From 6fcbc4ebcdac00b581eb05d24ae86840002b2700 Mon Sep 17 00:00:00 2001 From: Frederik Christ Vestergaard Date: Tue, 14 Feb 2023 11:28:41 +0100 Subject: [PATCH 1/3] Made map component fill 100% in height, actual height now on pr-use-basis --- .../iot-device-detail-generic.component.html | 2 ++ .../iot-device-edit/iot-device-edit.component.html | 2 +- .../gateway-detail/gateway-detail.component.html | 4 +++- .../gateway/gateway-edit/gateway-edit.component.html | 4 ++-- .../gateway/gateway-list/gateway-list.component.html | 2 +- .../gateway/gateway-list/gateway-list.component.scss | 2 +- src/assets/scss/components/_boxes.scss | 12 ++++++++++-- src/assets/scss/components/_map.scss | 8 ++++---- 8 files changed, 24 insertions(+), 12 deletions(-) diff --git a/src/app/applications/iot-devices/iot-device-detail/iot-device-detail-generic/iot-device-detail-generic.component.html b/src/app/applications/iot-devices/iot-device-detail/iot-device-detail-generic/iot-device-detail-generic.component.html index 857cad21b..1cab2bc81 100644 --- a/src/app/applications/iot-devices/iot-device-detail/iot-device-detail-generic/iot-device-detail-generic.component.html +++ b/src/app/applications/iot-devices/iot-device-detail/iot-device-detail-generic/iot-device-detail-generic.component.html @@ -64,7 +64,9 @@

{{ 'IOTDEVICE.DETAIL' | translate }}

{{ 'IOTDEVICE.LOCATION' | translate }}

+
+

{{ 'IOTDEVICE.LONGITUDE' | translate }}{{longitude | number:'2.1-6'}}

diff --git a/src/app/applications/iot-devices/iot-device-edit/iot-device-edit.component.html b/src/app/applications/iot-devices/iot-device-edit/iot-device-edit.component.html index 972b1f4da..0a0ab24ca 100644 --- a/src/app/applications/iot-devices/iot-device-edit/iot-device-edit.component.html +++ b/src/app/applications/iot-devices/iot-device-edit/iot-device-edit.component.html @@ -64,7 +64,7 @@ [ngClass]="{'is-invalid' : formFailedSubmit && errorFields.includes('comment'), 'is-valid' : formFailedSubmit && !errorFields.includes('comment')}">
-
+
diff --git a/src/app/gateway/gateway-detail/gateway-detail.component.html b/src/app/gateway/gateway-detail/gateway-detail.component.html index 84430002a..70c208a73 100644 --- a/src/app/gateway/gateway-detail/gateway-detail.component.html +++ b/src/app/gateway/gateway-detail/gateway-detail.component.html @@ -20,7 +20,9 @@

{{ 'GATEWAY.DETAILS' | translate }}

{{ 'GATEWAY.LOCATION' | translate }}

- +
+ +

{{ 'GATEWAY.LONGITUDE' | translate }} diff --git a/src/app/gateway/gateway-edit/gateway-edit.component.html b/src/app/gateway/gateway-edit/gateway-edit.component.html index b8676b113..9dd722f01 100644 --- a/src/app/gateway/gateway-edit/gateway-edit.component.html +++ b/src/app/gateway/gateway-edit/gateway-edit.component.html @@ -33,7 +33,7 @@ [ngClass]="{'is-invalid' : formFailedSubmit && errorFields.includes('id'), 'is-valid' : formFailedSubmit && !errorFields.includes('id')}">

-
+
@@ -77,4 +77,4 @@
- \ No newline at end of file + diff --git a/src/app/gateway/gateway-list/gateway-list.component.html b/src/app/gateway/gateway-list/gateway-list.component.html index 4b7295c1e..994e996b9 100644 --- a/src/app/gateway/gateway-list/gateway-list.component.html +++ b/src/app/gateway/gateway-list/gateway-list.component.html @@ -16,7 +16,7 @@
-
+
diff --git a/src/app/gateway/gateway-list/gateway-list.component.scss b/src/app/gateway/gateway-list/gateway-list.component.scss index ce9186f29..abfe7181e 100644 --- a/src/app/gateway/gateway-list/gateway-list.component.scss +++ b/src/app/gateway/gateway-list/gateway-list.component.scss @@ -3,4 +3,4 @@ font-size: inherit; line-height: 3em; height: 3em; -} \ No newline at end of file +} diff --git a/src/assets/scss/components/_boxes.scss b/src/assets/scss/components/_boxes.scss index 6fbcebb59..f292929b8 100644 --- a/src/assets/scss/components/_boxes.scss +++ b/src/assets/scss/components/_boxes.scss @@ -35,11 +35,19 @@ .box{ width: 100%; @extend .p-3; - + &--info{ background-color: $color-bg-info; border: $info-border; border-radius: $border-radius-primary; @extend .mb-5; } -} \ No newline at end of file +} + +.sixty-height{ + height: 60vh; +} + +.thirty-height{ + height: 30vh +} diff --git a/src/assets/scss/components/_map.scss b/src/assets/scss/components/_map.scss index 10b6878a1..4c1f69de2 100644 --- a/src/assets/scss/components/_map.scss +++ b/src/assets/scss/components/_map.scss @@ -1,13 +1,13 @@ .map-container { - height: 30vh; + height: 100%; } - + .map-frame { height: 100%; } - + .map { height: 100%; - } \ No newline at end of file + } From 970b4f32e582b30f1e173abadb342e73f9714263 Mon Sep 17 00:00:00 2001 From: Frederik Christ Vestergaard Date: Wed, 15 Feb 2023 14:47:22 +0100 Subject: [PATCH 2/3] Refresh gatewaylist every minute --- src/app/gateway/gateway-table/gateway-table.component.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/app/gateway/gateway-table/gateway-table.component.ts b/src/app/gateway/gateway-table/gateway-table.component.ts index e2098dae5..f5e05dd6c 100644 --- a/src/app/gateway/gateway-table/gateway-table.component.ts +++ b/src/app/gateway/gateway-table/gateway-table.component.ts @@ -43,7 +43,7 @@ export class GatewayTableComponent implements AfterViewInit { faExclamationTriangle = faExclamationTriangle; faCheckCircle = faCheckCircle; - + refetchIntervalId: NodeJS.Timeout; batteryStatusColor = 'green'; batteryStatusPercentage = 50; resultsLength = 0; @@ -67,10 +67,14 @@ export class GatewayTableComponent implements AfterViewInit { this.organizationId = x; this.refresh(); }); - + this.refetchIntervalId = setInterval(() => this.refresh(), 60 * 1000) this.refresh(); } + ngOnDestroy() { + clearInterval(this.refetchIntervalId) + } + private refresh() { this.getGateways().subscribe((data) => { data.result.forEach((gw) => { From edeacad5c80a81b01f9fb23b3398f043159cd0f9 Mon Sep 17 00:00:00 2001 From: Frederik Christ Vestergaard Date: Mon, 20 Feb 2023 08:31:53 +0100 Subject: [PATCH 3/3] Removed redundant 100% height div wrappers --- src/app/shared/components/map/map.component.html | 6 +----- src/assets/scss/components/_map.scss | 16 +++------------- 2 files changed, 4 insertions(+), 18 deletions(-) diff --git a/src/app/shared/components/map/map.component.html b/src/app/shared/components/map/map.component.html index 163c3a777..d08db03c5 100644 --- a/src/app/shared/components/map/map.component.html +++ b/src/app/shared/components/map/map.component.html @@ -1,5 +1 @@ -
-
-
-
-
\ No newline at end of file +
diff --git a/src/assets/scss/components/_map.scss b/src/assets/scss/components/_map.scss index 4c1f69de2..bfee708c5 100644 --- a/src/assets/scss/components/_map.scss +++ b/src/assets/scss/components/_map.scss @@ -1,13 +1,3 @@ - - -.map-container { - height: 100%; - } - - .map-frame { - height: 100%; - } - - .map { - height: 100%; - } +.map { + height: 100%; +}