[Pkg-nagios-changes] [SCM] UNNAMED PROJECT branch, master, updated. 016db4e7560fc8ef5ccdb6357745ef691650d94a

nap naparuba at gmail.com
Wed Nov 16 10:03:05 UTC 2011


The following commit has been merged in the master branch:
commit ff98fd843640e7ae6e9acf83daad0e87ec69c658
Author: nap <naparuba at gmail.com>
Date:   Sun Nov 13 14:07:43 2011 +0100

    Add : make all nodes apears in the dep graph, but hidden one in very smalls.

diff --git a/shinken/webui/plugins/depgraph/htdocs/js/eltdeps.js b/shinken/webui/plugins/depgraph/htdocs/js/eltdeps.js
index 6ff199f..da98086 100644
--- a/shinken/webui/plugins/depgraph/htdocs/js/eltdeps.js
+++ b/shinken/webui/plugins/depgraph/htdocs/js/eltdeps.js
@@ -97,7 +97,6 @@ window.onload = function init(){
     // Main printing loop for particules, graph is print only when need, 
     // but particules are print each loop
     function loop() {
-	
 	for (i = 0, len = particles.length; i < len; i++) {
 	    var particle = particles[i];
 
@@ -254,21 +253,27 @@ window.onload = function init(){
 	    'custom': {
 		'render': function(node, canvas) {
 
+		    /*First we need to know where the node is, so we can draw 
+		     in the correct place for the GLOBAL canvas*/
+		    var pos = node.getPos().getc();
+		    var size = 24;
+
+		    var ctx = canvas.getCtx();
+
 		    // Look if we really need to render this node
 		    if(!should_be_print(node)){
+			var color = node.data.circle;
 			// Remeber to clean the particule if need
 			clean_particule(node.id);
+			ctx.beginPath();
+			ctx.fillStyle = color;//'rgba(0,0,255,0.8)';
+			ctx.arc(pos.x, pos.y, 1,  0, Math.PI*(2), true);
+			ctx.fill();
 			return;
 		    }
 
 
 		    //alert('Rendering node '+node.id);
-		    /*First we need to know where the node is, so we can draw 
-		     in the correct place for the GLOBAL canvas*/
-		    var pos = node.getPos().getc();
-		    var size = 24;
-
-		    var ctx = canvas.getCtx();
 		    // save it
 		    context = ctx;
 		    img = new Image();
@@ -373,9 +378,9 @@ window.onload = function init(){
 		dst = adj.nodeTo;
 
 		// If one of the line border is a no print node
-		// do not print this line
+		// print this line in very few pixels
 		if(!should_be_print(src) || !should_be_print(dst)){
-		    adj.data.$lineWidth = 0.0001;
+		    adj.data.$lineWidth = 0.3;
 		}else{
 		    adj.data.$lineWidth = 2;
 		}

-- 
UNNAMED PROJECT



More information about the Pkg-nagios-changes mailing list