Module: check_mk
Branch: master
Commit: f96da821a83c2b945ded76fb8d977bd6c99f329c
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=f96da821a83c2b…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Mon Apr 16 15:52:24 2012 +0200
Sidebar: added new buttons for site status/master control
---
web/htdocs/images/button_sitestatus_dead_hi.png | Bin 0 -> 1179 bytes
web/htdocs/images/button_sitestatus_dead_lo.png | Bin 0 -> 1110 bytes
.../images/button_sitestatus_disabled_hi.png | Bin 0 -> 1009 bytes
.../images/button_sitestatus_disabled_lo.png | Bin 0 -> 1024 bytes
web/htdocs/images/button_sitestatus_down_hi.png | Bin 0 -> 1112 bytes
web/htdocs/images/button_sitestatus_down_lo.png | Bin 0 -> 1032 bytes
web/htdocs/images/button_sitestatus_online_hi.png | Bin 0 -> 1155 bytes
web/htdocs/images/button_sitestatus_online_lo.png | Bin 0 -> 1179 bytes
web/htdocs/images/button_sitestatus_unknown_hi.png | Bin 0 -> 1301 bytes
web/htdocs/images/button_sitestatus_unknown_lo.png | Bin 0 -> 1301 bytes
web/htdocs/images/button_sitestatus_unreach_hi.png | Bin 0 -> 1253 bytes
web/htdocs/images/button_sitestatus_unreach_lo.png | Bin 0 -> 1243 bytes
web/htdocs/images/button_sitestatus_waiting_hi.png | Bin 0 -> 1325 bytes
web/htdocs/images/button_sitestatus_waiting_lo.png | Bin 0 -> 1301 bytes
web/htdocs/images/button_snapin_switch_off_hi.png | Bin 0 -> 1086 bytes
web/htdocs/images/button_snapin_switch_off_lo.png | Bin 0 -> 1026 bytes
web/htdocs/images/button_snapin_switch_on_hi.png | Bin 0 -> 1162 bytes
web/htdocs/images/button_snapin_switch_on_lo.png | Bin 0 -> 1157 bytes
web/htdocs/images/sidebar_bottom.png | Bin 643 -> 462 bytes
web/htdocs/images/sidebar_top.png | Bin 7761 -> 6961 bytes
web/htdocs/images/snapin_background.png | Bin 300 -> 196 bytes
web/htdocs/images/snapin_closed.png | Bin 1134 -> 845 bytes
web/htdocs/images/snapin_footer.png | Bin 633 -> 475 bytes
web/htdocs/images/snapin_header.png | Bin 669 -> 509 bytes
web/htdocs/sidebar.css | 2 +-
web/plugins/sidebar/shipped.py | 56 ++++++-------------
26 files changed, 19 insertions(+), 39 deletions(-)
diff --git a/web/htdocs/images/button_sitestatus_dead_hi.png
b/web/htdocs/images/button_sitestatus_dead_hi.png
new file mode 100644
index 0000000..06e240c
Binary files /dev/null and b/web/htdocs/images/button_sitestatus_dead_hi.png differ
diff --git a/web/htdocs/images/button_sitestatus_dead_lo.png
b/web/htdocs/images/button_sitestatus_dead_lo.png
new file mode 100644
index 0000000..ca1e945
Binary files /dev/null and b/web/htdocs/images/button_sitestatus_dead_lo.png differ
diff --git a/web/htdocs/images/button_sitestatus_disabled_hi.png
b/web/htdocs/images/button_sitestatus_disabled_hi.png
new file mode 100644
index 0000000..a516dfe
Binary files /dev/null and b/web/htdocs/images/button_sitestatus_disabled_hi.png differ
diff --git a/web/htdocs/images/button_sitestatus_disabled_lo.png
b/web/htdocs/images/button_sitestatus_disabled_lo.png
new file mode 100644
index 0000000..cedbfc9
Binary files /dev/null and b/web/htdocs/images/button_sitestatus_disabled_lo.png differ
diff --git a/web/htdocs/images/button_sitestatus_down_hi.png
b/web/htdocs/images/button_sitestatus_down_hi.png
new file mode 100644
index 0000000..32537e3
Binary files /dev/null and b/web/htdocs/images/button_sitestatus_down_hi.png differ
diff --git a/web/htdocs/images/button_sitestatus_down_lo.png
b/web/htdocs/images/button_sitestatus_down_lo.png
new file mode 100644
index 0000000..c7b838e
Binary files /dev/null and b/web/htdocs/images/button_sitestatus_down_lo.png differ
diff --git a/web/htdocs/images/button_sitestatus_online_hi.png
b/web/htdocs/images/button_sitestatus_online_hi.png
new file mode 100644
index 0000000..8c6a3cb
Binary files /dev/null and b/web/htdocs/images/button_sitestatus_online_hi.png differ
diff --git a/web/htdocs/images/button_sitestatus_online_lo.png
b/web/htdocs/images/button_sitestatus_online_lo.png
new file mode 100644
index 0000000..7163693
Binary files /dev/null and b/web/htdocs/images/button_sitestatus_online_lo.png differ
diff --git a/web/htdocs/images/button_sitestatus_unknown_hi.png
b/web/htdocs/images/button_sitestatus_unknown_hi.png
new file mode 100644
index 0000000..afb78ce
Binary files /dev/null and b/web/htdocs/images/button_sitestatus_unknown_hi.png differ
diff --git a/web/htdocs/images/button_sitestatus_unknown_lo.png
b/web/htdocs/images/button_sitestatus_unknown_lo.png
new file mode 100644
index 0000000..fde96b1
Binary files /dev/null and b/web/htdocs/images/button_sitestatus_unknown_lo.png differ
diff --git a/web/htdocs/images/button_sitestatus_unreach_hi.png
b/web/htdocs/images/button_sitestatus_unreach_hi.png
new file mode 100644
index 0000000..b7c7a73
Binary files /dev/null and b/web/htdocs/images/button_sitestatus_unreach_hi.png differ
diff --git a/web/htdocs/images/button_sitestatus_unreach_lo.png
b/web/htdocs/images/button_sitestatus_unreach_lo.png
new file mode 100644
index 0000000..d5e795d
Binary files /dev/null and b/web/htdocs/images/button_sitestatus_unreach_lo.png differ
diff --git a/web/htdocs/images/button_sitestatus_waiting_hi.png
b/web/htdocs/images/button_sitestatus_waiting_hi.png
new file mode 100644
index 0000000..deb4d3c
Binary files /dev/null and b/web/htdocs/images/button_sitestatus_waiting_hi.png differ
diff --git a/web/htdocs/images/button_sitestatus_waiting_lo.png
b/web/htdocs/images/button_sitestatus_waiting_lo.png
new file mode 100644
index 0000000..034e3aa
Binary files /dev/null and b/web/htdocs/images/button_sitestatus_waiting_lo.png differ
diff --git a/web/htdocs/images/button_snapin_switch_off_hi.png
b/web/htdocs/images/button_snapin_switch_off_hi.png
new file mode 100644
index 0000000..a6cdaf2
Binary files /dev/null and b/web/htdocs/images/button_snapin_switch_off_hi.png differ
diff --git a/web/htdocs/images/button_snapin_switch_off_lo.png
b/web/htdocs/images/button_snapin_switch_off_lo.png
new file mode 100644
index 0000000..db5a76b
Binary files /dev/null and b/web/htdocs/images/button_snapin_switch_off_lo.png differ
diff --git a/web/htdocs/images/button_snapin_switch_on_hi.png
b/web/htdocs/images/button_snapin_switch_on_hi.png
new file mode 100644
index 0000000..974583d
Binary files /dev/null and b/web/htdocs/images/button_snapin_switch_on_hi.png differ
diff --git a/web/htdocs/images/button_snapin_switch_on_lo.png
b/web/htdocs/images/button_snapin_switch_on_lo.png
new file mode 100644
index 0000000..d7b8049
Binary files /dev/null and b/web/htdocs/images/button_snapin_switch_on_lo.png differ
diff --git a/web/htdocs/images/sidebar_bottom.png b/web/htdocs/images/sidebar_bottom.png
index b945e5a..30284e7 100644
Binary files a/web/htdocs/images/sidebar_bottom.png and
b/web/htdocs/images/sidebar_bottom.png differ
diff --git a/web/htdocs/images/sidebar_top.png b/web/htdocs/images/sidebar_top.png
index 6e20f09..2057a38 100644
Binary files a/web/htdocs/images/sidebar_top.png and b/web/htdocs/images/sidebar_top.png
differ
diff --git a/web/htdocs/images/snapin_background.png
b/web/htdocs/images/snapin_background.png
index 1bd35a0..c967a98 100644
Binary files a/web/htdocs/images/snapin_background.png and
b/web/htdocs/images/snapin_background.png differ
diff --git a/web/htdocs/images/snapin_closed.png b/web/htdocs/images/snapin_closed.png
index 9607c94..c8c489b 100644
Binary files a/web/htdocs/images/snapin_closed.png and
b/web/htdocs/images/snapin_closed.png differ
diff --git a/web/htdocs/images/snapin_footer.png b/web/htdocs/images/snapin_footer.png
index f4938ec..c1b8dbc 100644
Binary files a/web/htdocs/images/snapin_footer.png and
b/web/htdocs/images/snapin_footer.png differ
diff --git a/web/htdocs/images/snapin_header.png b/web/htdocs/images/snapin_header.png
index df703d4..b83aaec 100644
Binary files a/web/htdocs/images/snapin_header.png and
b/web/htdocs/images/snapin_header.png differ
diff --git a/web/htdocs/sidebar.css b/web/htdocs/sidebar.css
index b503957..ba42335 100644
--- a/web/htdocs/sidebar.css
+++ b/web/htdocs/sidebar.css
@@ -204,7 +204,7 @@ div.snapin div.head.open {
div.snapin div.head.closed {
background-image: url("images/snapin_closed.png");
- height: 22px;
+ height: 23px;
}
/* close button on header */
diff --git a/web/plugins/sidebar/shipped.py b/web/plugins/sidebar/shipped.py
index 46ea3c1..91ab9ac 100644
--- a/web/plugins/sidebar/shipped.py
+++ b/web/plugins/sidebar/shipped.py
@@ -421,8 +421,8 @@ def render_sitestatus():
html.write("<tr><td class=left>%s</td>" % text)
onclick = "switch_site('_site_switch=%s:%s')" % (sitename,
switch)
html.write("<td class=state>")
- html.write('<a title="%s" href="#"
onclick="%s" class="sitestatus %s">%s</a></td>' %
- (title, onclick, state, state))
+ html.icon_button("#", _("%s this site") % (state ==
"disabled" and "enable" or "disable"),
+ "sitestatus_%s" % state, onclick=onclick)
html.write("</tr>\n")
html.write("</table>\n")
@@ -448,14 +448,11 @@ table.sitestate td.left {
text-align: left;
}
-table.sitestate a {
- font-weight: bold;
- -moz-border-radius: 4px;
- margin: 0px;
- padding: 0px 0px;
- text-align: center;
- display: block;
+div.snapin table.sitestate td img.iconbutton {
+ width: 60px;
+ height: 16px;
}
+
table.sitestate td.left a {
text-align: left;
font-weight: normal;
@@ -466,10 +463,6 @@ table.sitestate td.state {
font-size: 7pt;
}
-table.sitestate td.state a {
- border-width: 1px;
- border-style: solid;
-}
""" % snapin_width
}
@@ -574,11 +567,11 @@ table.tacticaloverview th span {
table.tacticaloverview td {
width: 33.3%%;
text-align: right;
- border: 1px solid #123a4a;
+ /* border: 1px solid #123a4a; */
background-color: #6da1b8;
padding: 0px;
height: 14px;
- box-shadow: 0px 0px 1px #386068;
+ /* box-shadow: 1px 0px 1px #386068; */
}
table.tacticaloverview a { display: block; margin-right: 2px; }
""" % snapin_width
@@ -962,8 +955,11 @@ def render_master_control():
colvalue = siteline[i + 1]
url = defaults.url_prefix +
("check_mk/switch_master_state.py?site=%s&switch=%s&state=%d" % (siteid,
colname, 1 - colvalue))
onclick = "get_url('%s', updateContents,
'snapin_master_control')" % url
- enabled = colvalue and "enabled" or "disabled"
- html.write("<tr><td class=left>%s</td><td
class=%s><a onclick=\"%s\"
href=\"#\">%s</a></td></tr>\n" % (title, enabled,
onclick, enabled))
+ html.write("<tr><td class=left>%s</td><td>"
% title)
+ html.icon_button("#", _("Switch %s %s") % (title,
colvalue and "off" or "on"),
+ "snapin_switch_" + (colvalue and "on" or
"off"), onclick=onclick)
+ html.write("</td></tr>")
+ # html.write("<a onclick=\"%s\"
href=\"#\">%s</a></td></tr>\n" % (title, enabled,
onclick, enabled))
html.write("</table>")
if siteid:
html.end_foldable_container()
@@ -986,17 +982,6 @@ div.snapin table.master_control td {
text-align: right;
}
-div.snapin table.master_control td a {
- font-weight: bold;
- -moz-border-radius: 4px;
- margin: 0px;
- padding: 0px 3px;
- text-align: center;
- font-size: 7pt;
- margin-right: 0px;
- display: block;
- border: 1px solid black;
-}
div.snapin table.master_control td.left a {
text-align: left;
font-size: 8pt;
@@ -1007,17 +992,12 @@ div.snapin table.master_control td.left {
text-align: left;
}
-div.snapin table.master_control td.enabled a {
- background-color: #4f6;
- color: #000;
- border-color: #080;
-}
-div.snapin table.master_control td.disabled a {
- background-color: #f33;
- border-color: #c00;
- color: #fff;
+div.snapin table.master_control td img.iconbutton {
+ width: 60px;
+ height: 16px;
}
-""" % (snapin_width - 20)
+
+""" % (snapin_width - 15)
}
def ajax_switch_masterstate():