Fix bug #677 osm nsi-op-list name' and 'osm nsi-op-show id' returns null 19/7619/1
authorFelipe Vicens <felipe.vicens@atos.net>
Thu, 6 Jun 2019 00:26:02 +0000 (02:26 +0200)
committerFelipe Vicens <felipe.vicens@atos.net>
Thu, 6 Jun 2019 07:58:35 +0000 (09:58 +0200)
Change-Id: If7c330bef21613916ffd3bdd12b1962f8f7877e8
Signed-off-by: Felipe Vicens <felipe.vicens@atos.net>
entrypoint.sh [changed mode: 0644->0755]
instancehandler/template/instance_operations_list.html
lib/osm/osmclient/clientv2.py
static/src/instancehandler/instance_operations_list.js

old mode 100644 (file)
new mode 100755 (executable)
index 1568717..3f54f1f 100644 (file)
                     "render": function (data, type, row) {
                         return '<div class="btn-group">\n' +
                             '     <button type="button" class="btn btn-default"\n' +
-                            '             onclick="javascript:showOperationDetails(\''+row["nsInstanceId"]+'\', \''+row["_id"]+'\')"\n' +
+                            '             onclick="javascript:showOperationDetails(\''+instance_type+'\', \''+instance_id+'\', \''+row["_id"]+'\')"\n' +
                             '             data-toggle="tooltip" data-placement="top" data-container="body" title="Show Info">\n' +
                             '         <i class="fa fa-info"></i>\n' +
                             '     </button>\n' +
 
 {% block footer %}
     {% include "footer.html" %}
-{% endblock %}
\ No newline at end of file
+{% endblock %}
index 384eeaa..95b4b97 100644 (file)
@@ -1092,7 +1092,7 @@ class Client(object):
         result = {'error': True, 'data': ''}
         headers = {"Content-Type": "application/json", "accept": "application/json",
                    'Authorization': 'Bearer {}'.format(token['id'])}
-        _url = "{0}/nsilcm/v1/nsi_lcm_op_occs/?nsInstanceId={1}".format(self._base_path, id)
+        _url = "{0}/nsilcm/v1/nsi_lcm_op_occs/?netsliceInstanceId={1}".format(self._base_path, id)
 
         try:
             r = requests.get(_url, params=None, verify=False, stream=True, headers=headers)
index d85ebcf..5341c89 100644 (file)
@@ -15,8 +15,8 @@
 */
 
 
-function showOperationDetails(instance_id, operation_id) {
-    var url_info = '/instances/ns/'+instance_id+'/operation/' + operation_id;
+function showOperationDetails(type, instance_id, operation_id) {
+    var url_info = '/instances/'+type+'/'+instance_id+'/operation/' + operation_id;
     var dialog = bootbox.dialog({
         message: '<div class="text-center"><i class="fa fa-spin fa-spinner"></i> Loading...</div>',
         closeButton: true
@@ -72,4 +72,4 @@ $(document).ready(function () {
     }, json_editor_settings);
 
 
-});
\ No newline at end of file
+});