Weathermap editor with easy node move

Support questions about the Network Weather Map plugin

Moderators: Developers, Moderators

Post Reply
13hakta
Posts: 6
Joined: Thu Dec 02, 2010 12:35 am
Location: Sterlitamak
Contact:

Weathermap editor with easy node move

Post by 13hakta »

Hello! I've updated weathermap editor script for initiating node moving by dragging. So, it become easier to redraw even huge map. All is needed is to start dragging node and point the place where it should be located.

==PATCH==

--- editor.js.old 2010-03-04 15:45:19.000000000 +0500
+++ editor.js 2011-09-29 17:20:32.185311639 +0600
@@ -81,5 +81,22 @@
}

+function drag_handler(event) {
+ var alt, objectname, objecttype, objectid;

+ // if we're not in a mode yet...
+ if (document.frmMain.action.value == '') {
+ alt = jQuery(this).attr("id");
+
+ objectname = alt.slice(5, alt.length);
+ objectid = objectname.slice(0, objectname.length - 2);
+ objectname = NodeIDs[objectid];
+
+ document.getElementById('param').value = objectname;
+ show_node(objectname);
+ move_node();
+ }
+
+ return false;
+}

function attach_click_events()
@@ -90,4 +107,5 @@
jQuery("area[id^=TIMES]").attr("href","#").click(position_timestamp);
jQuery("area[id^=LEGEN]").attr("href","#").click(position_legend);
+ jQuery("area[id^=NODE:]").attr("href","#").bind('dragstart', drag_handler);

if(fromplug===1)
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: Weathermap editor with easy node move

Post by Howie »

Cool... I'll give it a try!

One day I'll get this thing finished:
http://www.network-weathermap.com/files/editor-test.m4v
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
Atreides
Cacti User
Posts: 174
Joined: Mon May 31, 2010 9:26 am

Re: Weathermap editor with easy node move

Post by Atreides »

Is what you did possible, Howie?.
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: Weathermap editor with easy node move

Post by Howie »

Atreides wrote:Is what you did possible, Howie?.
That's a working demo from 2008. The code doesn't work right now, but yes...
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
benoitp38
Posts: 4
Joined: Thu Oct 06, 2011 8:33 am

Re: Weathermap editor with easy node move

Post by benoitp38 »

i'm unable to patch.

Can you provide the command please ?
Atreides
Cacti User
Posts: 174
Joined: Mon May 31, 2010 9:26 am

Re: Weathermap editor with easy node move

Post by Atreides »

Hello,
Anyone have a working drag & drop for weathermap ? I tried this patch, also few tips I've found on this forum, but no joy. Moving tons of nodes every 5 min to align beautifull is starting to kill me :).
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: Weathermap editor with easy node move

Post by Howie »

Atreides wrote:Hello,
Anyone have a working drag & drop for weathermap ? I tried this patch, also few tips I've found on this forum, but no joy. Moving tons of nodes every 5 min to align beautifull is starting to kill me :).
I use relative positioning and cut&paste for this, personally.
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests