diff options
author | sunqi310 <sun.qi310@zte.com.cn> | 2016-09-27 14:52:26 +0800 |
---|---|---|
committer | sunqi310 <sun.qi310@zte.com.cn> | 2016-09-27 14:52:26 +0800 |
commit | b7be4ada90f9cbd9648ab888fdbb5b09766dd60e (patch) | |
tree | 71cd2dd7065301746b43d99a6bddad54e7870943 /openo-portal | |
parent | b3245afe1f3c21af64e2e4e8e3002301e783c01b (diff) |
TOSCA-85 Resolve the problem that the value of the version attribute can not show when modify vim information
Change-Id: I63182f2cf0475a71d271cc66eb40733fcdb266f6
Issue-id:TOSCA-85
Signed-off-by: sunqi310 <sun.qi310@zte.com.cn>
Diffstat (limited to 'openo-portal')
8 files changed, 31 insertions, 30 deletions
diff --git a/openo-portal/portal-extsys/src/main/webapp/extsys/vim/i18n/loadi18nApp.js b/openo-portal/portal-extsys/src/main/webapp/extsys/vim/i18n/loadi18nApp.js index e37a0489..bd964684 100644 --- a/openo-portal/portal-extsys/src/main/webapp/extsys/vim/i18n/loadi18nApp.js +++ b/openo-portal/portal-extsys/src/main/webapp/extsys/vim/i18n/loadi18nApp.js @@ -17,15 +17,14 @@ function loadPropertiesSideMenu(lang, propertiesFileNamePrefix, propertiesFilePa jQuery.i18n.properties({
language: lang,
name: propertiesFileNamePrefix,
- path: propertiesFilePath, // 资源文件路径
- mode: 'map', // 用 Map 的方式使用资源文件中的值
- callback: function () {// 加载成功后设置显示内容
+ path: propertiesFilePath, // resource path
+ mode: 'map',
+ callback: function () {
var i18nItems = $('[name_i18n=com_zte_conductor_ui_i18n]');
for (var i = 0; i < i18nItems.length; i++) {
var $item = $(i18nItems.eq(i));
var itemId = $item.attr('id_i18n');
- var itemTitle = $item.attr('title');
- /** id存在时元素内容需要国际化,title存在时元素title需要国际化 */
+ var itemTitle = $item.attr('title');
if (typeof($item.attr("title")) == "string") {
$item.attr("title", ($.i18n.prop(itemTitle)));
}
diff --git a/openo-portal/portal-extsys/src/main/webapp/extsys/vim/i18n/roc-vim-iui-i18n-en-US.properties b/openo-portal/portal-extsys/src/main/webapp/extsys/vim/i18n/roc-vim-iui-i18n-en-US.properties index 8a7e6379..70d2225f 100644 --- a/openo-portal/portal-extsys/src/main/webapp/extsys/vim/i18n/roc-vim-iui-i18n-en-US.properties +++ b/openo-portal/portal-extsys/src/main/webapp/extsys/vim/i18n/roc-vim-iui-i18n-en-US.properties @@ -35,8 +35,8 @@ com_zte_ums_eco_roc_vim_total=Total com_zte_ums_eco_roc_vim_metric=vims
com_zte_ums_eco_roc_vim_register_info=Register
com_zte_ums_eco_roc_vim_modify_info=Modify
-com_zte_ums_eco_roc_vim_domain=domain
-com_zte_ums_eco_roc_vim_description=description
+com_zte_ums_eco_roc_vim_domain=Domain
+com_zte_ums_eco_roc_vim_description=Description
############## js ######################
com_zte_ums_eco_roc_vim_auth_url_require_message=please input auth url
com_zte_ums_eco_roc_vim_auth_url_alarm_message=example: http://xx.xx.xx.xx:5000/v2.0
diff --git a/openo-portal/portal-extsys/src/main/webapp/extsys/vim/js/vimChart.js b/openo-portal/portal-extsys/src/main/webapp/extsys/vim/js/vimChart.js index 0a2b097a..255d39aa 100644 --- a/openo-portal/portal-extsys/src/main/webapp/extsys/vim/js/vimChart.js +++ b/openo-portal/portal-extsys/src/main/webapp/extsys/vim/js/vimChart.js @@ -23,8 +23,7 @@ var labelTop = { position: 'outer',
formatter: function (params) {
var total = params.series.data[1].value + params.series.data[0].value;
- var util = params.series.data[0].util;
- // return total+util+"中的"+"\n"+params.value+util+"已使用" ;
+ var util = params.series.data[0].util;
return $.i18n.prop('com_zte_ums_eco_roc_vim_resource_chart_used') + params.value + util + "\n" +
$.i18n.prop('com_zte_ums_eco_roc_vim_resource_chart_total') + total + util;
},
@@ -175,7 +174,7 @@ vimChart.vimPieChart = function (data) { };
- // 为echarts对象加载数据
+
vimPieChart.hideLoading();
vimPieChart.setOption(option);
window.onresize = vimPieChart.resize;
@@ -411,7 +410,7 @@ vimChart.tenantPieChart = function (data) { };
- // 为echarts对象加载数据
+
tenantPieChart.hideLoading();
tenantPieChart.setOption(option);
window.onresize = tenantPieChart.resize;
diff --git a/openo-portal/portal-extsys/src/main/webapp/extsys/vim/js/vimChartController.js b/openo-portal/portal-extsys/src/main/webapp/extsys/vim/js/vimChartController.js index 17f8e050..dc9f3ad1 100644 --- a/openo-portal/portal-extsys/src/main/webapp/extsys/vim/js/vimChartController.js +++ b/openo-portal/portal-extsys/src/main/webapp/extsys/vim/js/vimChartController.js @@ -33,7 +33,7 @@ var vm = avalon },
initChart: function () {
- //判断租户是否有admin权限
+ //has admin role
var tenantRoleUrl = vm.$tenantRoleUrl.replace("{vim_id}", vm.vimInfo.id);
$.ajax({
"type": 'get',
@@ -49,16 +49,16 @@ var vm = avalon complete: function () {
if (vm.vimInfo.isAdmin == true) {
- //获取全部资源使用情况
+ //get all resource
vm.vimChartLoad();
- //获取租户列表
+ //get tenant list
vm.vimListLoad();
}
}
});
- //获取租户资源使用情况
+ //get resource of tenant
vm.tenantChartLoad();
},
gotoVimPage: function () {
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 967eb1c6..dfeb5dd8 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 @@ -37,10 +37,10 @@ var vm = avalon },
isSave: true,
action: {ADD: 'add', UPDATE: 'update'},
- $queryVimInfoUrl: '../../openoapi/extsys/v1/vims',
- $addVimInfoUrl: '../../openoapi/extsys/v1/vims/',
- $updateVimInfoUrl: '../../openoapi/extsys/v1/vims/',
- $delVimInfoUrl: '../../openoapi/extsys/v1/vims/{vim_id}',
+ $queryVimInfoUrl: '/openoapi/extsys/v1/vims',
+ $addVimInfoUrl: '/openoapi/extsys/v1/vims/',
+ $updateVimInfoUrl: '/openoapi/extsys/v1/vims/',
+ $delVimInfoUrl: '/openoapi/extsys/v1/vims/{vim_id}',
$initTable: function () {
$.ajax({
"type": 'get',
@@ -94,7 +94,8 @@ var vm = avalon saveType: "add",
description: "",
vimType: "openstack",
- vendor: ""
+ vendor: "",
+ version: ""
},
$showVimTable: function (el, action) {
vm.isSave = false;
@@ -125,6 +126,7 @@ var vm = avalon vm.addVim.titleName = $.i18n.prop('com_zte_ums_eco_roc_vim_modify_info');
vm.addVim.vimType = el.type;
vm.addVim.vendor = el.vendor;
+ vm.addVim.version = el.version;
}
vm.executeError.visible = false;
vm.executeWait.visible = false;
@@ -146,8 +148,7 @@ var vm = avalon }
vm.executeWait.visible = true;
vm.executeError.visible = false;
- if (vm.addVim.saveType == "add") {
- //不能重复添加
+ if (vm.addVim.saveType == "add") {
/*
for( var i = 0; i < vm.vimInfo.length; i ++ ){
if(vm.addVim.url == vm.vimInfo[i].url){
@@ -162,7 +163,7 @@ var vm = avalon vm.updateVim();
}
},
- //新增vim
+ //add vim
persistVim: function () {
$.ajax({
type: "Post",
@@ -208,7 +209,7 @@ var vm = avalon }
});
},
- //更新vim
+ //update vim
updateVim: function () {
$.ajax({
type: "Put",
@@ -242,6 +243,8 @@ var vm = avalon vm.vimInfo[i].domain = vm.addVim.domain;
vm.vimInfo[i].description = vm.addVim.description;
vm.vimInfo[i].type = vm.addVim.vimType;
+ vm.vimInfo[i].version=vm.addVim.version;
+ vm.vimInfo[i].vendor=vm.addVim.vendor;
}
}
$('#addVimDlg').modal('hide');
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 5198724c..7bc55914 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 @@ -249,16 +249,16 @@ <script type="text/javascript" src="../../common/js/tools.js"></script>
<script type="text/javascript" src="../../common/thirdparty/jquery.i18n/jquery.i18n.properties-1.0.9.js"></script>
<script type="text/javascript" src="../../common/js/json2.js"></script>
-<script type="text/javascript" src="../../common/thirdparty/thirdparty/bootstrap/js/bootstrap.min.js"></script>
+<script type="text/javascript" src="../../common/thirdparty/bootstrap/js/bootstrap.min.js"></script>
<script type="text/javascript" src="../../common/thirdparty/jquery-validation/js/jquery.validate.js"></script>
<script type="text/javascript" src="../../common/thirdparty/jquery-validation/js/additional-methods.min.js"></script>
<script type="text/javascript" src="../../common/thirdparty/bootbox/bootbox.min.js"></script>
<!--<script type="text/javascript" src="../component/thirdparty/cometd/cometd.js"></script>-->
<!--<script type="text/javascript" src="../component/thirdparty/cometd/jquery/jquery.cometd.js"></script>-->
-<script type="text/javascript" src="js/loadi18nApp.js"></script>
+<script type="text/javascript" src="i18n/loadi18nApp.js"></script>
<script type="text/javascript" src="js/vim-validate.js"></script>
<!--<script type="text/javascript" src="./js/client-cometd.js"></script>-->
-<script src="../vendor/avalon/avalon.js"></script>
+<script src="../../common/thirdparty/avalon/avalon.js"></script>
<script type="text/javascript" src="js/vimUtil.js"></script>
<script type="text/javascript" src="js/vimController.js"></script>
<script src="../../common/thirdparty/bootstrap-growl/bootstrap-growl.min.js"></script>
diff --git a/openo-portal/portal-extsys/src/main/webapp/extsys/vnfm/i18n/nfv-nso-iui-i18n-en-US.properties b/openo-portal/portal-extsys/src/main/webapp/extsys/vnfm/i18n/nfv-nso-iui-i18n-en-US.properties index aed3e347..cea26225 100644 --- a/openo-portal/portal-extsys/src/main/webapp/extsys/vnfm/i18n/nfv-nso-iui-i18n-en-US.properties +++ b/openo-portal/portal-extsys/src/main/webapp/extsys/vnfm/i18n/nfv-nso-iui-i18n-en-US.properties @@ -35,7 +35,7 @@ nfv-vnfm-iui-text-certificateUrl=certificate URL nfv-vnfm-iui-text-vendor=Vendor nfv-vnfm-iui-text-userName=Username nfv-vnfm-iui-text-password=Password -nfv-vnfm-iui-text_description=description +nfv-vnfm-iui-text_description=Description nfv-vnfm-iui-text-cancelBtn=cancel nfv-vnfm-iui-text-saveBtn=save nfv-vnfm-iui-text-registerBtn=Register diff --git a/openo-portal/portal-extsys/src/main/webapp/extsys/vnfm/vnfmView.html b/openo-portal/portal-extsys/src/main/webapp/extsys/vnfm/vnfmView.html index 1a8053e0..c5b7cf3a 100644 --- a/openo-portal/portal-extsys/src/main/webapp/extsys/vnfm/vnfmView.html +++ b/openo-portal/portal-extsys/src/main/webapp/extsys/vnfm/vnfmView.html @@ -225,8 +225,8 @@ <script type="text/javascript" src="../../common/thirdparty/jquery-validation/js/additional-methods.min.js"></script>
<script type="text/javascript" src="../../common/thirdparty/bootstrap-growl/bootstrap-growl.min.js"></script>
-<script type="text/javascript" src="../../common/thirdparty/cometd/cometd.js"></script>
-<script type="text/javascript" src="../../common/thirdparty/cometd/jquery.cometd.js"></script>
+<!--<script type="text/javascript" src="../../common/thirdparty/cometd/cometd.js"></script>-->
+<!--<script type="text/javascript" src="../../common/thirdparty/cometd/jquery.cometd.js"></script>-->
<script type="text/javascript" src="../../common/thirdparty/avalon/avalon.js"></script>
<script type="text/javascript" src="../../common/js/tools.js"></script>
|