X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=static%2Fsrc%2Fdescriptorhandler%2Fcomposer.js;h=aef680fdde49946a46222efc1d6b1cfba5591275;hb=refs%2Fchanges%2F70%2F9870%2F1;hp=4b8bfd5897fc80d1b01be05edba623fbfc220530;hpb=e65ab995302cb8ea6d91cb0916d72a31528df67a;p=osm%2FLW-UI.git diff --git a/static/src/descriptorhandler/composer.js b/static/src/descriptorhandler/composer.js index 4b8bfd5..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 + }); }) }; @@ -193,6 +199,11 @@ function refreshElementInfo(event, element) { vduDetails(element.info.osm); break; case 'int_cp': + intcpDetails(element.info.osm); + break; + case 'ns_cp': + nscpDetails(element.info.osm); + break; case 'cp': cpDetails(element.info.osm); break; @@ -255,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 += '