aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--openo-portal/portal-catalog/src/main/webapp/catalog/i18n/nfv-nso-iui-i18n-en-US.properties3
-rw-r--r--openo-portal/portal-catalog/src/main/webapp/catalog/i18n/nfv-nso-iui-i18n-zh-CN.properties3
-rw-r--r--openo-portal/portal-catalog/src/main/webapp/catalog/js/package/pmController.js15
-rw-r--r--openo-portal/portal-catalog/src/main/webapp/catalog/js/package/pmUtil.js47
-rw-r--r--openo-portal/portal-catalog/src/main/webapp/catalog/js/template/topoUtil.js4
-rw-r--r--openo-portal/portal-common/src/main/webapp/common/default.html120
-rw-r--r--openo-portal/portal-common/src/main/webapp/common/i18n/web-framework-menu-i18n-en-US.properties2
-rw-r--r--openo-portal/portal-common/src/main/webapp/common/image/integration/netnumenLogo.pngbin4097 -> 0 bytes
-rw-r--r--openo-portal/portal-common/src/main/webapp/common/image/integration/openo_bg_1.jpgbin143465 -> 152396 bytes
-rw-r--r--openo-portal/portal-common/src/main/webapp/common/image/integration/openo_bg_2.jpgbin152396 -> 143465 bytes
-rw-r--r--openo-portal/portal-common/src/main/webapp/common/image/integration/openo_logo_black.pngbin0 -> 27249 bytes
-rw-r--r--openo-portal/portal-common/src/main/webapp/common/image/integration/openo_logo_pantone.pngbin0 -> 27702 bytes
-rw-r--r--openo-portal/portal-common/src/main/webapp/common/image/integration/openo_logo_white.pngbin5717 -> 26677 bytes
-rw-r--r--openo-portal/portal-common/src/main/webapp/common/js/core/const.js3
-rw-r--r--openo-portal/portal-common/src/main/webapp/common/js/core/openoFrameWork.js95
-rw-r--r--openo-portal/portal-common/src/main/webapp/common/js/login.js84
-rw-r--r--openo-portal/portal-common/src/main/webapp/common/js/security/security.js2
-rw-r--r--openo-portal/portal-common/src/main/webapp/common/json/menu_list.json196
-rw-r--r--openo-portal/portal-common/src/main/webapp/common/login.html59
-rw-r--r--openo-portal/portal-common/src/main/webapp/common/logout.html39
-rw-r--r--openo-portal/portal-extsys/src/main/webapp/extsys/sdncontroller/controller.html5
-rw-r--r--openo-portal/portal-extsys/src/main/webapp/extsys/sdncontroller/js/controller.js6
-rw-r--r--openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/InputData.html20
-rw-r--r--openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/gsolcmmain.html51
-rw-r--r--openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/images/loading.gifbin0 -> 781 bytes
-rw-r--r--openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/js/gsolcm.js119
-rw-r--r--openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/js/jquery.isloading.min.js39
-rw-r--r--openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/js/rest.js50
-rw-r--r--openo-portal/portal-resmgr/src/main/webapp/resmgr-sdn/js/brs.js30
-rw-r--r--openo-portal/portal-resmgr/src/main/webapp/resmgr-sdn/ne.html8
-rw-r--r--openo-portal/portal-resmgr/src/main/webapp/resmgr-sdn/port.html18
31 files changed, 619 insertions, 399 deletions
diff --git a/openo-portal/portal-catalog/src/main/webapp/catalog/i18n/nfv-nso-iui-i18n-en-US.properties b/openo-portal/portal-catalog/src/main/webapp/catalog/i18n/nfv-nso-iui-i18n-en-US.properties
index 5e9b97bf..7c2d1303 100644
--- a/openo-portal/portal-catalog/src/main/webapp/catalog/i18n/nfv-nso-iui-i18n-en-US.properties
+++ b/openo-portal/portal-catalog/src/main/webapp/catalog/i18n/nfv-nso-iui-i18n-en-US.properties
@@ -89,6 +89,9 @@ nfv-package-iui-message-select-vim-error = Can not select more than one VIM to b
nfv-package-iui-onboard-dialog-vimname = VIM Name
nfv-package-iui-product-env = Product Environment
nfv-package-iui-test-env = Test Environment
+nfv-package-iui-http-delete-error = Delete package from HTTP server failed!
+nfv-package-iui-template-delete-error = Delete template data failed!
+nfv-package-iui-package-delete-error = Delete package data failed!
nfv-package-iui-drop-zone-title=Drag & drop files here …
nfv-package-iui-drop-zone-selectBtn=Browse
diff --git a/openo-portal/portal-catalog/src/main/webapp/catalog/i18n/nfv-nso-iui-i18n-zh-CN.properties b/openo-portal/portal-catalog/src/main/webapp/catalog/i18n/nfv-nso-iui-i18n-zh-CN.properties
index efb19162..1d3e6cfe 100644
--- a/openo-portal/portal-catalog/src/main/webapp/catalog/i18n/nfv-nso-iui-i18n-zh-CN.properties
+++ b/openo-portal/portal-catalog/src/main/webapp/catalog/i18n/nfv-nso-iui-i18n-zh-CN.properties
@@ -90,6 +90,9 @@ nfv-package-iui-message-select-vim-error = 最多只能选择一个VIM做为测
nfv-package-iui-onboard-dialog-vimname = VIM名称
nfv-package-iui-product-env = 生产环境
nfv-package-iui-test-env = 测试环境
+nfv-package-iui-http-delete-error = 从HTTP服务器上删除包失败!
+nfv-package-iui-template-delete-error = 删除模板数据失败!
+nfv-package-iui-package-delete-error = 删除包数据失败!
nfv-package-iui-drop-zone-title=拖拽文件到这里 …
diff --git a/openo-portal/portal-catalog/src/main/webapp/catalog/js/package/pmController.js b/openo-portal/portal-catalog/src/main/webapp/catalog/js/package/pmController.js
index 3b19d23e..714d953c 100644
--- a/openo-portal/portal-catalog/src/main/webapp/catalog/js/package/pmController.js
+++ b/openo-portal/portal-catalog/src/main/webapp/catalog/js/package/pmController.js
@@ -83,6 +83,7 @@ var vm = avalon.define({
setting.language = vm.$language;
setting.paginate = true;
setting.info = true;
+ setting.sort = true;
setting.columns = vm.$packageTableFields.table;
setting.restUrl = vm.$restUrl.queryPackageInfoUrl;
setting.tableId = vm.$tableId;
@@ -120,15 +121,13 @@ var vm = avalon.define({
vm.packageDetail.detailData[index].isActive = true;
},
$initPackageDetailTable : function (csarId) {
- var data;
- for(var i=0; i<vm.resource.packageInfo.length; i++) {
- if (vm.resource.packageInfo[i].csarId == csarId) {
- data = vm.resource.packageInfo[i];
- break;
+ var url=vm.$restUrl.queryPackageInfoUrl + "/" + csarId;
+ commonUtil.get(url,null,function(resp) {
+ if (resp) {
+ vm.resource.packageDetails=resp;
}
- }
- vm.resource.packageDetails = data;
- vm.resource.relationInfo = [];
+ })
+
},
$isRowDeletingStatus : function(name) {
var table = $("#" + vm.$tableId).dataTable();
diff --git a/openo-portal/portal-catalog/src/main/webapp/catalog/js/package/pmUtil.js b/openo-portal/portal-catalog/src/main/webapp/catalog/js/package/pmUtil.js
index d69be0a0..db21456f 100644
--- a/openo-portal/portal-catalog/src/main/webapp/catalog/js/package/pmUtil.js
+++ b/openo-portal/portal-catalog/src/main/webapp/catalog/js/package/pmUtil.js
@@ -71,8 +71,18 @@ pmUtil.updateDeletedPackageStatus = function(message) {
if(messageobj.status == "true" || messageobj.status == "deletionPending") {
commonUtil.showMessage($.i18n.prop("nfv-package-iui-message-delete-success"), "success");
refreshByCond();
- } else {
+ } else if (messageobj.status == "Delete package from HTTP server failed!") {
pmUtil.changeTableStatus(messageobj.csarid, "deletefail");
+ commonUtil.showMessage($.i18n.prop("nfv-package-iui-http-delete-error"), "failed");
+ } else if (messageobj.status == "Delete template data failed!") {
+ pmUtil.changeTableStatus(messageobj.csarid, "deletefail");
+ commonUtil.showMessage($.i18n.prop("nfv-package-iui-template-delete-error"), "failed");
+ } else if (messageobj.status == "Delete package data failed!") {
+ pmUtil.changeTableStatus(messageobj.csarid, "deletefail");
+ commonUtil.showMessage($.i18n.prop("nfv-package-iui-package-delete-error"), "failed");
+ } else if (messageobj.status == "false") {
+ pmUtil.changeTableStatus(messageobj.csarid, "deletefail");
+ commonUtil.showMessage($.i18n.prop("nfv-package-iui-message-delete-error"), "failed");
}
}
@@ -110,8 +120,13 @@ pmUtil.doOnBoard = function(url,param) {
}
refreshByCond();
},
- error : function() {
- commonUtil.showMessage($.i18n.prop("nfv-package-iui-message-onBoard-error"), "failed");
+ error : function(resp) {
+ if(resp != "" && resp.responseText == "success") {
+ commonUtil.showMessage($.i18n.prop("nfv-package-iui-message-onBoarded"), "success");
+ refreshByCond();
+ } else {
+ commonUtil.showMessage($.i18n.prop("nfv-package-iui-message-onBoard-error"), "failed");
+ }
}
});
}
@@ -132,7 +147,7 @@ pmUtil.doNFAROnboard = function(extData) {
}
refreshByCond();
},
- error : function() {
+ error : function(resp) {
commonUtil.showMessage($.i18n.prop("nfv-package-iui-message-onBoard-error"), "failed");
}
});
@@ -151,7 +166,7 @@ pmUtil.doSSAROnboard = function(url) {
}
refreshByCond();
},
- error : function() {
+ error : function(resp) {
commonUtil.showMessage($.i18n.prop("nfv-package-iui-message-onBoard-error"), "failed");
}
});
@@ -163,15 +178,11 @@ pmUtil.delPackage = function (url) {
url : url,
contentType : "application/json",
success : function(resp) {
- //commonUtil.showMessage($.i18n.prop("nfv-package-iui-message-delete-success"), "success");
- //setTimeout( function(){
- // refreshByCond();
- //}, 1 * 1000 );
+
},
error : function(resp) {
if(resp.status == 202 || resp.responseText == "success") {
- //commonUtil.showMessage($.i18n.prop("nfv-package-iui-message-delete-success"), "success");
- //refreshByCond();
+
} else {
commonUtil.showMessage($.i18n.prop("nfv-package-iui-message-delete-error"), "failed");
refreshByCond();
@@ -180,9 +191,21 @@ pmUtil.delPackage = function (url) {
});
}
+pmUtil.isRowDeletingStatus = function(csarId) {
+ var table = $("#" + vm.$tableId).dataTable();
+ var tableData = table.fnGetData();
+ for (var i=0; i<tableData.length; i++) {
+ if(tableData[i]["csarId"] == csarId &&
+ tableData[i]["status"].indexOf($.i18n.prop("nfv-package-iui-status-deleting")) > -1) {
+ return true;
+ }
+ }
+ return false;
+}
+
pmUtil.nameRender = function(obj) {
return '<a href="#" onclick="vm.packageDetail.$showDetails('
- + '\'block\',\'' + obj.aData.id + '\', \'' + obj.aData.name + '\')">' + obj.aData.name + '</a>';
+ + '\'block\',\'' + obj.aData.csarId + '\', \'' + obj.aData.name + '\')">' + obj.aData.name + '</a>';
}
pmUtil.onBoardRender = function(obj) {
diff --git a/openo-portal/portal-catalog/src/main/webapp/catalog/js/template/topoUtil.js b/openo-portal/portal-catalog/src/main/webapp/catalog/js/template/topoUtil.js
index 2c0561e0..47bd9a5d 100644
--- a/openo-portal/portal-catalog/src/main/webapp/catalog/js/template/topoUtil.js
+++ b/openo-portal/portal-catalog/src/main/webapp/catalog/js/template/topoUtil.js
@@ -388,7 +388,7 @@ topoUtil.generateNodeTemplate = function(data) {
nodeTemplate.currentLinkNum = 0;
var relationShips = data.relationShips || []; //some nodes may not have relationships
$.each(relationShips, function(index, obj){
- if (obj.sourceNodeId == data.id) {
+ if (obj.sourceNodeId == data.name) {
switch(obj.type) {
case "containedIn" :
case "tosca.relationships.nfv.ContainedIn" :
@@ -414,7 +414,7 @@ topoUtil.generateNodeTemplate = function(data) {
break;
}
}
- if (obj.targetNodeId == data.id) {
+ if (obj.targetNodeId == data.name) {
switch(obj.type) {
case "connectedTo" :
case "tosca.relationships.nfv.ConnectsTo" :
diff --git a/openo-portal/portal-common/src/main/webapp/common/default.html b/openo-portal/portal-common/src/main/webapp/common/default.html
index 1ea020eb..f0120dc1 100644
--- a/openo-portal/portal-common/src/main/webapp/common/default.html
+++ b/openo-portal/portal-common/src/main/webapp/common/default.html
@@ -37,31 +37,6 @@
<link href="css/more-operation.css" rel="stylesheet" type="text/css" />
<link href="css/ZteIctIcons/style.css" rel="stylesheet" type="text/css"/>
<link href="" rel="stylesheet" type="text/css" id="style_color"/>
- <script type="text/javascript" src="js/core/const.js"></script>
- <script type="text/javascript" src="js/core/hk.min.js"></script>
- <script type="text/javascript" src="thirdparty/jquery/jquery-1.10.2.min.js"></script>
- <script type="text/javascript" src="thirdparty/fakeLoader/fakeLoader.min.js"></script>
- <script type="text/javascript" src="thirdparty/bootstrap/js/bootstrap.min.js"></script>
- <script type="text/javascript" src="thirdparty/jquery-validation/js/jquery.validate.min.js"></script>
- <script type="text/javascript" src="thirdparty/bootstrap-hover-dropdown/bootstrap-hover-dropdown.min.js"></script>
- <script type="text/javascript" src="thirdparty/jquery-blockui/jquery.blockui.min.js"></script>
- <script type="text/javascript" src="thirdparty/jquery-cokie/jquery.cokie.min.js"></script>
- <script type="text/javascript" src="thirdparty/uniform/jquery.uniform.min.js"></script>
- <script type="text/javascript" src="thirdparty/cometd/cometd.js"></script>
- <script type="text/javascript" src="thirdparty/cometd/jquery/jquery.cometd.js"></script>
- <script type="text/javascript" src="thirdparty/select2/select2.min.js"></script>
- <script type="text/javascript" src="thirdparty/bootbox/bootbox.min.js"></script>
- <script type="text/javascript" src="thirdparty/jquery.i18n/jquery.i18n.properties-1.0.9.js"></script>
- <script type="text/javascript" src="thirdparty/data-tables/jquery.dataTables.min.js"></script>
- <script type="text/javascript" src="js/moreOperation.js"></script>
- <script type="text/javascript" src="js/tools.js"></script>
- <script type="text/javascript" src="js/international/loadi18n.js"></script>
- <script type="text/javascript" src="js/Main2moreMenu.js"></script>
- <script type="text/javascript" src="js/core/pym.min.js"></script>
- <script type="text/javascript" src="js/core/openoFrameWork.js"></script>
- <script type="text/javascript" src="js/fm_light.js"></script>
- <script type="text/javascript" src="js/mainpage/about.js"></script>
- <script type="text/javascript" src="js/core/load_menuList.js"></script>
</head>
<body class="page-header-fixed page-sidebar-fixed">
<div id="pageLoading" class="fakeloader"></div>
@@ -70,10 +45,7 @@
</script>
<div class="header navbar navbar-fixed-top mega-menu">
<div class="header-inner">
- <a class="navbar-brand zte-navbar-brand hidden-sm hidden-xs" href="main-page.html">
- <img id="com_zte_ums_ict_framework_img_netnumenLogo" src="image/integration/netnumenLogo.png" name_img="com_zte_ums_ict_framework_img" alt="logo"/>
- <span id="com_zte_ums_ict_framework_ui_main_title" name_i18n="openo_frame_page_i18n" class="zte-brand-text"/>
- </a>
+ <img id="com_zte_ums_ict_framework_img_netnumenLogo" src="image/integration/openo_logo_black.png" width="7%" name_img="com_zte_ums_ict_framework_img" alt="logo" style="margin-left:50px; margin-top:3px;"/>
<ul class="nav navbar-nav pull-right">
<div class="zte-theme-panel">
<div class="toggler"></div>
@@ -89,64 +61,6 @@
</div>
</div>
</div>
-
-
-
- <li class="dropdown" id="header_notification_bar" style="display:none">
- <a href="#" class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown" data-close-others="true">
- <i class="fa fa-warning" id="hd_heighestAlarmcount_li"></i>
- <span class="badge" id="hd_heighestAlarmcount_value"></span>
- </a>
- <ul class="dropdown-menu extended notification">
- <li>
- <p>
- <span id="hd_alarmcount_total_before_text"></span>
- <span class="badge" id="hd_alarmcount_total_value"></span>
- <span id="hd_alarmcount_total_after_text"></span>
- </p>
- </li>
- <li>
- <ul class="dropdown-menu-list scroller" style="height: 168px;">
- <li>
- <a href="#">
- <span class="label label-icon alarm-critical">
- <i class="fa fa-bolt " id="hd_alarmcount_critical_li"></i>
- <span class="badge" id="hd_alarmcount_critical_value"></span>
- </span>
- <span id="hd_alarmcount_critical_text"></span>
- </a>
- </li>
- <li>
- <a href="#">
- <span class="label label-icon alarm-major">
- <i class="fa fa-warning" id="hd_alarmcount_major_li"></i>
- <span class="badge" id="hd_alarmcount_major_value"></span>
- </span>
- <span id="hd_alarmcount_major_text"></span>
- </a>
- </li>
- <li>
- <a href="#">
- <span class="label label-icon alarm-minor">
- <i class="fa fa-bell-o" id="hd_alarmcount_minor_li"></i>
- <span class="badge" id="hd_alarmcount_minor_value"></span>
- </span>
- <span id="hd_alarmcount_minor_text"></span>
- </a>
- </li>
- <li>
- <a href="#">
- <span class="label label-icon alarm-warning">
- <i class="fa fa-bullhorn" id="hd_alarmcount_warning_li"></i>
- <span class="badge" id="hd_alarmcount_warning_value"></span>
- </span>
- <span id="hd_alarmcount_warning_text"></span>
- </a>
- </li>
- </ul>
- </li>
- </ul>
- </li>
<li class="dropdown user" id="header_dropdown_user" style="display:none">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown" data-close-others="true">
<span><img alt="" width=26 height=26 src="image/user.png"/></span>
@@ -173,9 +87,6 @@
</div>
</ul>
</li>
-
-
-
</ul>
</div>
</div>
@@ -194,7 +105,7 @@
</div>
<ul class="col-md-2 more-botton-zone"></ul>
</ul>
- <div id = "pageableDiv" style = "display: none" class="row row1">
+ <div id ="pageableDiv" style ="display: none" class="row row1">
<div class="col-xs-12" >
<div class="row">
<div id="carousel-example-generic" class="carousel slide" data-ride="carousel" data-interval="false">
@@ -217,8 +128,31 @@
</div>
</div>
</div>
-
-
+ <script type="text/javascript" src="js/core/const.js"></script>
+ <script type="text/javascript" src="js/core/hk.min.js"></script>
+ <script type="text/javascript" src="thirdparty/jquery/jquery-1.10.2.min.js"></script>
+ <script type="text/javascript" src="thirdparty/fakeLoader/fakeLoader.min.js"></script>
+ <script type="text/javascript" src="thirdparty/bootstrap/js/bootstrap.min.js"></script>
+ <script type="text/javascript" src="thirdparty/jquery-validation/js/jquery.validate.min.js"></script>
+ <script type="text/javascript" src="thirdparty/bootstrap-hover-dropdown/bootstrap-hover-dropdown.min.js"></script>
+ <script type="text/javascript" src="thirdparty/jquery-blockui/jquery.blockui.min.js"></script>
+ <script type="text/javascript" src="thirdparty/jquery-cokie/jquery.cokie.min.js"></script>
+ <script type="text/javascript" src="thirdparty/uniform/jquery.uniform.min.js"></script>
+ <script type="text/javascript" src="thirdparty/cometd/cometd.js"></script>
+ <script type="text/javascript" src="thirdparty/cometd/jquery/jquery.cometd.js"></script>
+ <script type="text/javascript" src="thirdparty/select2/select2.min.js"></script>
+ <script type="text/javascript" src="thirdparty/bootbox/bootbox.min.js"></script>
+ <script type="text/javascript" src="thirdparty/jquery.i18n/jquery.i18n.properties-1.0.9.js"></script>
+ <script type="text/javascript" src="thirdparty/data-tables/jquery.dataTables.min.js"></script>
+ <script type="text/javascript" src="js/moreOperation.js"></script>
+ <script type="text/javascript" src="js/tools.js"></script>
+ <script type="text/javascript" src="js/international/loadi18n.js"></script>
+ <script type="text/javascript" src="js/Main2moreMenu.js"></script>
+ <script type="text/javascript" src="js/core/pym.min.js"></script>
+ <script type="text/javascript" src="js/core/openoFrameWork.js"></script>
+ <script type="text/javascript" src="js/fm_light.js"></script>
+ <script type="text/javascript" src="js/mainpage/about.js"></script>
+ <script type="text/javascript" src="js/core/load_menuList.js"></script>
<script>
var panel = $('.zte-theme-panel');
loadi18n_WebFramework('web-framework-i18n', 'i18n/', 'openo_frame_page_i18n');
diff --git a/openo-portal/portal-common/src/main/webapp/common/i18n/web-framework-menu-i18n-en-US.properties b/openo-portal/portal-common/src/main/webapp/common/i18n/web-framework-menu-i18n-en-US.properties
index bb94f539..0e39ee75 100644
--- a/openo-portal/portal-common/src/main/webapp/common/i18n/web-framework-menu-i18n-en-US.properties
+++ b/openo-portal/portal-common/src/main/webapp/common/i18n/web-framework-menu-i18n-en-US.properties
@@ -37,4 +37,4 @@ openo_menu_performance_performance_query=Performance Query
openo_menu_manage_view=Manage View
openo_menu_manage_view_vim_manage=VIM Manage
openo_menu_manage_view_vnfm=VNFM
-
+openo_menu_manage_view_sdn_controller=SDN Controller
diff --git a/openo-portal/portal-common/src/main/webapp/common/image/integration/netnumenLogo.png b/openo-portal/portal-common/src/main/webapp/common/image/integration/netnumenLogo.png
deleted file mode 100644
index 21f9e87a..00000000
--- a/openo-portal/portal-common/src/main/webapp/common/image/integration/netnumenLogo.png
+++ /dev/null
Binary files differ
diff --git a/openo-portal/portal-common/src/main/webapp/common/image/integration/openo_bg_1.jpg b/openo-portal/portal-common/src/main/webapp/common/image/integration/openo_bg_1.jpg
index 4a7b0722..db94b166 100644
--- a/openo-portal/portal-common/src/main/webapp/common/image/integration/openo_bg_1.jpg
+++ b/openo-portal/portal-common/src/main/webapp/common/image/integration/openo_bg_1.jpg
Binary files differ
diff --git a/openo-portal/portal-common/src/main/webapp/common/image/integration/openo_bg_2.jpg b/openo-portal/portal-common/src/main/webapp/common/image/integration/openo_bg_2.jpg
index db94b166..4a7b0722 100644
--- a/openo-portal/portal-common/src/main/webapp/common/image/integration/openo_bg_2.jpg
+++ b/openo-portal/portal-common/src/main/webapp/common/image/integration/openo_bg_2.jpg
Binary files differ
diff --git a/openo-portal/portal-common/src/main/webapp/common/image/integration/openo_logo_black.png b/openo-portal/portal-common/src/main/webapp/common/image/integration/openo_logo_black.png
new file mode 100644
index 00000000..f320af35
--- /dev/null
+++ b/openo-portal/portal-common/src/main/webapp/common/image/integration/openo_logo_black.png
Binary files differ
diff --git a/openo-portal/portal-common/src/main/webapp/common/image/integration/openo_logo_pantone.png b/openo-portal/portal-common/src/main/webapp/common/image/integration/openo_logo_pantone.png
new file mode 100644
index 00000000..14135042
--- /dev/null
+++ b/openo-portal/portal-common/src/main/webapp/common/image/integration/openo_logo_pantone.png
Binary files differ
diff --git a/openo-portal/portal-common/src/main/webapp/common/image/integration/openo_logo_white.png b/openo-portal/portal-common/src/main/webapp/common/image/integration/openo_logo_white.png
index ef9aedb7..7adc4ac3 100644
--- a/openo-portal/portal-common/src/main/webapp/common/image/integration/openo_logo_white.png
+++ b/openo-portal/portal-common/src/main/webapp/common/image/integration/openo_logo_white.png
Binary files differ
diff --git a/openo-portal/portal-common/src/main/webapp/common/js/core/const.js b/openo-portal/portal-common/src/main/webapp/common/js/core/const.js
index 3e36766c..e022439e 100644
--- a/openo-portal/portal-common/src/main/webapp/common/js/core/const.js
+++ b/openo-portal/portal-common/src/main/webapp/common/js/core/const.js
@@ -25,6 +25,7 @@ var IS_V5_TESTVERSION = true;
var FrameConst={};
//Ĭϵ¼ɹתҳ
FrameConst.DEFAULT_LOGINSKIP_PAGE = "common/main-page.html";
+FrameConst.DEFAULT_PAGE = "default.html";
FrameConst.do_heartbeat = false;
FrameConst.change_pass = false;
@@ -35,7 +36,7 @@ FrameConst.REST_HEARTBEAT = "../../api/uiframe/v1/heartbeat";
FrameConst.REST_GETLICENSEINFO = "../../api/uiframe/v1/licensevalueinfo";
FrameConst.REST_CHECKRIGHT = "../../api/uiframe/v1/checkRight";
FrameConst.REST_LOGIN = "../../api/uiframe/v1/login";
-FrameConst.REST_LOGOUT = "../../api/uiframe/v1/loginOut?SSOAction=SSOLogout";
+FrameConst.REST_LOGOUT = "/openoui/common/logout.html";
FrameConst.REST_GET_FRAME_MENUDIRECTION = "../../api/uiframe/v1/confByKey?key=usf.mainframe.web.navigation.direction";
FrameConst.REST_GET_USERNAME = "../../api/uiframe/v1/userName";
diff --git a/openo-portal/portal-common/src/main/webapp/common/js/core/openoFrameWork.js b/openo-portal/portal-common/src/main/webapp/common/js/core/openoFrameWork.js
index 267b7219..0ce09df5 100644
--- a/openo-portal/portal-common/src/main/webapp/common/js/core/openoFrameWork.js
+++ b/openo-portal/portal-common/src/main/webapp/common/js/core/openoFrameWork.js
@@ -403,51 +403,51 @@ function setThemeColor( configColor ){
});
};
-function setFrameWorkByConf(){
- //设置用户相关的框架下拉菜单是否可用
- var helpMenuItem = openoFrameWork_conf.helpMenuItem;
- var aboutMenuItem = openoFrameWork_conf.aboutMenuItem;
- var flightMenuItem = openoFrameWork_conf.flightMenuItem;
- var fullscreenMenuItem = openoFrameWork_conf.fullscreenMenuItem;
- var logoutMenuItem = openoFrameWork_conf.logoutMenuItem;
- var changePassMenuItem = openoFrameWork_conf.changePassMenuItem;
- if (!helpMenuItem || helpMenuItem === "false") {
- $('#uep_ict_help_url').parent('li').remove();
- }
- if(!aboutMenuItem|| aboutMenuItem === "false"){
- $('[data-target="#aboutDlg"]').parent('li').remove();
- }
- if(!helpMenuItem && !aboutMenuItem){
- $('#uep_ict_help_div').remove();
- }
- if (!flightMenuItem|| flightMenuItem === "false") {
- $('#header_notification_bar').html("<div>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp</div>");
- }
- if (!fullscreenMenuItem|| fullscreenMenuItem === "false") {
- //$('#trigger_fullscreen').parent().css("display", "none");
- $('#trigger_fullscreen_div').html("");
- }
- if (!logoutMenuItem || logoutMenuItem === "false") {
- //$('#trigger_logout').parent().css("display", "none");
- $('#trigger_logout_div').html("");
- }
- if ((!fullscreenMenuItem && !logoutMenuItem) || (fullscreenMenuItem === "false" && logoutMenuItem === "false")) {
- $('#full_logout_divider').css("display", "none");
- }
- if (!changePassMenuItem ) {
- $('#changePwd_labellink').css('display','none');
- $('#full_logout_divider').css('display','none');
- }
-
- //设置二次开发者选择的框架皮肤
- var defaultColor = openoFrameWork_conf.defaultThemeColor;
- var panel = $('.zte-theme-panel');
- $('ul > li', panel).removeClass("current");
- if (store && !store('style_color')) { // cookie没有才设置默认主题
- setThemeColor(defaultColor);
- }else{
- setThemeColor(store('style_color'));
- }
+function setFrameWorkByConf() {
+ //设置用户相关的框架下拉菜单是否可用
+ var helpMenuItem = openoFrameWork_conf.helpMenuItem;
+ var aboutMenuItem = openoFrameWork_conf.aboutMenuItem;
+ var flightMenuItem = openoFrameWork_conf.flightMenuItem;
+ var fullscreenMenuItem = openoFrameWork_conf.fullscreenMenuItem;
+ var logoutMenuItem = openoFrameWork_conf.logoutMenuItem;
+ var changePassMenuItem = openoFrameWork_conf.changePassMenuItem;
+ if (!helpMenuItem || helpMenuItem === "false") {
+ $('#uep_ict_help_url').parent('li').remove();
+ }
+ if (!aboutMenuItem|| aboutMenuItem === "false") {
+ $('[data-target="#aboutDlg"]').parent('li').remove();
+ }
+ if (!helpMenuItem && !aboutMenuItem) {
+ $('#uep_ict_help_div').remove();
+ }
+ if (!flightMenuItem|| flightMenuItem === "false") {
+ $('#header_notification_bar').html("<div>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp</div>");
+ }
+ if (!fullscreenMenuItem|| fullscreenMenuItem === "false") {
+ //$('#trigger_fullscreen').parent().css("display", "none");
+ $('#trigger_fullscreen_div').html("");
+ }
+ if (!logoutMenuItem || logoutMenuItem === "false") {
+ //$('#trigger_logout').parent().css("display", "none");
+ $('#trigger_logout_div').html("");
+ }
+ if ((!fullscreenMenuItem && !logoutMenuItem) || (fullscreenMenuItem === "false" && logoutMenuItem === "false")) {
+ $('#full_logout_divider').css("display", "none");
+ }
+ if (!changePassMenuItem ) {
+ $('#changePwd_labellink').css('display','none');
+ $('#full_logout_divider').css('display','none');
+ }
+
+ //设置二次开发者选择的框架皮肤
+ var defaultColor = openoFrameWork_conf.defaultThemeColor;
+ var panel = $('.zte-theme-panel');
+ $('ul > li', panel).removeClass("current");
+ if (store && !store('style_color')) { // cookie没有才设置默认主题
+ setThemeColor(defaultColor);
+ } else {
+ setThemeColor(store('style_color'));
+ }
};
/*新增的hashtabel实现类,用户后续iframe的缓存,前进后退时打开过的页面的菜单id的缓存等*/
@@ -1269,7 +1269,7 @@ var openoFrameWork = function () {
}
var pdiv="pdiv_"+miframe;
if($("#"+pdiv).length<=0){//检查下,如果该div没有添加过就添加
- pageContentBody.append("<div id='"+pdiv+"'></div>");
+ pageContentBody.append("<div id='"+pdiv+"' style='height:800px;overflow:auto'></div>");
}
dealstartPageLoading();
pymParent=createIframe(pdiv, url,miframe,miframe,miframe,_xdomain,_iframeAutoScroll);
@@ -1952,7 +1952,7 @@ var openoFrameWork = function () {
return "Already disabled!";
};
window.doLogout = function(){
- window.location=FrameConst.REST_LOGOUT;
+ top.window.document.location.href=FrameConst.REST_LOGOUT;
};
//处理ict注销确认
$('#trigger_logout').click(function(){
@@ -3169,7 +3169,6 @@ var openoFrameWork = function () {
return null; //返回参数值
}
};
-
}();
//抽取html片段中任意位置的script标签(包括代码是内嵌的情况)逐个运行(不会在单个script加载不到的时候停下来)
diff --git a/openo-portal/portal-common/src/main/webapp/common/js/login.js b/openo-portal/portal-common/src/main/webapp/common/js/login.js
index ccc150a4..61d96b53 100644
--- a/openo-portal/portal-common/src/main/webapp/common/js/login.js
+++ b/openo-portal/portal-common/src/main/webapp/common/js/login.js
@@ -17,39 +17,35 @@ String.prototype.trim = function() {
return this.replace(/(^\s*)|(\s*$)/g, "");
};
-function loginSubmitHandler(form) {
- var params = {};
- params["username"] = $("#openo_input_userName").val().trim();
- var sourcePass = $("#openo_input_password").val();
- var pass = sourcePass;
- if (FrameConst.isEncypt === "true") {
- pass = ict_framework_func1(pass);
+function loginSubmitHandler() {
+ var loginData = {
+ "userName": $("#openo_input_userName").val(),
+ "password": $("#openo_input_password").val()
}
- params["password"] = pass;
- params["isEncypted"] = FrameConst.isEncypt;
- saveUserInfo(params);
- location.href = FrameConst.DEFAULT_LOGINSKIP_PAGE;
-// $.ajax({
-// url : FrameConst.REST_LOGIN,
-// type : 'POST',
-// data : JSON.stringify(params),
-// dataType : 'json',
-// contentType : 'application/json; charset=utf-8',
-// success : function(data, status, xhr) {
-// if (data.result == 0) {
-// var epass = CryptoJS.MD5(params.username+sourcePass);
-// store("icttka", epass.toLocaleString());
-// }
-// processLoginResult(data, params);
-// },
-// Error : function(xhr, error, exception) {
-// if (console) {
-// console.log("login fail:" + error);
-// console.log(exception);
-// }
-// }
-// });
+ saveUserInfo();
+
+ $.ajax({
+ url : "/openoapi/auth/v1/tokens",
+ type : "POST",
+ contentType : 'application/json; charset=utf-8',
+ data : JSON.stringify(loginData)
+ }).done(function(data) {
+ var topURL = top.window.document.location.href;
+ if (topURL.indexOf("?service") != -1) {
+ top.window.document.location.href = decodeURIComponent(topURL.substring(topURL.indexOf("?service")+9));
+ } else {
+ top.window.document.location.href = "/openoui/common/default.html";
+ }
+ }).fail(function(data) {
+ if (data.status == 401) {
+ alert("the username or password is wrong.")
+ // username or pasword is wrong.
+ } else {
+ // system error.
+ }
+ top.window.document.location.href = "/openoui/common/login.html";
+ });
};
var Login = function () {
@@ -169,9 +165,9 @@ var Login = function () {
handleLogin();
handleForgetPassword();
$.backstretch([
- "./common/image/integration/openo_bg_1.jpg",
- "./common/image/integration//openo_bg_2.jpg",
- "./common/image/integration//openo_bg_3.jpg"
+ "image/integration/openo_bg_1.jpg",
+ "image/integration//openo_bg_2.jpg",
+ "image/integration//openo_bg_3.jpg"
], {
fade: 500,
duration: 15000
@@ -188,13 +184,13 @@ $(document).ready(function() {
}
});
-function saveUserInfo(params) {
+function saveUserInfo() {
var rmbcheck = $("input[name='remember']");
if (rmbcheck.attr("checked") == true || rmbcheck.is(':checked')) {
var userName = $("#openo_input_userName").val();
var passWord = $("#openo_input_password").val();
store("remember", "true");
- store("openo_input_userName", params.username);
+ store("openo_input_userName", username);
store("openo_input_password", passWord);
} else {
store.remove("remember");
@@ -202,3 +198,19 @@ function saveUserInfo(params) {
store.remove("openo_input_password");
}
}
+
+function logout() {
+ alert("logout");
+ $.ajax({
+ url : "/openoapi/auth/v1/tokens" + "?=" + new Date().getTime(),
+ type : "DELETE",
+ contentType : 'application/json',
+ dataType: "text",
+ success : function() {
+ top.window.location = "/openoui/auth/v1/login/html/login.html";
+ },
+ error : function() {
+ top.window.location = "/openoui/auth/v1/login/html/login.html";
+ }
+ });
+}
diff --git a/openo-portal/portal-common/src/main/webapp/common/js/security/security.js b/openo-portal/portal-common/src/main/webapp/common/js/security/security.js
index 521130c4..f6ae4d05 100644
--- a/openo-portal/portal-common/src/main/webapp/common/js/security/security.js
+++ b/openo-portal/portal-common/src/main/webapp/common/js/security/security.js
@@ -22,7 +22,7 @@ var ErrResult_LOGIN_SERV_ERROR = -1;
function processLoginResult(data,params){
if(data.home="web/res/web-framework/index.html"||data.home.indexOf("index.html")>0){
- data.home=FrameConst.DEFAULT_LOGINSKIP_PAGE;
+ data.home=FrameConst.DEFAULT_PAGE;
//下面这部分是为了演示需要临时增加的自动切换
/*if(params.username=="admin1"){
data.home="/web/res/web-framework/default.html?menu=1";
diff --git a/openo-portal/portal-common/src/main/webapp/common/json/menu_list.json b/openo-portal/portal-common/src/main/webapp/common/json/menu_list.json
index e4b0c3ad..e5a90972 100644
--- a/openo-portal/portal-common/src/main/webapp/common/json/menu_list.json
+++ b/openo-portal/portal-common/src/main/webapp/common/json/menu_list.json
@@ -1,96 +1,102 @@
-{
- "parentMenus":[
- {
- "id":"openo_menu_service",
- "url":"",
- "iconClass":"fa fa-comments"
- },
- {
- "id":"openo_menu_resource_mgr",
- "url":"",
- "iconClass":"fa fa-folder-open-o"
- },
- {
- "id":"openo_menu_user",
- "url":"",
- "iconClass":"fa fa-puzzle-piece"
- },
- {
- "id":"openo_menu_orchestrator",
- "url":"",
- "iconClass":"fa fa-folder-open-o"
- },
- {
- "id":"openo_menu_manage_view",
- "url":"",
- "iconClass":"fa fa-coffee"
- },
- {
- "id":"openo_menu_performance",
- "url":"",
- "iconClass":"fa fa-bar-chart"
- }
- ],
- "childMenus":[
- {
- "parentId":"openo_menu_service",
- "id":"openo_menu_service_service_management",
- "url":"../lifecyclemgr/gsolcmmain.html",
- "iconClass":"fa fa-comments"
- },
- {
- "parentId":"openo_menu_resource_mgr",
- "id":"openo_menu_resource_mgr",
- "url":"../resmgr-sdn/resource.html",
- "iconClass":"fa fa-folder-open-o"
- },
- {
- "parentId":"openo_menu_user",
- "id":"openo_menu_user_user_management",
- "url":"../user/user.html",
- "iconClass":"fa fa-puzzle-piece"
- },
- {
- "parentId":"openo_menu_orchestrator",
- "id":"openo_menu_orchestrator_model_design",
- "url":"/winery/servicetemplates.html",
- "iconClass":"fa fa-folder-open-o"
- },
- {
- "parentId":"openo_menu_orchestrator",
- "id":"openo_menu_orchestrator_package",
- "url":"../catalog/csarPackage.html",
- "iconClass":"fa fa-folder-open-o"
- },
- {
- "parentId":"openo_menu_orchestrator",
- "id":"openo_menu_orchestrator_service_template",
- "url":"../catalog/template.html",
- "iconClass":"fa fa-list-alt"
- },
- {
- "parentId":"openo_menu_manage_view",
- "id":"openo_menu_manage_view_vim_manage",
- "url":"../extsys/vim/vimView.html",
- "iconClass":"fa fa-coffee"
- },
- {
- "parentId":"openo_menu_manage_view",
- "id":"openo_menu_manage_view_vnfm",
- "url":"../extsys/vnfm/vnfmView.html",
- "iconClass":"fa fa-coffee"
- },
- {
- "parentId":"openo_menu_performance",
- "id":"openo_menu_performance_performance_query",
- "url":"../performance/performance_view.html",
- "iconClass":"fa fa-bar-chart"
- },
- {
- "parentId":"openo_menu_performance",
- "id":"openo_menu_alarm_alarm_query",
- "url":"../performance/alarm_view.html",
- "iconClass":"fa fa-bell"
- }
- ]
+{
+ "parentMenus":[
+ {
+ "id":"openo_menu_service",
+ "url":"",
+ "iconClass":"fa fa-comments"
+ },
+ {
+ "id":"openo_menu_resource_mgr",
+ "url":"",
+ "iconClass":"fa fa-folder-open-o"
+ },
+ {
+ "id":"openo_menu_user",
+ "url":"",
+ "iconClass":"fa fa-puzzle-piece"
+ },
+ {
+ "id":"openo_menu_orchestrator",
+ "url":"",
+ "iconClass":"fa fa-folder-open-o"
+ },
+ {
+ "id":"openo_menu_manage_view",
+ "url":"",
+ "iconClass":"fa fa-coffee"
+ },
+ {
+ "id":"openo_menu_performance",
+ "url":"",
+ "iconClass":"fa fa-bar-chart"
+ }
+ ],
+ "childMenus":[
+ {
+ "parentId":"openo_menu_service",
+ "id":"openo_menu_service_service_management",
+ "url":"../lifecyclemgr/gsolcmmain.html",
+ "iconClass":"fa fa-comments"
+ },
+ {
+ "parentId":"openo_menu_resource_mgr",
+ "id":"openo_menu_resource_mgr_sdno",
+ "url":"../resmgr-sdn/resource.html",
+ "iconClass":"fa fa-folder-open-o"
+ },
+ {
+ "parentId":"openo_menu_resource_mgr",
+ "id":"openo_menu_resource_mgr_nfvo",
+ "url":"../resmgr-nfv/resource.html",
+ "iconClass":"fa fa-folder-open-o"
+ },
+ {
+ "parentId":"openo_menu_user",
+ "id":"openo_menu_user_user_management",
+ "url":"../user/user.html",
+ "iconClass":"fa fa-puzzle-piece"
+ },
+ {
+ "parentId":"openo_menu_orchestrator",
+ "id":"openo_menu_orchestrator_package",
+ "url":"../catalog/csarPackage.html",
+ "iconClass":"fa fa-folder-open-o"
+ },
+ {
+ "parentId":"openo_menu_orchestrator",
+ "id":"openo_menu_orchestrator_service_template",
+ "url":"../catalog/template.html",
+ "iconClass":"fa fa-list-alt"
+ },
+ {
+ "parentId":"openo_menu_manage_view",
+ "id":"openo_menu_manage_view_vim_manage",
+ "url":"../extsys/vim/vimView.html",
+ "iconClass":"fa fa-coffee"
+ },
+ {
+ "parentId":"openo_menu_manage_view",
+ "id":"openo_menu_manage_view_vnfm",
+ "url":"../extsys/vnfm/vnfmView.html",
+ "iconClass":"fa fa-coffee"
+ },
+ {
+ "parentId":"openo_menu_manage_view",
+ "id":"openo_menu_manage_view_sdn_controller",
+ "url":"../extsys/sdncontroller/controller.html",
+ "iconClass":"fa fa-coffee"
+ },
+ {
+ "parentId":"openo_menu_performance",
+ "id":"openo_menu_performance_performance_query",
+ "url":"../performance/performance_view.html",
+ "iconClass":"fa fa-bar-chart"
+ },
+ {
+ "parentId":"openo_menu_performance",
+ "id":"openo_menu_alarm_alarm_query",
+ "url":"../performance/alarm_view.html",
+ "iconClass":"fa fa-bell"
+ }
+ ]
} \ No newline at end of file
diff --git a/openo-portal/portal-common/src/main/webapp/common/login.html b/openo-portal/portal-common/src/main/webapp/common/login.html
index 145bf3b4..0d0ddbba 100644
--- a/openo-portal/portal-common/src/main/webapp/common/login.html
+++ b/openo-portal/portal-common/src/main/webapp/common/login.html
@@ -22,31 +22,29 @@
<meta content="width=device-width, initial-scale=1.0" name="viewport"/>
<meta content="" name="description"/>
<meta content="" name="author"/>
- <link href="./common/thirdparty/fakeLoader/fakeLoader.css" rel="stylesheet" type="text/css"/>
- <link href="./common/thirdparty/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css"/>
- <link href="./common/thirdparty/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css"/>
- <link href="./common/thirdparty/uniform/css/uniform.default.css" rel="stylesheet" type="text/css"/>
- <link href="./common/css/style-custom.css" rel="stylesheet" type="text/css"/>
- <link href="./common/css/style.css" rel="stylesheet" type="text/css"/>
- <link href="./common/css/style-responsive.css" rel="stylesheet" type="text/css"/>
- <link href="./common/css/plugins.css" rel="stylesheet" type="text/css"/>
- <link href="./common/css/login.css" rel="stylesheet" type="text/css"/>
- <script src="./common/thirdparty/jquery/jquery-1.10.2.min.js" type="text/javascript"></script>
- <script src="./common/thirdparty/fakeLoader/fakeLoader.min.js" type="text/javascript"></script>
- <script src="./common/thirdparty/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
- <script src="./common/thirdparty/jquery-blockui/jquery.blockui.min.js" type="text/javascript"></script>
- <script src="./common/thirdparty/uniform/jquery.uniform.min.js" type="text/javascript"></script>
- <script src="./common/thirdparty/jquery-validation/js/jquery.validate.min.js" type="text/javascript"></script>
- <script src="./common/thirdparty/backstretch/jquery.backstretch.min.js" type="text/javascript"></script>
- <script src="./common/thirdparty/jquery.i18n/jquery.i18n.properties-1.0.9.js" type="text/javascript"></script>
- <script src="./common/js/core/const.js" type="text/javascript"></script>
- <script src="./common/js/security/security.js" type="text/javascript"></script>
- <script src="./common/js/core/hk.min.js" type="text/javascript"></script>
- <script src="./common/js/tools.js" type="text/javascript"></script>
- <script src="./common/js/security/aes.js" type="text/javascript"></script>
- <script src="./common/js/security/framework-util.js" type="text/javascript"></script>
- <script src="./common/js/login.js" type="text/javascript"></script>
- <script src="./common/js/international/loadi18n.js" type="text/javascript"></script>
+ <link href="thirdparty/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css"/>
+ <link href="thirdparty/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css"/>
+ <link href="thirdparty/uniform/css/uniform.default.css" rel="stylesheet" type="text/css"/>
+ <link href="css/style-custom.css" rel="stylesheet" type="text/css"/>
+ <link href="css/style.css" rel="stylesheet" type="text/css"/>
+ <link href="css/style-responsive.css" rel="stylesheet" type="text/css"/>
+ <link href="css/plugins.css" rel="stylesheet" type="text/css"/>
+ <link href="css/login.css" rel="stylesheet" type="text/css"/>
+ <script src="thirdparty/jquery/jquery-1.10.2.min.js" type="text/javascript"></script>
+ <script src="thirdparty/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
+ <script src="thirdparty/jquery-blockui/jquery.blockui.min.js" type="text/javascript"></script>
+ <script src="thirdparty/uniform/jquery.uniform.min.js" type="text/javascript"></script>
+ <script src="thirdparty/jquery-validation/js/jquery.validate.min.js" type="text/javascript"></script>
+ <script src="thirdparty/backstretch/jquery.backstretch.min.js" type="text/javascript"></script>
+ <script src="thirdparty/jquery.i18n/jquery.i18n.properties-1.0.9.js" type="text/javascript"></script>
+ <script src="js/core/const.js" type="text/javascript"></script>
+ <script src="js/security/security.js" type="text/javascript"></script>
+ <script src="js/core/hk.min.js" type="text/javascript"></script>
+ <script src="js/tools.js" type="text/javascript"></script>
+ <script src="js/security/aes.js" type="text/javascript"></script>
+ <script src="js/security/framework-util.js" type="text/javascript"></script>
+ <script src="js/login.js" type="text/javascript"></script>
+ <script src="js/international/loadi18n.js" type="text/javascript"></script>
<script>
if(top != window){
top.location.href = location.href;
@@ -61,15 +59,11 @@
</script>
</head>
<body class="login">
- <div id="pageLoading" class="fakeloader"></div>
- <script type="text/javascript">
- $("#pageLoading").fakeLoader({text:"",bgColor:"#1178ee",opacity:'1',spinner:"spinner2",zIndex:99999999});
- </script>
<div class="logo">
- <img id="openo_login_logo_white" src="./common/image/integration/openo_logo_white.png" name_img="openo_login_logo_white_img" style="display:none" alt=""/>
+ <img id="openo_login_logo_white" src="image/integration/openo_logo_pantone.png" width="30%" name_img="openo_login_logo_white_img" style="display:none" alt=""/>
</div>
<div class="content">
- <form class="login-form" method="post" id="fm1" action="./login">
+ <form class="login-form">
<h3 class="form-title"><span id="openo_login_welcome" name_i18n="openo_login_i18n_login"></span></h3>
<div class="alert display-hide" id="nameOrpwdError" tipstatus="normal">
<button class="close" data-close="alert" onclick="hidetip('nameOrpwdError');"></button>
@@ -107,13 +101,12 @@
</div>
<script>
jQuery(document).ready(function() {
- loadi18n_WebFramework('web-framework-login-i18n', './common/i18n/', 'openo_login_i18n_login');
+ loadi18n_WebFramework('web-framework-login-i18n', 'i18n/', 'openo_login_i18n_login');
$("#openo_login_logo_white").css('display','inline');
Login.init();
if(store("openo_input_userName")){
$("#openo_input_userName").val(store("openo_input_userName"));
}
- $("#pageLoading").setToHide();
});
</script>
</body>
diff --git a/openo-portal/portal-common/src/main/webapp/common/logout.html b/openo-portal/portal-common/src/main/webapp/common/logout.html
new file mode 100644
index 00000000..bb3dbc21
--- /dev/null
+++ b/openo-portal/portal-common/src/main/webapp/common/logout.html
@@ -0,0 +1,39 @@
+<!--
+ Copyright 2016 Huawei Technologies Co., Ltd.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<!doctype html>
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+ <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+ <script type="text/javascript" src="/openoui/common/thirdparty/jquery/jquery-1.11.2.min.js"></script>
+</head>
+<body>
+ <script type="text/javascript">
+ $.ajax({
+ url: "/openoapi/auth/v1/tokens" + "?=" + new Date().getTime(),
+ type: "DELETE",
+ contentType: "application/json",
+ dataType: "text",
+ success: function() {
+ top.window.location = "/openoui/common/login.html";
+ },
+ error: function() {
+ top.window.location = "/openoui/common/login.html";
+ }
+ })
+ </script>
+</body>
+</html>
diff --git a/openo-portal/portal-extsys/src/main/webapp/extsys/sdncontroller/controller.html b/openo-portal/portal-extsys/src/main/webapp/extsys/sdncontroller/controller.html
index 59d35c73..1d38c414 100644
--- a/openo-portal/portal-extsys/src/main/webapp/extsys/sdncontroller/controller.html
+++ b/openo-portal/portal-extsys/src/main/webapp/extsys/sdncontroller/controller.html
@@ -32,7 +32,6 @@
<script type="text/javascript" src="js/bootstrap-table-filter-control.min.js"></script>
<script type="text/javascript">
$(document).ready(function () {
- setUrlFromFile();
loadControllerData();
});
function operateFormatter(value, row, index) {
@@ -43,7 +42,7 @@
window.operateEvents = {
'click .siteDeleteImg': function (e, value, row, index) {
// TO DO ajex call for delete
- deleteController(row.id, row);
+ deleteController(row["sdnControllerId"]);
}
};
</script>
@@ -291,7 +290,7 @@
class="required">*</span>
</label>
<div class="col-sm-7">
- <input type="text" id="description" name="description"
+ <input type="text" id="type" name="type"
class="form-control"/>
</div>
</div>
diff --git a/openo-portal/portal-extsys/src/main/webapp/extsys/sdncontroller/js/controller.js b/openo-portal/portal-extsys/src/main/webapp/extsys/sdncontroller/js/controller.js
index df0fef51..b420c604 100644
--- a/openo-portal/portal-extsys/src/main/webapp/extsys/sdncontroller/js/controller.js
+++ b/openo-portal/portal-extsys/src/main/webapp/extsys/sdncontroller/js/controller.js
@@ -37,7 +37,7 @@ function deleteController(objectId) {
contentType: "application/json",
success: function (jsonobj) {
$('#controller').bootstrapTable('remove', {
- field: 'id',
+ field: 'sdnControllerId',
values: [objectId]
});
alert("Delete Controller successfull !!!");
@@ -144,7 +144,6 @@ $(function () {
$('#createController').click(function () {
var formData = JSON.stringify($("#controllerForm").serializeObject());
- var jsonobj = JSON.parse(formData);
var requestUrl = "/openoapi/extsys/v1/sdncontrollers";
$.ajax({
type: "POST",
@@ -154,8 +153,7 @@ $(function () {
data: formData,
success: function (jsonResp) {
alert("Controller saved successfully!!!");
- jsonobj["id"] = jsonResp.sdnControllerId;
- $('#controller').bootstrapTable("append", jsonobj);
+ $('#controller').bootstrapTable("append", jsonResp);
$('#vmAppDialog').removeClass('in').css('display', 'none');
},
diff --git a/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/InputData.html b/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/InputData.html
index 917cff16..b5a2d98c 100644
--- a/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/InputData.html
+++ b/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/InputData.html
@@ -40,7 +40,25 @@
if (jsonData != null) {
$("body").empty();
for(var key in jsonData.inputParameters){
- $("body").append('<div class="mT15 form-group row" style="margin-top:35px;margin-left:25%"><div class="col-sm-6" align="right"><label class="control-label"><span style="font-size:16px;">'+ key + ':</span></label></div><div class="col-sm-6"><input type="text" name="" maxlength="256" style="margin-left:10px;width:250px;" data-toggle="tooltip" data-placement="top" title="'+ jsonData.inputParameters[key] + '" value="'+ jsonData.inputParameters[key] + '" readonly disabled/></div></div>');
+ var name = key;
+ if(name.includes('.'))
+ {
+ name = key.substring(key.lastIndexOf('.')+1,key.length);
+ }
+ var paramValue = jsonData.inputParameters[key];
+ if(name.indexOf('location') != -1) {
+ var vimObj = getVimNameById(paramValue);
+ if(vimObj != undefined){
+ paramValue = vimObj.name;
+ }
+ }
+ else if(name.indexOf('sdncontroller') != -1){
+ var sdnControllerObj = getSdnControllerNameById(paramValue);
+ if(sdnControllerObj != undefined){
+ paramValue = sdnControllerObj.name;
+ }
+ }
+ $("body").append('<div class="mT15 form-group row" style="margin-top:35px;margin-left:25%"><div class="col-sm-6" align="right"><label class="control-label"><span style="font-size:16px;">'+ name + ':</span></label></div><div class="col-sm-6"><input type="text" name="" maxlength="256" style="margin-left:10px;width:250px;" data-toggle="tooltip" data-placement="top" title="'+ paramValue + '" value="'+ paramValue + '" readonly disabled/></div></div>');
}
}
diff --git a/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/gsolcmmain.html b/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/gsolcmmain.html
index 7fbc77d3..b7357c52 100644
--- a/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/gsolcmmain.html
+++ b/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/gsolcmmain.html
@@ -15,6 +15,7 @@
limitations under the License.
-->
+
<!DOCTYPE html>
<html lang="en">
<head>
@@ -28,19 +29,23 @@
<script type="text/javascript" src="js/rest.js"></script>
<script type="text/javascript" src="js/bootstrap-table.min.js"></script>
<script type="text/javascript" src="js/gsolcm.js"></script>
+ <script type="text/javascript" src="../common/thirdparty/bootbox/bootbox.min.js"></script>
+ <script type="text/javascript" src="js/jquery.isloading.min.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.12.1.min.js"></script>
<link href="css/jquery-ui-1.12.1.min.css" rel="stylesheet" />
<script type="text/javascript" src="js/bootstrap-table-filter-control.min.js"></script>
<script type="text/javascript">
$(document).ready(function () {
- /* $('.modal-content').resizable({
-
- minHeight: 300,
- minWidth: 300
- });*/
+ new lcmHandler();
+
$('.modal-dialog').draggable();
$("#detailCont").show();
var jsondata = loadGetServiceData();
+
+ $.each(jsondata,function(k,v){
+ jsondata[k].createTime= new Date(jsondata[k].createTime).toUTCString();
+ });
+
$('#sai').bootstrapTable({
//Assigning data to table
data: jsondata
@@ -68,10 +73,10 @@
//loadIframe("topoFrame", "chartTopo.html?serviceId="+row.serviceId);
document.getElementById("topoCont").setAttribute('data', 'chartTopo.html?serviceId='+row.serviceId);
- document.getElementById('inputcontent').setAttribute('data', 'inputData.html?json='+ JSON.stringify(row));
- document.getElementById('inputcontentDlg').setAttribute('data', 'inputData.html?json='+ JSON.stringify(row));
+ document.getElementById('inputcontent').setAttribute('data', 'InputData.html?json='+ JSON.stringify(row));
+ document.getElementById('inputcontentDlg').setAttribute('data', 'InputData.html?json='+ JSON.stringify(row));
});
- new lcmHandler();
+
});
function operateFormatter(value, row, index) {
@@ -210,6 +215,30 @@
.clearfix {
display: none;
}
+ .isloading-wrapper.isloading-right{
+ margin-left:10px;
+ }
+ .isloading-overlay{
+ position:relative;
+ text-align:center;
+ }
+ .isloading-overlay .isloading-wrapper{
+ background: url("images/loading.gif") 90% 50% no-repeat #FFFFFF;
+ padding:15px 30px;
+ -webkit-border-radius:7px;
+ -webkit-background-clip:padding-box;
+ -moz-border-radius:7px;
+ -moz-background-clip:padding;
+ border-radius:7px;
+ background-clip:padding-box;
+ display:inline-block;
+ margin:0 auto;
+ top:10%;
+ z-index:9000;
+ }
+ .icon-refresh{
+ background: url("images/loading.gif") 50% 50% no-repeat;
+ }
</style>
</head>
<body id="open_base_site_cotentBody" class="cotentBody ng-scope">
@@ -358,11 +387,11 @@
</iframe>-->
</div>
<div id="inpContMod" style="display:none;">
- <object id="inputcontentDlg" data="inputData.html" width="100%" height="300"
+ <object id="inputcontentDlg" data="InputData.html" width="100%" height="300"
type="text/html">
</object>
- <!--<iframe src="inputData.html" name="" style="width:100%" allowTransparency="true" scrolling="no" frameborder="0">
+ <!--<iframe src="InputData.html" name="" style="width:100%" allowTransparency="true" scrolling="no" frameborder="0">
</iframe>
</iframe>-->
</div>
@@ -431,7 +460,7 @@
</object>
</div>
<div id="inpCont" style="display:none;">
- <object id="inputcontent" src="inputData.html" width="100%" height="300" type="text/html">
+ <object id="inputcontent" src="InputData.html" width="100%" height="300" type="text/html">
</object>
</div>
</div>
diff --git a/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/images/loading.gif b/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/images/loading.gif
new file mode 100644
index 00000000..5e28c953
--- /dev/null
+++ b/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/images/loading.gif
Binary files differ
diff --git a/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/js/gsolcm.js b/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/js/gsolcm.js
index 57643c8c..9105d5d6 100644
--- a/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/js/gsolcm.js
+++ b/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/js/gsolcm.js
@@ -32,6 +32,7 @@ lcmHandler.prototype = {
alert('Location must be selected in Template Parameters');
return;
}
+ $.isLoading({ text: "Creating service..." });
var serviceInstance = {
serviceTemplateId: $("#svcTempl").val(),
serviceName: $('#svcName').val(),
@@ -50,6 +51,7 @@ lcmHandler.prototype = {
).then(
function(serviceInstance) {
updateTable(serviceInstance);
+ $.isLoading('hide');
$('#vmAppDialog').removeClass('in').css('display', 'none');
}
);
@@ -146,12 +148,14 @@ function fetchGsoTemplateInputParameters(templateId) {
$.when(
fetchTemplateParameterDefinitions(templateId),
fetchGsoNestingTemplateParameters(templateId),
- fetchVimInfo()
+ fetchVimInfo(),
+ fetchSdnController()
).then(
- function (templateParameterResponse, nestingTempatesParas, vimInfoResponse) {
+ function (templateParameterResponse, nestingTempatesParas, vimInfoResponse, sdnControllersResponse) {
var inputParas = concat(templateParameterResponse[0].inputs, nestingTempatesParas);
var vims = translateToVimInfo(vimInfoResponse[0]);
- templateParameters = translateToTemplateParameters(inputParas, vims);
+ var sdnControllers = translateToSdnControllers(sdnControllersResponse[0]);
+ templateParameters = translateToTemplateParameters(inputParas, vims, sdnControllers);
defer.resolve(templateParameters);
}
);
@@ -205,7 +209,13 @@ function fetchGsoNestingTemplateParameters(templateId) {
description: nodeTemplate.name + ' Location',
required: 'true'
});
- }
+ inputs.push({
+ name: nodeTemplate.type + '.sdncontroller',
+ type: 'sdncontroller',
+ description: nodeTemplate.name + ' SDN Controller',
+ required: 'true'
+ });
+ }
nodeAggregatation.notify(inputs);
}
);
@@ -255,7 +265,7 @@ function pushAll(acc, array) {
return result;
}
-function translateToTemplateParameters(inputs, vims) {
+function translateToTemplateParameters(inputs, vims, controllers) {
var inputParameters = [];
var i;
for (i = 0; i < inputs.length; i += 1) {
@@ -269,17 +279,19 @@ function translateToTemplateParameters(inputs, vims) {
value: inputs[i].defaultValue || ''
};
}
- return {changed: false, parameters: inputParameters, vimInfos: vims};
+ return {changed: false, parameters: inputParameters, vimInfos: vims, sdnControllers: controllers};
}
function fetchNfvoTemplateInputParameters(templateId) {
var defer = $.Deferred();
$.when(
fetchTemplateParameterDefinitions(templateId),
- fetchVimInfo()
+ fetchVimInfo(),
+ fetchSdnController()
).then(
- function (templateParameterResponse, vimInfoResponse) {
+ function (templateParameterResponse, vimInfoResponse, sdnControllerResponse) {
var vims = translateToVimInfo(vimInfoResponse[0]);
+ var sdnControllers = translateToSdnControllers(sdnControllerResponse[0]);
var inputParas = templateParameterResponse[0].inputs;
inputParas.push({
name: 'location',
@@ -287,7 +299,13 @@ function fetchNfvoTemplateInputParameters(templateId) {
description: 'Location',
required: 'true'
});
- templateParameters = translateToTemplateParameters(inputParas, vims);
+ inputParas.push({
+ name: 'sdncontroller',
+ type: 'sdncontroller',
+ description: 'SDN Controller',
+ required: 'true'
+ });
+ templateParameters = translateToTemplateParameters(inputParas, vims, sdnControllers);
defer.resolve(templateParameters);
}
);
@@ -300,7 +318,7 @@ function fetchSdnoTemplateInputParameters(templateId) {
fetchTemplateParameterDefinitions(templateId)
).then(
function (templateParameterResponse) {
- templateParameters = translateToTemplateParameters(templateParameterResponse.inputs, []);
+ templateParameters = translateToTemplateParameters(templateParameterResponse.inputs, [], []);
defer.resolve(templateParameters);
}
);
@@ -323,48 +341,68 @@ function fetchVimInfo() {
});
}
+function fetchSdnController() {
+ var sdnControllerUri = '/openoapi/extsys/v1/sdncontrollers';
+ return $.ajax({
+ type: "GET",
+ url: sdnControllerUri
+ });
+}
+
function translateToVimInfo(vims) {
return vims.map(function (vim) {
return {
- vimId: vim.vimId,
- vimName: vim.name
+ optionId: vim.vimId,
+ optionName: vim.name
};
});
}
+function translateToSdnControllers(controllers) {
+ return controllers.map(function(controller) {
+ return {
+ optionId: controller.sdnControllerId,
+ optionName: controller.name
+ };
+ });
+}
+
function transformToComponents(templateParas) {
var inputs = templateParas.parameters;
var vimInfos = templateParas.vimInfos;
+ var sdnControllers = templateParas.sdnControllers;
var components = '';
inputs.forEach(function (inputPara) {
if(inputPara.type === 'location') {
- components = components + generateLocationComponent(inputPara, vimInfos);
- } else {
+ components = components + generateComboxComponent(inputPara, vimInfos);
+ } else if(inputPara.type === 'sdncontroller') {
+ components = components + generateComboxComponent(inputPara, sdnControllers);
+ } else {
components = components + generateComponent(inputPara);
}
});
return components;
}
-function generateLocationComponent(inputPara, vimInfos) {
+function generateComboxComponent(inputPara, items) {
var component = '<div class="form-group" style="margin-left:25px;margin-bottom:15px;">' +
'<label class="col-sm-3 control-label">' +
- '<span>'+ inputPara.description +'</span>' +
+ '<span>'+ inputPara.name +'</span>' +
'<span class="required">*</span>' +
'</label>' +
'<div class="col-sm-7">' +
'<select class="form-control" style ="padding-top: 0px;padding-bottom: 0px;"' +
- ' id="' + inputPara.id + '" name="vim_location">' +
- transformToOptions(vimInfos) +
+ ' id="' + inputPara.id + '" name="'+ inputPara.name +'">' +
+ transformToOptions(items) +
'</select></div></div>';
return component;
}
-function transformToOptions(vims) {
+function transformToOptions(items) {
var options = '<option value="select">--select--</option>';
var i;
- for (i = 0; i < vims.length; i += 1) {
- var option = '<option value="' + vims[i].vimId + '">' + vims[i].vimName + '</option>';
+ for (i = 0; i < items.length; i += 1) {
+ var option = '<option value="' + items[i].optionId + '">' + items[i].optionName + '</option>';
options = options + option;
}
return options;
@@ -373,11 +411,11 @@ function transformToOptions(vims) {
function generateComponent(inputPara) {
var component = '<div class="mT15 form-group" style="margin-left:25px;">' +
'<label class="col-sm-3 control-label">' +
- '<span>' + inputPara.description + '</span>' + generateRequiredLabel(inputPara) +
+ '<span>' + inputPara.name + '</span>' + generateRequiredLabel(inputPara) +
'</label>' +
'<div class="col-sm-7">' +
'<input type="text" id="' + inputPara.id + '" name="parameter description" class="form-control" placeholder="' +
- inputPara.description + '" value="' + inputPara.value + '" />' +
+ inputPara.name + '" value="' + inputPara.value + '" />' +
'</div></div>';
return component;
}
@@ -502,21 +540,28 @@ function formatDate(date) {
}
function deleteNe(rowId, row) {
- var instanceId = row.serviceId;
- var serviceType = row.serviceType;
- var gatewayService = '/openoapi/servicegateway/v1/services/' + instanceId + '/terminate';
- var remove = function () {
- $('#sai').bootstrapTable('remove', {field: 'serviceId', values: [instanceId]});
+ var deleteHandle = function(result) {
+ if(result) {
+ $.isLoading({ text: "Deleting service..." });
+ var instanceId = row.serviceId;
+ var serviceType = row.serviceType;
+ var gatewayService = '/openoapi/servicegateway/v1/services/' + instanceId + '/terminate';
+ var remove = function () {
+ $.isLoading( "hide" );
+ $('#sai').bootstrapTable('remove', {field: 'serviceId', values: [instanceId]});
+ };
+ if(serviceType === 'GSO') {
+ deleteGsoServiceInstance(gatewayService, instanceId, remove);
+ } else if (serviceType === 'NFVO') {
+ var nfvoNsUri = '/openoapi/nslcm/v1/ns';
+ deleteNonGsoServiceInstance(gatewayService, nfvoNsUri, instanceId, remove);
+ } else if (serviceType === 'SDNO') {
+ var sdnoNsUri = '/openoapi/sdnonslcm/v1/ns';
+ deleteNonGsoServiceInstance(gatewayService, sdnoNsUri, instanceId, remove);
+ }
+ }
};
- if(serviceType === 'GSO') {
- deleteGsoServiceInstance(gatewayService, instanceId, remove)
- } else if (serviceType === 'NFVO') {
- var nfvoNsUri = '/openoapi/nslcm/v1/ns';
- deleteNonGsoServiceInstance(gatewayService, nfvoNsUri, instanceId, remove);
- } else if (serviceType === 'SDNO') {
- var sdnoNsUri = '/openoapi/sdnonslcm/v1/ns';
- deleteNonGsoServiceInstance(gatewayService, sdnoNsUri, instanceId, remove);
- }
+ bootbox.confirm("Do you confirm to delete service?", deleteHandle);
}
function deleteGsoServiceInstance(gatewayService, instanceId, remove) {
diff --git a/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/js/jquery.isloading.min.js b/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/js/jquery.isloading.min.js
new file mode 100644
index 00000000..87573765
--- /dev/null
+++ b/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/js/jquery.isloading.min.js
@@ -0,0 +1,39 @@
+/**
+* Loading plugin for jQuery
+* version: v1.0.6
+*
+* Small helper to give the user a visual feedback that something is happening
+* when fetching/posting data
+*
+* USAGE:
+* - global overlay: $.isLoading();
+* - use javascript: $( selector ).isLoading();
+* - On non-form elements: $("div").isLoading({ text: "Loading", position:'inside'});
+* - remove the loading element: $( selector ).isLoading( "hide" );
+*
+* @author Laurent Blanes <laurent.blanes@gmail.com>
+* ---
+* Copyright 2013, Laurent Blanes ( https://github.com/hekigan/is-loading )
+*
+* The MIT License (MIT)
+*
+* Copyright (c) 2013 Laurent Blanes
+*
+* Permission is hereby granted, free of charge, to any person obtaining a copy
+* of this software and associated documentation files (the "Software"), to deal
+* in the Software without restriction, including without limitation the rights
+* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+* copies of the Software, and to permit persons to whom the Software is
+* furnished to do so, subject to the following conditions:
+*
+* The above copyright notice and this permission notice shall be included in
+* all copies or substantial portions of the Software.
+*
+* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+* THE SOFTWARE.
+*/!function(e,t){function i(t,i){this.element=t,this.options=e.extend({},n,i),this._defaults=n,this._name=o,this._loader=null,this.init()}function s(){e[o]||(e.isLoading=function(t){e("body").isLoading(t)})}var o="isLoading",n={position:"right",text:"","class":"glyphicon glyphicon-refresh",transparency:.5,tpl:'<span class="isloading-wrapper %wrapper%">%text%<i class="%class% glyphicon-spin"></i></span>',disableSource:!0,disableOthers:[]};i.prototype={init:function(){e(this.element).is("body")&&(this.options.position="overlay"),this.show()},show:function(){var i=this,s=i.options.tpl.replace("%wrapper%"," isloading-show isloading-"+i.options.position);switch(s=s.replace("%class%",i.options["class"]),s=s.replace("%text%",""!==i.options.text?i.options.text+" ":""),i._loader=e(s),e(i.element).is("input, textarea")&&!0===i.options.disableSource?e(i.element).attr("disabled","disabled"):!0===i.options.disableSource&&e(i.element).addClass("disabled"),i.options.position){case"inside":e(i.element).html(i._loader);break;case"overlay":var o=null;if(e(i.element).is("body"))o=e('<div class="isloading-overlay" style="position:fixed; left:0; top:0; z-index: 10000; background: rgba(0,0,0,'+i.options.transparency+"); width: 100%; height: "+e(t).height()+'px;" />'),e("body").prepend(o),e(t).on("resize",function(){o.height(e(t).height()+"px"),i._loader.css({top:e(t).height()/2-i._loader.outerHeight()/2+"px"})});else{var n=e(i.element).css("position"),a={},l=e(i.element).outerHeight()+"px",r="100%";a="relative"===n||"absolute"===n?{top:0,left:0}:e(i.element).position(),o=e('<div class="isloading-overlay" style="position:absolute; top: '+a.top+"px; left: "+a.left+"px; z-index: 10000; background: rgba(0,0,0,"+i.options.transparency+"); width: "+r+"; height: "+l+';" />'),e(i.element).prepend(o),e(t).on("resize",function(){o.height(e(i.element).outerHeight()+"px"),i._loader.css({top:o.outerHeight()/2-i._loader.outerHeight()/2+"px"})})}o.html(i._loader),i._loader.css({top:o.outerHeight()/2-i._loader.outerHeight()/2+"px"});break;default:e(i.element).after(i._loader)}i.disableOthers()},hide:function(){"overlay"===this.options.position?e(this.element).find(".isloading-overlay").first().remove():(e(this._loader).remove(),e(this.element).text(e(this.element).attr("data-isloading-label"))),e(this.element).removeAttr("disabled").removeClass("disabled"),this.enableOthers()},disableOthers:function(){e.each(this.options.disableOthers,function(t,i){var s=e(i);s.is("button, input, textarea")?s.attr("disabled","disabled"):s.addClass("disabled")})},enableOthers:function(){e.each(this.options.disableOthers,function(t,i){var s=e(i);s.is("button, input, textarea")?s.removeAttr("disabled"):s.removeClass("disabled")})}},e.fn[o]=function(t){return this.each(function(){if(t&&"hide"!==t||!e.data(this,"plugin_"+o))e.data(this,"plugin_"+o,new i(this,t));else{var s=e.data(this,"plugin_"+o);"hide"===t?s.hide():s.show()}})},s()}(jQuery,window,document);
diff --git a/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/js/rest.js b/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/js/rest.js
index 7590bdf7..ddeabf7e 100644
--- a/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/js/rest.js
+++ b/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/js/rest.js
@@ -174,7 +174,7 @@ function loadGetServiceData(){
var parameter = {
'sort': [],
'pagination': 0,
- 'pagesize': 25,
+ 'pagesize': 10000,
'condition': {},
'serviceId': ""
};
@@ -220,6 +220,54 @@ function loadServiceDetails(serviceId){
return returnObj;
}
+//get the vim name by id.
+function getVimNameById(vimId){
+
+ // TODO re-confirm the latest url.
+ var requestUrl ="/openoapi/extsys/v1/vims/" + vimId;
+ var returnObj;
+ $
+ .ajax({
+ type : "GET",
+ async: false,
+ url : requestUrl,
+ contentType : "application/json",
+ success : function(jsonobj) {
+ // TODO return according to the json data received.
+ returnObj = jsonobj;
+ },
+ error : function(xhr, ajaxOptions, thrownError) {
+ alert("Error on getting link data : " + xhr.responseText);
+ }
+ });
+ return returnObj;
+}
+
+// get the sdn controller name by id.
+function getSdnControllerNameById(sdnControllerId){
+
+ // TODO re-confirm the latest url.
+ var requestUrl ="/openoapi/extsys/v1/sdncontrollers/" + sdnControllerId;
+ var returnObj;
+ $
+ .ajax({
+ type : "GET",
+ async: false,
+ url : requestUrl,
+ contentType : "application/json",
+ success : function(jsonobj) {
+ // TODO return according to the json data received.
+ returnObj = jsonobj;
+ },
+ error : function(xhr, ajaxOptions, thrownError) {
+ alert("Error on getting link data : " + xhr.responseText);
+ }
+ });
+ return returnObj;
+}
+
+
+
function anchorClick(serviceId){
var jsonData = loadServiceDetails(serviceId);
//TODO populate the modal according to json response
diff --git a/openo-portal/portal-resmgr/src/main/webapp/resmgr-sdn/js/brs.js b/openo-portal/portal-resmgr/src/main/webapp/resmgr-sdn/js/brs.js
index 91fd0c5f..83266af7 100644
--- a/openo-portal/portal-resmgr/src/main/webapp/resmgr-sdn/js/brs.js
+++ b/openo-portal/portal-resmgr/src/main/webapp/resmgr-sdn/js/brs.js
@@ -25,10 +25,7 @@ $('.siteDeleteImg').click(function () {
});
-function hideFirstCol() {
- //$('table tr').find('th:eq(0)').hide();
- //$('table tr').find('td:eq(0)').hide();
-}
+
function deleteSite(objectId) {
var requestUrl = "/openoapi/sdnobrs/v1/sites/" + objectId;
$
@@ -150,12 +147,18 @@ function loadNeData() {
url: requestUrl,
contentType: "application/json",
success: function (jsonobj) {
+
var nedata = jsonobj.managedElements;
+ var neMap = [];
+ neMap = loadControllerData();
+ /*$.each(nedata,function(k,v){
+ nedata[k];
+ })*/;
+
$('#ne').bootstrapTable({
data: nedata
});
$('#ne').bootstrapTable('refresh');
- hideFirstCol();
},
error: function (xhr, ajaxOptions, thrownError) {
@@ -181,18 +184,23 @@ function loadPortData() {
});
}
function loadControllerData() {
+ var neMap = [];
var requestUrl = "/openoapi/extsys/v1/sdncontrollers";
$.ajax({
type: "GET",
+ async: false,
url: requestUrl,
contentType: "application/json",
success: function (jsonobj) {
- fillSelect(jsonobj);
+
+ neMap = fillSelect(jsonobj);
+
},
error: function (xhr, ajaxOptions, thrownError) {
alert("Error on getting controller data : " + xhr.responseText);
}
});
+ return neMap;
}
function fillSelect(str){
var json;
@@ -204,9 +212,12 @@ function fillSelect(str){
}
var seleObj = $('#controller')
seleObj.find("option").remove();
+ var neMap = [];
for(var i=0;i < json.length;i++){
- seleObj.append('<option value="'+json[i].name+'">'+json[i].name+'</option>');
+ seleObj.append('<option value="'+json[i].sdnControllerId+'">'+json[i].name+'</option>');
+ neMap[json[i].sdnControllerId] = json[i].name;
}
+ return neMap;
}
$(function () {
$('.creat-btn').click(function () {
@@ -300,6 +311,9 @@ $(function () {
$('#createNe').click(function () {
var formData = JSON.stringify($("#neForm").serializeObject());
var jsonobj = JSON.parse(formData);
+ var controllerIDs = [] ;
+ controllerIDs[0]= jsonobj.controller;
+ jsonobj.controllerID = controllerIDs;
var newJson = {"managedElement": jsonobj};
formData = JSON.stringify(newJson);
var requestUrl = "/openoapi/sdnobrs/v1/managed-elements";
@@ -338,7 +352,7 @@ $(function () {
data: formData,
success: function (jsonResp) {
alert("Port saved successfully!!!");
- //TODO : hide model data window.
+
jsonobj["id"] = jsonResp.logicalTerminationPoint.id;
$('#port').bootstrapTable("append", jsonobj);
$('#vmAppDialog').removeClass('in').css('display', 'none');
diff --git a/openo-portal/portal-resmgr/src/main/webapp/resmgr-sdn/ne.html b/openo-portal/portal-resmgr/src/main/webapp/resmgr-sdn/ne.html
index 518da3ee..8eff1cd5 100644
--- a/openo-portal/portal-resmgr/src/main/webapp/resmgr-sdn/ne.html
+++ b/openo-portal/portal-resmgr/src/main/webapp/resmgr-sdn/ne.html
@@ -132,7 +132,7 @@
</span>
</div>
</th>
- <th class="openo-table-state-default openo-table-th openo-table-disable-element leftHeaderAlign"
+ <!-- <th class="openo-table-state-default openo-table-th openo-table-disable-element leftHeaderAlign"
data-field="controller" data-sortable="true" data-filter-control="input">
<div class="openo-table-th-border"></div>
<div class="DataTables_sort_wrapper openo-ellipsis ">
@@ -140,7 +140,7 @@
class="openo-table-th-sorticon overflow_elip leftHeaderAlign openo-table-disable-element ">Controller
</span>
</div>
- </th>
+ </th> -->
<th class="openo-table-state-default openo-table-th openo-table-disable-element leftHeaderAlign"
data-field="nativeID" data-sortable="true" data-filter-control="input">
<div class="openo-table-th-border"></div>
@@ -159,7 +159,7 @@
</span>
</div>
</th>
- <th class="openo-table-state-default openo-table-th openo-table-disable-element leftHeaderAlign"
+ <!-- <th class="openo-table-state-default openo-table-th openo-table-disable-element leftHeaderAlign"
data-field="neRole" data-sortable="true" data-filter-control="input">
<div class="openo-table-th-border"></div>
<div class="DataTables_sort_wrapper openo-ellipsis ">
@@ -185,7 +185,7 @@
class="openo-table-th-sorticon overflow_elip leftHeaderAlign openo-table-disable-element ">Operating State
</span>
</div>
- </th>
+ </th> -->
<th class="openo-table-state-default openo-table-th openo-table-disable-element leftHeaderAlign"
align="center" data-formatter="operateFormatter" data-events="operateEvents">
<div class="openo-table-th-border"></div>
diff --git a/openo-portal/portal-resmgr/src/main/webapp/resmgr-sdn/port.html b/openo-portal/portal-resmgr/src/main/webapp/resmgr-sdn/port.html
index ba0d5ec2..dbed9f8d 100644
--- a/openo-portal/portal-resmgr/src/main/webapp/resmgr-sdn/port.html
+++ b/openo-portal/portal-resmgr/src/main/webapp/resmgr-sdn/port.html
@@ -167,6 +167,15 @@
</div>
</th>
<th class="openo-table-state-default openo-table-th openo-table-disable-element leftHeaderAlign"
+ data-field="nativeID" data-sortable="true" data-filter-control="input">
+ <div class="openo-table-th-border"></div>
+ <div class="DataTables_sort_wrapper openo-ellipsis ">
+ <span id="native_Id"
+ class="openo-table-th-sorticon overflow_elip leftHeaderAlign openo-table-disable-element ">Native ID
+ </span>
+ </div>
+ </th>
+ <th class="openo-table-state-default openo-table-th openo-table-disable-element leftHeaderAlign"
data-field="adminState" data-sortable="true" data-filter-control="input">
<div class="openo-table-th-border"></div>
<div class="DataTables_sort_wrapper openo-ellipsis ">
@@ -330,6 +339,15 @@
placeholder="255.255.255.255"/>
</div>
</div>
+ <div class="form-group">
+ <label class="col-sm-3 control-label">
+ <span>Native ID</span>&nbsp;&nbsp;&nbsp;
+ </label>
+ <div class="col-sm-7">
+ <input type="text" id="nativeID" name="nativeID" class="form-control"
+ placeholder="Native ID"/>
+ </div>
+ </div>
</div>
</div>
</div>