diff options
Diffstat (limited to 'openo-portal')
19 files changed, 221 insertions, 132 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/pmUtil.js b/openo-portal/portal-catalog/src/main/webapp/catalog/js/package/pmUtil.js index 80067abc..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");
}
}
@@ -168,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();
@@ -185,6 +191,18 @@ 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.csarId + '\', \'' + obj.aData.name + '\')">' + obj.aData.name + '</a>';
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..643c5db1 100644 --- a/openo-portal/portal-common/src/main/webapp/common/default.html +++ b/openo-portal/portal-common/src/main/webapp/common/default.html @@ -70,10 +70,9 @@ </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> + <div style="margin-left:50px; margin-top:3px;"> + <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"/> + </div> <ul class="nav navbar-nav pull-right"> <div class="zte-theme-panel"> <div class="toggler"></div> @@ -194,7 +193,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"> 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 Binary files differdeleted file mode 100644 index 21f9e87a..00000000 --- a/openo-portal/portal-common/src/main/webapp/common/image/integration/netnumenLogo.png +++ /dev/null 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 Binary files differindex 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 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 Binary files differindex 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 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 Binary files differnew file mode 100644 index 00000000..f320af35 --- /dev/null +++ b/openo-portal/portal-common/src/main/webapp/common/image/integration/openo_logo_black.png 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 Binary files differnew file mode 100644 index 00000000..14135042 --- /dev/null +++ b/openo-portal/portal-common/src/main/webapp/common/image/integration/openo_logo_pantone.png 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 Binary files differindex 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 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..429f2d04 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; 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..95ea913e 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>      </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>      </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); 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..d129b927 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,26 @@ 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), + success : function(data) { + top.window.document.location.href = "default.html"; + }, + error : function(data) { + top.window.document.location.href = "login.html"; + } + }); }; var Login = function () { @@ -169,9 +156,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 +175,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 +189,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/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-lifecyclemgr/src/main/webapp/lifecyclemgr/gsolcmmain.html b/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/gsolcmmain.html index ad3b5977..b7357c52 100644 --- a/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/gsolcmmain.html +++ b/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/gsolcmmain.html @@ -30,11 +30,13 @@ <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 () {
+ new lcmHandler();
$('.modal-dialog').draggable();
$("#detailCont").show();
@@ -74,7 +76,7 @@ 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) {
@@ -213,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">
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 Binary files differnew file mode 100644 index 00000000..5e28c953 --- /dev/null +++ b/openo-portal/portal-lifecyclemgr/src/main/webapp/lifecyclemgr/images/loading.gif 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 23f0a8d2..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'); } ); @@ -385,7 +387,7 @@ function transformToComponents(templateParas) { 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">' + @@ -409,11 +411,11 @@ function transformToOptions(items) { 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; } @@ -540,10 +542,12 @@ function formatDate(date) { function deleteNe(rowId, row) { 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') { 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); |