Skip to content

Commit 24f492a

Browse files
Merge pull request #38 from KonsumGandalf/sim-35
Refactor: Change base path
2 parents c254e0d + 7bdef77 commit 24f492a

File tree

49 files changed

+386
-194
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+386
-194
lines changed

.dockerignore

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,5 @@ yarn-error.log
1919
.dockerignore
2020
docker-compose.yml
2121

22-
# Ignore Json files
23-
./src/assets/leaflet/region-map.json
24-
./src/assets/leaflet/street-map.json
22+
# Ignore Grid Json files
23+
/src/assets/maplibre

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,6 @@ Thumbs.db
4444
.nx/workspace-data
4545

4646
.angular
47+
48+
# Ignore Grid Json files
49+
/src/assets/maplibre

k6s/backend-test.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,18 @@ import { sleep, check } from 'k6';
33

44
export const options = {
55
vus: 5,
6-
duration: '40s',
6+
duration: '20s',
77
};
88

99
export default function () {
10-
let res = http.get('http://konsumpi:8081/api/streets/grid?lat=52.523232122212534&lng=13.47329869&zoom=9&year=2024');
11-
res = http.get('http://konsumpi:8081/api/safety-metrics/simra-regions/Berlin-Potsdam');
12-
res = http.get('http://konsumpi:8081/api/safety-metrics/streets?size=20&minNumberOfRides=2&page=0&weekDay=ALL_WEEK&trafficTime=ALL_DAY&year=2000&sort=dangerousScore,DESC');
10+
// let res = http.get('http://konsumpi:8081/api/streets/grid?lat=52.523232122212534&lng=13.47329869&zoom=9&year=2024');
11+
// res = http.get('http://konsumpi:8081/api/safety-metrics/simra-regions/Berlin-Potsdam');
12+
const res = http.get('http://konsumpi:8081/api/safety-metrics/streets-grid?weekDay=ALL_WEEK&year=2000&trafficTime=ALL_DAY');
1313
// res = http.get('http://konsumpi:8081/api/safety-metrics/regions?size=20&minNumberOfRides=100&page=0&weekDay=ALL_WEEK&trafficTime=ALL_DAY&year=2000&sort=dangerousScore,DESC');
1414

1515
check(res, {
16-
'Status ist 200': (r) => r.status === 200,
1716
'Antwortzeit < 300': (r) => r.timings.duration < 300,
17+
'Status ist 200': (r) => r.status === 200,
1818
});
19+
1920
}

k6s/frontend-test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ import http from 'k6/http';
22
import { sleep, check } from 'k6';
33

44
export const options = {
5-
vus: 10,
5+
vus: 100,
66
duration: '30s',
77
};
88

99
export default function () {
10-
const res = http.get('https://konsumpi:8081/streets/map?lat=52.522&lng=13.413&zoom=14');
10+
const res = http.get('http://konsumpi:4200/streets/map');
1111

1212
check(res, {
1313
'Status ist 200': (r) => r.status === 200,
Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,20 @@
11
/**
22
* Types of cycleway lanes
33
* @see https://wiki.openstreetmap.org/wiki/Key:cycleway:lane
4+
* @see https://wiki.openstreetmap.org/wiki/Key:cycleway:right
45
*/
56
export enum ECyclewayType {
67
ADVISORY = 'advisory',
78
EXCLUSIVE = 'exclusive',
89
PICTOGRAM = 'pictogram',
9-
NO = 'no'
10+
11+
SHARED_LANE = 'shared_lane',
12+
LANE = 'lane',
13+
TRACK = 'track',
14+
SHARED_BUSWAY = 'shared_busway',
15+
SEPARATE = 'separate',
16+
17+
NO = 'no',
18+
19+
UNKNOWN = 'unknown'
1020
}

libs/common/models/src/lib/enums/street-parking.enum.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@ export enum EParking {
1010
SHOULDER = 'shoulder',
1111
SEPARATE = 'separate',
1212
NO = 'no',
13+
YES = 'yes',
1314
}

libs/common/ui/components/assets/i18n/de.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
"MORNING_RUSH_HOUR": "Beinhaltet Stunden zwischen 7:30 und 9:59 Uhr",
5656
"MID_DAY": "Beinhaltet Stunden zwischen 10:00 und 15:29 Uhr",
5757
"EVENING_RUSH_HOUR": "Beinhaltet Stunden zwischen 15:30 und 18:59 Uhr",
58-
"EVENING_NIGHT_MORNING": "Beinhaltet Stunden zwischen 19:00 und 5:59 Uhr"
58+
"EVENING_NIGHT_MORNING": "Beinhaltet Stunden zwischen 19:00 und 7:29 Uhr"
5959
}
6060
},
6161
"YEAR": {
@@ -66,9 +66,7 @@
6666
}
6767
}
6868
},
69-
"ATOMS": {
70-
71-
},
69+
"ATOMS": {},
7270
"MOLECULES": {
7371
"DANGEROUS_SCORE_BAR": {
7472
"BAR_LABEL": {

libs/common/ui/components/assets/i18n/en.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@
9999
"MORNING_RUSH_HOUR": "Includes hours between 7:30 and 9:59",
100100
"MID_DAY": "Includes hours between 10:00 and 15:29",
101101
"EVENING_RUSH_HOUR": "Includes hours between 15:30 and 18:59",
102-
"EVENING_NIGHT_MORNING": "Includes hours between 19:00 and 5:59"
102+
"EVENING_NIGHT_MORNING": "Includes hours between 19:00 and 7:29"
103103
}
104104
},
105105
"STREET_PARKING": {
@@ -125,8 +125,8 @@
125125
"MOLECULES": {
126126
"DANGEROUS_SCORE_BAR": {
127127
"BAR_LABEL": {
128-
"LOW_RISK": "High Risk",
129-
"HIGH_RISK": "Low Risk"
128+
"LOW_RISK": "Low Risk",
129+
"HIGH_RISK": "High Risk"
130130
}
131131
},
132132
"SAFETY_METRICS_DIGIT_PANEL": {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
<div pTooltip="{{'STREETS.EXPLORER.GENERAL.TABLE.HEADER.COLUMNS.SCORE' | translate}}: {{color() | rangePipe}}"></div>
1+
<div pTooltip="Score: {{color() | rangePipe}}"></div>
22

libs/common/ui/components/src/lib/atoms/color-block/component/color-block.component.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { ChangeDetectionStrategy, Component, HostBinding, input, ViewEncapsulation } from '@angular/core';
22
import { CommonModule } from '@angular/common';
3-
import { TranslatePipe } from '@ngx-translate/core';
43
import { EDangerousColors } from '@simra/common-models';
54
import { Tooltip } from 'primeng/tooltip';
65
import { RangePipe } from '../pipes/range.pipe';
@@ -10,7 +9,7 @@ import { RangePipe } from '../pipes/range.pipe';
109
*/
1110
@Component({
1211
selector: 'a-color-block',
13-
imports: [CommonModule, RangePipe, Tooltip, TranslatePipe],
12+
imports: [CommonModule, RangePipe, Tooltip],
1413
templateUrl: './color-block.component.html',
1514
styleUrl: './color-block.component.scss',
1615
changeDetection: ChangeDetectionStrategy.OnPush,

0 commit comments

Comments
 (0)