From cf175acaa4173e33dc2a939f197ce722c68ddb35 Mon Sep 17 00:00:00 2001 From: Igor Kulikov Date: Wed, 26 Feb 2020 12:36:34 +0200 Subject: [PATCH] Propagate UI changes. --- .../widget/legend-config-panel.component.ts | 15 +---- .../components/widget/legend.component.html | 64 +++++++++++++++---- .../components/widget/legend.component.scss | 21 +++++- .../components/widget/widget.component.scss | 1 + 4 files changed, 73 insertions(+), 28 deletions(-) diff --git a/ui-ngx/src/app/modules/home/components/widget/legend-config-panel.component.ts b/ui-ngx/src/app/modules/home/components/widget/legend-config-panel.component.ts index f2a6463a04..a96d1bab9c 100644 --- a/ui-ngx/src/app/modules/home/components/widget/legend-config-panel.component.ts +++ b/ui-ngx/src/app/modules/home/components/widget/legend-config-panel.component.ts @@ -91,22 +91,9 @@ export class LegendConfigPanelComponent extends PageComponent implements OnInit } this.legendConfigForm.patchValue( { - position, - showMin: false, - showMax: false, - showAvg: false, - showTotal: false + position }, {emitEvent: false} ); - this.legendConfigForm.get('showMin').disable({emitEvent: false}); - this.legendConfigForm.get('showMax').disable({emitEvent: false}); - this.legendConfigForm.get('showAvg').disable({emitEvent: false}); - this.legendConfigForm.get('showTotal').disable({emitEvent: false}); - } else { - this.legendConfigForm.get('showMin').enable({emitEvent: false}); - this.legendConfigForm.get('showMax').enable({emitEvent: false}); - this.legendConfigForm.get('showAvg').enable({emitEvent: false}); - this.legendConfigForm.get('showTotal').enable({emitEvent: false}); } } diff --git a/ui-ngx/src/app/modules/home/components/widget/legend.component.html b/ui-ngx/src/app/modules/home/components/widget/legend.component.html index 96e6438711..3d0eda2856 100644 --- a/ui-ngx/src/app/modules/home/components/widget/legend.component.html +++ b/ui-ngx/src/app/modules/home/components/widget/legend.component.html @@ -15,7 +15,8 @@ limitations under the License. --> - +
@@ -26,17 +27,54 @@ - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
- {{ legendKey.dataKey.label }} - {{ legendData.data[legendKey.dataIndex].min }}{{ legendData.data[legendKey.dataIndex].max }}{{ legendData.data[legendKey.dataIndex].avg }}{{ legendData.data[legendKey.dataIndex].total }}
+ {{ legendKey.dataKey.label }} + {{ legendData.data[legendKey.dataIndex].min }}{{ legendData.data[legendKey.dataIndex].max }}{{ legendData.data[legendKey.dataIndex].avg }}{{ legendData.data[legendKey.dataIndex].total }}
+ + + {{ legendKey.dataKey.label }} + +
{{ 'legend.min' | translate }} + {{ legendData.data[legendKey.dataIndex].min }} +
{{ 'legend.max' | translate }} + {{ legendData.data[legendKey.dataIndex].max }} +
{{ 'legend.avg' | translate }} + {{ legendData.data[legendKey.dataIndex].avg }} +
{{ 'legend.total' | translate }} + {{ legendData.data[legendKey.dataIndex].total }} +
diff --git a/ui-ngx/src/app/modules/home/components/widget/legend.component.scss b/ui-ngx/src/app/modules/home/components/widget/legend.component.scss index 55815d400b..3df8afb224 100644 --- a/ui-ngx/src/app/modules/home/components/widget/legend.component.scss +++ b/ui-ngx/src/app/modules/home/components/widget/legend.component.scss @@ -15,9 +15,17 @@ */ :host { table.tb-legend { - width: 100%; font-size: 12px; + &.tb-legend-column { + width: 100%; + } + + &.tb-legend-row { + width: auto; + margin-left: auto; + } + .tb-legend-header, .tb-legend-value { text-align: right; @@ -42,6 +50,15 @@ white-space: nowrap; } + .tb-legend-type { + min-width: 50px; + padding: 0 10px 1px 0; + font-weight: 700; + color: rgb(255, 110, 64); + text-align: right; + white-space: nowrap; + } + .tb-legend-line { display: inline-block; width: 15px; @@ -50,7 +67,9 @@ } .tb-legend-label { + padding: 2px 10px; text-align: left; + white-space: nowrap; outline: none; &.tb-horizontal { diff --git a/ui-ngx/src/app/modules/home/components/widget/widget.component.scss b/ui-ngx/src/app/modules/home/components/widget/widget.component.scss index 1b8e3e52e5..09053af87f 100644 --- a/ui-ngx/src/app/modules/home/components/widget/widget.component.scss +++ b/ui-ngx/src/app/modules/home/components/widget/widget.component.scss @@ -46,5 +46,6 @@ #widget-container { min-height: 0; + min-width: 0; } }