From dd601efeadc0322eb91143bb91b2f8dc8175e1ba Mon Sep 17 00:00:00 2001 From: Guilhermo Pazuch <1490938+gpazuch@users.noreply.github.com> Date: Tue, 20 Dec 2022 15:05:13 -0300 Subject: [PATCH] fix(ui): #1589 dataset must not allow agent group editing (#2103) --- .../datasets/dataset-from/dataset-from.component.html | 9 ++++++++- .../datasets/dataset-from/dataset-from.component.ts | 8 ++++---- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/ui/src/app/pages/datasets/dataset-from/dataset-from.component.html b/ui/src/app/pages/datasets/dataset-from/dataset-from.component.html index e384461f8..4093d150e 100644 --- a/ui/src/app/pages/datasets/dataset-from/dataset-from.component.html +++ b/ui/src/app/pages/datasets/dataset-from/dataset-from.component.html @@ -16,7 +16,14 @@
- + +
+ + * +
+ +
+
* diff --git a/ui/src/app/pages/datasets/dataset-from/dataset-from.component.ts b/ui/src/app/pages/datasets/dataset-from/dataset-from.component.ts index b4f555dd3..6628e0a2c 100644 --- a/ui/src/app/pages/datasets/dataset-from/dataset-from.component.ts +++ b/ui/src/app/pages/datasets/dataset-from/dataset-from.component.ts @@ -51,7 +51,7 @@ export class DatasetFromComponent implements OnInit { isEdit: boolean; selectedGroup: string; - + groupName: string; selectedPolicy: string; fetchedData: boolean; sinkIDs: string[]; @@ -78,6 +78,7 @@ export class DatasetFromComponent implements OnInit { private cdr: ChangeDetectorRef, ) { this.isEdit = false; + this.groupName = ''; this.availableAgentGroups = []; this.fetchedData = false; this.filteredAgentGroups$ = of(this.availableAgentGroups); @@ -165,11 +166,10 @@ export class DatasetFromComponent implements OnInit { const group = this.availableAgentGroups.filter( (agent) => agent.id === groupId, ); - let name; if (group.length > 0) { - name = group[0].name; + this.groupName = group[0].name; } - this.form.patchValue({ agent_group_name: name }); + this.form.patchValue({ agent_group_name: this.groupName }); this.cdr.markForCheck(); }