From f914a52cb02c45313099672a090a748dde6eceed Mon Sep 17 00:00:00 2001 From: sunqi310 Date: Fri, 30 Sep 2016 10:56:25 +0800 Subject: Modify the UI of Vim and vnfm manager Change-Id: I80ba1645a45775e10bb62840b532eea988904cee Signed-off-by: sunqi310 --- .../src/main/webapp/extsys/vim/js/vimController.js | 37 ++++++++++++++++------ .../src/main/webapp/extsys/vim/vimView.html | 34 ++++++++++---------- .../vnfm/i18n/nfv-nso-iui-i18n-en-US.properties | 1 + .../vnfm/i18n/nfv-nso-iui-i18n-zh-CN.properties | 1 + .../main/webapp/extsys/vnfm/js/vnfmController.js | 15 +++++++-- .../src/main/webapp/extsys/vnfm/js/vnfmUtil.js | 1 + .../src/main/webapp/extsys/vnfm/vnfmView.html | 2 +- 7 files changed, 60 insertions(+), 31 deletions(-) (limited to 'openo-portal/portal-extsys') diff --git a/openo-portal/portal-extsys/src/main/webapp/extsys/vim/js/vimController.js b/openo-portal/portal-extsys/src/main/webapp/extsys/vim/js/vimController.js index 06479d49..96e23a0d 100644 --- a/openo-portal/portal-extsys/src/main/webapp/extsys/vim/js/vimController.js +++ b/openo-portal/portal-extsys/src/main/webapp/extsys/vim/js/vimController.js @@ -87,6 +87,8 @@ var vm = avalon vimId: "", vimName: "", domain: '', + domainVisable:true, + vimNameModify:false, userName: "", tenant: "", password: "", @@ -102,10 +104,12 @@ var vm = avalon if (vm.action.ADD == action) { vm.addVim.vimId = ""; vm.addVim.vimName = ""; + vm.addVim.vimNameModify=false; vm.addVim.userName = ""; vm.addVim.password = ""; vm.addVim.url = ""; vm.addVim.domain = ""; + vm.addVim.domainVisable = true; vm.addVim.description = ""; vm.addVim.tenant = ""; vm.addVim.vendor = ""; @@ -116,12 +120,14 @@ var vm = avalon } else { vm.addVim.vimId = el.vimId; vm.addVim.vimName = el.name; + vm.addVim.vimNameModify=true; vm.addVim.url = el.url; vm.addVim.description = el.description; vm.addVim.userName = el.userName; vm.addVim.password = el.password; vm.addVim.tenant = el.tenant; vm.addVim.domain = el.domain; + vm.addVim.domainVisable=vm.$getdomainVisable(el.type); vm.addVim.saveType = "update"; vm.addVim.titleName = $.i18n.prop('com_zte_ums_eco_roc_vim_modify_info'); vm.addVim.vimType = el.type; @@ -148,16 +154,14 @@ var vm = avalon } vm.executeWait.visible = true; vm.executeError.visible = false; - if (vm.addVim.saveType == "add") { - /* - for( var i = 0; i < vm.vimInfo.length; i ++ ){ - if(vm.addVim.url == vm.vimInfo[i].url){ - resUtil.growl($.i18n.prop("com_zte_ums_eco_roc_vim_growl_msg_title") + 'already exists',"info"); - $('#addVimDlg').modal('hide'); - return; - } - } - */ + if (vm.addVim.saveType == "add") { + for( var i = 0; i < vm.vimInfo.length; i ++ ){ + if(vm.addVim.name == vm.vimInfo[i].name){ + resUtil.growl($.i18n.prop("com_zte_ums_eco_roc_vim_growl_msg_title") + ' already exists',"info"); + $('#addVimDlg').modal('hide'); + return; + } + } vm.persistVim(); } else if (vm.addVim.saveType == "update") { vm.updateVim(); @@ -292,7 +296,20 @@ var vm = avalon }, gotoChartPage: function (oid, name, tenant) { window.location.href = "vimChart.html?" + oid + "&" + name + "&" + tenant; + }, + $getdomainVisable:function(vimType){ + if ("openstack"==vimType){ + return true; + }else{ + return false; + } + + }, + vimTypeRendered:function(){ + vm.addVim.domainVisable=vm.$getdomainVisable(vm.addVim.vimType); } + + }); avalon.scan(); vm.$initTable(); diff --git a/openo-portal/portal-extsys/src/main/webapp/extsys/vim/vimView.html b/openo-portal/portal-extsys/src/main/webapp/extsys/vim/vimView.html index 726883ff..28518381 100644 --- a/openo-portal/portal-extsys/src/main/webapp/extsys/vim/vimView.html +++ b/openo-portal/portal-extsys/src/main/webapp/extsys/vim/vimView.html @@ -63,7 +63,21 @@ *
- + + +
+ +
+ +
+
@@ -138,7 +152,7 @@ -
+
-
-
- -
- - -
-
+
- +
-- cgit 1.2.3-korg