summaryrefslogtreecommitdiffstats
path: root/usecaseui-lcm/src/main/webapp/static/fusion
diff options
context:
space:
mode:
authorLuji7 <lu.ji3@zte.com.cn>2017-09-18 15:39:24 +0800
committerLuji7 <lu.ji3@zte.com.cn>2017-09-18 15:39:36 +0800
commit20b443f877ad93ef52de6fe8bc1af48546dc8c86 (patch)
tree4c6fe8b4cbb547964c3fa5de34e5cf71113bc380 /usecaseui-lcm/src/main/webapp/static/fusion
parent6f219158ff490d3484d578deaa77c11222360a75 (diff)
ns and vnf package distribution ui
Change-Id: Id08458ba85b5d4a87c2c3e1e083fef17d334fff0 Issue-id: USECASEUI-40 Signed-off-by: Luji7 <lu.ji3@zte.com.cn>
Diffstat (limited to 'usecaseui-lcm/src/main/webapp/static/fusion')
-rw-r--r--usecaseui-lcm/src/main/webapp/static/fusion/js/lifecyclemanager.js58
1 files changed, 58 insertions, 0 deletions
diff --git a/usecaseui-lcm/src/main/webapp/static/fusion/js/lifecyclemanager.js b/usecaseui-lcm/src/main/webapp/static/fusion/js/lifecyclemanager.js
index aa26bb04..84863a58 100644
--- a/usecaseui-lcm/src/main/webapp/static/fusion/js/lifecyclemanager.js
+++ b/usecaseui-lcm/src/main/webapp/static/fusion/js/lifecyclemanager.js
@@ -24,12 +24,28 @@ var lcmHandler = function() {
};
lcmHandler.prototype = {
+ showOnboardSelection: false,
+
_addOwnEvents : function() {
$('#createService').click(function() {
console.log("create service...");
$('#createServiceDialog').modal();
});
$('#startToCreateService').click(this.okAction);
+ // $('.show-onboard').click(function () {
+ // this.showOnboard = !this.showOnboard;
+ // if(this.showOnboard) {
+ // document.getElementById("onboard").innerHTML = generateVnfNsOnboardDialog({});
+ // }else {
+ // document.getElementById("onboard").innerHTML = '';
+ // }
+ //
+ // });
+ $('.onboard-button').click(function () {
+ console.log("show vnf ns vims...");
+ document.getElementById("vnf-ns-vim-table").innerHTML = generateVnfNsOnboardDialog({});
+ $("#vnf-ns-onboard-dialog").modal();
+ });
},
okAction : function() {
if (!checkInputs('create', templateParameters.paramJsonObj)) {
@@ -62,6 +78,22 @@ function showBasic() {
$("#templateParameterTab").hide();
}
+function hideService() {
+ console.log("hide service...");
+ $("#serviceTab").css({"margin-left":"1px","border-bottom-style":"solid", "border-color": "", "background-color":"#F2F2F2", "border-bottom-color": "#66B3FF"});
+ $("#service-table").hide();
+ $("#vnfNsTab").css({"border-bottom-style":"none","border-color": "#66B3FF","background-color":"#F2F2F2"});
+ $("#vnf-ns-onboard").show();
+}
+
+function showService() {
+ console.log("show service...");
+ $("#serviceTab").css({"margin-left":"1px","border-bottom-style":"none","border-color": "#66B3FF", "background-color":"#F2F2F2"});
+ $("#service-table").show();
+ $("#vnfNsTab").css({"border-bottom-style":"solid", "border-color": "", "background-color":"#F2F2F2", "border-bottom-color": "#66B3FF"});
+ $("#vnf-ns-onboard").hide();
+}
+
function serviceTemplateChanged() {
templateParameters.changed = true;
}
@@ -637,3 +669,29 @@ function queryService(serviceId) {
url : uri
});
}
+
+// function generateVnfNsOnboardDialog(onboardData) {
+// var component = '<div>'
+// + '<table id="onbaordTable" class="table table-striped table-hover table-bordered">'
+// + '<thead><tr><th>Name</th><th>Type</th><th>Action</th></tr></thead>'
+// + '<tbody>'
+// +'<tr><td>vBras</td><td>VNF</td><td><button class="btn btn-primary onboard-button">Onboard</button></td></tr>'
+// +'<tr><td>network service</td><td>NS</td><td><button class="btn btn-primary onboard-button">Onboard</button></td></tr>'
+// +'</tbody>'
+// +'</table>'
+// +'</div>';
+// return component;
+// }
+
+function generateVnfNsOnboardDialog(onboardData) {
+ var component = '<div>'
+ + '<table id="vnfVimNsSelection" class="table table-striped table-hover table-bordered">'
+ + '<thead><tr><th>VIM Name</th><th>Test Environment</th><th>Product Environment</th></tr></thead>'
+ + '<tbody>'
+ +'<tr><td>VIM1</td><td><input type="radio" name="test-env" /></td><td><input type="checkbox" /></td></tr>'
+ +'<tr><td>VIM2</td><td><input type="radio" name="test-env" /></td><td><input type="checkbox" /></td></tr>'
+ +'</tbody>'
+ +'</table>'
+ +'</div>';
+ return component;
+}