summaryrefslogtreecommitdiffstats
path: root/portal/src/main/webapp/extsys/vim
diff options
context:
space:
mode:
author覃亮10184303 <qin.liang13@zte.com.cn>2017-09-21 17:28:10 +0800
committer覃亮10184303 <qin.liang13@zte.com.cn>2017-09-21 17:30:56 +0800
commit542b94df5a08d4e2bd68816481986b4963df68c6 (patch)
tree73aa730fbda488ad7eca0b707dbc03077264f104 /portal/src/main/webapp/extsys/vim
parentce13cec7061af3b55cb6a79b9318b51027af6ebe (diff)
Integrate esr-gui with server
Issue-ID: AAI-349 Change-Id: Ie3b4e6fc6a8eadbcec497b333c03c2db51cfc910 Signed-off-by: 覃亮10184303 <qin.liang13@zte.com.cn>
Diffstat (limited to 'portal/src/main/webapp/extsys/vim')
-rw-r--r--portal/src/main/webapp/extsys/vim/js/vimController.js20
-rw-r--r--portal/src/main/webapp/extsys/vim/vimView.html10
2 files changed, 13 insertions, 17 deletions
diff --git a/portal/src/main/webapp/extsys/vim/js/vimController.js b/portal/src/main/webapp/extsys/vim/js/vimController.js
index 2996e28..e9fd644 100644
--- a/portal/src/main/webapp/extsys/vim/js/vimController.js
+++ b/portal/src/main/webapp/extsys/vim/js/vimController.js
@@ -55,7 +55,7 @@ var vm = avalon
$queryVimInfoUrl: '/api/aai-esr-server/v1/vims',
$addVimInfoUrl: '/api/aai-esr-server/v1/vims',
$updateVimInfoUrl: '/api/aai-esr-server/v1/vims/{cloudOwner}/{cloudRegionId}',
- $delVimInfoUrl: '/api/aai-esr-server/v1/vims?cloudOwner={cloudOwner}&cloudRegionId={cloudRegionId}',
+ $delVimInfoUrl: '/api/aai-esr-server/v1/vims/{cloudOwner}/{cloudRegionId}',
$initTable: function () {
$.ajax({
"type": 'get',
@@ -192,19 +192,15 @@ var vm = avalon
delVim: function (index) {
bootbox.confirm($.i18n.prop('com_zte_ums_eco_roc_vim_confirm_delete_vim_record'), function (result) {
if (result) {
- var id = vm.vimInfo[index]["id"];
- vm.vimInfo.splice(index, 1);
- /* $.ajax({
+ var cloudOwner = vm.vimInfo[index]["cloudOwner"];
+ var cloudRegionId = vm.vimInfo[index]["cloudRegionId"];
+ var url = vm.$delVimInfoUrl.replace('{cloudOwner}', cloudOwner).replace('{cloudRegionId}', cloudRegionId);
+ $.ajax({
type: "DELETE",
- url: vm.$delVimInfoUrl.replace('{vim_id}', el.vimId),
+ url: url,
success: function (data, statusText, jqXHR) {
if (jqXHR.status == "204") {
- for (var i = 0; i < vm.vimInfo.length; i++) {
- if (el.vimId == vm.vimInfo[i].vimId) {
- vm.vimInfo.splice(i, 1);
- break;
- }
- }
+ vm.vimInfo.splice(index, 1);
resUtil.growl($.i18n.prop('com_zte_ums_eco_roc_vim_growl_msg_title') + $.i18n.prop('com_zte_ums_eco_roc_vim_growl_msg_remove_success'), "success");
}
else {
@@ -214,7 +210,7 @@ var vm = avalon
error: function (XMLHttpRequest, textStatus, errorThrown) {
resUtil.growl($.i18n.prop('com_zte_ums_eco_roc_vim_growl_msg_title') + errorThrown, "danger");
}
- });*/
+ });
}
});
},
diff --git a/portal/src/main/webapp/extsys/vim/vimView.html b/portal/src/main/webapp/extsys/vim/vimView.html
index 8be2a4a..923ddf7 100644
--- a/portal/src/main/webapp/extsys/vim/vimView.html
+++ b/portal/src/main/webapp/extsys/vim/vimView.html
@@ -230,15 +230,15 @@
<i class="fa fa-cloud fa-5x color_cloud"></i>
</div>
<div class="m-t-xl">
- <h3 class="md-text-overflow" ms-title="'cloudOwner:' + el['cloudOwner']" ms-text="'cloudOwner:' + el['cloudOwner']"></h3>
- <h3 class="md-text-overflow" ms-title="'cloudRegionId:' + el['cloudRegionId']" ms-text="'cloudRegionId:' + el['cloudRegionId']"></h3>
+ <h3 class="md-text-overflow" ms-attr-title="'cloudOwner:' + el['cloudOwner']" ms-text="'cloudOwner:' + el['cloudOwner']"></h3>
+ <h3 class="md-text-overflow" ms-attr-title="'cloudRegionId:' + el['cloudRegionId']" ms-text="'cloudRegionId:' + el['cloudRegionId']"></h3>
<div class="font">
<span id_i18n="com_zte_ums_eco_roc_vim_display_type"name_i18n="com_zte_conductor_ui_i18n"></span>
- <span class="md-text-overflow" ms-title="el['cloudType']" ms-text="el['cloudType']"></span>
+ <span class="md-text-overflow" ms-attr-title="el['cloudType']" ms-text="el['cloudType']"></span>
</div>
<div class="font">
<span id_i18n="com_zte_ums_eco_roc_vim_display_version"name_i18n="com_zte_conductor_ui_i18n"></span>
- <span class="md-text-overflow" ms-title="el['cloudRegionVersion']" ms-text="el['cloudRegionVersion']"></span>
+ <span class="md-text-overflow" ms-attr-title="el['cloudRegionVersion']" ms-text="el['cloudRegionVersion']"></span>
</div>
</div>
</div>
@@ -246,7 +246,7 @@
<div class="pull-right">
<a class="btn btn-default btn-sm" ms-click="$showVimTable($index, 'update')"><i
class="fa fa-pencil-square-o fa-lg"></i></a>
- <a class="btn btn-default btn-sm" disabled="disabled" ms-click="delVim($index)"><i class="fa fa-trash-o fa-lg"> </i></a>
+ <a class="btn btn-default btn-sm" ms-click="delVim($index)"><i class="fa fa-trash-o fa-lg"> </i></a>
<!--<a class="btn btn-default btn-sm" ms-click="gotoChartPage(el.oid,el.name,el.user)"><i class="fa fa-pie-chart fa-lg"> </i></a>-->
</div>
</div>