[Pkg-nagios-changes] [SCM] UNNAMED PROJECT branch, debian/master, updated. 810edbdd3feedbfe37f4a65bee50b57b2f60fa2a
Naparuba
naparuba at gmail.com
Tue Feb 28 22:08:13 UTC 2012
The following commit has been merged in the debian/master branch:
commit 06271ec3fcdd7fd77f44a59288cdd21b36709d43
Author: Naparuba <naparuba at gmail.com>
Date: Thu Dec 8 05:58:10 2011 +0100
Add : /wall view is not a div based one and no more a 3d effect one.
diff --git a/shinken/webui/plugins/wall/htdocs/css/snowstack.css b/shinken/webui/plugins/wall/htdocs/css/snowstack.css
index c5ac834..c4a4413 100644
--- a/shinken/webui/plugins/wall/htdocs/css/snowstack.css
+++ b/shinken/webui/plugins/wall/htdocs/css/snowstack.css
@@ -58,7 +58,7 @@ div.cell
-webkit-transform: translate3d(0, 0, 0);
}
-div.cell .media
+.media
{
display: block;
width: 250px;
diff --git a/shinken/webui/plugins/wall/htdocs/js/wall.js b/shinken/webui/plugins/wall/htdocs/js/wall.js
index cf667b4..c502edd 100644
--- a/shinken/webui/plugins/wall/htdocs/js/wall.js
+++ b/shinken/webui/plugins/wall/htdocs/js/wall.js
@@ -22,11 +22,11 @@
*/
-/* We will initialize the WALL panel with our data*/
+/* We will initialize the WALL panel with our data
window.addEvent('domready', function(){
options = {'autoslide' : true};
snowstack_init(images, options);
-});
+});*/
function translate_problem(){
@@ -47,6 +47,39 @@ function translate_problem(){
}
+
+function translate_impact(to_right){
+ var to_slide = $$('.sliding-impacts');
+ to_slide.each(function(el){
+ var pos = el.getPosition();
+ var new_pos = pos;
+ if(to_right){
+ new_pos = pos.x - 400;
+ }else{
+ new_pos = pos.x + 400;
+ }
+
+ var myeffect = new Fx.Elements(el);//$$('a'));
+
+ myeffect.start({
+ '0': {
+ 'left': [pos.x,new_pos]
+ }
+ });
+
+ });
+
+}
+
+
+function go_right(){
+ translate_impact(true);
+}
+
+function go_left(){
+ translate_impact(false);
+}
+
/* And we will initialise the slide of our problems too*/
window.addEvent('domready', function(){
var nb_elements = $$('.sliding').length;
@@ -62,3 +95,20 @@ window.addEvent('domready', function(){
}
});
+
+
+/* And we will initialise the slide of our problems too*/
+window.addEvent('domready', function(){
+ var nb_elements = $$('.sliding-impacts').length;
+ // If there is not enough elements, don't even slide
+ // So we print in each page 6 elements. No need to slide if lower
+ if(nb_elements > 6){
+ var nb_slides = nb_elements / 6;
+ var slide_interval = 60/nb_slides;
+ //alert('interval'+slide_interval);
+
+ slide_interval = Math.max(slide_interval, 10000);
+ setInterval( go_right, slide_interval);//10000);
+ }
+
+});
diff --git a/shinken/webui/plugins/wall/views/wall.tpl b/shinken/webui/plugins/wall/views/wall.tpl
index b96780e..2aba3f6 100644
--- a/shinken/webui/plugins/wall/views/wall.tpl
+++ b/shinken/webui/plugins/wall/views/wall.tpl
@@ -1,20 +1,38 @@
%helper = app.helper
-%rebase layout css=['wall/css/snowstack.css', 'wall/css/wall.css'], title='Wall view', js=['wall/js/snowstack.js', 'wall/js/wall.js'], refresh=True, user=user, print_menu=False, print_header=True
+%rebase layout css=['wall/css/snowstack.css', 'wall/css/wall.css'], title='Wall view', js=[ 'wall/js/wall.js'], refresh=True, user=user, print_menu=False, print_header=True
<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>
+%# <div class="origin view">
+%# <div id="camera" class="camera view"></div>
+%# </div>
+
+%ind = -1
+%for imp in impacts:
+ %ind += 1
+ %x,y = divmod(ind, 2)
+ <div class="media divstate{{imp.state_id}} sliding-impacts" style="left:{{x * 400}}px; position: absolute; top:{{ y * 150}}px; i:{{ind}} {{x}} {{y}}">
+ <span class="wall-pulse pulse" title=""></span>'
+ <div class="item-icon">
+ <img class="wall-icon" src="{{app.helper.get_icon_state(imp)}}"></img>
+ </div>
+ <div class="item-text">
+ <span class="state_{{imp.state.lower()}}">{{imp.state}} <br/> {{imp.get_full_name()}}</span>
+ </div>
+ <div class="item-button">
+ <a href="{{app.helper.get_link_dest(imp)}}">{{!app.helper.get_button('', img='/static/images/search.png')}}</a>
+ </div>
+ </div>
+%end
</div>
<script type="text/javascript">
-var images = {{!impacts}};
+var images = [];//{{!impacts}};
</script>
diff --git a/shinken/webui/plugins/wall/wall.py b/shinken/webui/plugins/wall/wall.py
index 1f39786..4a0a94b 100644
--- a/shinken/webui/plugins/wall/wall.py
+++ b/shinken/webui/plugins/wall/wall.py
@@ -75,13 +75,13 @@ def get_page():
#all_imp_impacts = app.datamgr.get_services()#important_elements()
- impacts = []
- for imp in all_imp_impacts:
- safe_print("FIND A BAD SERVICE IN IMPACTS", imp.get_dbg_name())
- d = {'name' : imp.get_full_name().encode('utf8', 'ignore'),
- "title": "My Image 3", "thumb": "/static/images/state_flapping.png", "zoom": "/static/images/state_flapping.png",
- "html" : get_div(imp)}
- impacts.append(d)
+ impacts = all_imp_impacts
+# for imp in all_imp_impacts:
+# safe_print("FIND A BAD SERVICE IN IMPACTS", imp.get_dbg_name())
+# d = {'name' : imp.get_full_name().encode('utf8', 'ignore'),
+# "title": "My Image 3", "thumb": "/static/images/state_flapping.png", "zoom": "/static/images/state_flapping.png",
+# "html" : get_div(imp)}
+# impacts.append(d)
# Got in json format
#j_impacts = json.dumps(impacts)
--
UNNAMED PROJECT
More information about the Pkg-nagios-changes
mailing list