From: lombardofr Date: Mon, 21 Jan 2019 14:43:52 +0000 (+0100) Subject: nsi list, show, create, delete X-Git-Tag: v5.0.3^2~1 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=cf3a1f01c2b7ef2e76f8090fc995b74e95835306;p=osm%2FLW-UI.git nsi list, show, create, delete Change-Id: I0c7757cdb7a38712e8960806765a2508b0013ce6 Signed-off-by: lombardofr --- diff --git a/instancehandler/template/instance_list.html b/instancehandler/template/instance_list.html index 067dcb5..9fddbc0 100644 --- a/instancehandler/template/instance_list.html +++ b/instancehandler/template/instance_list.html @@ -42,6 +42,8 @@ {% include 'instance_list_vnf.html' %} {% elif type == 'pdu' %} {% include 'instance_list_pdu.html' %} + {% elif type == 'nsi' %} + {% include 'instance_list_nsi.html' %} {% endif %} @@ -49,6 +51,7 @@ {% include 'modal/instance_create.html' %} {% include 'modal/instance_create_pdu.html' %} + {% include 'modal/instance_create_nsi.html' %} {% include 'modal/instance_show.html' %} {% include 'modal/instance_new_action.html' %} {% include 'modal/instance_new_alarm.html' %} @@ -282,6 +285,105 @@ "targets": 5, "orderable": false } + ], + 'nsi': [ + { + "render": function (data, type, row) { + return row["name"]; + }, + "targets": 0 + }, + { + "render": function (data, type, row) { + return row["_id"]; + }, + "targets": 1 + }, + { + "render": function (data, type, row) { + return row["nst-ref"]; + }, + "targets": 2 + }, + { + // "width": "5%", + "render": function (data, type, row) { + if(row["operational-status"] === 'failed') + return ''+ row["operational-status"] +''; + if(row["operational-status"] === 'init') + return ''+ row["operational-status"] +''; + if(row["operational-status"] === 'running') + return ''+ row["operational-status"] +''; + return ''+row["operational-status"]+''; + }, + "targets": 3 + }, + { + // "width": "5%", + "render": function (data, type, row) { + if(row["config-status"] === 'failed') + return ''+ row["config-status"] +''; + if(row["config-status"] === 'init') + return ''+ row["config-status"] +''; + if(row["config-status"] === 'running') + return ''+ row["config-status"] +''; + if(row["config-status"] === 'configured') + return ''+ row["config-status"] +''; + return ''+row["operational-status"]+''; + }, + "targets": 4 + }, + { + // "className": "ellipsis", + "render": function (data, type, row) { + return row["detailed-status"]; + }, + "targets": 5 + },{ + "width": "20%", + "render": function (data, type, row) { + var template = '
' + + ' '; + }else{ + template += ' '; + } */ + template += ' ' + + ' ' + + ' ' + + '
'; + return template; + }, + "targets": 5, + "orderable": false + }, + ] }; $(document).ready(function () { diff --git a/instancehandler/template/instance_list_nsi.html b/instancehandler/template/instance_list_nsi.html new file mode 100644 index 0000000..a90e04c --- /dev/null +++ b/instancehandler/template/instance_list_nsi.html @@ -0,0 +1,41 @@ +{% load get %} +
+
+

Network Slices Instances

+ +
+ + + +
+ +
+
+ {% if alert_error %} +
+ +

Error

+ {{alert_error}} +
+ {% endif %} + + + + + + + + + + + + + + + +
NameIdentifierNst nameOperational StatusConfig StatusDetailed StatusActions
+
+
diff --git a/instancehandler/template/modal/instance_create_nsi.html b/instancehandler/template/modal/instance_create_nsi.html new file mode 100644 index 0000000..bad979f --- /dev/null +++ b/instancehandler/template/modal/instance_create_nsi.html @@ -0,0 +1,71 @@ + diff --git a/instancehandler/template/modal/instance_show.html b/instancehandler/template/modal/instance_show.html index 6df8bc1..1263855 100644 --- a/instancehandler/template/modal/instance_show.html +++ b/instancehandler/template/modal/instance_show.html @@ -1,5 +1,5 @@