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 }} + | +||||