diff options
36 files changed, 1008 insertions, 288 deletions
diff --git a/common/src/main/webapp/framework/browser/templates/home.html b/common/src/main/webapp/framework/browser/templates/home.html index 41426f61..cd170303 100644 --- a/common/src/main/webapp/framework/browser/templates/home.html +++ b/common/src/main/webapp/framework/browser/templates/home.html @@ -145,7 +145,7 @@ </ul> </div>--> </div> - <div id="rightContainer" class="col-sm-8 col-md-9 col-lg-9"> + <div id="rightContainer" class=""> <!--<div id="sampleArea"></div>--> <ui-view></ui-view> </div> diff --git a/extsys/src/main/webapp/extsys/sdncontroller/bak/controller.html b/extsys/src/main/webapp/extsys/sdncontroller/bak/controller.html index 144a9bec..5397e6e0 100644 --- a/extsys/src/main/webapp/extsys/sdncontroller/bak/controller.html +++ b/extsys/src/main/webapp/extsys/sdncontroller/bak/controller.html @@ -22,17 +22,17 @@ <head lang="en"> <meta charset="UTF-8"> <title></title> - <link href="css/bootstrap.min.css" rel="stylesheet"/> - <link href="css/VMMain.css" rel="stylesheet"/> - <link href="css/bootstrap-table.min.css" rel="stylesheet"/> - <script type="text/javascript" src="js/jquery-1.11.2.min.js"></script> - <script type="text/javascript" src="js/controller.js"></script> - <script type="text/javascript" src="js/bootstrap.min.js"></script> - <script type="text/javascript" src="js/bootstrap-table.min.js"></script> - <script type="text/javascript" src="js/bootstrap-table-filter-control.min.js"></script> + <link href="/openoui/extsys/sdncontroller/bak/css/bootstrap.min.css" rel="stylesheet"/> + <link href="/openoui/extsys/sdncontroller/bak/css/VMMain.css" rel="stylesheet"/> + <link href="/openoui/extsys/sdncontroller/bak/css/bootstrap-table.min.css" rel="stylesheet"/> + <script type="text/javascript" src="/openoui/extsys/sdncontroller/bak/js/jquery-1.11.2.min.js"></script> + <script type="text/javascript" src="/openoui/extsys/sdncontroller/bak/js/controller.js"></script> + <script type="text/javascript" src="/openoui/extsys/sdncontroller/bak/js/bootstrap.min.js"></script> + <script type="text/javascript" src="/openoui/extsys/sdncontroller/bak/js/bootstrap-table.min.js"></script> + <script type="text/javascript" src="/openoui/extsys/sdncontroller/bak/js/bootstrap-table-filter-control.min.js"></script> <script type="text/javascript"> $(document).ready(function () { - loadControllerData(); + loadControllerData(); }); function operateFormatter(value, row, index) { return ['<img class="siteDeleteImg" src="images/delete.png" href="javascript:void(0)" style="cursor: pointer" name="title" title="Delete" />'] @@ -55,7 +55,7 @@ <div id="open_base_tpL_buttonGroup" class="openoButton_buttonGroupClass"> <div class="openo openo-widget-button openoButton_buttonClass_parent ng-isolate-scope openoButton_buttonClass defaultbutton openoButton_button_default" - tabindex="0" id="false" text="res.brApp_ui_res_btn_create" icon-url="./images/add.png" + tabindex="0" id="false" text="res.brApp_ui_res_btn_create" icon-url="/openoui/extsys/sdncontroller/bak/images/add.png" cls="defaultbutton" click="clickAdd" style="display: inline-block; padding-left: 0px; padding-right: 0px;"> <div class="openoButton_buttonInnerClass openo-corner-all openoButton_Image" id="false_button"> diff --git a/extsys/src/main/webapp/extsys/sdncontroller/css/style.css b/extsys/src/main/webapp/extsys/sdncontroller/css/style.css new file mode 100644 index 00000000..1f81d81d --- /dev/null +++ b/extsys/src/main/webapp/extsys/sdncontroller/css/style.css @@ -0,0 +1,33 @@ +/* Copyright 2017, 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.
+ */
+
+
+.containerh{
+ background-color:white !important;
+ min-height:800px;
+
+}
+
+#textCenter{
+ padding-top:8px;
+}
+
+#rowSpacing{
+ margin-bottom: 9px;
+}
+
+#borderSpacing{
+ margin-bottom: -15px;
+}
\ No newline at end of file diff --git a/extsys/src/main/webapp/extsys/sdncontroller/index.html b/extsys/src/main/webapp/extsys/sdncontroller/index.html index 62855576..942a86bb 100644 --- a/extsys/src/main/webapp/extsys/sdncontroller/index.html +++ b/extsys/src/main/webapp/extsys/sdncontroller/index.html @@ -34,15 +34,16 @@ <!--<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>-->
<script src="/openoui/thirdparty/js/jquery-ui.js"></script>
<script type="text/javascript" src="/openoui/thirdparty/js/bootstrap.min.js"></script>
+ <link href="/openoui/extsys/sdncontroller/css/style.css" rel="stylesheet"/>
<script src="/openoui/extsys/sdncontroller/js/app.js"></script>
<script src="/openoui/extsys/sdncontroller/js/rest.js"></script>
- <script src="/openoui/framework/js/DataService.js"></script>
+ <script src="/openoui/extsys/sdncontroller/js/DataService.js"></script>
<script src="/openoui/thirdparty/js/mustache.js"></script>
</head>
-<body ng-app="ControllerApp" onload="loadTemplate()">
+<body ng-app="ControllerApp" class="containerh"> <!-- onload="loadTemplate()"-->
<ui-view></ui-view>
</body>
</html>
\ No newline at end of file diff --git a/extsys/src/main/webapp/extsys/sdncontroller/js/DataService.js b/extsys/src/main/webapp/extsys/sdncontroller/js/DataService.js new file mode 100644 index 00000000..f374bbd8 --- /dev/null +++ b/extsys/src/main/webapp/extsys/sdncontroller/js/DataService.js @@ -0,0 +1,80 @@ +app.factory("DataService", function($http, $log) { + return { + /** + * + * @param url - url of the service + * @param data - data as an object (used as query string in url) + * @returns {*} + */ + get: function (url, data) { + if(data) { + url += "?"; + for(key in data){ + url += key+ "=" + data[key]; + } + } + return $http({ + url: url, + method: 'GET', + data: null, + headers: {'Content-Type': 'application/json'} + }).then(function (response) { + return response.data; + }); + }, + /** + * + * @param url - url of the service + * @param data - data as an object (used for post method) + * @returns {*} + */ + post: function (url, data) { + return $http({ + url: url, + method: 'POST', + data: data, + headers: {'Content-Type': 'application/json '} + }).then(function (response) { + console.log("Response : "); + $log.info(response.data); + return response.data; + }); + }, + /** + * TODO - To Check for Delete + * @param url + * @param data + * @returns {*} + */ + delete: function (url) { + return $http({ + url: url, + method: 'DELETE', + data: null, + headers: {'Content-Type': 'application/json '} + }).then(function (response) { + console.log("Response : "); + $log.info(response.data); + return response.data; + }); + }, + /** + * + * @param url + * @param data + */ + put: function (url, data) { + return $http({ + url: url, + method: 'PUT', + data: data, + headers: {'Content-Type': 'application/json '} + }).then(function (response) { + console.log("Response : "); + $log.info(response.data); + return response.data; + }); + } + + } +})
\ No newline at end of file diff --git a/extsys/src/main/webapp/extsys/sdncontroller/js/app.js b/extsys/src/main/webapp/extsys/sdncontroller/js/app.js index c6f601c2..9a47d6c6 100644 --- a/extsys/src/main/webapp/extsys/sdncontroller/js/app.js +++ b/extsys/src/main/webapp/extsys/sdncontroller/js/app.js @@ -27,6 +27,12 @@ var app = angular.module("ControllerApp", ["ui.router", "ngTable"]) }
});
})*/
+ .run(function($rootScope, $location, $state, $stateParams) {
+ $rootScope.$on('$viewContentLoaded', function() {
+ //call it here
+ loadTemplate();
+ });
+ })
.config(function($stateProvider, $urlRouterProvider, $urlMatcherFactoryProvider) {
//$routeProvider.caseInsensitiveMatch = true;
$urlMatcherFactoryProvider.caseInsensitive(true);
@@ -54,8 +60,8 @@ var app = angular.module("ControllerApp", ["ui.router", "ngTable"]) $log.info(data);
loadButtons();
}, function (reason) {
-
$scope.message = "Error is :" + JSON.stringify(reason);
+ loadButtons();
});
}
@@ -63,27 +69,13 @@ var app = angular.module("ControllerApp", ["ui.router", "ngTable"]) var def_button_tpl = $(modelTemplate).filter('#defaultButtons').html();
var def_iconbutton_tpl = $(modelTemplate).filter('#defaultIconButtons').html();
var dialog = $(modelTemplate).filter('#dialog').html();
- var add_data = {"title":"Create", "type":"btn btn-default", "gType": "plus-icon", "iconPosition":"left", "clickAction":"showAddModal()"};
+ var add_data = {"title":"Create", "type":"btn btn-default", "gType": "plus-icon", "iconPosition":"left", "clickAction":"showAddModal()"};
// var delete_data = {"title":"Delete Selected", "type":"btn btn-default", "gType": "delete-icon", "iconPosition":"left", "clickAction":"deleteData()"};
var addhtml = Mustache.to_html(def_iconbutton_tpl, add_data);
//var deletehtml = Mustache.to_html(def_iconbutton_tpl, delete_data);
$('#extsysAction').html($compile(addhtml)($scope));
//$('#extsysAction').append($compile(deletehtml)($scope));
- $scope.checkboxes = { 'checked': false, items: {} };
-
- //var data = [{id: 1, name: "Moroni", age: 50}, {id: 2, name: "ABC", age: 30}, {id: 3, name: "Morhoni", age: 10}, {id: 4, name: "DABC", age: 31}, {id: 5, name: "Noor", age: 30}, {id: 6, name: "ABCD", age: 40}, {id: 7, name: "DABC", age: 31}, {id: 8, name: "Noor", age: 30}, {id: 9, name: "ABCD", age: 40}, {id: 10, name: "DABC", age: 31}, {id: 11, name: "Noor", age: 30}, {id: 12, name: "ABCD", age: 40}];
- $scope.controllerTableParams = new NgTableParams({count: 5, sorting: {name: 'asc'} //{page: 1,count: 10,filter: {name: 'M'},sorting: {name: 'desc'}
- }, { counts:[5, 10, 20, 50], dataset: $scope.data.controllerData});
-
- /*$scope.$watch('checkboxes.checked', function(value) {
- angular.forEach($scope.data.controllerData, function(item) {
- console.log("#######"+item.id);
- if (angular.isDefined(item.id)) {
- $scope.checkboxes.items[item.id] = value;
- }
- });
- });*/
var modelSubmit_data = {"title":"OK", "clickAction":"saveData(ext.id)"};
var modelSubmit_html = Mustache.to_html(def_button_tpl, modelSubmit_data);
@@ -120,29 +112,33 @@ var app = angular.module("ControllerApp", ["ui.router", "ngTable"]) /*var extProtocol = {"ErrMsg" : {"textboxErr" : "Protocol is required.", "modalVar":"ext.protocol"}};
$('#myModal #protocol').append($compile(Mustache.to_html(text, extProtocol.ErrMsg))($scope));*/
- var dropdowndata_protocol = {
+ /*var dropdowndata_protocol = {
"modalVar" : "ext.Protocol",
"labelField" : "itemLabel",
- "optionsValue" : JSON.stringify($scope.data.dropdownProtocolData.item)
+ "optionsValue" : JSON.stringify($scope.data ? $scope.data.dropdownProtocolData.item : "")
};
- console.log("dropdown data:"+$scope.data.dropdownProtocolData.item);
+ //console.log("dropdown data:"+$scope.data.dropdownProtocolData.item);
+
+ $('#myModal #protocol').append($compile(Mustache.to_html(dropDown, dropdowndata_protocol))($scope));*/
- $('#myModal #protocol').append($compile(Mustache.to_html(dropDown, dropdowndata_protocol))($scope));
+ var dropdownResponse=[{"id":"netconf","name":"netconf"},{"id":"snmp","name":"snmp"},{"id":"https","name":"https"},{"id":"http","name":"http"}];
+ var dropdownInfo = translateToDropdownInfo(dropdownResponse);
+ $('#myModal #protocolDD').html(dropdownInfo);
var extProductName = {"ErrMsg" : {"textboxErr" : "ProductName is required.", "modalVar":"ext.productName"}};
$('#myModal #ProductName').append($compile(Mustache.to_html(text, extProductName.ErrMsg))($scope));
- /*var extType = {"ErrMsg" : {"textboxErr" : "Type is required.", "modalVar":"ext.type"}};
- $('#myModal #type').append($compile(Mustache.to_html(text, extType.ErrMsg))($scope));*/
+ var extType = {"ErrMsg" : {"textboxErr" : "Type is required.", "modalVar":"ext.type"}};
+ $('#myModal #type').append($compile(Mustache.to_html(text, extType.ErrMsg))($scope));
- var dropdowndata_type = {
+ /*var dropdowndata_type = {
"modalVar" : "ext.Type",
"labelField" : "itemLabel",
- "optionsValue" : JSON.stringify($scope.data.dropdownTypeData.item)
+ "optionsValue" : JSON.stringify($scope.data?$scope.data.dropdownTypeData.item:"")
};
- $('#myModal #type').append($compile(Mustache.to_html(dropDown, dropdowndata_type))($scope));
+ $('#myModal #type').append($compile(Mustache.to_html(dropDown, dropdowndata_type))($scope));*/
@@ -156,6 +152,20 @@ var app = angular.module("ControllerApp", ["ui.router", "ngTable"]) var extOperation = {"ErrMsg" : {"textboxErr" : "The name is required.", "modalVar":"ext.operation", "placeholder":"Hard Disk"}};
$('#myModal #Operation').append($compile(Mustache.to_html(text, extOperation.ErrMsg))($scope));*/
+ $scope.checkboxes = { 'checked': false, items: {} };
+
+ //var data = [{id: 1, name: "Moroni", age: 50}, {id: 2, name: "ABC", age: 30}, {id: 3, name: "Morhoni", age: 10}, {id: 4, name: "DABC", age: 31}, {id: 5, name: "Noor", age: 30}, {id: 6, name: "ABCD", age: 40}, {id: 7, name: "DABC", age: 31}, {id: 8, name: "Noor", age: 30}, {id: 9, name: "ABCD", age: 40}, {id: 10, name: "DABC", age: 31}, {id: 11, name: "Noor", age: 30}, {id: 12, name: "ABCD", age: 40}];
+ $scope.controllerTableParams = new NgTableParams({count: 5, sorting: {name: 'asc'} //{page: 1,count: 10,filter: {name: 'M'},sorting: {name: 'desc'}
+ }, { counts:[5, 10, 20, 50], dataset: $scope.data});
+
+ /*$scope.$watch('checkboxes.checked', function(value) {
+ angular.forEach($scope.data.controllerData, function(item) {
+ console.log("#######"+item.id);
+ if (angular.isDefined(item.id)) {
+ $scope.checkboxes.items[item.id] = value;
+ }
+ });
+ });*/
}
@@ -199,6 +209,17 @@ var app = angular.module("ControllerApp", ["ui.router", "ngTable"]) $state.reload();
}
+ function translateToDropdownInfo(dropdowndata) {
+ var options = '<option value="select">--select--</option>';
+ var i;
+ for (i = 0; i < dropdowndata.length; i += 1) {
+ var option = '<option value="' + dropdowndata[i].id + '">' + dropdowndata[i].name
+ + '</option>';
+ options = options + option;
+ }
+
+ return options;
+ }
/*$scope.checkAll = function () {
@@ -335,22 +356,43 @@ function loadTemplate() { });
}*/
-var modelTemplate = "";
+/*var modelTemplate = "";
function loadTemplate() {
- $.get('framework/template.html', function (template) {
+ *//*$.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('framework/templateContainer.html', function (template) {
+ $.get('/openoui/framework/templateFunctional.html', function (template) {
+ modelTemplate += template;
+ });
+}*/
+
+var modelTemplate = "";
+function loadTemplate() {
+
+ /*$.get('/openoui/resmgr/templates/template.html', function (template) {
+ modelTemplate += template;
+ });*/
+ $.get('/openoui/extsys/sdncontroller/templates/templateContainer.html', function (template) {
modelTemplate += template;
});
- $.get('framework/templateWidget.html', function (template) {
+ $.get('/openoui/extsys/sdncontroller/templates/templateWidget.html', function (template) {
//console.log("Template is : "+template);
modelTemplate += template;
});
- $.get('framework/templateNotification.html', function (template) {
+ $.get('/openoui/extsys/sdncontroller/templates/templateNotification.html', function (template) {
modelTemplate += template;
});
- $.get('framework/templateFunctional.html', function (template) {
+ $.get('/openoui/extsys/sdncontroller/templates/templateFunctional.html', function (template) {
modelTemplate += template;
});
}
diff --git a/extsys/src/main/webapp/extsys/sdncontroller/js/rest.js b/extsys/src/main/webapp/extsys/sdncontroller/js/rest.js index 47b94c64..1279c424 100644 --- a/extsys/src/main/webapp/extsys/sdncontroller/js/rest.js +++ b/extsys/src/main/webapp/extsys/sdncontroller/js/rest.js @@ -18,7 +18,7 @@ app.factory("controllerDataService", function($http, DataService, $log){
- var uri = 'http://192.168.9.13:18008';
+ var uri = '';
return {
getControllerData : function() {
/*return $http({
diff --git a/extsys/src/main/webapp/extsys/sdncontroller/templates/controller.html b/extsys/src/main/webapp/extsys/sdncontroller/templates/controller.html index faa336d1..2d336101 100644 --- a/extsys/src/main/webapp/extsys/sdncontroller/templates/controller.html +++ b/extsys/src/main/webapp/extsys/sdncontroller/templates/controller.html @@ -30,32 +30,32 @@ <input type="checkbox" ng-model="checkboxes.items[controllerData.id]" />
</td>-->
<td title="'Name'" filter="{ Name: 'text'}" sortable="'Name'">
- {{controllerData.Name}}
+ {{controllerData.name}}
</td>
<td title="'Protocol'" filter="{ Protocol: 'text'}" sortable="'Protocol'">
- {{controllerData.Protocol}}
+ {{controllerData.protocol}}
</td>
<td title="'Product Name'" filter="{ productName: 'text'}" sortable="'productName'">
{{controllerData.productName}}
</td>
</td>
<td title="'Type'" filter="{ Type: 'text'}" sortable="'Type'">
- {{controllerData.Type}}
+ {{controllerData.type}}
</td>
<td title="'Vendor'" filter="{ Vendor: 'text'}" sortable="'Vendor'">
- {{controllerData.Vendor}}
+ {{controllerData.vendor}}
</td>
<td title="'Version'" filter="{ Version: 'number'}" sortable="'Version'">
- {{controllerData.Version}}
+ {{controllerData.version}}
</td>
<td title="'Description'" filter="{ Description: 'text'}" sortable="'Description'">
- {{controllerData.Description}}
+ {{controllerData.description}}
</td>
<td title="'Create Time'" filter="{ createTime: 'number'}" sortable="'createTime'">
{{controllerData.createTime}}
</td>
<td title="'Operation'" filter="{ Operation: 'text'}" sortable="'Operation'">
- {{controllerData.Operation}}
+ {{controllerData.operation}}
</td>
<td title="'Action'">
<!-- <span class="pull-right glyphicon glyphicon-edit" ng-click="editData(controllerData.name)" style="cursor: pointer;margin: 0 5px"></span>
@@ -80,7 +80,7 @@ <div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
- <h5 class="modal-title">Modal Header</h5>
+ <h5 class="modal-title">>Add Controller</h5>
</div>
<form name="extsysForm" method="post">
<div class="modal-body">
@@ -130,6 +130,7 @@ <div class="form-group row">
<label class="col-xs-4 col-form-label">Protocol</label>
<div id="protocol" class="col-xs-8" >
+ <select id="protocolDD" class="form-control inputfield" ng-model="ne.optSelect"></select>
</div>
</div>
diff --git a/extsys/src/main/webapp/extsys/sdncontroller/templates/templateContainer.html b/extsys/src/main/webapp/extsys/sdncontroller/templates/templateContainer.html new file mode 100644 index 00000000..ef6f01c6 --- /dev/null +++ b/extsys/src/main/webapp/extsys/sdncontroller/templates/templateContainer.html @@ -0,0 +1,79 @@ +<!--
+
+ Copyright 2016-2017, 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.
+
+-->
+<!-- Accordion -->
+<script id="accordion" type="text/html">
+ {{#items}}
+ <div class="panel panel-default">
+ <h3 class="panel-title">
+ <a data-toggle="collapse" data-parent="#accordion" data-target="#{{tabId}}">{{header}}</a>
+ </h3>
+ <div id="{{tabId}}" class="panel-collapse collapse {{#isActive}}in{{/isActive}}">
+ <div class="panel-body"> {{msg}} </div>
+ </div>
+ </div>
+ {{/items}}
+</script>
+
+<!--Tabs-->
+<script id="tabs" type="text/html">
+ <ul class="nav nav-tabs">
+ {{#items}}<li {{#isActive}}class="active"{{/isActive}}><a data-toggle="tab" data-target="#{{target}}">{{tablabel}}</a></li>{{/items}}
+ </ul>
+ <div class="tab-content">
+ {{#items}}
+ <div id="{{target}}" class="tab-pane fade {{#isActive}}in active{{/isActive}}">
+ <h3>{{tablabel}}</h3>
+ <p>{{msg}}</p>
+ </div>
+ {{/items}}
+ </div>
+</script>
+
+<!--Vertical Tabs-->
+<script id="vtabs" type="text/html">
+ <ul class="nav nav-stacked col-sm-4 col-md-4 col-lg-4">
+ {{#items}}<li {{#isActive}}class="active"{{/isActive}}><a data-toggle="tab" data-target="#{{target}}">{{tablabel}}</a></li>{{/items}}
+ </ul>
+ <div class="tab-content col-sm-8 col-md-8 col-lg-8">
+ {{#items}}
+ <div id="{{target}}" class="tab-pane fade {{#isActive}}in active{{/isActive}}">
+ <h3>{{tablabel}}</h3>
+ <p>{{msg}}</p>
+ </div>
+ {{/items}}
+ </div>
+</script>
+
+<!--Table-->
+<script id="table" type="text/html">
+ {{#filter}}<input type="text" id="myInput" onkeyup="{{action}}" placeholder="Search for {{searchField}}">{{/filter}}
+ <table id="myTable{{#filter}}_search{{/filter}}" class="table {{#striped}}table-striped{{/striped}} {{#border}}table-bordered{{/border}} {{#hover}}table-hover{{/hover}} {{#condensed}}table-condensed{{/condensed}}">
+ <thead>
+ <tr>
+ {{#itemHeader}}<th>{{.}}</th>{{/itemHeader}}
+ </tr>
+ </thead>
+ <tbody>
+ {{#rowitem}}
+ <tr>
+ {{#values}}<td>{{.}}</td>{{/values}}
+ </tr>
+ {{/rowitem}}
+ </tbody>
+ </table>
+</script>
\ No newline at end of file diff --git a/extsys/src/main/webapp/extsys/sdncontroller/templates/templateFunctional.html b/extsys/src/main/webapp/extsys/sdncontroller/templates/templateFunctional.html new file mode 100644 index 00000000..ff2f53f0 --- /dev/null +++ b/extsys/src/main/webapp/extsys/sdncontroller/templates/templateFunctional.html @@ -0,0 +1,82 @@ +<!--
+
+ Copyright 2016-2017, 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.
+
+-->
+
+<script id="functionalDialog" type="text/html">
+ <div id="funModal" class="modal fade" role="dialog" ng-init="getDetail()">
+ <div class="modal-dialog modal-md">
+
+ <!-- Modal content-->
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal">×</button>
+ <h4 class="modal-title titlestyle">{{title}}</h4>
+ </div>
+ <div class="modal-body">
+ <div>
+ <form class="form-horizontal" role="form">
+ {{#labels}}
+ <div class="form-group">
+ <label class="control-label col-sm-3 labelstyle" for={{input_id}}>{{text}}</label>
+ <div class="col-sm-7">
+ <input type={{type}} class="form-control" id={{input_id}}>
+ </div>
+ </div>
+ {{/labels}}
+ </form>
+ </div>
+ </div>
+ <div class="modal-footer">
+ <div>{{#buttons}} <button type="button" class="btn btnDefault btnmrg" data-dismiss="modal" >{{text}}</button> {{/buttons}}
+ {{#showClose}}<button type="button" class="btn btnDefault btnmrg" data-dismiss="modal">{{closeBtnTxt}}</button>{{/showClose}}
+ </div>
+ <!--<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>-->
+ </div>
+ </div>
+
+ </div>
+ </div>
+</script>
+
+
+<script id="dialog" type="text/html">
+ <div id="uniModal" class="modal fade" role="dialog">
+ <div class="modal-dialog">
+
+ <!-- Modal content-->
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal">×</button>
+ <div class="modalHeader"></div>
+ </div>
+ <form name="provinceForm" method="post"><!-- ng-submit="saveData(province.id)"-->
+ <div class="modal-body">
+ <div class="modalBodyContent">
+ </div>
+ </div>
+
+ <div id="footerBtns" class="modal-footer">
+ </div>
+
+ </form>
+ </div>
+
+
+ </div>
+ </div>
+
+</script>
\ No newline at end of file diff --git a/extsys/src/main/webapp/extsys/sdncontroller/templates/templateNotification.html b/extsys/src/main/webapp/extsys/sdncontroller/templates/templateNotification.html new file mode 100644 index 00000000..97f26e37 --- /dev/null +++ b/extsys/src/main/webapp/extsys/sdncontroller/templates/templateNotification.html @@ -0,0 +1,48 @@ +<!--
+
+ Copyright 2016-2017, 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.
+
+-->
+
+<!--Dialog-->
+<script id="personDialog" type="text/html">
+ <div id="msgModal" class="modal fade" role="dialog">
+ <div class="modal-dialog modal-md">
+
+ <!-- Modal content-->
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal">×</button>
+ <h4 class="modal-title titlestyle">{{title}}</h4>
+ </div>
+ <div class="modal-body">
+ <div class="container center">
+ <div class="row">
+ <div class="col-xs-2 col-sm-2 col-md-1 col-lg-1 icon {{icon}} {{iconColor}}"></div>
+ <div class="msg col-xs-10 col-sm-10 col-md-11 col-lg-11" style="text-align:left;vertical-align: middle;">{{msg}}</div>
+ </div>
+ </div>
+ </div>
+ <div class="modal-footer">
+ <div>{{#buttons}} <button type="button" class="btn btnDefault btnmrg" data-dismiss="modal" ng-click={{action}}>{{text}}</button> {{/buttons}}
+ {{#showClose}}<button type="button" class="btn btnDefault btnmrg" data-dismiss="modal">{{closeBtnTxt}}</button>{{/showClose}}
+ </div>
+ <!--<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>-->
+ </div>
+ </div>
+
+ </div>
+ </div>
+</script>
\ No newline at end of file diff --git a/extsys/src/main/webapp/extsys/sdncontroller/templates/templateWidget.html b/extsys/src/main/webapp/extsys/sdncontroller/templates/templateWidget.html new file mode 100644 index 00000000..bb8eef48 --- /dev/null +++ b/extsys/src/main/webapp/extsys/sdncontroller/templates/templateWidget.html @@ -0,0 +1,222 @@ +<!--
+
+ Copyright 2016-2017, 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.
+
+-->
+
+<!-- Default Buttons <button class="btnDefault" ng-click="{{clickAction}}">{{title}}</button>-->
+<script id="defaultButtons" type="text/html">
+ <input type="button" class="btnDefault btnmrg" ng-click="{{clickAction}}" value="{{title}}"/>
+</script>
+
+<script id="defaultIconButtons" type="text/html">
+ <button id="iconBtn" type="button" class="btnDefault btnmrg {{type}}" ng-click="{{clickAction}}">{{title}}
+ <span class="glyphicon {{gType}} pull-{{iconPosition}}"></span>
+ </button>
+</script>
+
+<!-- Visual Buttons -->
+<script id="visualButtons" type="text/html">
+ <button type="button" class="btn btn-{{type}}">{{title}}</button>
+</script>
+
+<!-- Different sized Buttons -->
+<script id="sizeButtons" type="text/html">
+ <button type="button" class="btn btn-{{type}} {{size}}">{{title}}</button>
+</script>
+
+<!-- Icon Buttons -->
+<script id="iconButtons" type="text/html">
+ <button type="button" class="btn btn-{{type}}">{{title}}
+ <span class="glyphicon {{gType}}"></span>
+ </button>
+</script>
+
+<!--Dropdown template-->
+<script id="dropDown" type="text/html">
+ <div class="drop{{position}}">
+ <button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown">{{title}}
+ <span class="caret"></span>
+ </button>
+ <ul class="dropdown-menu">
+ {{#items}}<li><a href="#">{{itemLabel}}</a></li>{{/items}}
+ </ul>
+ </div>
+</script>
+
+<script id="dropDownHeader" type="text/html">
+ <button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown">{{title}}
+ <span class="caret"></span>
+ </button>
+ <ul class="dropdown-menu">
+ {{#items}}
+ {{#isheader}}<li class="divider"></li><li class="dropdown-header">{{itemLabel}}</li><li class="divider"></li>{{/isheader}}
+ {{^isheader}}<li><a href="#">{{itemLabel}}</a></li>{{/isheader}}
+ {{/items}}
+ </ul>
+</script>
+
+<script id="simpleDropdownTmpl" type="text/html">
+ <div class="dropdownplain">
+
+ <select class="inputfield form-control" ng-model="{{modalVar}}" ng-options="item.{{labelField}} for item in {{optionsValue}}">
+ <option style="display:none" value="">--select--</option>
+ </select>
+ </div>
+</script>
+
+
+<!--Radio Buttons-->
+<script id="radioButtons" type="text/html">
+ <div>
+ <input class="magic-radio" type="radio" name="radio" id="radio{{id}}"/>
+ <label for="radio{{id}}">{{label}}</label></br>
+ </div>
+</script>
+
+<!--Check boxes template-->
+<script id="checkBoxes" type="text/html">
+ <div class="funkyradio-{{type}}">
+ <input type="checkbox" name="check" id="checkbox{{id}}" {{#checked}}checked{{/checked}} />
+ <label for="checkbox{{id}}">{{label}}</label>
+ </div>
+</script>
+
+<!--text-->
+<script id="textfield" type="text/html">
+ <div class="css-form">
+ <input id ="textbox" name="textbox" class="form-control inputfield" placeholder="{{placeholder}}" ng-model="{{modalVar}}" type="text" ng-blur="{{errfunc}}({{modalVar}})" {{#required}}required{{/required}}> {{#required}}<span class="staricon">*</span>{{/required}}
+ <span class="errMsg" ng-show="{{errtag}}">{{errmsg}}</span>
+ </div>
+</script>
+
+<!--email-->
+<script id="email" type="text/html">
+ <div class="css-form">
+ <input class="form-control inputfield" placeholder="{{placeholder}}" ng-model="{{modalVar}}" type="email" ng-blur="{{errfunc}}({{modalVar}})" {{#required}}required{{/required}}>{{#required}}<span class="staricon">*</span>{{/required}}
+ <span class="errMsg" ng-show="{{errtag}}">{{errmsg}}</span>
+ </div>
+</script>
+
+<!--url-->
+<script id="url" type="text/html">
+ <div class="css-form">
+ <input class="form-control inputfield" placeholder="{{placeholder}}" ng-model="{{modalVar}}" type="url" ng-blur="{{errfunc}}({{modalVar}})" {{#required}}required{{/required}}>{{#required}}<span class="staricon">*</span>{{/required}}
+ <span class="errMsg" ng-show="{{errtag}}">{{errmsg}}</span>
+ </div>
+</script>
+
+<!--password-->
+<script id="password" type="text/html">
+ <div class="css-form">
+
+
+ <input class="form-control inputfield" placeholder="{{placeholder}}" ng-model="{{modalVar}}" type="password" pattern=".{3,}" maxlength="{{#maxLength}}{{maxLength}}{{/maxLength}}{{^maxLength}}9{{/maxLength}}" ng-blur="{{errfunc}}({{modalVar}})" {{#required}}required{{/required}}>{{#required}}<span class="staricon">*</span>{{/required}}
+ <span class="errMsg" ng-show="{{errtag}}">{{errmsg}}</span>
+ </div>
+</script>
+
+<!--numeric-->
+<script id="numeric" type="text/html">
+ <div class="css-form">
+ <input class="form-control inputfield" placeholder="{{placeholder}}" ng-model="{{modalVar}}" type="number" ng-blur="{{errfunc}}({{modalVar}})" {{#required}}required{{/required}}/>{{#required}}<span class="staricon">*</span>{{/required}}
+ <span class="errMsg" ng-show="{{errtag}}">{{errmsg}}</span>
+ </div>
+</script>
+
+<!--dot-->
+<script id="dot" type="text/html">
+ <div class="css-form">
+ <input class="form-control inputfield" placeholder="{{placeholder}}" ng-model="{{modalVar}}" type="datetime-local" ng-blur="{{errfunc}}({{modalVar}})" {{#required}}required{{/required}}>{{#required}}<span class="staricon">*</span>{{/required}}
+ <span class="errMsg" ng-show="{{errtag}}">{{errmsg}}</span>
+ </div>
+</script>
+
+<!--date-->
+<script id="dateinput" type="text/html">
+ <div class="css-form">
+ <input class="form-control inputfield" placeholder="{{placeholder}}" ng-model="{{modalVar}}" type="date" ng-blur="{{errfunc}}({{modalVar}})" {{#required}}required{{/required}}>{{#required}}<span class="staricon">*</span>{{/required}}
+ <span class="errMsg" ng-show="{{errtag}}">{{errmsg}}</span>
+ </div>
+</script>
+
+<!--Month-->
+<script id="monthinput" type="text/html">
+ <div class="css-form">
+ <input class="form-control inputfield" placeholder="{{placeholder}}" ng-model="{{modalVar}}" type="month" ng-blur="{{errfunc}}({{modalVar}})" {{#required}}required{{/required}}>{{#required}}<span class="staricon">*</span>{{/required}}
+ <span class="errMsg" ng-show="{{errtag}}">{{errmsg}}</span>
+ </div>
+</script>
+
+
+<!--Week-->
+<script id="weekinput" type="text/html">
+ <div class="css-form">
+ <input class="form-control inputfield" placeholder="{{placeholder}}" ng-model="{{modalVar}}" type="week" ng-blur="{{errfunc}}({{modalVar}})" {{#required}}required{{/required}}>{{#required}}<span class="staricon">*</span>{{/required}}
+ <span class="errMsg" ng-show="{{errtag}}">{{errmsg}}</span>
+ </div>
+</script>
+
+<!--time-->
+<script id="timeinput" type="text/html">
+ <div class="css-form">
+ <input class="form-control inputfield" placeholder="{{placeholder}}" ng-model="{{modalVar}}" type="time" ng-blur="{{errfunc}}({{modalVar}})" {{#required}}required{{/required}}>{{#required}}<span class="staricon">*</span>{{/required}}
+ <span class="errMsg" ng-show="{{errtag}}">{{errmsg}}</span>
+ </div>
+</script>
+
+<!--ipv4-->
+<script id="ipv4" type="text/html">
+ <div class="css-form">
+ <input class="form-control inputfield" type="ipv4" placeholder="{{placeholder}}" ng-model="{{modalVar}}" pattern="((^|\.)((25[0-5])|(2[0-4]\d)|(1\d\d)|([1-9]?\d))){4}$" ng-blur="{{errfunc}}({{modalVar}})" {{#required}}required{{/required}}>{{#required}}<span class="staricon">*</span>{{/required}}
+ <span class="errMsg" ng-show="{{errtag}}">{{errmsg}}</span>
+ </div>
+</script>
+
+<!--ipv6-->
+<script id="ipv6" type="text/html">
+ <div class="css-form">
+ <input class="form-control inputfield" placeholder="{{placeholder}}" ng-model="{{modalVar}}" type="ipv6" pattern="^([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])" ng-blur="{{errfunc}}({{modalVar}})" {{#required}}required{{/required}}>{{#required}}<span class="staricon">*</span>{{/required}}
+ <span class="errMsg" ng-show="{{errtag}}">{{errmsg}}</span>
+ </div>
+</script>
+
+<!--textarea-->
+<script id="textarea" type="text/html">
+ <div class="css-form">
+ <textarea class="form-control inputfield" rows="4" cols="50" placeholder="{{placeholder}}" ng-model="{{modalVar}}" ng-blur="{{errfunc}}({{modalVar}})" {{#required}}required{{/required}}></textarea>{{#required}}<span class="staricon">*</span>{{/required}}
+ <span class="errMsg" ng-show="{{errtag}}">{{errmsg}}</span>
+ </div>
+</script>
+
+<!--note-->
+<script id="note" type="text/html">
+
+ <a id="noteanchor" href="#/home/textarea" title="Note" data-toggle="popover" data-trigger="focus" data-placement="{{placement}}">
+ <span class="glyphicon glyphicon-info-sign "></span></a>
+</script>
+
+<!-- list -->
+<script id="list" type="text/html">
+
+ {{#items}}
+
+ <div>
+ <button type="button" class="btn btn-primary btn-block" ng-click="loadSubMenuPage('{{id}}', '{{level}}', '{{row}}')">{{title}}</button>
+ </div>
+
+ {{/items}}
+
+</script>
diff --git a/lifecyclemgr/src/main/webapp/lifecyclemgr/js/DataService.js b/lifecyclemgr/src/main/webapp/lifecyclemgr/js/DataService.js index e5b7c8cc..04394a22 100644 --- a/lifecyclemgr/src/main/webapp/lifecyclemgr/js/DataService.js +++ b/lifecyclemgr/src/main/webapp/lifecyclemgr/js/DataService.js @@ -62,7 +62,7 @@ app.factory("DataService", function($http, $log){ if(lcData) {
for (var i = 0; i < lcData.length; i++) {
if(lcData[i].serviceId == id) {
- returnData = lcData[i].inputParameters;
+ returnData = lcData[i];
break;
}
}
@@ -93,8 +93,23 @@ app.factory("DataService", function($http, $log){ return response.data;
});
},
- loadServiceDetails : function(id) {
- return JSON.parse('[{"id":"12345", "name":"sdno"}, {"id":"23456", "name":"gso"},{"id":"12345", "name":"nfvo"}]');
+ loadServiceTopoSequence : function(id) {
+ return $http({
+ url: '/openoapi/gso/v1/services/toposequence/' + id,
+ //url: 'http://localhost:5000/api/getOverlayVPNData',
+ method: 'GET',
+ headers: {'Content-Type': 'application/json'}
+ }).then(function(response){
+ //$log.info(response);
+ var serviceToposequence = response.data;
+ var responseData = [];
+ for (var i = 0; i < serviceToposequence.service.segments.length; i++) {
+ var segment = serviceToposequence.service.segments[i];
+ responseData[i] = {"id":segment.serviceSegmentId, "name":segment.serviceSegmentType};
+ }
+ return responseData;
+ });
+ //return JSON.parse('[{"id":"12345", "name":"sdno"}, {"id":"23456", "name":"gso"},{"id":"12345", "name":"nfvo"}]');
},
loadNfvoServiceDetails : function(id) {
return JSON.parse('{"vnfInfoId": [{ "vnfInstanceId": "123", "vnfInstanceName": "vnf instance 1", "vnfProfileId": "321" }, { "vnfInstanceId": "123", "vnfInstanceName": "vnf instance 1", "vnfProfileId": "321" }], "vlInfo": [{ "networkResource": {"resourceName": "network resource 1"}, "linkPortResource": { "resourceName": "link port resource 1"}}, { "networkResource": {"resourceName": "network resource 1"}, "linkPortResource": { "resourceName": "link port resource 1"}}], "vnffgInfo": [{"vnfId": "vnfid-123", "virtualLinkId": "virtual link 123", "cpId": "cp id 123", "nfp": "nfp 123"}, {"vnfId": "vnfid-123", "virtualLinkId": "virtual link 123", "cpId": "cp id 123", "nfp": "nfp 123"}]}');
@@ -364,7 +379,9 @@ function collectParamValue(identify, param) { * @returns
*/
function getParamId(identify, param) {
- return '' ===identify ? param.name : identify + '_' + param.name;
+ var tmpname = param.name.replace(/-/g, '_');
+ var tmpname1 = tmpname.replace(/\./g, '_');
+ return '' ===identify ? tmpname1 : identify + '_' + tmpname1;
}
/**
@@ -393,7 +410,7 @@ function generateParamComponent(nodeType, identify, param, strReadOnly) { var name = getParamLabel(nodeType, param);
var id = getParamId(identify,param);
var component = '';
- if (param.type === 'string') {
+ if (param.type != 'enum') {
component = '<div class="mT15 form-group row-content" style="margin-left:0px;">'
+ '<label class="col-sm-6 control-label labelstyle">'
+ '<span>' + name + '</span>' + generateRequiredLabel(param)
@@ -411,7 +428,7 @@ function generateParamComponent(nodeType, identify, param, strReadOnly) { component = '<div class="form-group row-content" style="margin-left:0px;margin-bottom:5px;">'
+ '<label class="col-sm-6 control-label labelstyle">'
+ '<span>' + name + '</span>'
- + '<span class="required">*</span>'
+ + generateRequiredLabel(param)
+ '</label>'
+ '<div class="col-sm-6">'
+ '<select class="form-control" style ="padding-top: 0px;padding-bottom: 0px;"'
diff --git a/lifecyclemgr/src/main/webapp/lifecyclemgr/js/app.js b/lifecyclemgr/src/main/webapp/lifecyclemgr/js/app.js index 053ee41d..e1dbdbed 100644 --- a/lifecyclemgr/src/main/webapp/lifecyclemgr/js/app.js +++ b/lifecyclemgr/src/main/webapp/lifecyclemgr/js/app.js @@ -536,23 +536,25 @@ var app = angular.module("lcApp", ["ui.router", "ngTable"])/*, 'ui.bootstrap', ' console.log("detailInfoCtrl --> $stateParams.id:: " + $stateParams.id);
//$scope.currentId = $stateParams.id;
$scope.rightPanelHeader = "VPN Manager";
-
- var jsonData = DataService.loadServiceDetails($stateParams.id);
+ var rowData = DataService.getSavedLCData($stateParams.id);
+ var jsonData =[];
+ if(rowData.serviceType === "SDNO" || rowData.serviceType === "NFVO"){
+ jsonData[0] = {"id": $stateParams.id, "name": rowData.serviceType};
+ }
+ else{
+ jsonData = DataService.loadServiceTopoSequence($stateParams.id);
+ }
$(".accordion").html("");
for (var i = 0; i < jsonData.length; i++) {
//console.log("jsonData Name: " + jsonData[i].name);
- if (jsonData[i].name == "sdno") {
+ if (jsonData[i].name == "SDNO") {
//$("#sdnoLink").text(jsonData[i].name.toUpperCase());
//console.log("Adding Accordian to SDNO");
- $(".accordion").append($compile(addAccordionData("sdno", jsonData[i].name.toUpperCase(), $stateParams.id))($scope));
- }
- else if (jsonData[i].name == "gso") {
- //console.log("Adding Accordian to GSO");
- $(".accordion").append($compile(addAccordionData("gso", jsonData[i].name.toUpperCase(), $stateParams.id))($scope));
+ $(".accordion").append($compile(addAccordionData("sdno", jsonData[i].name.toUpperCase(), jsonData[i].id))($scope));
}
- else if (jsonData[i].name == "nfvo") {
+ else if (jsonData[i].name == "NFVO") {
//console.log("Adding Accordian to NFVO");
- $(".accordion").append($compile(addAccordionData("nfvo", jsonData[i].name.toUpperCase(), $stateParams.id))($scope));
+ $(".accordion").append($compile(addAccordionData("nfvo", jsonData[i].name.toUpperCase(), jsonData[i].id))($scope));
}
else {
@@ -716,7 +718,8 @@ var app = angular.module("lcApp", ["ui.router", "ngTable"])/*, 'ui.bootstrap', ' .controller('inputDataCtrl', function($scope, $stateParams, $log, DataService) {
console.log("inputDataCtrl --> $stateParams.id:: " + $stateParams.id);
- $scope.inputData = DataService.getSavedLCData($stateParams.id);
+ var rowData = DataService.getSavedLCData($stateParams.id);
+ $scope.inputData = rowData.inputParameters;
$log.info($scope.inputData);
$("div.inputDataElements").html("");
$("div.inputDataElements").append(convertInputsToUI('', 'show', $scope.inputData));
diff --git a/lifecyclemgr/src/main/webapp/lifecyclemgr/style.css b/lifecyclemgr/src/main/webapp/lifecyclemgr/style.css new file mode 100644 index 00000000..b0ce4f62 --- /dev/null +++ b/lifecyclemgr/src/main/webapp/lifecyclemgr/style.css @@ -0,0 +1,16 @@ +/* Copyright 2017, 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.
+ */
+
+
diff --git a/login/src/main/webapp/login/html/menu.html b/login/src/main/webapp/login/html/menu.html index 509a5493..e2f37d33 100644 --- a/login/src/main/webapp/login/html/menu.html +++ b/login/src/main/webapp/login/html/menu.html @@ -64,14 +64,14 @@ <li><a href="/openoui/resmgr/index.html" target="mainFrame">Resource Management</a></li> </ul> </li> - <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">Province Management</a></li> </ul> - </li> + </li> --> <li> <div class="link"> <i class="fa fa-edit"></i>Orchestrator<i class="fa fa-chevron-down"></i> @@ -111,7 +111,7 @@ </li> <li> <div class="link"> - <i class="fa fa-puzzle-piece"></i>Market<i class="fa fa-chevron-down"></i> + <i class="fa fa-puzzle-piece"></i>VNF Market<i class="fa fa-chevron-down"></i> </div> <ul class="submenu"> <li><a href="/openoui/vnfmarket/index.html" target="mainFrame">VNF Market Place</a></li> diff --git a/resmgr/src/main/webapp/resmgr/js/app.js b/resmgr/src/main/webapp/resmgr/js/app.js index d930cbb1..2ca5177b 100644 --- a/resmgr/src/main/webapp/resmgr/js/app.js +++ b/resmgr/src/main/webapp/resmgr/js/app.js @@ -134,9 +134,18 @@ var app = angular.module("ResourceMgrApp", ["ui.router", "ngTable"]) var portName = {"ErrMsg" : {"errmsg" : "Name is required.", "modalVar":"port.name", "errtag":"textboxErrName", "errfunc":"validatetextboxName", "required":true}};
$('#myModal #name').append($compile(Mustache.to_html(text, portName.ErrMsg))($scope));
- var portMe = {"ErrMsg" : {"errmsg" : "ME is required.", "modalVar":"port.meID", "errtag":"textboxErrMe", "errfunc":"validatetextboxMe", "required":true}};
- $('#myModal #meID').append($compile(Mustache.to_html(text, portMe.ErrMsg))($scope));
-
+ portDataService.getAllNEData().then(function(response) {
+ var medata = [];
+ for(var i = 0; i < response.managedElements.length; i+=1){
+ medata[i] = {"serviceTemplateId":response.managedElements[i].id,"templateName":response.managedElements[i].name};
+ }
+ var dropdownInfo = translateToDropdownInfo(medata);
+ $("#myModal #medropdown").html(dropdownInfo);
+ console.log("Data: ");
+ $log.info(data);
+ }, function(reason) {
+ $scope.message = "Error is :" + JSON.stringify(reason);
+ });
//var portType = {"ErrMsg" : {"textboxErr" : "The name is required.", "modalVar":"port.type"}};
//$('#myModal #type').append($compile(Mustache.to_html(dropDown, $scope.data.dropdowntypeData))($scope));
@@ -148,7 +157,7 @@ var app = angular.module("ResourceMgrApp", ["ui.router", "ngTable"]) $('#myModal #type').append($compile(Mustache.to_html(dropDown, dropSimple_data))($scope));*/
- var dropdownResponse=[{"serviceTemplateId":"tenant_site","templateName":"portType1"},{"serviceTemplateId":"tenant_site2","templateName":"portType2"}];
+ var dropdownResponse=[{"serviceTemplateId":"ETH","templateName":"ETH"},{"serviceTemplateId":"POS","templateName":"POS"},{"serviceTemplateId":"Trunk","templateName":"Trunk"},{"serviceTemplateId":"Loopback","templateName":"Loopback"}];
var dropdownInfo = translateToDropdownInfo(dropdownResponse);
document.getElementById("portdropdown").innerHTML = dropdownInfo;
@@ -169,7 +178,7 @@ var app = angular.module("ResourceMgrApp", ["ui.router", "ngTable"]) $('#myModal #Edgepoint').append($compile(Mustache.to_html(dropDown, dropSimple_data))($scope));*/
- var dropdownResponse=[{"serviceTemplateId":"tenant_site","templateName":"Edgepoint1"},{"serviceTemplateId":"tenant_site2","templateName":"Edgepoint2"}];
+ var dropdownResponse=[{"serviceTemplateId":"true","templateName":"true"},{"serviceTemplateId":"false","templateName":"false"}];
var dropdownInfo = translateToDropdownInfo(dropdownResponse);
document.getElementById("portEdropdown").innerHTML = dropdownInfo;
@@ -464,7 +473,7 @@ var app = angular.module("ResourceMgrApp", ["ui.router", "ngTable"]) $('#myModal #type').append($compile(Mustache.to_html(dropDown, dropSimple_data))($scope));*/
- var dropdownResponse=[{"serviceTemplateId":"tenant_site","templateName":"tenant_site"},{"serviceTemplateId":"tenant_site2","templateName":"tenant_site2"}];
+ var dropdownResponse=[{"serviceTemplateId":"network_site","templateName":"network_site"},{"serviceTemplateId":"tenant_site","templateName":"tenant_site"}];
var dropdownInfo = translateToDropdownInfo(dropdownResponse);
document.getElementById("sitedropdown").innerHTML = dropdownInfo;
@@ -643,8 +652,8 @@ var app = angular.module("ResourceMgrApp", ["ui.router", "ngTable"]) $scope.init = function() {
locationDataService.getLocationData()
.then(function (data) {
- $scope.data = data;
- console.log("Data: ");
+ $scope.data = data.locations;
+ console.log(JSON.stringify($scope.data));
$log.info(data);
loadButtons();
}, function (reason) {
@@ -665,7 +674,7 @@ var app = angular.module("ResourceMgrApp", ["ui.router", "ngTable"]) $('#locationAction').html($compile(addhtml)($scope));
$('#locationAction').append($compile(deletehtml)($scope));
- var modelSubmit_data = {"title":"OK", "clickAction":"saveData(loc.Id)"};
+ var modelSubmit_data = {"title":"OK", "clickAction":"saveData(loc.id)"};
var modelSubmit_html = Mustache.to_html(def_button_tpl, modelSubmit_data);
$('#myModal #footerBtns').html($compile(modelSubmit_html)($scope));
@@ -678,34 +687,34 @@ var app = angular.module("ResourceMgrApp", ["ui.router", "ngTable"]) var ipv4 = $(modelTemplate).filter('#ipv4').html();
var number = $(modelTemplate).filter('#numeric').html();
- var locId = {"ErrMsg" : {"errmsg" : "Name is required.", "modalVar":"loc.Id", "errtag":"textboxErrId", "errfunc":"validatetextboxId"}};
+ var locId = {"ErrMsg" : {"errmsg" : "Name is required.", "modalVar":"loc.id", "errtag":"textboxErrId", "errfunc":"validatetextboxId"}};
$('#myModal #Name').append($compile(Mustache.to_html(text, locId.ErrMsg))($scope));
- var locCountry = {"ErrMsg" : {"errmsg" : "Country is required.", "modalVar":"loc.Country", "errtag":"textboxErrCountry", "errfunc":"validatetextboxCountry","required":true}};
+ var locCountry = {"ErrMsg" : {"errmsg" : "Country is required.", "modalVar":"loc.country", "errtag":"textboxErrCountry", "errfunc":"validatetextboxCountry","required":true}};
$('#myModal #Country').append($compile(Mustache.to_html(text, locCountry.ErrMsg))($scope));
- var locLocation = {"ErrMsg" : {"errmsg" : "Location is required.", "modalVar":"loc.Location", "errtag":"textboxErrLocation", "errfunc":"validatetextboxLocation","required":true}};
+ var locLocation = {"ErrMsg" : {"errmsg" : "Location is required.", "modalVar":"loc.location", "errtag":"textboxErrLocation", "errfunc":"validatetextboxLocation","required":true}};
$('#myModal #Location').append($compile(Mustache.to_html(text, locLocation.ErrMsg))($scope));
- var locDescription = {"ErrMsg" : {"errmsg" : "The name is required.", "modalVar":"loc.Description", "errtag":"textboxErr", "errfunc":"validatetextbox"}};
+ var locDescription = {"ErrMsg" : {"errmsg" : "The name is required.", "modalVar":"loc.description", "errtag":"textboxErr", "errfunc":"validatetextbox"}};
$('#myModal #Description').append($compile(Mustache.to_html(text, locDescription.ErrMsg))($scope));
- var locLatitude = {"ErrMsg" : {"errmsg" : "Latitude is required.", "modalVar":"loc.Latitude", "errtag":"textboxErrLatitude", "errfunc":"validatetextboxLatitude", "required":true}};
+ var locLatitude = {"ErrMsg" : {"errmsg" : "Latitude is required.", "modalVar":"loc.latitude", "errtag":"textboxErrLatitude", "errfunc":"validatetextboxLatitude", "required":true}};
$('#myModal #Latitude').append($compile(Mustache.to_html(text, locLatitude.ErrMsg))($scope));
- var locLongitude = {"ErrMsg" : {"errmsg" : "Longitude is required.", "modalVar":"loc.Longitude", "errtag":"textboxErrLongitude", "errfunc":"validatetextboxLongitude", "required":true}};
+ var locLongitude = {"ErrMsg" : {"errmsg" : "Longitude is required.", "modalVar":"loc.longitude", "errtag":"textboxErrLongitude", "errfunc":"validatetextboxLongitude", "required":true}};
$('#myModal #Longitude').append($compile(Mustache.to_html(text, locLongitude.ErrMsg))($scope));
$scope.checkboxes = { 'checked': false, items: {} };
- $scope.neTableParams = new NgTableParams({count: 5, sorting: {Id: 'asc'} //{page: 1,count: 10,filter: {name: 'M'},sorting: {name: 'desc'}
- }, { counts:[5, 10, 20, 50], dataset: $scope.data.locationData});
+ $scope.neTableParams = new NgTableParams({count: 5, sorting: {Id: 'asc'}
+ }, { counts:[5, 10, 20, 50], dataset: $scope.data});
$scope.$watch('checkboxes.checked', function(value) {
$scope.checkboxes.items = {};
angular.forEach($scope.neTableParams.data, function(item) {
- if (angular.isDefined(item.Id)) {
- $scope.checkboxes.items[item.Id] = value;
+ if (angular.isDefined(item.id)) {
+ $scope.checkboxes.items[item.id] = value;
}
});
});
@@ -713,7 +722,7 @@ var app = angular.module("ResourceMgrApp", ["ui.router", "ngTable"]) }
$scope.validatetextboxCountry = function (value){
- if($scope.loc.Country) {
+ if($scope.loc.country) {
$scope.textboxErrCountry = false;
}
else
@@ -721,7 +730,7 @@ var app = angular.module("ResourceMgrApp", ["ui.router", "ngTable"]) }
$scope.validatetextboxLocation = function (value){
- if($scope.loc.Location) {
+ if($scope.loc.location) {
$scope.textboxErrLocation = false;
}
else
@@ -729,7 +738,7 @@ var app = angular.module("ResourceMgrApp", ["ui.router", "ngTable"]) }
$scope.validatetextboxLatitude = function (value){
- if($scope.loc.Latitude) {
+ if($scope.loc.latitude) {
$scope.textboxErrLatitude = false;
}
else
@@ -737,7 +746,7 @@ var app = angular.module("ResourceMgrApp", ["ui.router", "ngTable"]) }
$scope.validatetextboxLongitude = function (value){
- if($scope.loc.Longitude) {
+ if($scope.loc.longitude) {
$scope.textboxErrLongitude = false;
}
else
@@ -771,7 +780,7 @@ var app = angular.module("ResourceMgrApp", ["ui.router", "ngTable"]) if (!$scope.textboxErrLocation && !$scope.textboxErrCountry && !$scope.textboxErrLatitude && !$scope.textboxErrLongitude) {
var locs = {}
- locs.location = $scope.loc
+ locs = $scope.loc
if(id) {
@@ -861,10 +870,10 @@ var app = angular.module("ResourceMgrApp", ["ui.router", "ngTable"]) $scope.editData = function(id) {
console.log("To be edited : " + id);
var dataFound = false;
- angular.forEach($scope.data.locationData, function(data) {
+ angular.forEach($scope.data, function(data) {
if(!dataFound) {
- if (data.Id == id) {
- console.log("Found : " + data.Id);
+ if (data.id == id) {
+ console.log("Found : " + data.id);
$scope.loc = data;
$("#myModal").modal();
dataFound = true;
@@ -1209,10 +1218,22 @@ var app = angular.module("ResourceMgrApp", ["ui.router", "ngTable"]) var dropdownInfo = translateToDropdownInfo(dropdownResponse);
document.getElementById("medropdown").innerHTML = dropdownInfo;
+
+ neDataService.getNECtrlDDList()
+ .then(function (response) {
+ $scope.ctrlList = response;
+ var dropdownInfo = translateCtrlIDToDropdownInfo($scope.ctrlList);
+ $("#myModal #medropdown").html(dropdownInfo);
+ console.log("Data: ");
+ $log.info(data);
+ }, function (reason) {
+ $scope.message = "Error is :" + JSON.stringify(reason);
+ });
+
/*var neController = {"ErrMsg" : {"errmsg" : "IP Address is required.", "modalVar":"ne.controller"}};
$('#myModal #controller').append($compile(Mustache.to_html(text, neController.ErrMsg))($scope));*/
- var neIPAddress = {"ErrMsg" : {"errmsg" : "IP Address is required.", "modalVar":"ne.ipAddress","errtag":"textboxErrIP", "errfunc":"validatetextboxIP","required":true}};
+ var neIPAddress = {"ErrMsg" : {"errmsg" : "IP Address is required.", "modalVar":"ne.ipAddress"}};
$('#myModal #ipAddress').append($compile(Mustache.to_html(text, neIPAddress.ErrMsg))($scope));
@@ -1275,6 +1296,18 @@ var app = angular.module("ResourceMgrApp", ["ui.router", "ngTable"]) return options;
}
+ function translateCtrlIDToDropdownInfo(dropdowndata) {
+ var options = '<option value="select">--select--</option>';
+ var i;
+ for (i = 0; i < dropdowndata.length; i += 1) {
+ var option = '<option value="' + dropdowndata[i].sdnControllerId + '">' + dropdowndata[i].name
+ + '</option>';
+ options = options + option;
+ }
+
+ return options;
+ }
+
$scope.validatetextboxName = function (value){
if($scope.ne.name) {
$scope.textboxErrName = false;
@@ -1452,7 +1485,7 @@ var app = angular.module("ResourceMgrApp", ["ui.router", "ngTable"]) $scope.init = function() {
datacenterDataService.getDatacenterData()
.then(function (data) {
- $scope.data = data;
+ $scope.data = data.datacenters;
console.log("Data: ");
$log.info(data);
loadButtons();
@@ -1474,7 +1507,7 @@ var app = angular.module("ResourceMgrApp", ["ui.router", "ngTable"]) $('#datacenterAction').html($compile(addhtml)($scope));
$('#datacenterAction').append($compile(deletehtml)($scope));
- var modelSubmit_data = {"title":"OK", "clickAction":"saveData(datacenter.Id)"};
+ var modelSubmit_data = {"title":"OK", "clickAction":"saveData(datacenter.id)"};
var modelSubmit_html = Mustache.to_html(def_button_tpl, modelSubmit_data);
$('#myModal #footerBtns').html($compile(modelSubmit_html)($scope));
@@ -1487,10 +1520,10 @@ var app = angular.module("ResourceMgrApp", ["ui.router", "ngTable"]) var number = $(modelTemplate).filter('#numeric').html();
var dropDown = $(modelTemplate).filter('#simpleDropdownTmpl').html();
- var dataId = {"ErrMsg" : {"textboxErr" : "The name is required.", "modalVar":"datacenter.Id"}};
+ var dataId = {"ErrMsg" : {"textboxErr" : "The name is required.", "modalVar":"datacenter.id"}};
$('#myModal #Id').append($compile(Mustache.to_html(text, dataId.ErrMsg))($scope));
- var dataName = {"ErrMsg" : {"errmsg" : "The name is required.", "modalVar":"datacenter.Name","errtag":"textboxErr", "errfunc":"validatetextbox","required":true}};
+ var dataName = {"ErrMsg" : {"errmsg" : "The name is required.", "modalVar":"datacenter.name","errtag":"textboxErr", "errfunc":"validatetextbox","required":true}};
$('#myModal #Name').append($compile(Mustache.to_html(text, dataName.ErrMsg))($scope));
var dataStatus = {"ErrMsg" : {"textboxErr" : "The name is required.", "modalVar":"datacenter.Status"}};
@@ -1525,40 +1558,45 @@ var app = angular.module("ResourceMgrApp", ["ui.router", "ngTable"]) var dropdownResponse=[{"serviceTemplateId":"Country1","templateName":"Country1"},{"serviceTemplateId":"Country2","templateName":"Country2"}];
var dropdownInfo = translateToDropdownInfo(dropdownResponse);
- document.getElementById("countrydropdown").innerHTML = dropdownInfo;
+ //document.getElementById("countrydropdown").innerHTML = dropdownInfo;
var dropdownResponse=[{"serviceTemplateId":"Location1","templateName":"Location1"},{"serviceTemplateId":"Location2","templateName":"Location2"}];
var dropdownInfo = translateToDropdownInfo(dropdownResponse);
- document.getElementById("locationdropdown").innerHTML = dropdownInfo;
+ //document.getElementById("locationdropdown").innerHTML = dropdownInfo;
var dropdownResponse=[{"serviceTemplateId":"ServiceName1","templateName":"ServiceName1"},{"serviceTemplateId":"ServiceName2","templateName":"ServiceName2"}];
var dropdownInfo = translateToDropdownInfo(dropdownResponse);
- document.getElementById("servicenamedropdown").innerHTML = dropdownInfo;
+ //document.getElementById("servicenamedropdown").innerHTML = dropdownInfo;
- var dataCPU = {"ErrMsg" : {"textboxErr" : "The name is required.", "modalVar":"datacenter.Cpu"}};
+ var dataCPU = {"ErrMsg" : {"textboxErr" : "The name is required.", "modalVar":"datacenter.cpu"}};
$('#myModal #Cpu').append($compile(Mustache.to_html(text, dataCPU.ErrMsg))($scope));
- var dataMemory = {"ErrMsg" : {"textboxErr" : "The name is required.", "modalVar":"datacenter.Memory"}};
+ var dataMemory = {"ErrMsg" : {"textboxErr" : "The name is required.", "modalVar":"datacenter.memory"}};
$('#myModal #Memory').append($compile(Mustache.to_html(text, dataMemory.ErrMsg))($scope));
- var dataHarddisk = {"ErrMsg" : {"textboxErr" : "The name is required.", "modalVar":"datacenter.HardDisk"}};
+ var dataHarddisk = {"ErrMsg" : {"textboxErr" : "The name is required.", "modalVar":"datacenter.hardDisk"}};
$('#myModal #HardDisk').append($compile(Mustache.to_html(text, dataHarddisk.ErrMsg))($scope));
$scope.checkboxes = { 'checked': false, items: {} };
- $scope.neTableParams = new NgTableParams({count: 5, sorting: {Id: 'asc'} //{page: 1,count: 10,filter: {name: 'M'},sorting: {name: 'desc'}
- }, { counts:[5, 10, 20, 50], dataset: $scope.data.datacenterData});
+ $scope.neTableParams = new NgTableParams({count: 5, sorting: {Id: 'asc'}
+ }, { counts:[5, 10, 20, 50], dataset: $scope.data});
$scope.$watch('checkboxes.checked', function(value) {
$scope.checkboxes.items = {};
angular.forEach($scope.neTableParams.data, function(item) {
- if (angular.isDefined(item.Id)) {
- $scope.checkboxes.items[item.Id] = value;
+ if (angular.isDefined(item.id)) {
+ $scope.checkboxes.items[item.id] = value;
}
});
});
+
+ //action
+ fillCountryData();
+ fillVimNameData();
+ regChangeAction();
}
@@ -1573,7 +1611,7 @@ var app = angular.module("ResourceMgrApp", ["ui.router", "ngTable"]) }
$scope.validatetextbox = function (value){
- if($scope.datacenter.Name) {
+ if($scope.datacenter.name) {
$scope.textboxErr = false;
}
else
@@ -1604,7 +1642,10 @@ var app = angular.module("ResourceMgrApp", ["ui.router", "ngTable"]) if (!$scope.textboxErr) {
var dcs = {}
- dcs.dc = $scope.datacenter;
+ dcs = $scope.datacenter;
+ $scope.datacenter.vimName = $("#servicenamedropdown").val();
+ $scope.datacenter.location = $("#locationdropdown").val();
+ $scope.datacenter.country = $("#countrydropdown").val();
if(id) {
//edit data
console.log("Editing data.." + JSON.stringify(dcs));
@@ -1692,9 +1733,9 @@ var app = angular.module("ResourceMgrApp", ["ui.router", "ngTable"]) $scope.editData = function(id) {
console.log("To be edited : " + id);
var dataFound = false;
- angular.forEach($scope.data.datacenterData, function(data) {
+ angular.forEach($scope.data, function(data) {
if(!dataFound) {
- if (data.Id == id) {
+ if (data.id == id) {
console.log("Found : " + data.id);
$scope.datacenter = data;
$("#myModal").modal();
diff --git a/resmgr/src/main/webapp/resmgr/nfv-resmgr/datacenter/datacenter.html b/resmgr/src/main/webapp/resmgr/nfv-resmgr/datacenter/datacenter.html index a2caf0a2..be46fbed 100644 --- a/resmgr/src/main/webapp/resmgr/nfv-resmgr/datacenter/datacenter.html +++ b/resmgr/src/main/webapp/resmgr/nfv-resmgr/datacenter/datacenter.html @@ -24,39 +24,39 @@ <table ng-table="neTableParams" class="table table-bordered table-striped" show-filter="true">
<tr ng-repeat="datacenterData in $data">
<td header="'ng-table/headers/checkbox.html'">
- <input type="checkbox" ng-model="checkboxes.items[datacenterData.Id]" />
+ <input type="checkbox" ng-model="checkboxes.items[datacenterData.id]" />
</td>
- <td title="'Id'" filter="{ Id: 'text'}" sortable="'Id'">
- {{datacenterData.Id}}
+ <td title="'Id'" filter="{ id: 'text'}" sortable="'id'">
+ {{datacenterData.id}}
</td>
- <td title="'Name'" filter="{ Name: 'number'}" sortable="'Name'">
- {{datacenterData.Name}}
+ <td title="'Name'" filter="{ name: 'number'}" sortable="'name'">
+ {{datacenterData.name}}
</td>
- <td title="'Status'" filter="{ Status: 'text'}" sortable="'Status'">
- {{datacenterData.Status}}
+ <td title="'Status'" filter="{ status: 'text'}" sortable="'status'">
+ {{datacenterData.status}}
</td>
</td>
- <td title="'Country'" filter="{ Country: 'text'}" sortable="'Country'">
- {{datacenterData.Country}}
+ <td title="'Country'" filter="{ country: 'text'}" sortable="'country'">
+ {{datacenterData.country}}
</td>
- <td title="'Location'" filter="{ Location: 'text'}" sortable="'Location'">
- {{datacenterData.Location}}
+ <td title="'Location'" filter="{ location: 'text'}" sortable="'location'">
+ {{datacenterData.location}}
</td>
- <td title="'Service Name'" filter="{ ServiceName: 'text'}" sortable="'ServiceName'">
- {{datacenterData.ServiceName}}
+ <td title="'Service Name'" filter="{ serviceName: 'text'}" sortable="'serviceName'">
+ {{datacenterData.vimName}}
</td>
- <td title="'Cpu(Cores)'" filter="{ Cpu: 'number'}" sortable="'Cpu'">
- {{datacenterData.Cpu}}
+ <td title="'Cpu(Cores)'" filter="{ cpu: 'number'}" sortable="'cpu'">
+ {{datacenterData.cpu}}
</td>
- <td title="'Memory(MB)'" filter="{ Memory: 'number'}" sortable="'Memory'">
- {{datacenterData.Memory}}
+ <td title="'Memory(MB)'" filter="{ memory: 'number'}" sortable="'memory'">
+ {{datacenterData.memory}}
</td>
- <td title="'HardDisk(GB)'" filter="{ HardDisk: 'number'}" sortable="'HardDisk'">
- {{datacenterData.HardDisk}}
+ <td title="'HardDisk(GB)'" filter="{ hardDisk: 'number'}" sortable="'hardDisk'">
+ {{datacenterData.hardDisk}}
</td>
<td title="'Action'">
- <span ng-click="editData(datacenterData.Id)" style="cursor: pointer;margin: 0 5px"> <img src="/openoui/framework/browser/thirdparty/images/edit.png" height="15" align="left"/></span>
- <span ng-click="deleteData(datacenterData.Id)" style="cursor: pointer;margin: 0 5px"><img src="/openoui/framework/browser/thirdparty/images/delete.png" height="15" align="middle"/></span>
+ <span ng-click="editData(datacenterData.id)" style="cursor: pointer;margin: 0 5px"> <img src="/openoui/framework/browser/thirdparty/images/edit.png" height="15" align="left"/></span>
+ <span ng-click="deleteData(datacenterData.id)" style="cursor: pointer;margin: 0 5px"><img src="/openoui/framework/browser/thirdparty/images/delete.png" height="15" align="middle"/></span>
</td>
</tr>
</table>
@@ -77,7 +77,7 @@ <button type="button" class="close" data-dismiss="modal">×</button>
<h5 class="modal-title labelstyle">Modal Header</h5>
</div>
- <form ng-submit="saveData(province.id)" name="provinceForm" method="post">
+ <form ng-submit="saveData(province.id)" name="datacenterForm" method="post">
<div class="modal-body" id="borderSpacing">
<div class="form-group row" id="rowSpacing">
@@ -85,38 +85,18 @@ <div id="Name" class="col-xs-8" >
</div>
</div>
- <!--<div class="form-group row">
- <label class="col-xs-4 col-form-label">Country</label>
- <div id="Country" class="col-xs-8" >
- </div>
- </div>-->
<div class="form-group row" id="rowSpacing">
<label class="col-xs-4 col-form-label" id="textCenter">Country</label>
<div id="Country" class="col-xs-8" >
<select id="countrydropdown" class="form-control inputfield" ng-model="datacenterData.optSelect" ng-options="item.templateName for item in optionsValue"></select>
</div>
</div>
- <div class="form-group row" id="rowSpacing">
- <label class="col-xs-4 col-form-label" id="textCenter">Status</label>
- <div id="Status" class="col-xs-8" >
- </div>
- </div>
- <!--<div class="form-group row">
- <label class="col-xs-4 col-form-label">Location</label>
- <div id="Location" class="col-xs-8" >
- </div>
- </div>-->
<div class="form-group row" id="rowSpacing">
<label class="col-xs-4 col-form-label" id="textCenter">Location</label>
<div id="Location" class="col-xs-8" >
<select id="locationdropdown" class="form-control inputfield" ng-model="datacenterData.optSelect" ng-options="item.templateName for item in optionsValue"></select>
</div>
</div>
- <!--<div class="form-group row">
- <label class="col-xs-4 col-form-label">ServiceName</label>
- <div id="ServiceName" class="col-xs-8" >
- </div>
- </div>-->
<div class="form-group row" id="rowSpacing">
<label class="col-xs-4 col-form-label" id="textCenter">ServiceName</label>
<div id="ServiceName" class="col-xs-8" >
@@ -125,17 +105,17 @@ </div>
<div class="form-group row" id="rowSpacing">
<label class="col-xs-4 col-form-label" id="textCenter">CPU(Cores)</label>
- <div id="Cpu" class="col-xs-8" >
+ <div id="" class="col-xs-8" >
</div>
</div>
<div class="form-group row" id="rowSpacing">
<label class="col-xs-4 col-form-label" id="textCenter">Memory</label>
- <div id="Memory" class="col-xs-8" >
+ <div id="" class="col-xs-8" >
</div>
</div>
<div class="form-group row" id="rowSpacing">
<label class="col-xs-4 col-form-label" id="textCenter">HardDisk</label>
- <div id="HardDisk" class="col-xs-8" >
+ <div id="" class="col-xs-8" >
</div>
</div>
diff --git a/resmgr/src/main/webapp/resmgr/nfv-resmgr/datacenter/datacenterRest.js b/resmgr/src/main/webapp/resmgr/nfv-resmgr/datacenter/datacenterRest.js index f1251569..61031eea 100644 --- a/resmgr/src/main/webapp/resmgr/nfv-resmgr/datacenter/datacenterRest.js +++ b/resmgr/src/main/webapp/resmgr/nfv-resmgr/datacenter/datacenterRest.js @@ -18,15 +18,6 @@ app.factory("datacenterDataService", function($http,DataService, $log){ uri += "/openoapi/resmgr/v1/datacenters/";
return {
getDatacenterData : function() {
- /*console.log("hi in dataservice");
- return $http({
- url: 'http://localhost:3000/datacenterAPI/getDatacenterData',
- method: 'GET',
- headers: {'Content-Type': 'application/json'}
- }).then(function(response){
- //$log.info(response);
- return response.data;
- });*/
return DataService.get(uri)
.then(function(response){
$log.info("in get data service data is :"+response);
@@ -35,17 +26,7 @@ app.factory("datacenterDataService", function($http,DataService, $log){ });
},
deleteDatacenterData : function(id) {
- /*return $http({
- url: 'http://localhost:3000/datacenterAPI/deleteDatacenterData',
- method: 'POST',
- data: {'idList':idList},
- headers: {'Content-Type': 'application/json'}
- }).then(function(response){
- console.log("Successfully Deleted..");
- $log.info(response);
- return response.data;
- });*/
- return DataService.delete(uri+"/"+id)
+ return DataService.delete(uri+id)
.then(function(response){
$log.info("in delete data service data is :"+response);
console.log(response);
@@ -69,4 +50,78 @@ app.factory("datacenterDataService", function($http,DataService, $log){ });
}
}
-});
\ No newline at end of file +});
+
+
+
+function fillCountryData() {
+
+ var requestUrl = "/openoapi/resmgr/v1/locations/country";
+ var htmlContent = "";
+ $.ajax({
+ type: "GET",
+ url: requestUrl,
+ contentType: "application/json",
+ success: function (jsonobj) {
+ var str = jsonobj.data.replace('[', '').replace(']', '').split(',')
+ $.each(str, function (n, v) {
+ htmlContent += "<option value=" + v + ">" + v + "</option>";
+ $("#countrydropdown").html(htmlContent);
+
+ });
+ },
+ error: function (xhr, ajaxOptions, thrownError) {
+ bootbox.alert("Error on getting country data : " + xhr.responseText);
+ }
+ });
+}
+
+function fillVimNameData() {
+
+ var requestUrl = "/openoapi/resmgr/v1/locations/cloudservice";
+ var htmlContent = "";
+ $.ajax({
+ type: "GET",
+ url: requestUrl,
+ contentType: "application/json",
+ success: function (jsonobj) {
+ var str = jsonobj.data.replace('[', '').replace(']', '').split(',')
+ $.each(str, function (n, v) {
+ htmlContent += "<option value='" + v + "'>" + v + "</option>";
+ $("#servicenamedropdown").html(htmlContent);
+
+ });
+ },
+ error: function (xhr, ajaxOptions, thrownError) {
+ bootbox.alert("Error on getting country data : " + xhr.responseText);
+ }
+ });
+}
+function regChangeAction(){
+ $('#countrydropdown').change(function () {
+ var country = $(this).children('option:selected').val();
+ var requestUrl = "/openoapi/resmgr/v1/locations/locationbycountry?country=" + country;
+
+ var htmlContent = "<option value=''>--select--</option>";
+ $.ajax({
+ type: "GET",
+ url: requestUrl,
+ contentType: "application/json",
+ success: function (jsonobj) {
+ console.log(jsonobj.data);
+ var str = jsonobj.data.replace('[', '').replace(']', '').split(',');
+ console.log(str);
+ $.each(str, function (n, v) {
+ htmlContent += "<option value='" + v + "'>" + v + "</option>";
+ $("#locationdropdown").html(htmlContent);
+
+ });
+
+ },
+ error: function (xhr, ajaxOptions, thrownError) {
+ bootbox.alert("Error on getting location data : " + xhr.responseText);
+ }
+ });
+
+ });
+}
\ No newline at end of file diff --git a/resmgr/src/main/webapp/resmgr/nfv-resmgr/location/location.html b/resmgr/src/main/webapp/resmgr/nfv-resmgr/location/location.html index 9c0f72eb..cafdca2c 100644 --- a/resmgr/src/main/webapp/resmgr/nfv-resmgr/location/location.html +++ b/resmgr/src/main/webapp/resmgr/nfv-resmgr/location/location.html @@ -23,32 +23,30 @@ <table ng-table="neTableParams" class="table table-bordered table-striped customtable" show-filter="true">
<tr ng-repeat="locationData in $data">
<td header="'ng-table/headers/checkbox.html'">
- <input type="checkbox" ng-model="checkboxes.items[locationData.Id]" />
+ <input type="checkbox" ng-model="checkboxes.items[locationData.id]" />
</td>
- <td title="'Id'" filter="{ Id: 'text'}" sortable="'Id'">
- {{locationData.Id}}
+ <td title="'Id'" filter="{ id: 'text'}" sortable="'id'">
+ {{locationData.id}}
</td>
- <td title="'Country'" filter="{ Country: 'text'}" sortable="'Country'">
- {{locationData.Country}}
+ <td title="'Country'" filter="{ country: 'text'}" sortable="'country'">
+ {{locationData.country}}
</td>
- <td title="'Location'" filter="{ Location: 'text'}" sortable="'Location'">
- {{locationData.Location}}
+ <td title="'Location'" filter="{ location: 'text'}" sortable="'location'">
+ {{locationData.location}}
</td>
</td>
- <td title="'Description'" filter="{ Description: 'text'}" sortable="'Description'">
- {{locationData.Description}}
+ <td title="'Description'" filter="{ description: 'text'}" sortable="'description'">
+ {{locationData.description}}
</td>
- <td title="'Latitude'" filter="{ Latitude: 'text'}" sortable="'Latitude'">
- {{locationData.Latitude}}
+ <td title="'Latitude'" filter="{ latitude: 'text'}" sortable="'latitude'">
+ {{locationData.latitude}}
</td>
- <td title="'Longitude'" filter="{ Longitude: 'text'}" sortable="'Longitude'">
- {{locationData.Longitude}}
+ <td title="'Longitude'" filter="{ longitude: 'text'}" sortable="'longitude'">
+ {{locationData.longitude}}
</td>
<td title="'Action'">
- <!--<span class="pull-right glyphicon glyphicon-edit" ng-click="editData(locationData.Id)" style="cursor: pointer;margin: 0 5px"></span>
- <span class="pull-right glyphicon glyphicon-trash" ng-click="deleteData(locationData.Id)" style="cursor: pointer;margin: 0 5px"></span>-->
- <span ng-click="editData(locationData.Id)" style="cursor: pointer;margin: 0 5px"> <img src="/openoui/framework/browser/thirdparty/images/edit.png" height="15" align="left"/></span>
- <span ng-click="deleteData(locationData.Id)" style="cursor: pointer;margin: 0 5px"><img src="/openoui/framework/browser/thirdparty/images/delete.png" height="15" align="middle"/></span>
+ <span ng-click="editData(locationData.id)" style="cursor: pointer;margin: 0 5px"> <img src="/openoui/framework/browser/thirdparty/images/edit.png" height="15" align="left"/></span>
+ <span ng-click="deleteData(locationData.id)" style="cursor: pointer;margin: 0 5px"><img src="/openoui/framework/browser/thirdparty/images/delete.png" height="15" align="middle"/></span>
</td>
</tr>
</table>
diff --git a/resmgr/src/main/webapp/resmgr/nfv-resmgr/location/locationRest.js b/resmgr/src/main/webapp/resmgr/nfv-resmgr/location/locationRest.js index 4bfb2f58..e940a588 100644 --- a/resmgr/src/main/webapp/resmgr/nfv-resmgr/location/locationRest.js +++ b/resmgr/src/main/webapp/resmgr/nfv-resmgr/location/locationRest.js @@ -45,7 +45,7 @@ app.factory("locationDataService", function($http,DataService, $log){ $log.info(response);
return response.data;
});*/
- return DataService.delete(uri+"/"+id)
+ return DataService.delete(uri+id)
.then(function(response){
$log.info("in delete data service data is :"+response);
console.log(response);
diff --git a/resmgr/src/main/webapp/resmgr/sdn-resmgr/ne/neRest.js b/resmgr/src/main/webapp/resmgr/sdn-resmgr/ne/neRest.js index f67c0fec..a15ad4f8 100644 --- a/resmgr/src/main/webapp/resmgr/sdn-resmgr/ne/neRest.js +++ b/resmgr/src/main/webapp/resmgr/sdn-resmgr/ne/neRest.js @@ -25,6 +25,16 @@ app.factory("neDataService", function($http, DataService, $log, siteDataService) return response;
});
},
+ getNECtrlDDList : function () {
+ var url = "";
+ url += "/openoapi/extsys/v1/sdncontrollers";
+ return DataService.get(url)
+ .then(function(response){
+ $log.info("in get data service data is :"+response);
+ console.log(response);
+ return response;
+ });
+ },
getAllNEData : function() {
/*return $http({
url: 'http://localhost:3000/meAPI/getAllNEData',
diff --git a/resmgr/src/main/webapp/resmgr/sdn-resmgr/port/port.html b/resmgr/src/main/webapp/resmgr/sdn-resmgr/port/port.html index f81265b0..e980af6a 100644 --- a/resmgr/src/main/webapp/resmgr/sdn-resmgr/port/port.html +++ b/resmgr/src/main/webapp/resmgr/sdn-resmgr/port/port.html @@ -95,6 +95,7 @@ <div class="form-group row" id="rowSpacing">
<label class="col-xs-4 col-form-label" id="textCenter">me</label>
<div id="meID" class="col-xs-8" >
+ <select id="medropdown" class="form-control inputfield" ng-model="siteData.optSelect"></select>
</div>
</div>
<div class="form-group row" id="rowSpacing">
diff --git a/resmgr/src/main/webapp/resmgr/sdn-resmgr/port/portRest.js b/resmgr/src/main/webapp/resmgr/sdn-resmgr/port/portRest.js index 6bed2640..ad960cd7 100644 --- a/resmgr/src/main/webapp/resmgr/sdn-resmgr/port/portRest.js +++ b/resmgr/src/main/webapp/resmgr/sdn-resmgr/port/portRest.js @@ -90,6 +90,14 @@ app.factory("portDataService", function($http,DataService, $log){ console.log(response);
return response;
});
+ },
+ getAllNEData : function() {
+ return DataService.get("/openoapi/extsys/v1/sdncontrollers")
+ .then(function(response){
+ $log.info("in get data service data is :"+response);
+ console.log(response);
+ return response;
+ });
}
}
});
\ No newline at end of file diff --git a/vnfmarket/src/main/webapp/vnfmarket/app/app.config.js b/vnfmarket/src/main/webapp/vnfmarket/app/app.config.js index 2efd963c..4b9af093 100644 --- a/vnfmarket/src/main/webapp/vnfmarket/app/app.config.js +++ b/vnfmarket/src/main/webapp/vnfmarket/app/app.config.js @@ -85,7 +85,7 @@ $translateProvider.useSanitizeValueStrategy(null); $translateProvider.useStaticFilesLoader({ - prefix: "vnfmarket/common/locale/locale-", + prefix: "/openoui/vnfmarket/common/locale/locale-", suffix: ".json" }); $translateProvider.preferredLanguage('en') diff --git a/vnfmarket/src/main/webapp/vnfmarket/app/modules/home/home.html b/vnfmarket/src/main/webapp/vnfmarket/app/modules/home/home.html index f27486fa..a10cf5fe 100644 --- a/vnfmarket/src/main/webapp/vnfmarket/app/modules/home/home.html +++ b/vnfmarket/src/main/webapp/vnfmarket/app/modules/home/home.html @@ -17,7 +17,7 @@ <div ng-controller="SidenavCtrl as vm" ng-cloak> <md-toolbar class="md-tall md-hue-1"> <div class="image"> - <img src="vnfmarket/common/images/logo.png" align="middle" > + <img src="/openoui/vnfmarket/common/images/logo.png" align="middle" > </div> <div layout="column" class="md-toolbar-tools-bottom inset"> </div> @@ -27,7 +27,7 @@ <div class="inset"> <!--<ng-md-icon icon="apps"></ng-md-icon>--> <i> - <img src="vnfmarket/common/images/Marketplace.png"> + <img src="/openoui/vnfmarket/common/images/Marketplace.png"> </i> </div> <p> {{ 'module.marketplace.sideNav.marketplaceNav' | translate}} </p> diff --git a/vnfmarket/src/main/webapp/vnfmarket/app/modules/home/homeRoute.js b/vnfmarket/src/main/webapp/vnfmarket/app/modules/home/homeRoute.js index ff2d0994..be24302e 100644 --- a/vnfmarket/src/main/webapp/vnfmarket/app/modules/home/homeRoute.js +++ b/vnfmarket/src/main/webapp/vnfmarket/app/modules/home/homeRoute.js @@ -26,7 +26,7 @@ angular.module('vnfmarket') .config(['$stateProvider', '$urlRouterProvider', function($stateProvider, $urlRouterProvider, vnfConfig) { - var homePath = 'vnfmarket/app/modules/home'; + var homePath = '/openoui/vnfmarket/app/modules/home'; $stateProvider .state('home', { url: '', diff --git a/vnfmarket/src/main/webapp/vnfmarket/app/modules/home/marketplace.html b/vnfmarket/src/main/webapp/vnfmarket/app/modules/home/marketplace.html index e0e9773b..eb4cf6b5 100644 --- a/vnfmarket/src/main/webapp/vnfmarket/app/modules/home/marketplace.html +++ b/vnfmarket/src/main/webapp/vnfmarket/app/modules/home/marketplace.html @@ -16,7 +16,7 @@ <div class="md-padding nomargin nopadding" flex layout-sm="column"> <md-card class="nomargin"> <md-card-content class="nopadding"> - <img src="vnfmarket/common/images/productioncardtype.png" style="width:100%;"> + <img src="/openoui/vnfmarket/common/images/productioncardtype.png" style="width:100%;"> </md-card-content> </md-card> <!-- Start About Page --> @@ -95,14 +95,14 @@ <button class="btn btnDefault iconMargin" ng-click="vm.serviceUpload(false, service.csarId)"> <md-tooltip md-direction="top">{{'common.actions.update' | translate}}</md-tooltip> <i> - <img src="vnfmarket/common/images/reupload.png" class="btnIconSpacing"> + <img src="/openoui/vnfmarket/common/images/reupload.png" class="btnIconSpacing"> </i> {{'common.actions.update' | translate}} </button> <button class="btn btnDefault iconMargin deletebutton" ng-click="vm.serviceDelete(service)"> <md-tooltip md-direction="top">{{'common.actions.delete' | translate}}</md-tooltip> <i> - <img src="vnfmarket/common/images/delete.png" class="btnIconSpacing"> + <img src="/openoui/vnfmarket/common/images/delete.png" class="btnIconSpacing"> </i> {{'common.actions.delete' | translate}} </button> @@ -110,7 +110,7 @@ <button class="btn btnPrimary downloadIcon" ng-click="vm.downloadService(service.csarId)" ng-disabled="service.downloadCount == -1"> <md-tooltip md-direction="top">{{'common.actions.download' | translate}} </md-tooltip> <i> - <img src="vnfmarket/common/images/download.png" class="btnIconSpacing"> + <img src="/openoui/vnfmarket/common/images/download.png" class="btnIconSpacing"> </i> {{'common.actions.download' | translate}} </button> @@ -184,7 +184,7 @@ <md-icon class="md-icon" aria-label="{{'common.actions.update' | translate}}" ng-click="vm.serviceUpload(false, service.csarId)"> <md-tooltip md-direction="top">{{'common.actions.update' | translate}}</md-tooltip> <i> - <img src="vnfmarket/common/images/reupload.png" class="btnIconSpacing"> + <img src="/openoui/vnfmarket/common/images/reupload.png" class="btnIconSpacing"> </i> <!-- <i class="material-icons materialIconAdjustment" aria-hidden="true">{{'common.actions.fileUpload' | translate}}</i> --> </md-icon> @@ -192,13 +192,13 @@ <md-tooltip md-direction="top">{{'common.actions.download' | translate}}</md-tooltip> <!-- <i class="material-icons materialIconAdjustment" aria-hidden="true">{{'common.actions.getApp' | translate}}</i> --> <i> - <img src="vnfmarket/common/images/download.png" class="btnIconSpacing primaryColor"> + <img src="/openoui/vnfmarket/common/images/download.png" class="btnIconSpacing primaryColor"> </i> </md-icon> <md-icon class="md-icon" aria-label="{{'common.actions.delete' | translate}}" ng-click="vm.serviceDelete(service)"> <md-tooltip md-direction="top">{{'common.actions.delete' | translate}}</md-tooltip> <i> - <img src="vnfmarket/common/images/delete.png" class="btnIconSpacing"> + <img src="/openoui/vnfmarket/common/images/delete.png" class="btnIconSpacing"> </i> <!-- <i class="fa fa-trash-o icon-red fa-sm" aria-hidden="true"></i> --> @@ -215,7 +215,7 @@ <div ng-if="vm.services.length == 0"> <div class="content emptyPage"> <div class="imageContainer"> - <img src="vnfmarket/common/images/empty.png" class="btnIconSpacing"> + <img src="/openoui/vnfmarket/common/images/empty.png" class="btnIconSpacing"> </div> <h3>{{'module.marketplace.main.emptyList.label' | translate}} <a ng-click="vm.serviceUpload(true)">{{'module.marketplace.main.emptyList.anchor' | translate}}</a> {{'module.marketplace.main.emptyList.labelContinued' | translate}}</h3> </div> diff --git a/vnfmarket/src/main/webapp/vnfmarket/app/modules/home/serviceDetails/functionalTest/view.html b/vnfmarket/src/main/webapp/vnfmarket/app/modules/home/serviceDetails/functionalTest/view.html index 61455396..86875311 100644 --- a/vnfmarket/src/main/webapp/vnfmarket/app/modules/home/serviceDetails/functionalTest/view.html +++ b/vnfmarket/src/main/webapp/vnfmarket/app/modules/home/serviceDetails/functionalTest/view.html @@ -3,7 +3,7 @@ <br>
<div>
<!-- <img src="../../../../../common/images/floating-layer-function_old.png">-->
- <img src="vnfmarket/common/images/floating_layer_function.png" width="100%" height="40%">
+ <img src="/openoui/vnfmarket/common/images/floating_layer_function.png" width="100%" height="40%">
</div>
<br>
<md-card flex="100" class="nomargin">
diff --git a/vnfmarket/src/main/webapp/vnfmarket/app/modules/home/serviceDetails/serviceDetails.html b/vnfmarket/src/main/webapp/vnfmarket/app/modules/home/serviceDetails/serviceDetails.html index 3731bf66..a6221996 100644 --- a/vnfmarket/src/main/webapp/vnfmarket/app/modules/home/serviceDetails/serviceDetails.html +++ b/vnfmarket/src/main/webapp/vnfmarket/app/modules/home/serviceDetails/serviceDetails.html @@ -42,7 +42,7 @@ <button class="btn btnPrimary downloadButton" ng-click="vm.downloadService(vm.service.csarId)">
<md-tooltip md-direction="top">{{'common.actions.download' | translate}} </md-tooltip>
<i>
- <img src="vnfmarket/common/images/download.png" class="btnIconSpacing">
+ <img src="/openoui/vnfmarket/common/images/download.png" class="btnIconSpacing">
</i>
{{'common.actions.download' | translate}}
</button>
@@ -50,14 +50,14 @@ <button class="btn btnDefault iconMargin" ng-click="vm.reupload(false,vm.service.csarId)">
<md-tooltip md-direction="top">{{'common.actions.update' | translate}}</md-tooltip>
<i>
- <img src="vnfmarket/common/images/reupload.png" class="btnIconSpacing">
+ <img src="/openoui/vnfmarket/common/images/reupload.png" class="btnIconSpacing">
</i>
{{'common.actions.update' | translate}}
</button>
<button class="btn btnDefault" ng-click="vm.serviceDelete(vm.service)">
<md-tooltip md-direction="top">{{'common.actions.delete' | translate}}</md-tooltip>
<i>
- <img src="vnfmarket/common/images/delete.png" class="btnIconSpacing">
+ <img src="/openoui/vnfmarket/common/images/delete.png" class="btnIconSpacing">
</i>
{{'common.actions.delete' | translate}}
</button>
diff --git a/vnfmarket/src/main/webapp/vnfmarket/app/modules/home/serviceDetails/serviceDetailsCtrl.js b/vnfmarket/src/main/webapp/vnfmarket/app/modules/home/serviceDetails/serviceDetailsCtrl.js index 95da6bf7..466ab412 100644 --- a/vnfmarket/src/main/webapp/vnfmarket/app/modules/home/serviceDetails/serviceDetailsCtrl.js +++ b/vnfmarket/src/main/webapp/vnfmarket/app/modules/home/serviceDetails/serviceDetailsCtrl.js @@ -46,7 +46,8 @@ }
vm.service = $stateParams.serviceDetails;
- vm.service.funcTestReportUrl = baseUrlConfig.common.ip + ":" + baseUrlConfig.common.port + vm.service.report;
+ //ses vm.service.funcTestReportUrl = baseUrlConfig.common.ip + ":" + baseUrlConfig.common.port + vm.service.report;
+ vm.service.funcTestReportUrl = vm.service.report;
vm.downloadService = function(csarId) {
homeService.updateDownloadCount(csarId).then(function(response){
diff --git a/vnfmarket/src/main/webapp/vnfmarket/app/modules/home/serviceUpload/onboarding/functionalTest/view.html b/vnfmarket/src/main/webapp/vnfmarket/app/modules/home/serviceUpload/onboarding/functionalTest/view.html index 1056ac7b..35fdb528 100644 --- a/vnfmarket/src/main/webapp/vnfmarket/app/modules/home/serviceUpload/onboarding/functionalTest/view.html +++ b/vnfmarket/src/main/webapp/vnfmarket/app/modules/home/serviceUpload/onboarding/functionalTest/view.html @@ -12,7 +12,7 @@ <br>
<div>
<!-- <img src="../../../../../common/images/floating-layer-function.png">-->
- <img src="vnfmarket/common/images/floating_layer_function.png" width="100%" height="40%">
+ <img src="/openoui/vnfmarket/common/images/floating_layer_function.png" width="100%" height="40%">
</div>
<br>
diff --git a/vnfmarket/src/main/webapp/vnfmarket/common/config/baseUrlConfig.js b/vnfmarket/src/main/webapp/vnfmarket/common/config/baseUrlConfig.js index c4836889..72b9f5a9 100644 --- a/vnfmarket/src/main/webapp/vnfmarket/common/config/baseUrlConfig.js +++ b/vnfmarket/src/main/webapp/vnfmarket/common/config/baseUrlConfig.js @@ -28,8 +28,8 @@ .module('vnfmarket')
.constant("baseUrlConfig", {
"common": {
- "ip" : "http://127.0.0.1",
- "port" : "8080"
+ "ip" : "", //ses
+ "port" : "" //ses
}
})
})();
\ No newline at end of file diff --git a/vnfmarket/src/main/webapp/vnfmarket/common/config/configuration.js b/vnfmarket/src/main/webapp/vnfmarket/common/config/configuration.js index a98c7523..fb8f85e5 100644 --- a/vnfmarket/src/main/webapp/vnfmarket/common/config/configuration.js +++ b/vnfmarket/src/main/webapp/vnfmarket/common/config/configuration.js @@ -72,7 +72,7 @@ }
},
"modulePath": {
- "home": "vnfmarket/app/modules/home"
+ "home": "/openoui/vnfmarket/app/modules/home"
}
})
})();
\ No newline at end of file diff --git a/vnfmarket/src/main/webapp/vnfmarket/common/services/httpService.js b/vnfmarket/src/main/webapp/vnfmarket/common/services/httpService.js index 1b340061..3141a1f4 100644 --- a/vnfmarket/src/main/webapp/vnfmarket/common/services/httpService.js +++ b/vnfmarket/src/main/webapp/vnfmarket/common/services/httpService.js @@ -39,7 +39,8 @@ var defer = $q.defer()
$http({
method: method,
- url: baseUrlConfig.common.ip + ":" + baseUrlConfig.common.port + url,
+ //ses url: baseUrlConfig.common.ip + ":" + baseUrlConfig.common.port + url,
+ url:url,
data: data,
headers: headers
}).then(function successCallback(response) {
@@ -50,7 +51,7 @@ var parentEl = angular.element(document.body);
$mdDialog.show({
parent:parentEl,
- templateUrl:'vnfmarket/common/templates/serverError.html',
+ templateUrl:'/openoui/vnfmarket/common/templates/serverError.html',
locals:{
error:error
},
@@ -73,7 +74,8 @@ var defer = $q.defer()
$http({
method: method,
- url: baseUrlConfig.common.ip + ":" + baseUrlConfig.common.port + url,
+ //ses url: baseUrlConfig.common.ip + ":" + baseUrlConfig.common.port + url,
+ url:url,
data: data,
headers: headers,
transformRequest: angular.identity,
@@ -92,7 +94,7 @@ var parentEl = angular.element(document.body);
$mdDialog.show({
parent:parentEl,
- templateUrl:'vnfmarket/common/templates/serverError.html',
+ templateUrl:'/openoui/vnfmarket/common/templates/serverError.html',
locals:{
error:error
},
diff --git a/vnfmarket/src/main/webapp/vnfmarket/index.html b/vnfmarket/src/main/webapp/vnfmarket/index.html index f5f8c77c..1293150f 100644 --- a/vnfmarket/src/main/webapp/vnfmarket/index.html +++ b/vnfmarket/src/main/webapp/vnfmarket/index.html @@ -24,21 +24,21 @@ <meta name="author" content="" /> <meta name="keywords" content="" /> <meta name="viewport" content="width=device-width, initial-scale=1,user-scalable=yes" /> - <link rel="shortcut icon" href="app/assets/images/favicon.ico" /> - <link rel="apple-touch-icon" href="app/assets/images/apple-touch-icon.png" /> - <link rel="apple-touch-icon" sizes="72x72" href="app/assets/images/apple-touch-icon-72x72.png" /> - <link rel="apple-touch-icon" sizes="114x114" href="app/assets/images/apple-touch-icon-114x114.png" /> + <link rel="shortcut icon" href="/openoui/vnfmarket/app/assets/images/favicon.ico" /> + <link rel="apple-touch-icon" href="/openoui/vnfmarket/app/assets/images/apple-touch-icon.png" /> + <link rel="apple-touch-icon" sizes="72x72" href="/openoui/vnfmarket/app/assets/images/apple-touch-icon-72x72.png" /> + <link rel="apple-touch-icon" sizes="114x114" href="/openoui/vnfmarket/app/assets/images/apple-touch-icon-114x114.png" /> <!-- injector:css --> - <link rel="stylesheet" href="vnfmarket/common/thirdparty/angular-material-icons/angular-material-icons.css"> - <link rel="stylesheet" href="vnfmarket/common/thirdparty/angular-material/angular-material.css"> - <link rel="stylesheet" href="vnfmarket/common/thirdparty/components-font-awesome/css/font-awesome.css"> - <link rel="stylesheet" href="vnfmarket/common/thirdparty/angular-material-data-table/dist/md-data-table.css"> + <link rel="stylesheet" href="/openoui/vnfmarket/common/thirdparty/angular-material-icons/angular-material-icons.css"> + <link rel="stylesheet" href="/openoui/vnfmarket/common/thirdparty/angular-material/angular-material.css"> + <link rel="stylesheet" href="/openoui/vnfmarket/common/thirdparty/components-font-awesome/css/font-awesome.css"> + <link rel="stylesheet" href="/openoui/vnfmarket/common/thirdparty/angular-material-data-table/dist/md-data-table.css"> <!-- endinjector --> - <link rel="stylesheet" href="vnfmarket/common/thirdparty/bootstrap/dist/css/bootstrap.min.css"> - <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=RobotoDraft:300,400,500,700,400italic"> - <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons"> - <link rel="stylesheet" href="vnfmarket/common/css/main.css"> - <link rel="stylesheet" href="vnfmarket/common/css/home.css"> + <link rel="stylesheet" href="/openoui/vnfmarket/common/thirdparty/bootstrap/dist/css/bootstrap.min.css"> + <!-- <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=RobotoDraft:300,400,500,700,400italic"> + <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons"> --> + <link rel="stylesheet" href="/openoui/vnfmarket/common/css/main.css"> + <link rel="stylesheet" href="/openoui/vnfmarket/common/css/home.css"> </head> <body ng-cloak> @@ -46,56 +46,56 @@ <div ui-view layout="row" layout-fill></div> <!--End--> <!-- injector:js --> -<script src="vnfmarket/common/thirdparty/jquery/dist/jquery.js"></script> -<script src="vnfmarket/common/thirdparty/es5-shim/es5-shim.js"></script> -<script src="vnfmarket/common/thirdparty/json3/lib/json3.min.js"></script> -<script src="vnfmarket/common/thirdparty/angular/angular.js"></script> -<script src="vnfmarket/common/thirdparty/angular-aria/angular-aria.js"></script> -<script src="vnfmarket/common/thirdparty/angular-mocks/angular-mocks.js"></script> -<script src="vnfmarket/common/thirdparty/angular-cookies/angular-cookies.js"></script> -<script src="vnfmarket/common/thirdparty/angular-animate/angular-animate.js"></script> -<script src="vnfmarket/common/thirdparty/angular-sanitize/angular-sanitize.js"></script> -<script src="vnfmarket/common/thirdparty/angular-resource/angular-resource.js"></script> -<script src="vnfmarket/common/thirdparty/angular-material-icons/angular-material-icons.min.js"></script> -<script src="vnfmarket/common/thirdparty/angular-messages/angular-messages.js"></script> -<script src="vnfmarket/common/thirdparty/angular-material/angular-material.js"></script> -<script src="vnfmarket/common/thirdparty/angular-ui-router/release/angular-ui-router.js"></script> -<script src="vnfmarket/common/thirdparty/bootstrap/dist/js/bootstrap.js"></script> -<script src="vnfmarket/common/thirdparty/angular-material-data-table/dist/md-data-table.js"></script> -<script src="vnfmarket/common/thirdparty/angular-translate/angular-translate.js"></script> -<script src="vnfmarket/common/thirdparty/angular-translate-loader-static-files/angular-translate-loader-static-files.js"></script> -<script src="vnfmarket/app/app.js"></script> -<script src="vnfmarket/app/app.config.js"></script> -<script src="vnfmarket/common/config/configuration.js"></script> -<script src="vnfmarket/common/config/baseUrlConfig.js"></script> -<script src="vnfmarket/app/modules/home/homeModule.js"></script> -<script src="vnfmarket/app/modules/home/homeRoute.js"></script> -<script src="vnfmarket/app/modules/home/homeCtrl.js"></script> -<script src="vnfmarket/app/modules/home/serviceDelete/serviceDeleteCtrl.js"></script> -<script src="vnfmarket/app/modules/home/serviceDetails/serviceDetailsCtrl.js"></script> +<script src="/openoui/vnfmarket/common/thirdparty/jquery/dist/jquery.js"></script> +<script src="/openoui/vnfmarket/common/thirdparty/es5-shim/es5-shim.js"></script> +<script src="/openoui/vnfmarket/common/thirdparty/json3/lib/json3.min.js"></script> +<script src="/openoui/vnfmarket/common/thirdparty/angular/angular.js"></script> +<script src="/openoui/vnfmarket/common/thirdparty/angular-aria/angular-aria.js"></script> +<script src="/openoui/vnfmarket/common/thirdparty/angular-mocks/angular-mocks.js"></script> +<script src="/openoui/vnfmarket/common/thirdparty/angular-cookies/angular-cookies.js"></script> +<script src="/openoui/vnfmarket/common/thirdparty/angular-animate/angular-animate.js"></script> +<script src="/openoui/vnfmarket/common/thirdparty/angular-sanitize/angular-sanitize.js"></script> +<script src="/openoui/vnfmarket/common/thirdparty/angular-resource/angular-resource.js"></script> +<script src="/openoui/vnfmarket/common/thirdparty/angular-material-icons/angular-material-icons.min.js"></script> +<script src="/openoui/vnfmarket/common/thirdparty/angular-messages/angular-messages.js"></script> +<script src="/openoui/vnfmarket/common/thirdparty/angular-material/angular-material.js"></script> +<script src="/openoui/vnfmarket/common/thirdparty/angular-ui-router/release/angular-ui-router.js"></script> +<script src="/openoui/vnfmarket/common/thirdparty/bootstrap/dist/js/bootstrap.js"></script> +<script src="/openoui/vnfmarket/common/thirdparty/angular-material-data-table/dist/md-data-table.js"></script> +<script src="/openoui/vnfmarket/common/thirdparty/angular-translate/angular-translate.js"></script> +<script src="/openoui/vnfmarket/common/thirdparty/angular-translate-loader-static-files/angular-translate-loader-static-files.js"></script> +<script src="/openoui/vnfmarket/app/app.js"></script> +<script src="/openoui/vnfmarket/app/app.config.js"></script> +<script src="/openoui/vnfmarket/common/config/configuration.js"></script> +<script src="/openoui/vnfmarket/common/config/baseUrlConfig.js"></script> +<script src="/openoui/vnfmarket/app/modules/home/homeModule.js"></script> +<script src="/openoui/vnfmarket/app/modules/home/homeRoute.js"></script> +<script src="/openoui/vnfmarket/app/modules/home/homeCtrl.js"></script> +<script src="/openoui/vnfmarket/app/modules/home/serviceDelete/serviceDeleteCtrl.js"></script> +<script src="/openoui/vnfmarket/app/modules/home/serviceDetails/serviceDetailsCtrl.js"></script> <!-- --> -<script src="vnfmarket/app/modules/home/serviceDetails/functionalTest/functionalTestService.js"></script> +<script src="/openoui/vnfmarket/app/modules/home/serviceDetails/functionalTest/functionalTestService.js"></script> -<script src="vnfmarket/app/modules/home/serviceDetails/functionalTest/functionalTestCtrl.js"></script> -<script src="vnfmarket/app/modules/home/serviceDetails/validation/validationCtrl.js"></script> -<script src="vnfmarket/app/modules/home/serviceDetails/lifeCycle/lifeCycleCtrl.js"></script> +<script src="/openoui/vnfmarket/app/modules/home/serviceDetails/functionalTest/functionalTestCtrl.js"></script> +<script src="/openoui/vnfmarket/app/modules/home/serviceDetails/validation/validationCtrl.js"></script> +<script src="/openoui/vnfmarket/app/modules/home/serviceDetails/lifeCycle/lifeCycleCtrl.js"></script> <!-- --> -<script src="vnfmarket/app/modules/home/serviceUpload/serviceUploadCtrl.js"></script> -<script src="vnfmarket/app/modules/layouts/main-page/mainPageCtrl.js"></script> -<script src="vnfmarket/app/modules/layouts/side-nav/sidenavCtrl.js"></script> -<script src="vnfmarket/app/modules/home/homeService.js"></script> -<script src="vnfmarket/app/modules/home/serviceDelete/serviceDeleteService.js"></script> -<script src="vnfmarket/app/modules/home/serviceDetails/serviceDetailsService.js"></script> -<script src="vnfmarket/app/modules/home/serviceUpload/serviceUploadService.js"></script> -<script src="vnfmarket/app/modules/home/serviceUpload/onboarding/onboarding.js"></script> -<script src="vnfmarket/app/modules/home/serviceUpload/onboarding/onboardingSuccess.js"></script> -<script src="vnfmarket/app/modules/home/serviceUpload/onboarding/onBoardingService.js"></script> -<script src="vnfmarket/app/modules/home/serviceUpload/onboarding/validation/validationCtrl.js"></script> -<script src="vnfmarket/app/modules/home/serviceUpload/onboarding/functionalTest/functionalTestCtrl.js"></script> -<script src="vnfmarket/app/modules/home/serviceUpload/onboarding/lifeCycle/lifeCycleCtrl.js"></script> -<script src="vnfmarket/common/services/httpService.js"></script> -<script src="vnfmarket/common/directives/autofocus/autofocusDirective.js"></script> -<script src="vnfmarket/common/directives/fileupload/fileuploadDirective.js"></script> +<script src="/openoui/vnfmarket/app/modules/home/serviceUpload/serviceUploadCtrl.js"></script> +<script src="/openoui/vnfmarket/app/modules/layouts/main-page/mainPageCtrl.js"></script> +<script src="/openoui/vnfmarket/app/modules/layouts/side-nav/sidenavCtrl.js"></script> +<script src="/openoui/vnfmarket/app/modules/home/homeService.js"></script> +<script src="/openoui/vnfmarket/app/modules/home/serviceDelete/serviceDeleteService.js"></script> +<script src="/openoui/vnfmarket/app/modules/home/serviceDetails/serviceDetailsService.js"></script> +<script src="/openoui/vnfmarket/app/modules/home/serviceUpload/serviceUploadService.js"></script> +<script src="/openoui/vnfmarket/app/modules/home/serviceUpload/onboarding/onboarding.js"></script> +<script src="/openoui/vnfmarket/app/modules/home/serviceUpload/onboarding/onboardingSuccess.js"></script> +<script src="/openoui/vnfmarket/app/modules/home/serviceUpload/onboarding/onBoardingService.js"></script> +<script src="/openoui/vnfmarket/app/modules/home/serviceUpload/onboarding/validation/validationCtrl.js"></script> +<script src="/openoui/vnfmarket/app/modules/home/serviceUpload/onboarding/functionalTest/functionalTestCtrl.js"></script> +<script src="/openoui/vnfmarket/app/modules/home/serviceUpload/onboarding/lifeCycle/lifeCycleCtrl.js"></script> +<script src="/openoui/vnfmarket/common/services/httpService.js"></script> +<script src="/openoui/vnfmarket/common/directives/autofocus/autofocusDirective.js"></script> +<script src="/openoui/vnfmarket/common/directives/fileupload/fileuploadDirective.js"></script> <!-- endinjector --> </body> </html> |