From 51320e159ed17d877f241d66f5f8313b8d6d1a45 Mon Sep 17 00:00:00 2001 From: Igor Kulikov Date: Mon, 14 Oct 2024 18:01:15 +0300 Subject: [PATCH] Flex layout replacements. Switch to tailwind.css. --- .../battery-level-basic-config.component.html | 8 +- ...uid-level-card-basic-config.component.html | 21 ++-- ...ignal-strength-basic-config.component.html | 23 ++-- .../status-widget-basic-config.component.html | 6 +- .../single-switch-basic-config.component.html | 42 +++---- .../rpc/slider-basic-config.component.html | 42 +++---- .../scada-symbol-basic-config.component.html | 6 +- ...peed-direction-basic-config.component.html | 22 ++-- .../embed-dashboard-dialog.component.html | 8 +- .../alarm/alarms-table-widget.component.html | 110 +++++++++--------- .../lib/display-columns-panel.component.html | 2 +- .../lib/edges-overview-widget.component.html | 8 +- .../widget/lib/flot-widget.component.html | 8 +- .../widget/lib/flot-widget.component.ts | 8 +- .../lib/json-input-widget.component.html | 11 +- .../lib/multiple-input-widget.component.html | 6 +- .../lib/photo-camera-input.component.html | 28 ++--- .../widget/lib/qrcode-widget.component.html | 4 +- .../timeseries-table-widget.component.html | 96 ++++++++------- 19 files changed, 233 insertions(+), 226 deletions(-) diff --git a/ui-ngx/src/app/modules/home/components/widget/config/basic/indicator/battery-level-basic-config.component.html b/ui-ngx/src/app/modules/home/components/widget/config/basic/indicator/battery-level-basic-config.component.html index f5a5693a63..ce0f79eda7 100644 --- a/ui-ngx/src/app/modules/home/components/widget/config/basic/indicator/battery-level-basic-config.component.html +++ b/ui-ngx/src/app/modules/home/components/widget/config/basic/indicator/battery-level-basic-config.component.html @@ -52,7 +52,7 @@ {{ 'widget-config.title' | translate }} -
+
@@ -71,11 +71,11 @@ {{ 'widgets.battery-level.icon' | translate }} -
+
- + {{ 'widgets.battery-level.value' | translate }} -
+
{{ 'widgets.battery-level.auto-scale' | translate }} diff --git a/ui-ngx/src/app/modules/home/components/widget/config/basic/indicator/liquid-level-card-basic-config.component.html b/ui-ngx/src/app/modules/home/components/widget/config/basic/indicator/liquid-level-card-basic-config.component.html index a3bfce9d5d..63da3f10fe 100644 --- a/ui-ngx/src/app/modules/home/components/widget/config/basic/indicator/liquid-level-card-basic-config.component.html +++ b/ui-ngx/src/app/modules/home/components/widget/config/basic/indicator/liquid-level-card-basic-config.component.html @@ -53,7 +53,7 @@ - +
-
+
widgets.liquid-level-card.shape
@@ -73,7 +73,7 @@
+
widgets.liquid-level-card.total-volume
@@ -186,7 +186,7 @@
-
+
widgets.liquid-level-card.total-volume-units
@@ -230,7 +230,7 @@ -
widget-config.decimals-suffix
+
widget-config.decimals-suffix
@@ -254,10 +254,9 @@ - + - + {{ 'widget-config.tooltip' | translate }} @@ -275,7 +274,7 @@ -
widget-config.decimals-suffix
+
widget-config.decimals-suffix
@@ -289,7 +288,7 @@ {{ 'widgets.value-card.date' | translate }}
- + diff --git a/ui-ngx/src/app/modules/home/components/widget/config/basic/indicator/signal-strength-basic-config.component.html b/ui-ngx/src/app/modules/home/components/widget/config/basic/indicator/signal-strength-basic-config.component.html index 0e8475aacf..edfb39e4ed 100644 --- a/ui-ngx/src/app/modules/home/components/widget/config/basic/indicator/signal-strength-basic-config.component.html +++ b/ui-ngx/src/app/modules/home/components/widget/config/basic/indicator/signal-strength-basic-config.component.html @@ -46,7 +46,7 @@ {{ 'widget-config.title' | translate }} -
+
@@ -65,12 +65,12 @@ {{ 'widgets.signal-strength.icon' | translate }} -
+
- + {{ 'widgets.signal-strength.date' | translate }} -
- +
+ @@ -113,10 +113,9 @@
- + - + {{ 'widget-config.tooltip' | translate }} @@ -126,12 +125,12 @@ {{ 'tooltip.value' | translate }} -
+
-
widget-config.decimals-suffix
+
widget-config.decimals-suffix
@@ -146,8 +145,8 @@ {{ 'tooltip.date' | translate }} -
- +
+ diff --git a/ui-ngx/src/app/modules/home/components/widget/config/basic/indicator/status-widget-basic-config.component.html b/ui-ngx/src/app/modules/home/components/widget/config/basic/indicator/status-widget-basic-config.component.html index e43dd1665a..d901901126 100644 --- a/ui-ngx/src/app/modules/home/components/widget/config/basic/indicator/status-widget-basic-config.component.html +++ b/ui-ngx/src/app/modules/home/components/widget/config/basic/indicator/status-widget-basic-config.component.html @@ -21,7 +21,7 @@
widgets.status-widget.behavior
widgets.rpc-state.initial-state
-
widgets.rpc-state.disabled-state
-
-
+
widget-config.card-style
diff --git a/ui-ngx/src/app/modules/home/components/widget/config/basic/rpc/single-switch-basic-config.component.html b/ui-ngx/src/app/modules/home/components/widget/config/basic/rpc/single-switch-basic-config.component.html index 9fa2d1b1a5..59cdfa56eb 100644 --- a/ui-ngx/src/app/modules/home/components/widget/config/basic/rpc/single-switch-basic-config.component.html +++ b/ui-ngx/src/app/modules/home/components/widget/config/basic/rpc/single-switch-basic-config.component.html @@ -21,7 +21,7 @@
widgets.single-switch.behavior
widgets.rpc-state.initial-state
-
widgets.rpc-state.turn-on
-
widgets.rpc-state.turn-off
-
widgets.rpc-state.disabled-state
- {{ 'widgets.single-switch.label' | translate }} -
+
@@ -103,11 +103,11 @@ {{ 'widgets.single-switch.icon' | translate }} -
+
- +
{{ 'widgets.single-switch.switch-color' | translate }}
-
-
+
+
widgets.single-switch.on
- -
+ +
widgets.single-switch.off
- -
+ +
widgets.single-switch.disabled
@@ -146,22 +146,22 @@
{{ 'widgets.single-switch.tumbler-color' | translate }}
-
-
+
+
widgets.single-switch.on
- -
+ +
widgets.single-switch.off
- -
+ +
widgets.single-switch.disabled
@@ -173,7 +173,7 @@ {{ 'widgets.single-switch.on-label' | translate }} -
+
@@ -190,7 +190,7 @@ {{ 'widgets.single-switch.off-label' | translate }} -
+
diff --git a/ui-ngx/src/app/modules/home/components/widget/config/basic/rpc/slider-basic-config.component.html b/ui-ngx/src/app/modules/home/components/widget/config/basic/rpc/slider-basic-config.component.html index 5dd62493ec..400ae2dc24 100644 --- a/ui-ngx/src/app/modules/home/components/widget/config/basic/rpc/slider-basic-config.component.html +++ b/ui-ngx/src/app/modules/home/components/widget/config/basic/rpc/slider-basic-config.component.html @@ -21,7 +21,7 @@
widgets.slider.behavior
widgets.slider.initial-value
-
widgets.slider.on-value-change
-
widgets.rpc-state.disabled-state
- {{ 'widget-config.title' | translate }} -
+
@@ -94,11 +94,11 @@ {{ 'widgets.slider.icon' | translate }} -
+
- + {{ 'widgets.slider.value' | translate }} -
+
-
widget-config.decimals-suffix
+
widget-config.decimals-suffix
@@ -131,7 +131,7 @@
{{ 'widgets.slider.range' | translate }}
-
+
widgets.slider.min
@@ -146,7 +146,7 @@ {{ 'widgets.slider.range-ticks' | translate }} -
+
@@ -160,7 +160,7 @@ {{ 'widgets.slider.tick-marks' | translate }} -
+
@@ -172,15 +172,15 @@
{{ 'widgets.slider.colors' | translate }}
-
-
+
+
widgets.slider.main
-
+
widgets.slider.background
@@ -190,15 +190,15 @@
{{ 'widgets.rpc-state.disabled-state' | translate }}
-
-
+
+
widgets.slider.main
-
+
widgets.slider.background
@@ -211,11 +211,11 @@
{{ 'widgets.slider.left-icon' | translate }}
-
+
- + @@ -230,11 +230,11 @@
{{ 'widgets.slider.right-icon' | translate }}
-
+
- + diff --git a/ui-ngx/src/app/modules/home/components/widget/config/basic/scada/scada-symbol-basic-config.component.html b/ui-ngx/src/app/modules/home/components/widget/config/basic/scada/scada-symbol-basic-config.component.html index e9c6f0967e..56a2e0b588 100644 --- a/ui-ngx/src/app/modules/home/components/widget/config/basic/scada/scada-symbol-basic-config.component.html +++ b/ui-ngx/src/app/modules/home/components/widget/config/basic/scada/scada-symbol-basic-config.component.html @@ -34,7 +34,7 @@ {{ 'widget-config.title' | translate }} -
+
@@ -53,11 +53,11 @@ {{ 'widget-config.card-icon' | translate }} -
+
- + widgets.wind-speed-direction.values
widgets.wind-speed-direction.wind-direction
-
- +
widgets.wind-speed-direction.center-value
-
- + {{ 'widget-config.title' | translate }} -
+
@@ -113,11 +113,11 @@ {{ 'widgets.wind-speed-direction.icon' | translate }} -
+
- +
{{ 'widgets.wind-speed-direction.major-ticks' | translate }}
-
- +
{{ 'widgets.wind-speed-direction.minor-ticks' | translate }}
-
- + -
+

{{title}}

- + @@ -26,11 +26,11 @@
-
+
-
+
- +  
- +
{{ translate.get('alarm.selected-alarms', {count: alarmsDatasource.selection.selected.length}) | async }} - +
-
+
@@ -78,16 +78,16 @@ - + {{ column.title }} - + @@ -120,60 +120,64 @@ - + + +
+
+
+
+
- -
- - - - -
-
- - + + +
- - -
+
+
+ + + + + + +
+
- - +
- {{ noDataDisplayMessageText }} - {{ 'common.loading' | translate }} + {{ noDataDisplayMessageText }} + {{ 'common.loading' | translate }}
-
+
diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/edges-overview-widget.component.html b/ui-ngx/src/app/modules/home/components/widget/lib/edges-overview-widget.component.html index abbf62f973..cc3cdcc01d 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/edges-overview-widget.component.html +++ b/ui-ngx/src/app/modules/home/components/widget/lib/edges-overview-widget.component.html @@ -16,10 +16,10 @@ -->
-
- {{ customerTitle }} - edge.widget-datasource-error -
+
+ {{ customerTitle }} + edge.widget-datasource-error +
diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/flot-widget.component.html b/ui-ngx/src/app/modules/home/components/widget/lib/flot-widget.component.html index 82ca0430cb..ebb7c6b5e1 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/flot-widget.component.html +++ b/ui-ngx/src/app/modules/home/components/widget/lib/flot-widget.component.html @@ -15,16 +15,16 @@ limitations under the License. --> -
+
-
+
diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/flot-widget.component.ts b/ui-ngx/src/app/modules/home/components/widget/lib/flot-widget.component.ts index 389deee749..ec40f4b069 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/flot-widget.component.ts +++ b/ui-ngx/src/app/modules/home/components/widget/lib/flot-widget.component.ts @@ -46,7 +46,7 @@ export class FlotWidgetComponent implements OnInit { legendConfig: LegendConfig; legendData: LegendData; isLegendFirst: boolean; - legendContainerLayoutType: string; + legendContainerLayoutType: 'flex-row' | 'flex-col'; legendStyle: {[klass: string]: any}; public settings: TbFlotSettings; @@ -70,7 +70,7 @@ export class FlotWidgetComponent implements OnInit { this.displayLegend = isDefinedAndNotNull(this.settings.showLegend) ? this.settings.showLegend : false; - this.legendContainerLayoutType = 'column'; + this.legendContainerLayoutType = 'flex-col'; if (this.displayLegend) { this.legendConfig = this.settings.legendConfig || defaultLegendConfig(widgetType.timeseries); @@ -84,10 +84,10 @@ export class FlotWidgetComponent implements OnInit { } if (this.legendConfig.position === LegendPosition.top || this.legendConfig.position === LegendPosition.bottom) { - this.legendContainerLayoutType = 'column'; + this.legendContainerLayoutType = 'flex-col'; this.isLegendFirst = this.legendConfig.position === LegendPosition.top; } else { - this.legendContainerLayoutType = 'row'; + this.legendContainerLayoutType = 'flex-row'; this.isLegendFirst = this.legendConfig.position === LegendPosition.left; } switch (this.legendConfig.position) { diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/json-input-widget.component.html b/ui-ngx/src/app/modules/home/components/widget/lib/json-input-widget.component.html index b24ad37ede..1b354c09fd 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/json-input-widget.component.html +++ b/ui-ngx/src/app/modules/home/components/widget/lib/json-input-widget.component.html @@ -17,12 +17,11 @@ -->
-
-
+
+
-
+
-
-
+
+
-
-
+
+
@@ -40,21 +40,21 @@ -
+
-
+
preview photo -
-
+
+
-
+
diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/qrcode-widget.component.html b/ui-ngx/src/app/modules/home/components/widget/lib/qrcode-widget.component.html index d60b36a5dc..66981fc62f 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/qrcode-widget.component.html +++ b/ui-ngx/src/app/modules/home/components/widget/lib/qrcode-widget.component.html @@ -15,8 +15,8 @@ limitations under the License. --> -
- +
+
entity.no-data
widgets.invalid-qr-code-text
diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/timeseries-table-widget.component.html b/ui-ngx/src/app/modules/home/components/widget/lib/timeseries-table-widget.component.html index 98d1090f4d..06ad7e4144 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/timeseries-table-widget.component.html +++ b/ui-ngx/src/app/modules/home/components/widget/lib/timeseries-table-widget.component.html @@ -16,15 +16,15 @@ -->
-
- +
+
- +  
- -
+
Timestamp + [style]="cellStyle(source, null, 0, row, row[0], rowIndex)"> {{ h.dataKey.label }} + [style]="cellStyle(source, h, h.index, row, row[h.index], rowIndex)"> - + + +
+
+
+
+
- -
- - - - -
-
- - + + +
- - -
+
+
+ + + + + + +
+
-
- {{ noDataDisplayMessageText }} + {{ noDataDisplayMessageText }}