提交 14211825 编写于 作者: P Piotr Bryk

Merge pull request #167 from taimir/create_namespace_bugfix

Create namespace dialog bugfix (production)
...@@ -48,17 +48,22 @@ export default class NamespaceDialogController { ...@@ -48,17 +48,22 @@ export default class NamespaceDialogController {
/** /**
* Returns true if new namespace name hasn't been filled by the user, i.e, is empty. * Returns true if new namespace name hasn't been filled by the user, i.e, is empty.
* @return {boolean} * @return {boolean}
* @export
*/ */
isDisabled() { isDisabled() {
return !this.namespace || /^\s*$/.test(!this.namespace) || return !this.namespace || /^\s*$/.test(!this.namespace) ||
this.namespaces.indexOf(this.namespace) >= 0; this.namespaces.indexOf(this.namespace) >= 0;
} }
/** Cancels the new namespace form. */ /**
* Cancels the new namespace form.
* @export
*/
cancel() { this.mdDialog_.cancel(); } cancel() { this.mdDialog_.cancel(); }
/** /**
* Creates new namespace based on the state of the controller. * Creates new namespace based on the state of the controller.
* @export
*/ */
createNamespace() { createNamespace() {
/** @type {!backendApi.NamespaceSpec} */ /** @type {!backendApi.NamespaceSpec} */
......
...@@ -28,7 +28,7 @@ export default function showNamespaceDialog(mdDialog, event, namespaces) { ...@@ -28,7 +28,7 @@ export default function showNamespaceDialog(mdDialog, event, namespaces) {
controllerAs: 'ctrl', controllerAs: 'ctrl',
clickOutsideToClose: true, clickOutsideToClose: true,
targetEvent: event, targetEvent: event,
templateUrl: '/deploy/createnamespace.html', templateUrl: 'deploy/createnamespace.html',
locals: { locals: {
namespaces: namespaces, namespaces: namespaces,
}, },
......
...@@ -80,7 +80,6 @@ export default class DeployController { ...@@ -80,7 +80,6 @@ export default class DeployController {
/** /**
* Notifies the child scopes to call their deploy methods. * Notifies the child scopes to call their deploy methods.
*
* @export * @export
*/ */
deployBySelection() { deployBySelection() {
...@@ -90,8 +89,8 @@ export default class DeployController { ...@@ -90,8 +89,8 @@ export default class DeployController {
/** /**
* Displays new namespace creation dialog. * Displays new namespace creation dialog.
*
* @param {!angular.Scope.Event} event * @param {!angular.Scope.Event} event
* @export
*/ */
handleNamespaceDialog(event) { handleNamespaceDialog(event) {
showNamespaceDialog(this.mdDialog_, event, this.namespaces) showNamespaceDialog(this.mdDialog_, event, this.namespaces)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册