Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Wed Jun 28, 2017 10:47 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Weathermap editor with easy node move
PostPosted: Thu Sep 29, 2011 6:33 am 
Offline

Joined: Thu Dec 02, 2010 12:35 am
Posts: 3
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)


Top
 Profile  
 
 Post subject: Re: Weathermap editor with easy node move
PostPosted: Thu Sep 29, 2011 6:42 am 
Offline
Cacti Guru User
User avatar

Joined: Thu Sep 16, 2004 5:53 am
Posts: 5111
Location: United Kingdom
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.98 is out! & QuickTree 0.2. Superlinks is over there now.
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!)


Top
 Profile  
 
 Post subject: Re: Weathermap editor with easy node move
PostPosted: Fri Oct 14, 2011 6:30 am 
Offline
Cacti User

Joined: Mon May 31, 2010 9:26 am
Posts: 125
Is what you did possible, Howie?.


Top
 Profile  
 
 Post subject: Re: Weathermap editor with easy node move
PostPosted: Fri Oct 14, 2011 7:33 am 
Offline
Cacti Guru User
User avatar

Joined: Thu Sep 16, 2004 5:53 am
Posts: 5111
Location: United Kingdom
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.98 is out! & QuickTree 0.2. Superlinks is over there now.
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!)


Top
 Profile  
 
 Post subject: Re: Weathermap editor with easy node move
PostPosted: Wed Nov 09, 2011 3:46 am 
Offline

Joined: Thu Oct 06, 2011 8:33 am
Posts: 4
i'm unable to patch.

Can you provide the command please ?


Top
 Profile  
 
 Post subject: Re: Weathermap editor with easy node move
PostPosted: Thu Oct 27, 2016 1:12 pm 
Offline
Cacti User

Joined: Mon May 31, 2010 9:26 am
Posts: 125
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 :).


Top
 Profile  
 
 Post subject: Re: Weathermap editor with easy node move
PostPosted: Thu Oct 27, 2016 1:45 pm 
Offline
Cacti Guru User
User avatar

Joined: Thu Sep 16, 2004 5:53 am
Posts: 5111
Location: United Kingdom
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.98 is out! & QuickTree 0.2. Superlinks is over there now.
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!)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group