com_zte_ums_eco_roc_vim_growl_msg_remove_failed=delete failed
com_zte_ums_eco_roc_vim_growl_msg_remove_server_success=delete server success:
com_zte_ums_eco_roc_vim_growl_msg_remove_server_failed=delete server falied:
-com_zte_ums_eco_roc_vim_growl_msg_query_failed=query faile
+com_zte_ums_eco_roc_vim_growl_msg_query_failed=query failed
+com_zte_ums_eco_roc_vim_growl_msg_query_vim_type_failed=query VIM type failed
+com_zte_ums_eco_roc_vim_growl_msg_query_complex_failed=query Physical Location Id failed
com_zte_ums_eco_roc_vim_growl_msg_save_success=save success
com_zte_ums_eco_roc_vim_growl_msg_save_failed=save failed
"cloudRegionVersion": "v1.0",
"ownerDefinedType": "",
"cloudZone": "",
- "complexName": "",
+ "physicalLocationId": "",
"cloudExtraInfo": "",
"vimAuthInfos": [
{
vimTypeObj: [],
vimTypes: [],
vimVersions:[],
+ physicalLocationIds:[],
$Status: {
success: "active",
failed: "inactive",
$addVimInfoUrl: '/api/aai-esr-server/v1/vims',
$updateVimInfoUrl: '/api/aai-esr-server/v1/vims/{cloudOwner}/{cloudRegionId}',
$delVimInfoUrl: '/api/aai-esr-server/v1/vims/{cloudOwner}/{cloudRegionId}',
+ $queryComplexInfoUrl: '/api/aai-esr-server/v1/vims/complexes',
$queryVimTypeUrl: '/multicloud/v0/vim_types',
$initTable: function () {
$.ajax({
vm.fillElement(vm.vimInfo[index], vm.currentElement);
}
vm.$showModal();
+ vm.getPhysicalLocationIds();
vm.getVimTypes();
},
$showModal: function () {
targetElement["cloudRegionVersion"] = sourceElement["cloudRegionVersion"];
targetElement["ownerDefinedType"] = sourceElement["ownerDefinedType"];
targetElement["cloudZone"] = sourceElement["cloudZone"];
- targetElement["complexName"] = sourceElement["complexName"];
+ targetElement["physicalLocationId"] = sourceElement["physicalLocationId"];
targetElement["cloudExtraInfo"] = sourceElement["cloudExtraInfo"];
if(!targetElement["vimAuthInfos"]){
targetElement["vimAuthInfos"] = [{}];
}
else {
vm.vimTypeObj = [];
- bootbox.alert($.i18n.prop("com_zte_ums_eco_roc_vim_growl_msg_query_failed"));
+ bootbox.alert($.i18n.prop("com_zte_ums_eco_roc_vim_growl_msg_query_vim_type_failed"));
return;
}
},
error: function (XMLHttpRequest, textStatus, errorThrown) {
- bootbox.alert($.i18n.prop("com_zte_ums_eco_roc_vim_growl_msg_query_failed") + textStatus + ":" + errorThrown);
+ bootbox.alert($.i18n.prop("com_zte_ums_eco_roc_vim_growl_msg_query_vim_type_failed") + textStatus + ":" + errorThrown);
return;
},
complete: function () {
});
vm.getVimVerions(vm.vimTypeObj[0]["vim_type"]);
},
+ getPhysicalLocationIds: function(){
+ $.ajax({
+ "type": 'get',
+ "url": vm.$queryComplexInfoUrl,
+ "success": function (resp, statusText, jqXHR) {
+ if (jqXHR.status == "200") {
+ vm.physicalLocationIds = resp;
+ }
+ else {
+ vm.physicalLocationIds = [];
+ bootbox.alert($.i18n.prop("com_zte_ums_eco_roc_vim_growl_msg_query_complex_failed"));
+ return;
+ }
+ },
+ error: function (XMLHttpRequest, textStatus, errorThrown) {
+ bootbox.alert($.i18n.prop("com_zte_ums_eco_roc_vim_growl_msg_query_complex_failed") + textStatus + ":" + errorThrown);
+ return;
+ },
+ complete: function () {
+ resUtil.tooltipVimStatus();
+ }
+ });
+ },
getVimVerions: function(vim_type){
for (var i=0;i<vm.vimTypeObj.length;i++) {
if(vim_type == vm.vimTypeObj[i]["vim_type"]) {