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