diff --git a/eNMS/static/inventory.js b/eNMS/static/inventory.js index 890a66600..f3f5fe865 100644 --- a/eNMS/static/inventory.js +++ b/eNMS/static/inventory.js @@ -107,13 +107,3 @@ function showDeviceResultsPanel(device) { initTable("result", device); }); } - -Object.assign(action, { - "Device properties": (d) => { - console.log(d) - showTypePanel("device", d.id) - }, - "Link properties": (l) => showTypePanel("link", l.id), - Connect: (d) => showPanel("device_connection", d.id), - Configuration: (d) => showDeviceConfiguration(d), -}); diff --git a/eNMS/static/view.js b/eNMS/static/view.js index a1a49ab02..46abc87f3 100644 --- a/eNMS/static/view.js +++ b/eNMS/static/view.js @@ -111,7 +111,7 @@ function createLink(link) { const pointList = [pointA, pointB]; const polyline = new L.Polyline(pointList, { color: link.color, - weight: 3, + weight: 2, opacity: 1, smoothFactor: 1, }); @@ -121,10 +121,9 @@ function createLink(link) { showTypePanel("link", this.link_id); }); polyline.on("contextmenu", function(e) { - console.log("test") $(".menu").hide(); $(".rc-link-menu").show(); - selectedObject = this.link; // eslint-disable-line no-undef + selectedObject = link; // eslint-disable-line no-undef }); polyline.bindTooltip(link.name, { permanent: false, @@ -225,6 +224,12 @@ function showViewFilteringPanel(type) { showFilteringPanel(`${type}_filtering`); } +Object.assign(action, { + "Properties": (o) => showTypePanel(o.icon ? "device" : "link", o.id), + Connect: (d) => showPanel("device_connection", d.id), + Configuration: (d) => showDeviceConfiguration(d), +}); + (function() { markerType = config.view.marker; map = L.map("map", { preferCanvas: true }).setView( diff --git a/eNMS/templates/pages/view.html b/eNMS/templates/pages/view.html index a5a6dce24..85ab85826 100644 --- a/eNMS/templates/pages/view.html +++ b/eNMS/templates/pages/view.html @@ -44,16 +44,13 @@