From 6d91a0d66e43097cec01deb1e8715a651a365db0 Mon Sep 17 00:00:00 2001 From: Qian Deng Date: Wed, 15 Aug 2018 18:10:08 +0800 Subject: [PATCH] Fix Group related issues 1. Fix Ldap group name to required item 2. Edit Group DN is not allowed Signed-off-by: Qian Deng --- .../add-group-modal.component.html | 15 ++++++++++++--- .../add-group-modal/add-group-modal.component.ts | 4 ++++ src/ui_ng/src/i18n/lang/en-us-lang.json | 2 +- src/ui_ng/src/i18n/lang/es-es-lang.json | 2 +- src/ui_ng/src/i18n/lang/fr-fr-lang.json | 2 +- 5 files changed, 19 insertions(+), 6 deletions(-) diff --git a/src/ui_ng/src/app/group/add-group-modal/add-group-modal.component.html b/src/ui_ng/src/app/group/add-group-modal/add-group-modal.component.html index d883b74bb..3f3c778c8 100644 --- a/src/ui_ng/src/app/group/add-group-modal/add-group-modal.component.html +++ b/src/ui_ng/src/app/group/add-group-modal/add-group-modal.component.html @@ -14,6 +14,7 @@ [class.invalid]="isDNInvalid"> @@ -26,11 +27,19 @@
- -
diff --git a/src/ui_ng/src/app/group/add-group-modal/add-group-modal.component.ts b/src/ui_ng/src/app/group/add-group-modal/add-group-modal.component.ts index b6660c6dd..c6937cfe2 100644 --- a/src/ui_ng/src/app/group/add-group-modal/add-group-modal.component.ts +++ b/src/ui_ng/src/app/group/add-group-modal/add-group-modal.component.ts @@ -45,6 +45,10 @@ export class AddGroupModalComponent implements OnInit, OnDestroy { let dnControl = this.groupForm.controls['ldap_group_dn']; return dnControl && dnControl.invalid && (dnControl.dirty || dnControl.touched); } + public get isNameInvalid(): boolean { + let dnControl = this.groupForm.controls['group_name']; + return dnControl && dnControl.invalid && (dnControl.dirty || dnControl.touched); + } public get isFormValid(): boolean { return this.groupForm.valid; diff --git a/src/ui_ng/src/i18n/lang/en-us-lang.json b/src/ui_ng/src/i18n/lang/en-us-lang.json index e3af91e5e..337cf00b1 100644 --- a/src/ui_ng/src/i18n/lang/en-us-lang.json +++ b/src/ui_ng/src/i18n/lang/en-us-lang.json @@ -487,7 +487,7 @@ "MAINTAINERS": "Maintainers", "PULLS": "Pull Count", "VERSION": "Version", - "APP_VERSION": "App Version", + "APP_VERSION": "Application Version", "INSTALL": "Install", "INSTALL_CHART": "Install Chart", "NAME": "Name", diff --git a/src/ui_ng/src/i18n/lang/es-es-lang.json b/src/ui_ng/src/i18n/lang/es-es-lang.json index b53abb19f..617cb86a1 100644 --- a/src/ui_ng/src/i18n/lang/es-es-lang.json +++ b/src/ui_ng/src/i18n/lang/es-es-lang.json @@ -486,7 +486,7 @@ "MAINTAINERS": "Maintainers", "PULLS": "Pull Count", "VERSION": "Version", - "APP_VERSION": "App Version", + "APP_VERSION": "Application Version", "INSTALL": "Install", "INSTALL_CHART": "Install Chart", "NAME": "Name", diff --git a/src/ui_ng/src/i18n/lang/fr-fr-lang.json b/src/ui_ng/src/i18n/lang/fr-fr-lang.json index 69e803b9b..de8361bb9 100644 --- a/src/ui_ng/src/i18n/lang/fr-fr-lang.json +++ b/src/ui_ng/src/i18n/lang/fr-fr-lang.json @@ -462,7 +462,7 @@ "MAINTAINERS": "Maintainers", "PULLS": "Pull Count", "VERSION": "Version", - "APP_VERSION": "App Version", + "APP_VERSION": "Application Version", "INSTALL": "Install", "INSTALL_CHART": "Install Chart", "NAME": "Name",