aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--integration/src/main/resources/portalConfig/msb_register.xml10
-rw-r--r--login/src/main/webapp/login/html/login.html91
-rw-r--r--login/src/main/webapp/login/html/menu.html246
-rw-r--r--login/src/main/webapp/login/index.html126
-rw-r--r--login/src/main/webapp/login/js/app.js281
-rw-r--r--login/src/main/webapp/login/js/loginApp.js53
-rw-r--r--login/src/main/webapp/login/js/menuApp.js55
-rw-r--r--login/src/main/webapp/login/js/rest.js58
8 files changed, 414 insertions, 506 deletions
diff --git a/integration/src/main/resources/portalConfig/msb_register.xml b/integration/src/main/resources/portalConfig/msb_register.xml
index 2f9c60ad..0f3777de 100644
--- a/integration/src/main/resources/portalConfig/msb_register.xml
+++ b/integration/src/main/resources/portalConfig/msb_register.xml
@@ -141,5 +141,15 @@
<lb_policy>hash</lb_policy>
<ttl>0</ttl>
</registerInfo>
+ <registerInfo>
+ <ip>127.0.0.1</ip>
+ <port>9150</port>
+ <url>/openoui/holmes</url>
+ <serviceName>holmes</serviceName>
+ <protocol>UI</protocol>
+ <visualRange>1</visualRange>
+ <lb_policy>hash</lb_policy>
+ <ttl>0</ttl>
+ </registerInfo>
</registerList>
</msbRegister>
diff --git a/login/src/main/webapp/login/html/login.html b/login/src/main/webapp/login/html/login.html
index ee20f5ec..70c77684 100644
--- a/login/src/main/webapp/login/html/login.html
+++ b/login/src/main/webapp/login/html/login.html
@@ -14,36 +14,65 @@
limitations under the License.
-->
-<h1>
- <div id="login_container">
- <div id="wrapper">
- <div id="login" class="animate form">
- <form ng-init="loginFormInit()" ng-submit="loginFormSubmit()">
- <img src="/openoui/login/image/openo_logo_pantone.png" width="100%" style="display:inline"/>
- <br/><br/><span style="color:red">{{error}}</span><br/><br/>
- <p>
- <label for="username" class="uname" data-icon="u">Your username</label>
- <input id="username" name="username" required="required" type="text" ng-model="user.username" placeholder="open-o user"/>
- </p>
- <p>
- <label for="password" class="youpasswd" data-icon="p">Your password</label>
- <input id="password" name="password" required="required" type="password" ng-model="user.password" placeholder="eg. X8df!90EO"/>
- </p>
- <p class="keeplogin">
- <input type="checkbox" name="loginkeeping" id="loginkeeping" ng-model="user.loginkeeping" ng-true-value="true" ng-false-value="false"/>
- <label for="loginkeeping">Keep me logged in</label>
- </p>
- <p class="login button">
- <input type="submit" value="Login"/>
- </p>
- </form>
+<!DOCTYPE html>
+<html>
+ <head lang="en">
+ <meta charset="utf-8">
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>OPEN-O</title>
+ <link rel="shortcut icon" type="image/x-icon" href="/openoui/login/image/favicon.ico"/>
+
+ <link rel="stylesheet" type="text/css" href="/openoui/thirdparty/css/bootstrap.min.css"/>
+ <link rel="stylesheet" type="text/css" href="/openoui/thirdparty/css/font-awesome.min.css"/>
+ <link rel="stylesheet" type="text/css" href="/openoui/thirdparty/css/animate-custom.css"/>
+
+ <link rel="stylesheet" type="text/css" href="/openoui/login/css/login_mainStyle.css"/>
+ <link rel="stylesheet" type="text/css" href="/openoui/login/css/login_background.css"/>
+ <link rel="stylesheet" type="text/css" href="/openoui/login/css/login_inputForm.css"/>
+ <link rel="stylesheet" type="text/css" href="/openoui/login/css/menu_mainStyle.css"/>
+
+ <script type="text/javascript" src="/openoui/thirdparty/js/angular.min.js"></script>
+ <script type="text/javascript" src="/openoui/thirdparty/js/jquery_1.12.4.min.js"></script>
+ <script type="text/javascript" src="/openoui/thirdparty/js/jquery-ui.js"></script>
+ <script type="text/javascript" src="/openoui/thirdparty/js/bootstrap.min.js"></script>
+ <script type="text/javascript" src="/openoui/thirdparty/js/jquery.cookie.js"></script>
+
+ <script type="text/javascript" src="/openoui/login/js/loginApp.js"></script>
+ </head>
+ <body ng-app="loginApp" ng-controller="loginCtrl">
+ <h1>
+ <div id="login_container">
+ <div id="wrapper">
+ <div id="login" class="animate form">
+ <form ng-init="loginFormInit()" ng-submit="loginFormSubmit()">
+ <img src="/openoui/login/image/openo_logo_pantone.png" width="100%" style="display:inline"/>
+ <br/><br/><span style="color:red">{{error}}</span><br/><br/>
+ <p>
+ <label for="username" class="uname" data-icon="u">Your username</label>
+ <input id="username" name="username" required="required" type="text" ng-model="user.username" placeholder="open-o user"/>
+ </p>
+ <p>
+ <label for="password" class="youpasswd" data-icon="p">Your password</label>
+ <input id="password" name="password" required="required" type="password" ng-model="user.password" placeholder="eg. X8df!90EO"/>
+ </p>
+ <p class="keeplogin">
+ <input type="checkbox" name="loginkeeping" id="loginkeeping" ng-model="user.loginkeeping" ng-true-value="true" ng-false-value="false"/>
+ <label for="loginkeeping">Keep me logged in</label>
+ </p>
+ <p class="login button">
+ <input type="submit" value="Login"/>
+ </p>
+ </form>
+ </div>
+ </div>
</div>
+ </h1>
+ <div class="slideshow">
+ <div class="slideshow-image" style="background-image: url('/openoui/login/image/loginBackground01.jpg')"></div>
+ <div class="slideshow-image" style="background-image: url('/openoui/login/image/loginBackground02.jpg')"></div>
+ <div class="slideshow-image" style="background-image: url('/openoui/login/image/loginBackground03.jpg')"></div>
+ <div class="slideshow-image" style="background-image: url('/openoui/login/image/loginBackground04.jpg')"></div>
</div>
- </div>
-</h1>
-<div class="slideshow">
- <div class="slideshow-image" style="background-image: url('/openoui/login/image/loginBackground01.jpg')"></div>
- <div class="slideshow-image" style="background-image: url('/openoui/login/image/loginBackground02.jpg')"></div>
- <div class="slideshow-image" style="background-image: url('/openoui/login/image/loginBackground03.jpg')"></div>
- <div class="slideshow-image" style="background-image: url('/openoui/login/image/loginBackground04.jpg')"></div>
-</div>
+ </body>
+</html>
diff --git a/login/src/main/webapp/login/html/menu.html b/login/src/main/webapp/login/html/menu.html
index 2cdfd6f0..6908d056 100644
--- a/login/src/main/webapp/login/html/menu.html
+++ b/login/src/main/webapp/login/html/menu.html
@@ -14,117 +14,151 @@
limitations under the License.
-->
-<div id="page-wrapper" class="main-menu fixed-sidebar fixed-header">
- <div id="page-sidebar">
- <div id="header-logo">
- <img src="/openoui/login/image/openo_logo_white.png" width="75%" style="display:block; margin:0 auto;"/>
- </div>
- <div id="sidebar-menu">
- <ul id="accordion" class="accordion">
- <li>
- <div class="link">
- <i class="fa fa-cloud"></i>Service<i class="fa fa-chevron-down"></i>
- </div>
- <ul class="submenu">
- <li><a ui-sref=".serviceManagement" ui-sref-active="submenu_active">Service Management</a></li>
- </ul>
- </li>
- <li>
- <div class="link">
- <i class="fa fa-search-minus"></i>Resource<i class="fa fa-chevron-down"></i>
- </div>
- <ul class="submenu">
- <li><a ui-sref=".resourceManagement" ui-sref-active="submenu_active">Resource Management</a></li>
- </ul>
- </li>
- <li>
- <div class="link">
- <i class="fa fa-map-marker"></i>Province<i class="fa fa-chevron-down"></i>
- </div>
- <ul class="submenu">
- <li><a ui-sref=".provinceManagement" ui-sref-active="submenu_active">Province Management</a></li>
- </ul>
- </li>
- <li>
- <div class="link">
- <i class="fa fa-edit"></i>Orchestrator<i class="fa fa-chevron-down"></i>
- </div>
- <ul class="submenu">
- <li><a ui-sref=".modelDesign" ui-sref-active="submenu_active">Model Design</a></li>
- <li><a ui-sref=".package" ui-sref-active="submenu_active">Package</a></li>
- <li><a ui-sref=".serviceTemplate" ui-sref-active="submenu_active">Service Template</a></li>
- </ul>
- </li>
- <li>
- <div class="link">
- <i class="fa fa-cogs"></i>Manage View<i class="fa fa-chevron-down"></i>
- </div>
- <ul class="submenu">
- <li><a ui-sref=".vimManage" ui-sref-active="submenu_active">VIM Manage</a></li>
- <li><a ui-sref=".vnfm" ui-sref-active="submenu_active">VNFM</a></li>
- <li><a ui-sref=".sdbController" ui-sref-active="submenu_active">SDN Controller</a></li>
- </ul>
- </li>
- <li>
- <div class="link">
- <i class="fa fa-line-chart"></i>Performance<i class="fa fa-chevron-down"></i>
- </div>
- <ul class="submenu">
- <li><a ui-sref=".performanceQuery" ui-sref-active="submenu_active">Performance Query</a></li>
- <li><a ui-sref=".alarmQuery" ui-sref-active="submenu_active">Alarm Query</a></li>
- </ul>
- </li>
- <li>
- <div class="link">
- <i class="fa fa-eye"></i>Monitor<i class="fa fa-chevron-down"></i>
- </div>
- <ul class="submenu">
- <li><a ui-sref=".parameterSetting" ui-sref-active="submenu_active">Parameter Setting</a></li>
- </ul>
- </li>
- <li>
- <div class="link">
- <i class="fa fa-puzzle-piece"></i>Market<i class="fa fa-chevron-down"></i>
- </div>
- <ul class="submenu">
- <li><a ui-sref=".vnfMarket" ui-sref-active="submenu_active">VNF Market Place</a></li>
- </ul>
- </li>
- </ul>
- </div>
- </div>
+<!DOCTYPE html>
+<html>
+ <head lang="en">
+ <meta charset="utf-8">
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>OPEN-O</title>
+ <link rel="shortcut icon" type="image/x-icon" href="/openoui/login/image/favicon.ico"/>
- <div id="page-main-wrapper" style="height:100%;">
- <div id="page-header" >
- <div id="page-header-wrapper" class="clearfix">
- <div class="top-icon-bar dropdown">
- <a href="javascript:;" title="" class="user-ico clearfix" data-toggle="dropdown">
- <img width="36" src="/openoui/login/image/user.png" alt="" style="border-radius: 15px;"/>
- <span>User Name</span>
- <i class="fa fa-chevron-down"></i>
- </a>
- <ul class="dropdown-menu float-right">
+ <link rel="stylesheet" type="text/css" href="/openoui/thirdparty/css/bootstrap.min.css"/>
+ <link rel="stylesheet" type="text/css" href="/openoui/thirdparty/css/font-awesome.min.css"/>
+ <link rel="stylesheet" type="text/css" href="/openoui/thirdparty/css/zTreeStyle.css"/>
+ <link rel="stylesheet" type="text/css" href="/openoui/thirdparty/css/magic-check.css"/>
+ <link rel="stylesheet" type="text/css" href="/openoui/thirdparty/css/ng-table.min.css"/>
+ <link rel="stylesheet" type="text/css" href="/openoui/thirdparty/css/animate-custom.css"/>
+ <link rel="stylesheet" type="text/css" href="/openoui/framework/css/open-ostyle.css"/>
+
+ <link rel="stylesheet" type="text/css" href="/openoui/login/css/menu_mainStyle.css"/>
+
+ <script type="text/javascript" src="/openoui/thirdparty/js/jquery_1.12.4.min.js"></script>
+ <script type="text/javascript" src="/openoui/thirdparty/js/jquery-ui.js"></script>
+ <script type="text/javascript" src="/openoui/thirdparty/js/bootstrap.min.js"></script>
+ <script type="text/javascript" src="/openoui/thirdparty/js/jquery.cookie.js"></script>
+
+ <script type="text/javascript" src="/openoui/login/js/menuApp.js"></script>
+ </head>
+ <body onload="init_menu()">
+ <div id="page-wrapper" class="main-menu fixed-sidebar fixed-header">
+ <div id="page-sidebar">
+ <div id="header-logo">
+ <img src="/openoui/login/image/openo_logo_white.png" width="75%" style="display:block; margin:0 auto;"/>
+ </div>
+ <div id="sidebar-menu">
+ <ul id="accordion" class="accordion">
<li>
- <a href="javascript:;" title="">
- <span class="font-bold">Logout</span>
- </a>
+ <div class="link">
+ <i class="fa fa-cloud"></i>Service<i class="fa fa-chevron-down"></i>
+ </div>
+ <ul class="submenu">
+ <li><a href="/openoui/lifecyclemgr/index.html" target="mainFrame" ui-sref-active="submenu_active">Service Management</a></li>
+ </ul>
+ </li>
+ <li>
+ <div class="link">
+ <i class="fa fa-search-minus"></i>Resource<i class="fa fa-chevron-down"></i>
+ </div>
+ <ul class="submenu">
+ <li><a href="/openoui/resmgr/index.html" target="mainFrame" ui-sref-active="submenu_active">Resource Management</a></li>
+ </ul>
+ </li>
+ <li>
+ <div class="link">
+ <i class="fa fa-map-marker"></i>Province<i class="fa fa-chevron-down"></i>
+ </div>
+ <ul class="submenu">
+ <li><a href="/openoui/provincemgr/index.html" target="mainFrame" ui-sref-active="submenu_active">Province Management</a></li>
+ </ul>
+ </li>
+ <li>
+ <div class="link">
+ <i class="fa fa-edit"></i>Orchestrator<i class="fa fa-chevron-down"></i>
+ </div>
+ <ul class="submenu">
+ <li><a href="/winery/servicetemplates.html" target="mainFrame" ui-sref-active="submenu_active">Model Design</a></li>
+ <li><a href="/openoui/catalog/csarPackage.html" target="mainFrame" ui-sref-active="submenu_active">Package</a></li>
+ <li><a href="/openoui/catalog/template.html" target="mainFrame" ui-sref-active="submenu_active">Service Template</a></li>
+ </ul>
+ </li>
+ <li>
+ <div class="link">
+ <i class="fa fa-cogs"></i>Manage View<i class="fa fa-chevron-down"></i>
+ </div>
+ <ul class="submenu">
+ <li><a href="/openoui/extsys/vim/vimView.html" target="mainFrame" ui-sref-active="submenu_active">VIM Manage</a></li>
+ <li><a href="/openoui/extsys/vnfm/vnfmView.html" target="mainFrame" ui-sref-active="submenu_active">VNFM</a></li>
+ <li><a href="/openoui/login/html/temp/sdbController.html" target="mainFrame" ui-sref-active="submenu_active">SDN Controller</a></li>
+ </ul>
+ </li>
+ <li>
+ <div class="link">
+ <i class="fa fa-line-chart"></i>Performance<i class="fa fa-chevron-down"></i>
+ </div>
+ <ul class="submenu">
+ <li><a href="/openoui/login/html/temp/performanceQuery.html" target="mainFrame" ui-sref-active="submenu_active">Performance Query</a></li>
+ <li><a href="/openoui/login/html/temp/alarmQuery.html" target="mainFrame" ui-sref-active="submenu_active">Alarm Query</a></li>
+ </ul>
+ </li>
+ <li>
+ <div class="link">
+ <i class="fa fa-eye"></i>Monitor<i class="fa fa-chevron-down"></i>
+ </div>
+ <ul class="submenu">
+ <li><a href="/openoui/login/html/temp/parameterSetting.html" target="mainFrame" ui-sref-active="submenu_active">Parameter Setting</a></li>
+ </ul>
+ </li>
+ <li>
+ <div class="link">
+ <i class="fa fa-puzzle-piece"></i>Market<i class="fa fa-chevron-down"></i>
+ </div>
+ <ul class="submenu">
+ <li><a href="/openoui/vnfmarket/index.html" target="mainFrame" ui-sref-active="submenu_active">VNF Market Place</a></li>
+ </ul>
+ </li>
+ <li>
+ <div class="link">
+ <i class="fa fa-database"></i>Holmes<i class="fa fa-chevron-down"></i>
+ </div>
+ <ul class="submenu">
+ <li><a href="/openoui/holmes/index.html" target="mainFrame" ui-sref-active="submenu_active">Alarm Analysis</a></li>
+ </ul>
</li>
</ul>
</div>
- <div class="top-icon-bar">
- <a href="javascript:;" class="popover-button" data-placement="bottom" title="Messages Widget" data-id="#msg-box">
- <i class="fa fa-envelope-o" style="color: green;"></i>
- </a>
- <a href="javascript:;" class="popover-button" data-placement="bottom" title="" data-id="#notif-box">
- <i class="fa fa-bell-o" style="color: red;"></i>
- </a>
+ </div>
+ <div id="page-main-wrapper">
+ <div id="page-header">
+ <div id="page-header-wrapper" class="clearfix">
+ <div class="top-icon-bar dropdown">
+ <a href="javascript:;" title="" class="user-ico clearfix" data-toggle="dropdown">
+ <img width="36" src="/openoui/login/image/user.png" alt="" style="border-radius: 15px;"/>
+ <span>User Name</span>
+ <i class="fa fa-chevron-down"></i>
+ </a>
+ <ul class="dropdown-menu float-right">
+ <li>
+ <a href="javascript:;" title="">
+ <span class="font-bold">Logout</span>
+ </a>
+ </li>
+ </ul>
+ </div>
+ <div class="top-icon-bar">
+ <a href="javascript:;" class="popover-button" data-placement="bottom" title="Messages Widget" data-id="#msg-box">
+ <i class="fa fa-envelope-o" style="color: green;"></i>
+ </a>
+ <a href="javascript:;" class="popover-button" data-placement="bottom" title="" data-id="#notif-box">
+ <i class="fa fa-bell-o" style="color: red;"></i>
+ </a>
+ </div>
+ </div>
+ </div>
+ <div id="rightContainer" class="col-sm-8 col-md-9 col-lg-9">
+ <iframe id="mainFrame" name="mainFrame" frameBorder=0 scrolling=no width="100%" onLoad="iFrameHeight()"></iframe>
</div>
</div>
</div>
-
- <div id="rightContainer" class="col-sm-8 col-md-9 col-lg-9" style="height:100%; width:100%">
- <ui-view></ui-view>
-
- </div>
- </div>
-</div> \ No newline at end of file
+ </body>
+</html>
diff --git a/login/src/main/webapp/login/index.html b/login/src/main/webapp/login/index.html
index 57cc88dc..7350057c 100644
--- a/login/src/main/webapp/login/index.html
+++ b/login/src/main/webapp/login/index.html
@@ -16,40 +16,106 @@
<!DOCTYPE html>
<html>
- <head lang="en">
+ <head>
<meta charset="utf-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <meta http-equiv="refresh" content="5; url=/openoui/login/html/login.html">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>OPEN-O</title>
<link rel="shortcut icon" type="image/x-icon" href="/openoui/login/image/favicon.ico"/>
-
- <link rel="stylesheet" type="text/css" href="/openoui/thirdparty/css/bootstrap.min.css"/>
- <link rel="stylesheet" type="text/css" href="/openoui/thirdparty/css/font-awesome.min.css"/>
- <link rel="stylesheet" type="text/css" href="/openoui/thirdparty/css/zTreeStyle.css"/>
- <link rel="stylesheet" type="text/css" href="/openoui/thirdparty/css/magic-check.css"/>
- <link rel="stylesheet" type="text/css" href="/openoui/thirdparty/css/ng-table.min.css"/>
- <link rel="stylesheet" type="text/css" href="/openoui/thirdparty/css/animate-custom.css"/>
- <link rel="stylesheet" type="text/css" href="/openoui/framework/css/open-ostyle.css"/>
-
- <link rel="stylesheet" type="text/css" href="/openoui/login/css/login_mainStyle.css"/>
- <link rel="stylesheet" type="text/css" href="/openoui/login/css/login_background.css"/>
- <link rel="stylesheet" type="text/css" href="/openoui/login/css/login_inputForm.css"/>
- <link rel="stylesheet" type="text/css" href="/openoui/login/css/menu_mainStyle.css"/>
-
- <script type="text/javascript" src="/openoui/thirdparty/js/angular.min.js"></script>
- <script type="text/javascript" src="/openoui/thirdparty/js/angular-ui-router.min.js"></script>
- <script type="text/javascript" src="/openoui/thirdparty/js/ng-table.min.js"></script>
- <script type="text/javascript" src="/openoui/thirdparty/js/jquery_1.12.4.min.js"></script>
- <script type="text/javascript" src="/openoui/thirdparty/js/jquery-ui.js"></script>
- <script type="text/javascript" src="/openoui/thirdparty/js/bootstrap.min.js"></script>
- <script type="text/javascript" src="/openoui/thirdparty/js/mustache.js"></script>
- <script type="text/javascript" src="/openoui/thirdparty/js/jquery.ztree.core-3.5.js"></script>
- <script type="text/javascript" src="/openoui/thirdparty/js/jquery.cookie.js"></script>
-
- <script type="text/javascript" src="/openoui/login/js/app.js"></script>
- <script type="text/javascript" src="/openoui/login/js/rest.js"></script>
+ <style type="text/css">
+ .main{
+ width: 100%;
+ height: auto;
+ padding-top: 100px;
+ }
+ a{
+ display: block;
+ text-align: center;
+ font-size: 20px;
+ margin-top: 200px;
+ }
+ .loadEffect{
+ width: 100px;
+ height: 100px;
+ position: relative;
+ margin: 0 auto;
+ margin-top:100px;
+ }
+ .loadEffect span{
+ display: inline-block;
+ width: 16px;
+ height: 16px;
+ border-radius: 50%;
+ background: lightgreen;
+ position: absolute;
+ -webkit-animation: load 1.04s ease infinite;
+ }
+ @-webkit-keyframes load{
+ 0%{
+ opacity: 1;
+ }
+ 100%{
+ opacity: 0.2;
+ }
+ }
+ .loadEffect span:nth-child(1){
+ left: 0;
+ top: 50%;
+ margin-top:-8px;
+ -webkit-animation-delay:0.13s;
+ }
+ .loadEffect span:nth-child(2){
+ left: 14px;
+ top: 14px;
+ -webkit-animation-delay:0.26s;
+ }
+ .loadEffect span:nth-child(3){
+ left: 50%;
+ top: 0;
+ margin-left: -8px;
+ -webkit-animation-delay:0.39s;
+ }
+ .loadEffect span:nth-child(4){
+ top: 14px;
+ right:14px;
+ -webkit-animation-delay:0.52s;
+ }
+ .loadEffect span:nth-child(5){
+ right: 0;
+ top: 50%;
+ margin-top:-8px;
+ -webkit-animation-delay:0.65s;
+ }
+ .loadEffect span:nth-child(6){
+ right: 14px;
+ bottom:14px;
+ -webkit-animation-delay:0.78s;
+ }
+ .loadEffect span:nth-child(7){
+ bottom: 0;
+ left: 50%;
+ margin-left: -8px;
+ -webkit-animation-delay:0.91s;
+ }
+ .loadEffect span:nth-child(8){
+ bottom: 14px;
+ left: 14px;
+ -webkit-animation-delay:1.04s;
+ }
+ </style>
</head>
- <body ng-app="POCApp" onload="loadTemplate()">
- <ui-view></ui-view>
+ <body>
+ <div class="main">
+ <div class="loadEffect">
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ <span></span>
+ </div>
+ </div>
</body>
</html>
diff --git a/login/src/main/webapp/login/js/app.js b/login/src/main/webapp/login/js/app.js
deleted file mode 100644
index cf647974..00000000
--- a/login/src/main/webapp/login/js/app.js
+++ /dev/null
@@ -1,281 +0,0 @@
-/*
- Copyright 2017, China Mobile 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.
-*/
-
-var app = angular.module("POCApp", ["ui.router", "ngTable"])
- .config(function($stateProvider, $urlRouterProvider, $urlMatcherFactoryProvider){
- $urlMatcherFactoryProvider.caseInsensitive(true);
- $urlRouterProvider.otherwise('/login');
- $stateProvider
- .state('login', {
- url : '/login',
- templateUrl : '/openoui/login/html/login.html',
- controller : 'loginCtrl',
- authenticate: false
- })
- .state("menu", {
- url: "/menu",
- templateUrl : "/openoui/login/html/menu.html",
- controller : "menuCtrl",
- authenticate: true
- })
- .state("menu.serviceManagement", {
- url: "/serviceManagement",
- templateUrl : "/openoui/lifecyclemgr/index.html",
- controller : "serviceManagementCtrl",
- authenticate: true
- })
- .state("menu.resourceManagement", {
- url: "/resourceManagement",
- // templateUrl : "/openoui/resmgr/index.html",
- template : "<iframe src='../../openoui/resmgr/index.html' height=100% width=100%> </iframe>",
- controller : "resourceManagementCtrl",
- authenticate: true
- })
- .state("menu.provinceManagement", {
- url: "/provinceManagement",
- templateUrl : "/openoui/provincemgr/index.html",
- controller : "provinceManagementCtrl",
- authenticate: true
- })
- .state("menu.modelDesign", {
- url: "/modelDesign",
- templateUrl : "/openoui/login/html/temp/modelDesign.html",
- controller : "modelDesignCtrl",
- authenticate: true
- })
- .state("menu.package", {
- url: "/package",
- templateUrl : "/openoui/catalog/csarPackage.html",
- controller : "packageCtrl",
- authenticate: true
- })
- .state("menu.serviceTemplate", {
- url: "/serviceTemplate",
- templateUrl : "/openoui/catalog/template.html",
- controller : "serviceTemplateCtrl",
- authenticate: true
- })
- .state("menu.vimManage", {
- url: "/vimManage",
- templateUrl : "/openoui/extsys/vim/vimView.html",
- controller : "vimManageCtrl",
- authenticate: true
- })
- .state("menu.vnfm", {
- url: "/vnfm",
- templateUrl : "/openoui/extsys/vnfm/vnfmView.html",
- controller : "vnfmCtrl",
- authenticate: true
- })
- .state("menu.sdbController", {
- url: "/sdbController",
- templateUrl : "/openoui/login/html/temp/sdbController.html",
- controller : "sdbControllerCtrl",
- authenticate: true
- })
- .state("menu.performanceQuery", {
- url: "/performanceQuery",
- templateUrl : "/openoui/login/html/temp/performanceQuery.html",
- controller : "performanceQueryCtrl",
- authenticate: true
- })
- .state("menu.alarmQuery", {
- url: "/alarmQuery",
- templateUrl : "/openoui/login/html/temp/alarmQuery.html",
- controller : "alarmQueryCtrl",
- authenticate: true
- })
- .state("menu.parameterSetting", {
- url: "/parameterSetting",
- templateUrl : "/openoui/login/html/temp/parameterSetting.html",
- controller : "parameterSettingCtrl",
- authenticate: true
- })
- .state("menu.vnfMarket", {
- url: "/vnfMarket",
- templateUrl : "/openoui/vnfmarket/index.html",
- controller : "vnfMarketCtrl",
- authenticate: true
- })
- })
-
- /*Login Controller*/
- .controller('loginCtrl', function($scope, $rootScope, $stateParams, $state, LoginService) {
- $scope.loginFormInit = function() {
- $scope.error = "";
- if ($.cookie("loginkeeping") == "true") {
- $scope.user = {
- 'username': $.cookie("username"),
- 'password': $.cookie("password"),
- 'loginkeeping': true,
- };
- } else {
- $scope.user = {
- 'username': $.cookie("username"),
- 'password': $.cookie("password"),
- 'loginkeeping': false,
- };
- }
- };
- $scope.loginFormSubmit = function() {
- LoginService.login($scope.user)
- .then(function (response){
- if ($scope.user.loginkeeping) {
- $.cookie("loginkeeping", "true", {expires: 7});
- $.cookie("username", $scope.user.username, {expires: 7});
- $.cookie("password", $scope.user.password, {expires: 7});
- } else {
- $.cookie("loginkeeping", "false", {expire: -1});
- $.cookie("username", "", {expires: -1});
- $.cookie("password", "", {expires: -1});
- }
-
- $scope.error = "";
- $state.transitionTo('menu');
- //if (response.status == -1) {
- // $scope.error = "Incorrect username/password !";
- //} else {
- // $scope.error = "";
- // $state.transitionTo('menu');
- //}
- });
- };
- })
-
- /*Menu Controller*/
- .controller("menuCtrl", function($scope, $state, DataService){
- $scope.message = "Menu";
- init_menu();
- })
-
- /*Service Management Controller*/
- .controller("serviceManagementCtrl", function($scope, DataService, $log){
- $scope.message = "Service Management";
- })
-
- /*Resource Management Controller*/
- .controller("resourceManagementCtrl", function($scope, DataService, $log){
- $scope.message = "Resource Management";
- })
-
- /*Province Management Controller*/
- .controller("provinceManagementCtrl", function($scope, DataService, $log){
- $scope.message = "Province Management";
- })
-
- /*Model Design Controller*/
- .controller("modelDesignCtrl", function($scope, DataService, $log){
- $scope.message = "Model Design";
- })
-
- /*Package Controller*/
- .controller("packageCtrl", function($scope, DataService, $log){
- $scope.message = "Package";
- })
-
- /*Service Template Controller*/
- .controller("serviceTemplateCtrl", function($scope, DataService, $log){
- $scope.message = "Service Template";
- })
-
- /*Vim Manage Controller*/
- .controller("vimManageCtrl", function($scope, DataService, $log){
- $scope.message = "Vim Manage";
- })
-
- /*VNFM Controller*/
- .controller("vnfmCtrl", function($scope, DataService, $log){
- $scope.message = "VNFM";
- })
-
- /*Sdn Controller Controller*/
- .controller("sdnControllerCtrl", function($scope, DataService, $log){
- $scope.message = "Sdn Controller";
- })
-
- /*Performance Query Controller*/
- .controller("performanceQueryCtrl", function($scope, DataService, $log){
- $scope.message = "Performance Query";
- })
-
- /*Alarm Query Controller*/
- .controller("alarmQueryCtrl", function($scope, DataService, $log){
- $scope.message = "Alarm Query";
- })
-
- /*Parameter Setting Controller*/
- .controller("parameterSettingCtrl", function($scope, DataService, $log){
- $scope.message = "Parameter Setting";
- })
-
- /*VNF Market Controller*/
- .controller("vnfMarketCtrl", function($scope, DataService, $log){
- $scope.message = "VNF Market Place";
- })
-
-
-var modelTemplate = "";
-function loadTemplate() {
- $.get('/openoui/framework/template.html', function (template) {
- modelTemplate += template;
- });
- $.get('/openoui/framework/templateContainer.html', function (template) {
- modelTemplate += template;
- });
- $.get('/openoui/framework/templateWidget.html', function (template) {
- //console.log("Template is : "+template);
- modelTemplate += template;
- });
- $.get('/openoui/framework/templateNotification.html', function (template) {
- modelTemplate += template;
- });
- $.get('/openoui/framework/templateFunctional.html', function (template) {
- modelTemplate += template;
- });
-}
-
-function init_menu() {
- var windowH = $(window).height();
- var headerH = $('#header-logo').height();
- var menuHeight = windowH - headerH;
- $('#page-sidebar').height(windowH);
- $("#sidebar-menu").height(menuHeight);
-
- var Accordion = function(el, multiple) {
- this.el = el || {};
- this.multiple = multiple || false;
-
- // Variables privadas
- var links = this.el.find('.link');
- // Evento
- links.on('click', {el: this.el, multiple: this.multiple}, this.dropdown)
- }
-
- Accordion.prototype.dropdown = function(e) {
- var $el = e.data.el;
- $this = $(this),
- $next = $this.next();
-
- $next.slideToggle();
- $this.parent().toggleClass('open');
-
- if (!e.data.multiple) {
- $el.find('.submenu').not($next).slideUp().parent().removeClass('open');
- };
- }
-
- var accordion = new Accordion($('#accordion'), false);
-}
diff --git a/login/src/main/webapp/login/js/loginApp.js b/login/src/main/webapp/login/js/loginApp.js
new file mode 100644
index 00000000..f3f4690e
--- /dev/null
+++ b/login/src/main/webapp/login/js/loginApp.js
@@ -0,0 +1,53 @@
+/*
+ Copyright 2017, China Mobile 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.
+*/
+
+var loginApp = angular.module("loginApp", []);
+loginApp.controller("loginCtrl", function($scope) {
+ $scope.loginFormInit = function() {
+ $scope.error = "";
+ if ($.cookie("loginkeeping") == "true") {
+ $scope.user = {
+ 'username': $.cookie("username"),
+ 'password': $.cookie("password"),
+ 'loginkeeping': true,
+ };
+ } else {
+ $scope.user = {
+ 'username': $.cookie("username"),
+ 'password': $.cookie("password"),
+ 'loginkeeping': false,
+ };
+ }
+ };
+ $scope.loginFormSubmit = function() {
+ if ($scope.user.loginkeeping) {
+ $.cookie("loginkeeping", "true", {expires: 7});
+ $.cookie("username", $scope.user.username, {expires: 7});
+ $.cookie("password", $scope.user.password, {expires: 7});
+ } else {
+ $.cookie("loginkeeping", "false", {expire: -1});
+ $.cookie("username", "", {expires: -1});
+ $.cookie("password", "", {expires: -1});
+ }
+
+ //if (response.status == -1) {
+ // $scope.error = "Incorrect username/password !";
+ //} else {
+ // $scope.error = "";
+ top.window.document.location.href = "/openoui/login/html/menu.html";
+ //}
+ };
+});
diff --git a/login/src/main/webapp/login/js/menuApp.js b/login/src/main/webapp/login/js/menuApp.js
new file mode 100644
index 00000000..148c9f03
--- /dev/null
+++ b/login/src/main/webapp/login/js/menuApp.js
@@ -0,0 +1,55 @@
+/*
+ Copyright 2017, China Mobile 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.
+*/
+
+function init_menu() {
+ var windowH = $(window).height();
+ var headerH = $('#header-logo').height();
+ var menuHeight = windowH - headerH;
+ $('#page-sidebar').height(windowH);
+ $("#sidebar-menu").height(menuHeight);
+
+ var Accordion = function(el, multiple) {
+ this.el = el || {};
+ this.multiple = multiple || false;
+
+ // Variables privadas
+ var links = this.el.find('.link');
+ // Evento
+ links.on('click', {el: this.el, multiple: this.multiple}, this.dropdown)
+ }
+
+ Accordion.prototype.dropdown = function(e) {
+ var $el = e.data.el;
+ $this = $(this),
+ $next = $this.next();
+
+ $next.slideToggle();
+ $this.parent().toggleClass('open');
+
+ if (!e.data.multiple) {
+ $el.find('.submenu').not($next).slideUp().parent().removeClass('open');
+ };
+ }
+ var accordion = new Accordion($('#accordion'), false);
+};
+
+function iFrameHeight() {
+ var ifm= document.getElementById("mainFrame");
+ var subWeb = document.frames ? document.frames["mainFrame"].document : ifm.contentDocument;
+ if (ifm != null && subWeb != null) {
+ ifm.height = subWeb.body.scrollHeight;
+ }
+};
diff --git a/login/src/main/webapp/login/js/rest.js b/login/src/main/webapp/login/js/rest.js
deleted file mode 100644
index 020c6899..00000000
--- a/login/src/main/webapp/login/js/rest.js
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- Copyright 2017, China Mobile 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.
-*/
-
-app.factory("DataService", function($http, $log){
- return {
- /*getAllData: function (value) {
- //var value = $scope.param;
- return $http({
- url: 'http://localhost:8080/POC_NodeToServletPorting_Server/?widgetType=' + value,
- headers: {'Content-Type': 'application/json'},
- method: 'GET'
- }).then(function (response) {
- $log.info(response.data);
- return response.data;
- })
- },*/
- }
-});
-
-app.factory('LoginService', function($http, $log) {
- return {
- login: function(user) {
- return $http({
- // TODO
- url: 'http://localhost:8080/api/signin',
- method: 'POST',
- data: {'name':user.username, 'pswd':user.password},
- headers: {'Content-Type': 'application/json'}
- }).then(function(response){
- if(response.status == 200) {
- // TODO
- // login succeeded
- } else {
- // TODO
- // login failed
- }
- // TODO
- return response;
- }, function(error){
- // TODO
- return error;
- });
- }
- };
-});