X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=static%2Fsrc%2Fdescriptorhandler%2Fcomposer.js;h=aef680fdde49946a46222efc1d6b1cfba5591275;hb=e96d058fe5c681052f45c1d794ba80b09b162c64;hp=18072a80528818168849b8a0439834712e2f3ba5;hpb=462eec298e50b930b1b8ec9296edf34934e9312b;p=osm%2FLW-UI.git diff --git a/static/src/descriptorhandler/composer.js b/static/src/descriptorhandler/composer.js index 18072a8..aef680f 100644 --- a/static/src/descriptorhandler/composer.js +++ b/static/src/descriptorhandler/composer.js @@ -18,7 +18,7 @@ var graph_editor = new TCD3.ModelGraphEditor(); var type_view = { - "nsd": ["vnf", "ns_vl"], + "nsd": ["vnf", "ns_vl", "ns_cp"], "vnfd": ["vdu", "cp", "vnf_vl", "int_cp"] }; @@ -141,8 +141,14 @@ function initDropOnGraph() { graph_editor.addNode(node_information, function () { console.log("OK") - }, function (error) { - showAlert(error) + }, function (result) { + var data = result.responseJSON; + var title = "Error " + (data && data.code ? data.code : 'unknown'); + var message = data && data.detail ? data.detail : 'No detail available.'; + bootbox.alert({ + title: title, + message: message + }); }) }; @@ -195,6 +201,9 @@ function refreshElementInfo(event, element) { case 'int_cp': intcpDetails(element.info.osm); break; + case 'ns_cp': + nscpDetails(element.info.osm); + break; case 'cp': cpDetails(element.info.osm); break; @@ -257,7 +266,7 @@ function updatePalette(view) { var nodes_properties = osm_gui_properties['nodes']; for (var n in nodes) { var node = nodes[n]; - if (nodes_properties[node]) { + if (nodes_properties[node] && (nodes_properties[node].draggable != false)) { palette_template += '