From b58d5d8e177049ab63587f4329f282bc206352ec Mon Sep 17 00:00:00 2001 From: lombardofr Date: Fri, 4 Jan 2019 15:25:45 +0100 Subject: [PATCH] pdu: list, create, show, delete Change-Id: I1d184eba4fef6cd55719ef5b0e51a29b05c34b96 Signed-off-by: lombardofr --- instancehandler/template/instance_list.html | 59 ++++++++- .../template/instance_list_pdu.html | 33 +++++ .../template/instance_list_vnf.html | 3 - .../template/modal/instance_create.html | 2 +- .../template/modal/instance_create_pdu.html | 87 ++++++++++++ .../template/modal/instance_new_action.html | 5 +- instancehandler/urls.py | 8 +- instancehandler/views.py | 124 +++++++++++------- lib/osm/osmclient/clientv2.py | 69 ++++++++++ .../project/osm/osm_project_left_sidebar.html | 7 + static/src/instancehandler/instance_create.js | 29 +++- static/src/instancehandler/instance_list.js | 88 ++++++++++++- 12 files changed, 447 insertions(+), 67 deletions(-) create mode 100644 instancehandler/template/instance_list_pdu.html create mode 100644 instancehandler/template/modal/instance_create_pdu.html diff --git a/instancehandler/template/instance_list.html b/instancehandler/template/instance_list.html index bc94e5f..39d9b3c 100644 --- a/instancehandler/template/instance_list.html +++ b/instancehandler/template/instance_list.html @@ -40,12 +40,15 @@ {% include 'instance_list_ns.html' %} {% elif type == 'vnf' %} {% include 'instance_list_vnf.html' %} + {% elif type == 'pdu' %} + {% include 'instance_list_pdu.html' %} {% endif %} {% include 'modal/instance_create.html' %} + {% include 'modal/instance_create_pdu.html' %} {% include 'modal/instance_show.html' %} {% include 'modal/instance_new_action.html' %} {% include 'modal/instance_new_alarm.html' %} @@ -75,6 +78,7 @@ diff --git a/instancehandler/template/instance_list_pdu.html b/instancehandler/template/instance_list_pdu.html new file mode 100644 index 0000000..3eab3fc --- /dev/null +++ b/instancehandler/template/instance_list_pdu.html @@ -0,0 +1,33 @@ +{% load get %} +{% load date_tag %} +
+
+

{{ type|upper }}

+ +
+ +
+ +
+
+ + + + + + + + + + + + + + +
IdentifierNameTypeUsage StateCreated AtActions
+
+
\ No newline at end of file diff --git a/instancehandler/template/instance_list_vnf.html b/instancehandler/template/instance_list_vnf.html index d290ad1..ae82675 100644 --- a/instancehandler/template/instance_list_vnf.html +++ b/instancehandler/template/instance_list_vnf.html @@ -1,14 +1,11 @@ {% load get %} {% load date_tag %} -

{{ type|upper }} Instances

- -
diff --git a/instancehandler/template/modal/instance_create.html b/instancehandler/template/modal/instance_create.html index 7544919..8b4d40c 100644 --- a/instancehandler/template/modal/instance_create.html +++ b/instancehandler/template/modal/instance_create.html @@ -6,7 +6,7 @@
-
{% csrf_token %} diff --git a/instancehandler/template/modal/instance_create_pdu.html b/instancehandler/template/modal/instance_create_pdu.html new file mode 100644 index 0000000..444bd7e --- /dev/null +++ b/instancehandler/template/modal/instance_create_pdu.html @@ -0,0 +1,87 @@ +
+ + + diff --git a/instancehandler/template/modal/instance_new_action.html b/instancehandler/template/modal/instance_new_action.html index 6cf3059..1aa1c24 100644 --- a/instancehandler/template/modal/instance_new_action.html +++ b/instancehandler/template/modal/instance_new_action.html @@ -24,11 +24,9 @@
Primitive parameters :
-
-
- +
@@ -42,7 +40,6 @@
-