From 539390e6b54736857a3e4ff51831ee3e6b8f00ba Mon Sep 17 00:00:00 2001 From: Vladyslav_Prykhodko Date: Wed, 15 Jun 2022 16:21:00 +0300 Subject: [PATCH] UI: Improvement function validateDatasources added validation for required label in dataKey setting --- ui-ngx/src/app/core/services/utils.service.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ui-ngx/src/app/core/services/utils.service.ts b/ui-ngx/src/app/core/services/utils.service.ts index fcef76f612..b901b87328 100644 --- a/ui-ngx/src/app/core/services/utils.service.ts +++ b/ui-ngx/src/app/core/services/utils.service.ts @@ -284,6 +284,11 @@ export class UtilsService { if (!datasource.dataKeys) { datasource.dataKeys = []; } + datasource.dataKeys.forEach(dataKey => { + if (isUndefined(dataKey.label)) { + dataKey.label = dataKey.name; + } + }); }); return datasources; }