diff --git a/dashboard/src/app/index.styl b/dashboard/src/app/index.styl index 453e5640ff1..e9598c8234f 100644 --- a/dashboard/src/app/index.styl +++ b/dashboard/src/app/index.styl @@ -101,6 +101,8 @@ md-option:hover .progress-line position absolute + left 0 + right 0 height 5px z-index 80 diff --git a/dashboard/src/app/workspaces/workspace-details/workspace-overview/workspace-details-overview.controller.ts b/dashboard/src/app/workspaces/workspace-details/workspace-overview/workspace-details-overview.controller.ts index 778b1eeeac5..ed82fef6d8d 100644 --- a/dashboard/src/app/workspaces/workspace-details/workspace-overview/workspace-details-overview.controller.ts +++ b/dashboard/src/app/workspaces/workspace-details/workspace-overview/workspace-details-overview.controller.ts @@ -52,8 +52,8 @@ export class WorkspaceDetailsOverviewController { * Default constructor that is using resource */ constructor($q: ng.IQService, $route: ng.route.IRouteService, $timeout: ng.ITimeoutService, $location: ng.ILocationService, - cheWorkspace: CheWorkspace, cheNotification: CheNotification, confirmDialogService: ConfirmDialogService, - namespaceSelectorSvc: NamespaceSelectorSvc, workspaceDetailsService: WorkspaceDetailsService) { + cheWorkspace: CheWorkspace, cheNotification: CheNotification, confirmDialogService: ConfirmDialogService, + namespaceSelectorSvc: NamespaceSelectorSvc, workspaceDetailsService: WorkspaceDetailsService) { this.$q = $q; this.$route = $route; this.$timeout = $timeout; @@ -109,13 +109,20 @@ export class WorkspaceDetailsOverviewController { fillInListOfUsedNames(): void { this.isLoading = true; const defer = this.$q.defer(); - this.namespaceId = this.namespaceSelectorSvc.getNamespaceId(); - if (this.namespaceId) { + let namespace = this.namespaceSelectorSvc.getNamespaceById(this.namespaceId); + if (namespace && namespace.label) { + this.namespaceSelectorSvc.onNamespaceChanged(namespace.label); defer.resolve(); } else { - this.namespaceSelectorSvc.fetchNamespaces().then((namespaceId: string) => { - this.namespaceId = namespaceId; - defer.resolve(); + this.namespaceSelectorSvc.fetchNamespaces().then(() => { + namespace = this.namespaceSelectorSvc.getNamespaceById(this.namespaceId); + if (namespace && namespace.label) { + this.namespaceSelectorSvc.onNamespaceChanged(namespace.label); + defer.resolve(); + } + // set default + this.namespaceId = this.namespaceSelectorSvc.getNamespaceId(); + defer.reject(); }, (error: any) => { defer.reject(error); }); diff --git a/dashboard/src/app/workspaces/workspace-details/workspace-overview/workspace-details-overview.html b/dashboard/src/app/workspaces/workspace-details/workspace-overview/workspace-details-overview.html index 4c8138d7d86..ba8ef0d8023 100644 --- a/dashboard/src/app/workspaces/workspace-details/workspace-overview/workspace-details-overview.html +++ b/dashboard/src/app/workspaces/workspace-details/workspace-overview/workspace-details-overview.html @@ -16,7 +16,6 @@ ng-pattern="/^[A-Za-z0-9_\-\.]+$/" custom-validator="workspaceDetailsOverviewController.isNameUnique($value)"> -
A name is required.
The name should not contain special characters like space, dollar, etc.
The name has to be less than 101 characters long.
The name has to be more than 3 characters long.