lists.checkmk.com
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
List overview
Download
Checkmk git commits
February 2012
----- 2024 -----
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
checkmk-commits@lists.checkmk.com
3 participants
223 discussions
Start a n
N
ew thread
Check_MK Git: check_mk: Layout sidebar version number
by lm@mathias-kettner.de
Module: check_mk Branch: master Commit: b0a42d0cde314b626a0085c46bfa292bc5b69eb4 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b0a42d0cde314b…
Author: Mathias Kettner <mk(a)mathias-kettner.de> Date: Mon Feb 6 17:47:32 2012 +0100 Layout sidebar version number --- web/htdocs/sidebar.css | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/web/htdocs/sidebar.css b/web/htdocs/sidebar.css index dccea0d..f3d52e7 100644 --- a/web/htdocs/sidebar.css +++ b/web/htdocs/sidebar.css @@ -69,11 +69,12 @@ body.side { #side_version { position: absolute; top: 24px; - left: 54px; + left: 64px; z-index: 54; color: #fff; text-align: right; width: 200px; + font-size: 8pt; } /* Scrolling part with snapins */
12 years, 4 months
1
0
0
0
Check_MK Git: check_mk: Add minimize button in sidebar
by lm@mathias-kettner.de
Module: check_mk Branch: master Commit: 2d85849563950c87cdce06d85143811a75b123b0 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=2d85849563950c…
Author: Mathias Kettner <mk(a)mathias-kettner.de> Date: Tue Feb 14 16:30:24 2012 +0100 Add minimize button in sidebar --- web/htdocs/images/button_closesnapin_hi.png | Bin 418 -> 229 bytes web/htdocs/images/button_closesnapin_lo.png | Bin 372 -> 229 bytes web/htdocs/images/button_maxisnapin_hi.png | Bin 0 -> 132 bytes web/htdocs/images/button_maxisnapin_lo.png | Bin 0 -> 132 bytes web/htdocs/images/button_minisnapin_hi.png | Bin 0 -> 127 bytes web/htdocs/images/button_minisnapin_lo.png | Bin 0 -> 127 bytes web/htdocs/images/tree_00.png | Bin 6108 -> 265 bytes web/htdocs/images/tree_90.png | Bin 8849 -> 256 bytes web/htdocs/js/sidebar.js | 13 ++++++++- web/htdocs/sidebar.css | 27 ++++++++++++++---- web/htdocs/sidebar.py | 40 ++++++++++++++++++--------- 11 files changed, 60 insertions(+), 20 deletions(-) diff --git a/web/htdocs/images/button_closesnapin_hi.png b/web/htdocs/images/button_closesnapin_hi.png index 0ed3419..93260e6 100644 Binary files a/web/htdocs/images/button_closesnapin_hi.png and b/web/htdocs/images/button_closesnapin_hi.png differ diff --git a/web/htdocs/images/button_closesnapin_lo.png b/web/htdocs/images/button_closesnapin_lo.png index 198c8f2..93260e6 100644 Binary files a/web/htdocs/images/button_closesnapin_lo.png and b/web/htdocs/images/button_closesnapin_lo.png differ diff --git a/web/htdocs/images/button_maxisnapin_hi.png b/web/htdocs/images/button_maxisnapin_hi.png new file mode 100644 index 0000000..6c8bd23 Binary files /dev/null and b/web/htdocs/images/button_maxisnapin_hi.png differ diff --git a/web/htdocs/images/button_maxisnapin_lo.png b/web/htdocs/images/button_maxisnapin_lo.png new file mode 100644 index 0000000..6c8bd23 Binary files /dev/null and b/web/htdocs/images/button_maxisnapin_lo.png differ diff --git a/web/htdocs/images/button_minisnapin_hi.png b/web/htdocs/images/button_minisnapin_hi.png new file mode 100644 index 0000000..71ee36f Binary files /dev/null and b/web/htdocs/images/button_minisnapin_hi.png differ diff --git a/web/htdocs/images/button_minisnapin_lo.png b/web/htdocs/images/button_minisnapin_lo.png new file mode 100644 index 0000000..71ee36f Binary files /dev/null and b/web/htdocs/images/button_minisnapin_lo.png differ diff --git a/web/htdocs/images/tree_00.png b/web/htdocs/images/tree_00.png index c413834..536b367 100644 Binary files a/web/htdocs/images/tree_00.png and b/web/htdocs/images/tree_00.png differ diff --git a/web/htdocs/images/tree_90.png b/web/htdocs/images/tree_90.png index 27b557c..908eb1a 100644 Binary files a/web/htdocs/images/tree_90.png and b/web/htdocs/images/tree_90.png differ diff --git a/web/htdocs/js/sidebar.js b/web/htdocs/js/sidebar.js index f5a3065..927b9e3 100644 --- a/web/htdocs/js/sidebar.js +++ b/web/htdocs/js/sidebar.js @@ -566,7 +566,14 @@ function removeSnapin(id, code) { function toggle_sidebar_snapin(oH2, url) { - var childs = oH2.parentNode.parentNode.childNodes; + // oH2 can also be an <a>. In that case it is the minimize + // image itself + + var childs; + if (oH2.tagName == "A") + childs = oH2.parentNode.parentNode.parentNode.childNodes; + else + childs = oH2.parentNode.parentNode.childNodes; for (var i in childs) { child = childs[i]; if (child.tagName == 'DIV' && child.className == 'content') @@ -576,17 +583,21 @@ function toggle_sidebar_snapin(oH2, url) { else if (child.tagName == 'DIV' && child.className == 'foot') var oFoot = child; } + var oImgMini = oHead.childNodes[0].childNodes[0].childNodes[0]; + // FIXME: Does oContent really exist? var closed = oContent.style.display == "none"; if (closed) { oContent.style.display = "block"; oFoot.style.display = "block"; oHead.className = "head open"; + oImgMini.src = "images/button_minisnapin_lo.png"; } else { oContent.style.display = "none"; oFoot.style.display = "none"; oHead.className = "head closed"; + oImgMini.src = "images/button_maxisnapin_lo.png"; } /* make this persistent -> save */ get_url(url + (closed ? "open" : "closed")); diff --git a/web/htdocs/sidebar.css b/web/htdocs/sidebar.css index f3d52e7..362a23a 100644 --- a/web/htdocs/sidebar.css +++ b/web/htdocs/sidebar.css @@ -189,7 +189,7 @@ div.snapin div.head { width: 260px; text-align: center; color: #fff; - padding-top: 9px; + padding-top: 8px; } div.snapin div.head b { @@ -213,12 +213,27 @@ div.snapin div.closesnapin { margin-right: 10px; margin-top: 2px; } -/* Reload-Button */ -div.snapin div.reloadsnapin { - float: right; - margin-right: 4px; - margin-top: 2px; + +div.snapin div.closesnapin img { + width: 8px; + height: 8px; + position: relative; + top: 1px; } +div.snapin div.minisnapin { + position: relative; + top: 2px; + left: 13px; + width: 0px; + height: 0px; +} +div.snapin div.minisnapin img { + width: 8px; + height: 8px; + position: relative; + top: 1px; +} + div.snapin div.content { background-image: url("images/snapin_background.png"); diff --git a/web/htdocs/sidebar.py b/web/htdocs/sidebar.py index c57c3b6..6340f4e 100644 --- a/web/htdocs/sidebar.py +++ b/web/htdocs/sidebar.py @@ -190,32 +190,46 @@ def render_snapin(name, state): if state == "closed": style = ' style="display:none"' headclass = "closed" + minimaxi = "maxi" else: style = "" headclass = "open" - url = "sidebar_openclose.py?name=%s&state=" % name + minimaxi = "mini" + toggle_url = "sidebar_openclose.py?name=%s&state=" % name html.write('<div class="head %s" ' % headclass) + + # If the user may modify the sidebar then add code for dragging the snapin if config.may("configure_sidebar"): - html.write("onmouseover=\"document.body.style.cursor='move';\" onmouseout=\"document.body.style.cursor='';\"" - " onmousedown=\"snapinStartDrag(event)\" onmouseup=\"snapinStopDrag(event)\">") + html.write("onmouseover=\"document.body.style.cursor='move';\" " + "onmouseout=\"document.body.style.cursor='';\" " + "onmousedown=\"snapinStartDrag(event)\" onmouseup=\"snapinStopDrag(event)\">") else: html.write(">") - if config.may("configure_sidebar"): + + # Icon for mini/maximizing, does not need permission + html.write('<div class="minisnapin">') + iconbutton(minimaxi + "snapin", None, + "side", "toggle_sidebar_snapin(this, '%s')" % toggle_url, 'snapin_'+name) + html.write('</div>') + + if config.may("configure_sidebar"): + # Button for closing (removing) a snapin html.write('<div class="closesnapin">') - iconbutton("closesnapin", "sidebar_openclose.py?name=%s&state=off" % name, "side", "removeSnapin", 'snapin_'+name) + iconbutton("closesnapin", "sidebar_openclose.py?name=%s&state=off" % name, + "side", "removeSnapin", 'snapin_'+name) html.write('</div>') - # # Show reload button, but only for reloadable Snapins - # if snapin.get("reload") or snapin.get("restart"): - # html.write('<div class="reloadsnapin">') - # iconbutton("reloadsnapin", url="sidebar_snapin.py?name=" + name, handler="updateContents", - # name = "snapin_" + name); - # html.write('</div>') - html.write("<b class=heading onclick=\"toggle_sidebar_snapin(this,'%s')\" onmouseover=\"this.style.cursor='pointer'\" " - "onmouseout=\"this.style.cursor='auto'\">%s</b>" % (url, snapin["title"])) + + # The heading. A click on the heading mini/maximizes the snapin + html.write("<b class=heading onclick=\"toggle_sidebar_snapin(this,'%s')\" " + "onmouseover=\"this.style.cursor='pointer'\" " + "onmouseout=\"this.style.cursor='auto'\">%s</b>" % (toggle_url, snapin["title"])) + + # End of header html.write("</div>") + # Now comes the content html.write("<div id=\"snapin_%s\" class=content%s>\n" % (name, style)) refresh_url = '' try:
12 years, 4 months
1
0
0
0
Check_MK Git: check_mk: New layout for background
by lm@mathias-kettner.de
Module: check_mk Branch: master Commit: 35d985bd4aaef7d3cb0bf899ea1c26cdd40ae4c3 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=35d985bd4aaef7…
Author: Mathias Kettner <mk(a)mathias-kettner.de> Date: Tue Feb 14 14:19:03 2012 +0100 New layout for background --- web/htdocs/images/button_closesnapin_lo.png | Bin 279 -> 372 bytes web/htdocs/images/contentframe_background.jpg | Bin 2091 -> 75953 bytes web/htdocs/images/dashadow-e.png | Bin 127 -> 127 bytes web/htdocs/images/dashadow-n.png | Bin 133 -> 133 bytes web/htdocs/images/dashadow-ne.png | Bin 313 -> 311 bytes web/htdocs/images/dashadow-nw.png | Bin 289 -> 288 bytes web/htdocs/images/dashadow-s.png | Bin 131 -> 132 bytes web/htdocs/images/dashadow-se.png | Bin 305 -> 299 bytes web/htdocs/images/dashadow-sw.png | Bin 273 -> 271 bytes web/htdocs/images/dashadow-w.png | Bin 126 -> 127 bytes web/htdocs/images/sidebar_background.jpg | Bin 2091 -> 15599 bytes web/htdocs/images/sidebar_bottom.png | Bin 483 -> 494 bytes web/htdocs/images/sidebar_top.png | Bin 5897 -> 7009 bytes web/htdocs/images/snapin_background.png | Bin 189 -> 195 bytes web/htdocs/images/snapin_closed.png | Bin 848 -> 844 bytes web/htdocs/images/snapin_footer.png | Bin 458 -> 459 bytes web/htdocs/images/snapin_header.png | Bin 506 -> 571 bytes 17 files changed, 0 insertions(+), 0 deletions(-) diff --git a/web/htdocs/images/button_closesnapin_lo.png b/web/htdocs/images/button_closesnapin_lo.png index 7b603a0..198c8f2 100644 Binary files a/web/htdocs/images/button_closesnapin_lo.png and b/web/htdocs/images/button_closesnapin_lo.png differ diff --git a/web/htdocs/images/contentframe_background.jpg b/web/htdocs/images/contentframe_background.jpg index bb5dfaf..9ec68b6 100644 Binary files a/web/htdocs/images/contentframe_background.jpg and b/web/htdocs/images/contentframe_background.jpg differ diff --git a/web/htdocs/images/dashadow-e.png b/web/htdocs/images/dashadow-e.png index 6df5f38..394cdc5 100644 Binary files a/web/htdocs/images/dashadow-e.png and b/web/htdocs/images/dashadow-e.png differ diff --git a/web/htdocs/images/dashadow-n.png b/web/htdocs/images/dashadow-n.png index 1494510..89309b8 100644 Binary files a/web/htdocs/images/dashadow-n.png and b/web/htdocs/images/dashadow-n.png differ diff --git a/web/htdocs/images/dashadow-ne.png b/web/htdocs/images/dashadow-ne.png index 6d2ad53..f4498a6 100644 Binary files a/web/htdocs/images/dashadow-ne.png and b/web/htdocs/images/dashadow-ne.png differ diff --git a/web/htdocs/images/dashadow-nw.png b/web/htdocs/images/dashadow-nw.png index 0718e0d..eaac3de 100644 Binary files a/web/htdocs/images/dashadow-nw.png and b/web/htdocs/images/dashadow-nw.png differ diff --git a/web/htdocs/images/dashadow-s.png b/web/htdocs/images/dashadow-s.png index 478d6fd..02e3da4 100644 Binary files a/web/htdocs/images/dashadow-s.png and b/web/htdocs/images/dashadow-s.png differ diff --git a/web/htdocs/images/dashadow-se.png b/web/htdocs/images/dashadow-se.png index bebc170..1e213f7 100644 Binary files a/web/htdocs/images/dashadow-se.png and b/web/htdocs/images/dashadow-se.png differ diff --git a/web/htdocs/images/dashadow-sw.png b/web/htdocs/images/dashadow-sw.png index 30413ae..383754f 100644 Binary files a/web/htdocs/images/dashadow-sw.png and b/web/htdocs/images/dashadow-sw.png differ diff --git a/web/htdocs/images/dashadow-w.png b/web/htdocs/images/dashadow-w.png index d8ec96d..1a9452d 100644 Binary files a/web/htdocs/images/dashadow-w.png and b/web/htdocs/images/dashadow-w.png differ diff --git a/web/htdocs/images/sidebar_background.jpg b/web/htdocs/images/sidebar_background.jpg index bb5dfaf..a0c289a 100644 Binary files a/web/htdocs/images/sidebar_background.jpg and b/web/htdocs/images/sidebar_background.jpg differ diff --git a/web/htdocs/images/sidebar_bottom.png b/web/htdocs/images/sidebar_bottom.png index e89c552..72cecb5 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 b46413c..09f9d28 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 9a54815..f5386e8 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 030a6fc..86a669e 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 4790034..3ee190a 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 f3ef2ab..df5dced 100644 Binary files a/web/htdocs/images/snapin_header.png and b/web/htdocs/images/snapin_header.png differ
12 years, 4 months
1
0
0
0
Check_MK Git: check_mk: Resize treeangle for folding
by lm@mathias-kettner.de
Module: check_mk Branch: master Commit: ea93e4a014f02a55fe14bc029a43922f29cbb644 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=ea93e4a014f02a…
Author: Mathias Kettner <mk(a)mathias-kettner.de> Date: Tue Feb 14 16:57:00 2012 +0100 Resize treeangle for folding --- web/htdocs/check_mk.css | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/web/htdocs/check_mk.css b/web/htdocs/check_mk.css index 52f5bef..a4a04a7 100644 --- a/web/htdocs/check_mk.css +++ b/web/htdocs/check_mk.css @@ -145,8 +145,8 @@ div.livestatus.message { '-------------------------------------------------------------------------*/ img.treeangle { - width: 14px; - height: 14px; + width: 9px; + height: 9px; margin-right: 3px; margin-top: 2px; }
12 years, 4 months
1
0
0
0
Check_MK Git: check_mk: Fix sizing of dashlet contents
by lm@mathias-kettner.de
Module: check_mk Branch: master Commit: 76dc11884e817206ae587024b812a1364e516ac2 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=76dc11884e8172…
Author: Mathias Kettner <mk(a)mathias-kettner.de> Date: Mon Feb 6 15:06:02 2012 +0100 Fix sizing of dashlet contents --- web/htdocs/dashboard.css | 2 ++ web/htdocs/js/dashboard.js | 4 ++-- web/htdocs/sidebar.py | 12 ++++++------ 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/web/htdocs/dashboard.css b/web/htdocs/dashboard.css index 7af9b30..e90e8b2 100644 --- a/web/htdocs/dashboard.css +++ b/web/htdocs/dashboard.css @@ -45,6 +45,8 @@ div.dashlet div.dashlet_inner { position: absolute; padding: 0px; margin: 0px; + top: 21px; + left: 11px; } /* Dashlets with "background" set to True */ diff --git a/web/htdocs/js/dashboard.js b/web/htdocs/js/dashboard.js index 927fb44..64a1a89 100644 --- a/web/htdocs/js/dashboard.js +++ b/web/htdocs/js/dashboard.js @@ -93,9 +93,9 @@ function resize_dashlets(id, code) oDash.style.position = 'absolute'; oDash.style.left = dashlet_padding[3] + "px"; oDash.style.top = dashlet_padding[0] + "px"; - if((d_width - 2*dashlet_padding) > 0) + if (netto_width > 0) oDash.style.width = netto_width + "px"; - if((d_height - 2*dashlet_padding) > 0) + if (netto_height > 0) oDash.style.height = netto_height + "px"; } } diff --git a/web/htdocs/sidebar.py b/web/htdocs/sidebar.py index 10f4359..c57c3b6 100644 --- a/web/htdocs/sidebar.py +++ b/web/htdocs/sidebar.py @@ -206,12 +206,12 @@ def render_snapin(name, state): html.write('<div class="closesnapin">') iconbutton("closesnapin", "sidebar_openclose.py?name=%s&state=off" % name, "side", "removeSnapin", 'snapin_'+name) html.write('</div>') - # Show reload button, but only for reloadable Snapins - if snapin.get("reload") or snapin.get("restart"): - html.write('<div class="reloadsnapin">') - iconbutton("reloadsnapin", url="sidebar_snapin.py?name=" + name, handler="updateContents", - name = "snapin_" + name); - html.write('</div>') + # # Show reload button, but only for reloadable Snapins + # if snapin.get("reload") or snapin.get("restart"): + # html.write('<div class="reloadsnapin">') + # iconbutton("reloadsnapin", url="sidebar_snapin.py?name=" + name, handler="updateContents", + # name = "snapin_" + name); + # html.write('</div>') html.write("<b class=heading onclick=\"toggle_sidebar_snapin(this,'%s')\" onmouseover=\"this.style.cursor='pointer'\" " "onmouseout=\"this.style.cursor='auto'\">%s</b>" % (url, snapin["title"])) html.write("</div>")
12 years, 4 months
1
0
0
0
Check_MK Git: check_mk: Merge branch 'master' of ssh://mathias-kettner.de/ check_mk into tobi
by lm@mathias-kettner.de
Module: check_mk Branch: master Commit: 9407a8239e32020060d6e987dc5556e1fbf73bac URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=9407a8239e3202…
Author: Mathias Kettner <mk(a)mathias-kettner.de> Date: Mon Feb 6 15:55:07 2012 +0100 Merge branch 'master' of ssh://mathias-kettner.de/check_mk into tobi ---
12 years, 4 months
1
0
0
0
Check_MK Git: check_mk: Relayouting dashboard - part 1
by lm@mathias-kettner.de
Module: check_mk Branch: master Commit: 5f3cfaf66cacf15844ed38a7bb1d5435d6229050 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=5f3cfaf66cacf1…
Author: Mathias Kettner <mk(a)mathias-kettner.de> Date: Mon Feb 6 14:59:27 2012 +0100 Relayouting dashboard - part 1 --- web/htdocs/dashboard.css | 71 ++++++++++++------------- web/htdocs/dashboard.py | 12 ++-- web/htdocs/images/contentframe_background.jpg | Bin 252025 -> 2091 bytes web/htdocs/images/dashadow-e.png | Bin 197 -> 127 bytes web/htdocs/images/dashadow-n.png | Bin 202 -> 133 bytes web/htdocs/images/dashadow-ne.png | Bin 371 -> 313 bytes web/htdocs/images/dashadow-nw.png | Bin 333 -> 289 bytes web/htdocs/images/dashadow-s.png | Bin 199 -> 131 bytes web/htdocs/images/dashadow-se.png | Bin 363 -> 305 bytes web/htdocs/images/dashadow-sw.png | Bin 363 -> 273 bytes web/htdocs/images/dashadow-w.png | Bin 200 -> 126 bytes web/htdocs/images/dashlet_linkarrow.png | Bin 0 -> 298 bytes web/htdocs/images/sidebar_background.jpg | Bin 49576 -> 2091 bytes web/htdocs/images/snapin_background.png | Bin 223 -> 189 bytes web/htdocs/images/snapin_closed.png | Bin 878 -> 848 bytes web/htdocs/images/snapin_footer.png | Bin 511 -> 458 bytes web/htdocs/images/snapin_header.png | Bin 629 -> 506 bytes web/htdocs/js/dashboard.js | 46 +++++++++------- web/htdocs/pages.css | 2 +- 19 files changed, 68 insertions(+), 63 deletions(-) Diff:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commitdiff;h=5f3cfaf66c…
12 years, 4 months
1
0
0
0
Check_MK Git: check_mk: Merge branch 'master' of ssh://mathias-kettner.de/ check_mk
by git@mathias-kettner.de
Module: check_mk Branch: master Commit: 77e976aa720f1ffe666545ba6572265275b06fb2 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=77e976aa720f1f…
Author: Mathias Kettner <mk(a)mathias-kettner.de> Date: Mon Feb 20 14:38:47 2012 +0100 Merge branch 'master' of ssh://mathias-kettner.de/check_mk ---
12 years, 4 months
1
0
0
0
Check_MK Git: check_mk: ps: output node a process is running on
by git@mathias-kettner.de
Module: check_mk Branch: master Commit: dd7a4cc90a5916331cc44ee182a8b36ac5fc0a66 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=dd7a4cc90a5916…
Author: Mathias Kettner <mk(a)mathias-kettner.de> Date: Mon Feb 20 14:38:39 2012 +0100 ps: output node a process is running on This is only done if the check is run on a cluster --- ChangeLog | 1 + checks/ps | 53 +++++++++++++++++++++++++++++++---------- modules/check_mk.py | 7 +++++ web/plugins/views/painters.py | 21 +++++++++++---- 4 files changed, 63 insertions(+), 19 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2f0d46a..0e7fdf6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -40,6 +40,7 @@ is needed on Cisco WLC 21xx series (thanks to Ralf Ertzinger) * FIX: fix inventory of f5_bigip_temp * mk_oracle (lnx+win): Fixed TEMP tablespace size calculations + * ps: output node process is running on (only for clusters) Multisite: * Added several missing localization stringsw diff --git a/checks/ps b/checks/ps index aa3c799..e2ce176 100644 --- a/checks/ps +++ b/checks/ps @@ -40,13 +40,14 @@ inventory_processes_perf = [] ANY_USER = None GRAB_USER = False +def inventory_ps(info): + return inventory_ps_common(inventory_processes, info) -def inventory_ps(check_name, info): +def inventory_ps_perf(info): + return inventory_ps_common(inventory_processes_perf, info) + +def inventory_ps_common(invdata, info): inventory = [] - if check_name == "ps": - invdata = inventory_processes - else: - invdata = inventory_processes_perf for inventry in invdata: # New in 1.1.7i1: inventory_processes may be prefixed with list of @@ -69,7 +70,9 @@ def inventory_ps(check_name, info): servicedesc, pattern, userspec, warnmin, okmin, okmax, warnmax = inventry num_perc_s = servicedesc.count("%s") - for ps in info: + for line in info: + # First entry in line is the node name or None for non-clusters + ps = line[1:] l_user = [userspec] matches = process_matches(ps, pattern, l_user) if matches != False: @@ -171,9 +174,14 @@ def check_procs(item, params, info, with_perfdata): percent_cpu = 0.0 extended_perfdata = False - for ps in info: + running_on = set([]) # collect information about nodes the processes run on + for line in info: + node_name = line[0] + ps = line[1:] if process_matches(ps, procname, [user]) != False: count += 1 + if node_name != None: + running_on.add(node_name) if ps[0][0] == '(': addinfo = ps[0][1:-1].split(",") if len(addinfo) >= 4: # extended performance data @@ -201,12 +209,31 @@ def check_procs(item, params, info, with_perfdata): else: perfdata = [] + infotext = " - %d processes" % count + if running_on: + infotext += " [running on %s]" % ", ".join(running_on) + if count > warnmax or count < warnmin: - return (2, "CRIT - %d processes (ok from %d to %d)" % (count, okmin, okmax), perfdata) + return (2, "CRIT" + infotext + " (ok from %d to %d)" % (okmin, okmax), perfdata) elif count > okmax or count < okmin: - return (1, "WARN - %d processes (ok from %d to %d)" % (count, okmin, okmax), perfdata) + return (1, "WARN" + infotext + " (ok from %d to %d)" % (okmin, okmax), perfdata) else: - return (0, "OK - %d processes" % count, perfdata) - -check_info['ps'] = (lambda i,p,n: check_procs(i,p,n,False), "proc_%s", 0, inventory_ps) -check_info['ps.perf'] = (lambda i,p,n: check_procs(i,p,n,True), "proc_%s", 1, inventory_ps) + return (0, "OK" + infotext, perfdata) + +check_info['ps'] = { + "check_function" : lambda i,p,n: check_procs(i,p,n,False), + "inventory_function" : inventory_ps, + "service_description" : "proc_%s", + "has_perfdata" : False, + "node_info" : True, # add first column with actual host name + "group" : "ps", +} + +check_info['ps.perf'] = { + "check_function" : lambda i,p,n: check_procs(i,p,n,True), + "inventory_function" : inventory_ps_perf, + "service_description" : "proc_%s", + "has_perfdata" : True, + "node_info" : True, # add first column with actual host name + "group" : "ps", +} diff --git a/modules/check_mk.py b/modules/check_mk.py index 73a27e9..9a7e5ed 100755 --- a/modules/check_mk.py +++ b/modules/check_mk.py @@ -2032,6 +2032,13 @@ def make_inventory(checkname, hostnamelist, check_only=False, include_state=Fals checkname_base = checkname.split('.')[0] # make e.g. 'lsi' from 'lsi.arrays' try: info = get_realhost_info(hostname, ipaddress, checkname_base, inventory_max_cachefile_age) + # Add information about nodes if check wants this + if check_info[checkname]["node_info"]: + if cluster_of(hostname): + add_host = hostname + else: + add_host = None + info = [ [add_host] + line for line in info ] except MKAgentError, e: # This special handling is needed for the inventory check. It needs special # handling for WATO. diff --git a/web/plugins/views/painters.py b/web/plugins/views/painters.py index 2aa0991..bc6e828 100644 --- a/web/plugins/views/painters.py +++ b/web/plugins/views/painters.py @@ -308,16 +308,25 @@ warn_marker = '<b class="stmark state1">WARN</b>' crit_marker = '<b class="stmark state2">CRIT</b>' unknown_marker = '<b class="stmark state3">UNKN</b>' -def format_plugin_output(output): - return output.replace("(!)", warn_marker) \ - .replace("(!!)", crit_marker) \ - .replace("(?)", unknown_marker) +def format_plugin_output(row, output): + output = output.replace("(!)", warn_marker) \ + .replace("(!!)", crit_marker) \ + .replace("(?)", unknown_marker) + if "[running on" in output: + a = output.index("[running on") + e = output.index("]", a) + hosts = output[a+12:e].replace(" ","").split(",") + css, h = paint_host_list(row["site"], hosts) + output = output[:a] + "running on " + h + output[e+1:] + + return output + multisite_painters["svc_plugin_output"] = { "title" : _("Output of check plugin"), "short" : _("Status detail"), "columns" : ["service_plugin_output"], - "paint" : lambda row: ("", format_plugin_output(row["service_plugin_output"])), + "paint" : lambda row: ("", format_plugin_output(row, row["service_plugin_output"])), "sorter" : 'svcoutput', } multisite_painters["svc_long_plugin_output"] = { @@ -1549,7 +1558,7 @@ multisite_painters["log_plugin_output"] = { "title" : _("Log: output of check plugin"), "short" : _("Check output"), "columns" : ["log_plugin_output"], - "paint" : lambda row: ("", format_plugin_output(row["log_plugin_output"])), + "paint" : lambda row: ("", format_plugin_output(row, row["log_plugin_output"])), } multisite_painters["log_attempt"] = {
12 years, 4 months
1
0
0
0
Check_MK Git: check_mk: Merge branch 'master' of ssh://git.mathias-kettner. de/var/www/80/git.mathias-kettner.de/check_mk
by lm@mathias-kettner.de
Module: check_mk Branch: master Commit: a48da53010d92d73d46cea7b828b0de0523ac388 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=a48da53010d92d…
Author: Lars Michelsen <lm(a)mathias-kettner.de> Date: Mon Feb 20 14:10:47 2012 +0100 Merge branch 'master' of ssh://git.mathias-kettner.de/var/www/80/git.mathias-kettner.de/check_mk ---
12 years, 4 months
1
0
0
0
← Newer
1
...
5
6
7
8
9
10
11
...
23
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Results per page:
10
25
50
100
200