[Pkg-nagios-changes] [SCM] UNNAMED PROJECT branch, debian/master, updated. 810edbdd3feedbfe37f4a65bee50b57b2f60fa2a

Naparuba naparuba at gmail.com
Tue Feb 28 22:07:00 UTC 2012


The following commit has been merged in the debian/master branch:
commit 78cd3f5ba2b17f111f96c93a5ac080d498226337
Author: Naparuba <naparuba at gmail.com>
Date:   Fri Nov 18 14:48:23 2011 +0100

    *Add : next/previous image for the /wall page. Click on them make the wall "slide"
    *Fix : strange high behavior of the item in the /wall page, reduce the number and add some width/heigth protection

diff --git a/shinken/webui/htdocs/images/next.png b/shinken/webui/htdocs/images/next.png
new file mode 100644
index 0000000..3f4e13e
Binary files /dev/null and b/shinken/webui/htdocs/images/next.png differ
diff --git a/shinken/webui/htdocs/images/previous.png b/shinken/webui/htdocs/images/previous.png
new file mode 100644
index 0000000..0a38994
Binary files /dev/null and b/shinken/webui/htdocs/images/previous.png differ
diff --git a/shinken/webui/plugins/flow/htdocs/css/wall.css b/shinken/webui/plugins/flow/htdocs/css/wall.css
index d873132..01886cd 100644
--- a/shinken/webui/plugins/flow/htdocs/css/wall.css
+++ b/shinken/webui/plugins/flow/htdocs/css/wall.css
@@ -117,6 +117,9 @@
 
 .sliding{}
 
+
+
+
 .selected{
     border: 5px solid #FEB515;
     -webkit-border-radius: 3px;
diff --git a/shinken/webui/plugins/wall/htdocs/css/snowstack.css b/shinken/webui/plugins/wall/htdocs/css/snowstack.css
index 7d186b2..c5ac834 100644
--- a/shinken/webui/plugins/wall/htdocs/css/snowstack.css
+++ b/shinken/webui/plugins/wall/htdocs/css/snowstack.css
@@ -16,7 +16,7 @@ div.page
 {
     -webkit-perspective: 600;
     width: 100%;
-    height: 100%;
+    height: 80%;
 /*    margin: 0 auto;*/
     text-align: center;
 
diff --git a/shinken/webui/plugins/wall/htdocs/css/wall.css b/shinken/webui/plugins/wall/htdocs/css/wall.css
index c1fa942..14fa79b 100644
--- a/shinken/webui/plugins/wall/htdocs/css/wall.css
+++ b/shinken/webui/plugins/wall/htdocs/css/wall.css
@@ -81,8 +81,10 @@
 .last_errors{
     border-color : black;
     border : 1px;
-    top : 450px;
-    position: relative;
+    top : 55%;
+    position: absolute;
+    min-height : 500px;
+    width: 100%;
 }
 
 
@@ -99,4 +101,40 @@
     left: 40px;
 }
 
-.sliding{}
\ No newline at end of file
+.sliding{
+    min-width: 250px;
+}
+
+
+/* We override some properties of the classic pulse
+ for huge size of wall icons */
+.wall-small-pulse {
+    width: 32px;
+    height: 32px;
+    top: 0px;
+    left: 0px;
+}
+
+
+.next-icon{
+    width: 64px;
+    height: 64px;
+    position: absolute;
+    /*margin-left: 104px;*/
+    z-index: 100;
+    outline: none;
+    right: 20px;
+    top : 50%;/*10px;*/
+}
+
+.previous-icon{
+    width: 64px;
+    height: 64px;
+    position: absolute;
+    /*margin-left: 104px;*/
+    z-index: 100;
+    outline: none;
+    left: 20px;
+    top : 50%;/*10px;*/
+    
+}
\ No newline at end of file
diff --git a/shinken/webui/plugins/wall/htdocs/js/snowstack.js b/shinken/webui/plugins/wall/htdocs/js/snowstack.js
index a4ccfd3..0a18014 100644
--- a/shinken/webui/plugins/wall/htdocs/js/snowstack.js
+++ b/shinken/webui/plugins/wall/htdocs/js/snowstack.js
@@ -297,6 +297,32 @@ function snowstack_search(searchkey, searchterm)
     }
 }
 
+
+function go_right(){
+    var newCellIndex = currentCellIndex;
+    /* Right Arrow */
+    if ((newCellIndex + snowstack_options.rows) < cells.length)
+    {
+	newCellIndex += snowstack_options.rows;
+    }else{
+	newCellIndex = 1;
+    }
+    snowstack_update(newCellIndex, magnifyMode);
+}
+
+function go_left(){
+    var newCellIndex = currentCellIndex;
+    /* Left Arrow */
+    //alert(newCellIndex >= snowstack_options.rows);//'go left');
+    if (newCellIndex >= snowstack_options.rows)
+    {
+
+	newCellIndex -= snowstack_options.rows;
+    }
+    snowstack_update(newCellIndex, magnifyMode);
+}
+
+
 global.snowstack_init = function (imagefun, options)
 {
     var loading = true;
@@ -357,17 +383,6 @@ global.snowstack_init = function (imagefun, options)
     var keytimer = null;
     var keydelay = 330;
 
-    function go_right(){
-	var newCellIndex = currentCellIndex;
-	/* Right Arrow */
-	if ((newCellIndex + snowstack_options.rows) < cells.length)
-	{
-	    newCellIndex += snowstack_options.rows;
-	}else{
-	    newCellIndex = 1;
-	}
-	snowstack_update(newCellIndex, magnifyMode);
-    }
 
     //Each 10s, go right
     if(snowstack_options.autoslide){
diff --git a/shinken/webui/plugins/wall/htdocs/js/wall.js b/shinken/webui/plugins/wall/htdocs/js/wall.js
index b3fa8db..cf667b4 100644
--- a/shinken/webui/plugins/wall/htdocs/js/wall.js
+++ b/shinken/webui/plugins/wall/htdocs/js/wall.js
@@ -51,9 +51,9 @@ function translate_problem(){
 window.addEvent('domready', function(){
     var nb_elements = $$('.sliding').length;
     // If there is not enough elements, don't even slide
-    // So we print in each page 12 elements. No need to slide if lower
-    if(nb_elements > 12){
-	var nb_slides = nb_elements / 4;
+    // So we print in each page 9 elements. No need to slide if lower
+    if(nb_elements > 9){
+	var nb_slides = nb_elements / 9;
 	var slide_interval = 60/nb_slides;
 	//alert('interval'+slide_interval);
 
diff --git a/shinken/webui/plugins/wall/views/wall.tpl b/shinken/webui/plugins/wall/views/wall.tpl
index d0312d3..b96780e 100644
--- a/shinken/webui/plugins/wall/views/wall.tpl
+++ b/shinken/webui/plugins/wall/views/wall.tpl
@@ -5,6 +5,8 @@
 
 
 <div class="page view">
+  <img src="/static/images/next.png" class="next-icon" onclick="go_right();"/>
+  <img src="/static/images/previous.png" class="previous-icon" onclick="go_left();"/>
     <div class="origin view">
         <div id="camera" class="camera view"></div>
     </div>
@@ -26,11 +28,11 @@ var images = {{!impacts}};
 %ind = -1
 %for pb in problems:
    %ind += 1
-   %x,y = divmod(ind, 4)
+   %x,y = divmod(ind, 3)
        <div class="divstate{{pb.state_id}} sliding" style="left:{{x * 400}}px; position: absolute; top:{{ y * 50 + 50}}px; i:{{ind}} {{x}} {{y}}">
 	 <div class="wall-aroundpulse aroundpulse">
 	 %if pb.business_impact > 2:
-	   <span class="pulse" title=""></span>
+	   <span class="wall-small-pulse pulse" title=""></span>
 	 %end
 	   <img style="width : 32px; height:32px" src="{{helper.get_icon_state(pb)}}">
 	 </div>

-- 
UNNAMED PROJECT



More information about the Pkg-nagios-changes mailing list