summaryrefslogtreecommitdiffstats
path: root/lifecyclemgr/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'lifecyclemgr/src/main')
-rw-r--r--lifecyclemgr/src/main/webapp/lifecyclemgr/index.html23
-rw-r--r--lifecyclemgr/src/main/webapp/lifecyclemgr/js/DataService.js10
-rw-r--r--lifecyclemgr/src/main/webapp/lifecyclemgr/js/app.js64
-rw-r--r--lifecyclemgr/src/main/webapp/lifecyclemgr/templates/lctabs.html12
4 files changed, 62 insertions, 47 deletions
diff --git a/lifecyclemgr/src/main/webapp/lifecyclemgr/index.html b/lifecyclemgr/src/main/webapp/lifecyclemgr/index.html
index 5bc04513..b64eed68 100644
--- a/lifecyclemgr/src/main/webapp/lifecyclemgr/index.html
+++ b/lifecyclemgr/src/main/webapp/lifecyclemgr/index.html
@@ -29,21 +29,22 @@
<link rel="stylesheet" href="/openoui/thirdparty/css/ng-table.min.css">
<link href="/openoui/lifecyclemgr/css/open-ostyle.css" rel="stylesheet"/>
<link href="/openoui/lifecyclemgr/css/style.css" rel="stylesheet"/>
- <script src="/openoui/thirdparty/js/angular.min.js"></script>
- <!-- <script src="http://angular-ui.github.io/bootstrap/ui-bootstrap-tpls-0.11.0.js"></script> -->
- <script src="/openoui/thirdparty/js/angular-ui-router.min.js"></script>
- <script src="/openoui/thirdparty/js/ng-table.min.js"></script>
- <script src="/openoui/thirdparty/js/jquery_1.12.4.min.js"></script>
- <script src="/openoui/thirdparty/js/jquery-ui.js"></script>
+ <!-- <script src="http://angular-ui.github.io/bootstrap/ui-bootstrap-tpls-0.11.0.js"></script> -->
+ <script type="text/javascript" src="/openoui/thirdparty/js/mustache.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 src="/openoui/lifecyclemgr/js/app.js"></script>
- <script src="/openoui/lifecyclemgr/js/DataService.js"></script>
- <script src="/openoui/thirdparty/js/mustache.js"></script>
- <script src="/openoui/lifecyclemgr/js/bootbox.min.js"></script>
<script type="text/javascript" src="/openoui/lifecyclemgr/js/jquery.i18n.properties-1.0.9.js"></script>
+ <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/lifecyclemgr/js/app.js"></script>
+ <script type="text/javascript" src="/openoui/lifecyclemgr/js/DataService.js"></script>
+ <script type="text/javascript" src="/openoui/lifecyclemgr/js/bootbox.min.js"></script>
+
</head>
-<body ng-app="lcApp" onload="loadTemplate()">
+<body ng-app="lcApp">
<div class="homecontent center lcmanager">
diff --git a/lifecyclemgr/src/main/webapp/lifecyclemgr/js/DataService.js b/lifecyclemgr/src/main/webapp/lifecyclemgr/js/DataService.js
index ffd13ada..e5b7c8cc 100644
--- a/lifecyclemgr/src/main/webapp/lifecyclemgr/js/DataService.js
+++ b/lifecyclemgr/src/main/webapp/lifecyclemgr/js/DataService.js
@@ -38,8 +38,8 @@ app.factory("DataService", function($http, $log){
//load main Table
return $http({
- //url: '/openoapi/servicegateway/v1/services',
- url: 'http://localhost:5000/api/getLCData',
+ url: '/openoapi/servicegateway/v1/services',
+ //url: 'http://localhost:5000/api/getLCData',
method: 'GET',
headers: {'Content-Type': 'application/json'}
@@ -73,7 +73,8 @@ app.factory("DataService", function($http, $log){
},
getOverlayData : function() {
return $http({
- url: 'http://localhost:5000/api/getOverlayVPNData',
+ url: '/openoapi/sdnooverlayvpn/v1/site2dc-vpn',
+ //url: 'http://localhost:5000/api/getOverlayVPNData',
method: 'GET',
headers: {'Content-Type': 'application/json'}
}).then(function(response){
@@ -83,7 +84,8 @@ app.factory("DataService", function($http, $log){
},
getUnderlayData : function() {
return $http({
- url: 'http://localhost:5000/api/getUnderlayVPNData',
+ url: '/openoapi/sdnol3vpn/v1/l3vpns',
+ //url: 'http://localhost:5000/api/getUnderlayVPNData',
method: 'GET',
headers: {'Content-Type': 'application/json'}
}).then(function(response){
diff --git a/lifecyclemgr/src/main/webapp/lifecyclemgr/js/app.js b/lifecyclemgr/src/main/webapp/lifecyclemgr/js/app.js
index 68c45be0..6c3dac4e 100644
--- a/lifecyclemgr/src/main/webapp/lifecyclemgr/js/app.js
+++ b/lifecyclemgr/src/main/webapp/lifecyclemgr/js/app.js
@@ -37,6 +37,10 @@ var app = angular.module("lcApp", ["ui.router", "ngTable"])/*, 'ui.bootstrap', '
event.preventDefault();
}
});
+ $rootScope.$on('$viewContentLoaded', function() {
+ //call it here
+ loadTemplate();
+ });
})
/*.provider('modalState', function($stateProvider) {
@@ -134,7 +138,7 @@ var app = angular.module("lcApp", ["ui.router", "ngTable"])/*, 'ui.bootstrap', '
})
- .controller('homeCtrl', function($scope, $compile, $state, $log, DataService, NgTableParams) {
+ .controller('homeCtrl', function($scope, $compile, $state, $log, $timeout, DataService, NgTableParams) {
$scope.param="lctableData";
$scope.init = function() {
jQuery.i18n.properties({
@@ -147,15 +151,20 @@ var app = angular.module("lcApp", ["ui.router", "ngTable"])/*, 'ui.bootstrap', '
DataService.loadGetServiceData()
.then(function (data) {
if (data) {
- $scope.tableData = data.data.lcData;
- var tableData = data.data.lcData;
+ $scope.tableData = data.data;
+ var tableData = data.data;
loadTableData();
+ //$timeout(loadTableData, 0);
}
else {
$scope.error = "Error!";
+ loadTableData();
+ //$timeout(loadTableData, 0);
}
}, function (reason) {
$scope.error = "Error ! " + reason;
+ loadTableData();
+ //$timeout(loadTableData, 0);
});
DataService.setTableDataLoaded();
}
@@ -205,7 +214,7 @@ var app = angular.module("lcApp", ["ui.router", "ngTable"])/*, 'ui.bootstrap', '
function loadTabData() {
console.log("hi tab");
- var tab_tpl = $(modelTemplate).filter('#tabs').html();
+ var tab_tpl = $(lcmModelTemplate).filter('#tabs').html();
var html = Mustache.to_html(tab_tpl, $scope.lctabsData.tabData);
$('#lctabArea').html(html);
}
@@ -213,8 +222,8 @@ var app = angular.module("lcApp", ["ui.router", "ngTable"])/*, 'ui.bootstrap', '
function loadTableData() {
console.log("In loadData()");
- var def_button_tpl = $(modelTemplate).filter('#defaultButtons').html();
- var def_iconbutton_tpl = $(modelTemplate).filter('#defaultIconButtons').html();
+ var def_button_tpl = $(lcmModelTemplate).filter('#defaultButtons').html();
+ var def_iconbutton_tpl = $(lcmModelTemplate).filter('#defaultIconButtons').html();
/*var add_data = {"title":"Add", "clickAction":"showAddModal()"};*/
var add_data = {"title":"Create", "type":"btn btn-default", "gType": "glyphicon-plus", "iconPosition":"left", "clickAction":"showAddModal()"};
var delete_data = {"title":"Delete Selected", "clickAction":"deleteData()"};
@@ -250,9 +259,9 @@ var app = angular.module("lcApp", ["ui.router", "ngTable"])/*, 'ui.bootstrap', '
- var text = $(modelTemplate).filter('#textfield').html();
- var number = $(modelTemplate).filter('#numeric').html();
- var dropDown = $(modelTemplate).filter('#simpleDropdownTmpl').html();
+ var text = $(lcmModelTemplate).filter('#textfield').html();
+ var number = $(lcmModelTemplate).filter('#numeric').html();
+ var dropDown = $(lcmModelTemplate).filter('#simpleDropdownTmpl').html();
var dataText = {"ErrMsg" : {"errmsg" : "Service name is required.", "modalVar":"lifecycleData.serviceName", "placeholder":"", "errtag":"lcnameErr", "errfunc":"validatename", "required":true}};
@@ -590,7 +599,7 @@ var app = angular.module("lcApp", ["ui.router", "ngTable"])/*, 'ui.bootstrap', '
.controller('vpnManagerCtrl', function($scope, $stateParams, $log, DataService) {
console.log("vpnManagerCtrl --> $stateParams.id:: " + $stateParams.id);
//$scope.rightPanelHeader = "VPN Manager";
- /*var vtab_tpl = $(modelTemplate).filter('#vtabs').html();
+ /*var vtab_tpl = $(lcmModelTemplate).filter('#vtabs').html();
var vTabData = {
"items": [{
"tablabel": "Overlay VPN",
@@ -611,7 +620,7 @@ var app = angular.module("lcApp", ["ui.router", "ngTable"])/*, 'ui.bootstrap', '
$scope.message = "Overlay VPN";
$scope.init = function() {
- //console.log("Overlay VPN... ng-init + " + $rootScope.modelTemplate);
+ //console.log("Overlay VPN... ng-init + " + $rootScope.lcmModelTemplate);
DataService.getOverlayData()
.then(function(data){
$scope.overlayData = data.overlayData;
@@ -623,7 +632,7 @@ var app = angular.module("lcApp", ["ui.router", "ngTable"])/*, 'ui.bootstrap', '
}
function loadButtons() {
//console.log("Got it : " + $scope.$parent.getTemplate("defaultButtons"));
- /*var def_button_tpl = $(modelTemplate).filter('#defaultButtons').html();
+ /*var def_button_tpl = $(lcmModelTemplate).filter('#defaultButtons').html();
console.log("template: " + def_button_tpl);
var delete_data = {"title":"Delete Selected", "clickAction":"deleteData()"};
@@ -657,7 +666,7 @@ var app = angular.module("lcApp", ["ui.router", "ngTable"])/*, 'ui.bootstrap', '
$scope.message = "Underlay VPN";
$scope.init = function() {
- //console.log("Underlay VPN... ng-init + " + $rootScope.modelTemplate);
+ //console.log("Underlay VPN... ng-init + " + $rootScope.lcmModelTemplate);
DataService.getUnderlayData()
.then(function(data){
$scope.underlayVPN = data.underlayVPN;
@@ -668,7 +677,7 @@ var app = angular.module("lcApp", ["ui.router", "ngTable"])/*, 'ui.bootstrap', '
});
}
function loadButtons() {
- /*var def_button_tpl = $(modelTemplate).filter('#defaultButtons').html();
+ /*var def_button_tpl = $(lcmModelTemplate).filter('#defaultButtons').html();
//console.log("template: " + def_button_tpl);
var delete_data = {"title":"Delete Selected", "clickAction":"deleteData()"};
@@ -713,7 +722,7 @@ var app = angular.module("lcApp", ["ui.router", "ngTable"])/*, 'ui.bootstrap', '
//$scope.currentId = $stateParams.id;
var jsonData = DataService.loadNfvoServiceDetails($stateParams.id);
- var table_tpl = $(modelTemplate).filter('#table').html();
+ var table_tpl = $(lcmModelTemplate).filter('#table').html();
var vnfData = fetchDataForVnf(jsonData);
$('#vnfInfoTable').html(Mustache.to_html(table_tpl, vnfData));
@@ -750,21 +759,24 @@ var app = angular.module("lcApp", ["ui.router", "ngTable"])/*, 'ui.bootstrap', '
})
-var modelTemplate = "";
-function loadTemplate() {
- $.get('./templateContainer.html', function (template) {
- modelTemplate += template;
+var lcmModelTemplate = "";
+function loadTemplate() {
+ //alert("sai");
+ $.get('/openoui/framework/template.html', function (template) {
+ lcmModelTemplate += template;
});
- $.get('./templateWidget.html', function (template) {
+ $.get('/openoui/framework/templateContainer.html', function (template) {
+ lcmModelTemplate += template;
+ });
+ $.get('/openoui/framework/templateWidget.html', function (template) {
//console.log("Template is : "+template);
- modelTemplate += template;
+ lcmModelTemplate += template;
});
- $.get('./templateNotification.html', function (template) {
- modelTemplate += template;
+ $.get('/openoui/framework/templateNotification.html', function (template) {
+ lcmModelTemplate += template;
});
- $.get('./templateFunctional.html', function (template) {
- modelTemplate += template;
+ $.get('/openoui/framework/templateFunctional.html', function (template) {
+ lcmModelTemplate += template;
});
}
-
diff --git a/lifecyclemgr/src/main/webapp/lifecyclemgr/templates/lctabs.html b/lifecyclemgr/src/main/webapp/lifecyclemgr/templates/lctabs.html
index 72a229a3..b5135ab0 100644
--- a/lifecyclemgr/src/main/webapp/lifecyclemgr/templates/lctabs.html
+++ b/lifecyclemgr/src/main/webapp/lifecyclemgr/templates/lctabs.html
@@ -22,9 +22,9 @@
<div id="lctabArea" ng-init="init()">
<ul class="nav nav-tabs">
- <li class="col-md-4 col-sm-4 col-xs-4 nopadding detailinfo"><a ui-sref=".detailInfo" ui-sref-active="link_active" class="nomargin">Detail Info</a></li>
- <li class="col-md-4 col-sm-4 col-xs-4 nopadding topo"><a ui-sref=".topo" ui-sref-active="link_active" class="nomargin" >Topo</a></li>
- <li class="col-md-4 col-sm-4 col-xs-4 nopadding inputdata"><a ui-sref=".inputData" ui-sref-active="link_active" class="nomargin" >Input Data</a></li>
+ <li class="col-md-6 col-sm-6 col-xs-6 nopadding detailinfo"><a ui-sref=".detailInfo" ui-sref-active="link_active" class="nomargin">Detail Info</a></li>
+ <!--<li class="col-md-4 col-sm-4 col-xs-4 nopadding topo"><a ui-sref=".topo" ui-sref-active="link_active" class="nomargin" >Topo</a></li>-->
+ <li class="col-md-6 col-sm-6 col-xs-6 nopadding inputdata"><a ui-sref=".inputData" ui-sref-active="link_active" class="nomargin" >Input Data</a></li>
</ul>
<div class="tab-content"></div>
@@ -42,9 +42,9 @@
<div class="modal-body">
<ul class="nav nav-tabs">
- <li class="col-md-4 col-sm-4 col-xs-4 nopadding detailinfo"><a ui-sref=".detailInfo" ui-sref-active="link_active" class="nomargin">Detail Info</a></li>
- <li class="col-md-4 col-sm-4 col-xs-4 nopadding topo"><a ui-sref=".topo" ui-sref-active="link_active" class="nomargin" >Topo</a></li>
- <li class="col-md-4 col-sm-4 col-xs-4 nopadding inputdata"><a ui-sref=".inputData" ui-sref-active="link_active" class="nomargin">Input Data</a></li>
+ <li class="col-md-6 col-sm-6 col-xs-6 nopadding detailinfo"><a ui-sref=".detailInfo" ui-sref-active="link_active" class="nomargin">Detail Info</a></li>
+ <!--<li class="col-md-4 col-sm-4 col-xs-4 nopadding topo"><a ui-sref=".topo" ui-sref-active="link_active" class="nomargin" >Topo</a></li>-->
+ <li class="col-md-6 col-sm-6 col-xs-6 nopadding inputdata"><a ui-sref=".inputData" ui-sref-active="link_active" class="nomargin">Input Data</a></li>
</ul>
<div class="tab-content"></div>