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
September
August
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
May 2012
----- 2024 -----
September 2024
August 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
2 participants
440 discussions
Start a n
N
ew thread
Check_MK Git: check_mk: First step in redesign of view options
by git@mathias-kettner.de
Module: check_mk Branch: master Commit: b33de3e8ca3bcb47b27b220589955153729265c5 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b33de3e8ca3bcb…
Author: Mathias Kettner <mk(a)mathias-kettner.de> Date: Sat May 19 18:24:25 2012 +0200 First step in redesign of view options --- web/htdocs/htmllib.py | 11 +- web/htdocs/images/columnswitcher.png | Bin 0 -> 702 bytes web/htdocs/images/columnswitcher_down.png | Bin 0 -> 671 bytes web/htdocs/images/columnswitcher_hi.png | Bin 0 -> 720 bytes web/htdocs/js/checkmk.js | 26 ++++ web/htdocs/pages.css | 4 + web/htdocs/views.css | 25 ++++ web/htdocs/views.py | 186 ++++++++++++++++++----------- web/plugins/pages/shipped.py | 1 + 9 files changed, 178 insertions(+), 75 deletions(-) Diff:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commitdiff;h=b33de3e8ca…
12 years, 3 months
1
0
0
0
Check_MK Git: check_mk: Minor layout improvement in forms
by git@mathias-kettner.de
Module: check_mk Branch: master Commit: 4ea051329ae40e46a62820b96d79c82f40c0c45c URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=4ea051329ae40e…
Author: Mathias Kettner <mk(a)mathias-kettner.de> Date: Sat May 19 12:07:14 2012 +0200 Minor layout improvement in forms --- web/htdocs/forms.py | 7 ++++--- web/htdocs/pages.css | 17 +++++++++++++++-- web/htdocs/wato.css | 4 ++-- web/htdocs/wato.py | 39 ++++++++++++++++++++++----------------- 4 files changed, 43 insertions(+), 24 deletions(-) diff --git a/web/htdocs/forms.py b/web/htdocs/forms.py index 484c975..02dc244 100644 --- a/web/htdocs/forms.py +++ b/web/htdocs/forms.py @@ -131,13 +131,14 @@ def container(): (not g_section_isopen and "none" or "")) g_section_open = True -def section(title = None, checkbox = None, id = ""): +def section(title = None, checkbox = None, id = "", simple=False): global g_section_open if g_section_open: html.write('</td></tr>') if id: id = ' id="%s"' % id - html.write('<tr style="display: %s"%s><td class=legend>' % (not g_section_isopen and "none" or "", id)) + html.write('<tr style="display: %s"%s><td class="legend%s">' % + (not g_section_isopen and "none" or "", id, simple and " simple" or "")) if title: html.write('<div class="title%s">%s<span class="dots">%s</span></div>' % (checkbox and " withcheckbox" or "", title, "."*100)) @@ -151,7 +152,7 @@ def section(title = None, checkbox = None, id = ""): html.write('</div>') html.write('</td>') - html.write('<td class=content>') + html.write('<td class="content%s">' % (simple and " simple" or "")) g_section_open = True def end(): diff --git a/web/htdocs/pages.css b/web/htdocs/pages.css index 50418a3..6647502 100644 --- a/web/htdocs/pages.css +++ b/web/htdocs/pages.css @@ -518,15 +518,24 @@ table.nform > tbody > tr > td { height: 27px; } +table.nform > tbody > tr > td.simple { + vertical-align: top; + height: 18px; +} + table.nform td.legend { text-align: left; /* font-weight: bold; */ width: 240px; padding-right: 8px; vertical-align: top; - padding-top: 11px; + padding-top: 8px; padding-left: 10px; } +table.nform td.legend.simple { + padding-top: 5px; +} + table.nform td.legend div.title { float: left; overflow: hidden; @@ -548,6 +557,10 @@ table.nform td.legend div.checkbox { table.nform td.content { padding-left: 10px; padding-right: 10px; + padding-bottom: 10px; +} +table.nform td.content.simple { + padding-bottom: 0px; } table.nform td.buttons { @@ -558,7 +571,7 @@ table.nform tr.top td { } table.nform tr.bottom td { - height: 10px; + height: 5px; } /*-------------------------------------------------------------------------. diff --git a/web/htdocs/wato.css b/web/htdocs/wato.css index 1cb7d5f..6b9791d 100644 --- a/web/htdocs/wato.css +++ b/web/htdocs/wato.css @@ -776,9 +776,9 @@ div.varname { max-width: 350px; } -.wato div.globalvars td { +/*.wato div.globalvars td { height: 20px; -} +}*/ /* Table in page "Global variables" */ .wato table.data.globalvars { diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py index a96106f..51ad0db 100644 --- a/web/htdocs/wato.py +++ b/web/htdocs/wato.py @@ -1905,10 +1905,11 @@ def mode_edithost(phase, new, cluster): # host name forms.header(_("General Properties")) - forms.section(_("Hostname")) if hostname and mode == "edit": + forms.section(_("Hostname"), simple=True) html.write(hostname) else: + forms.section(_("Hostname")) html.text_input("host") html.set_focus("host") @@ -5187,7 +5188,13 @@ def mode_globalvars(phase): edit_url = make_link([("mode", "edit_configvar"), ("varname", varname)]) title = '<a href="%s">%s</a>' % (edit_url, valuespec.title()) - forms.section(title) + + if varname in current_settings: + to_text = valuespec.value_to_text(current_settings[varname]) + else: + to_text = valuespec.value_to_text(defaultvalue) + simple = isinstance(valuespec, Checkbox) or "\n" not in to_text + forms.section(title, simple=simple) toggle_url = make_action_link([("mode", "globalvars"), ("_action", "toggle"), ("_varname", varname)]) @@ -5197,16 +5204,14 @@ def mode_globalvars(phase): # "snapin_greyswitch_" + (current_settings[varname] and "on" or "off")) "snapin_switch_" + (current_settings[varname] and "on" or "off")) else: - html.write('<a href="%s">%s</a>' % - (edit_url, valuespec.value_to_text(current_settings[varname]))) + html.write('<a href="%s">%s</a>' % (edit_url, to_text)) else: if isinstance(valuespec, Checkbox): html.icon_button(toggle_url, _("Immediately toggle this setting"), # "snapin_greyswitch_" + (defaultvalue and "on" or "off")) "snapin_switch_" + (defaultvalue and "on" or "off")) else: - html.write('<a href="%s">%s</a>' % - (edit_url, valuespec.value_to_text(defaultvalue))) + html.write('<a href="%s">%s</a>' % (edit_url, to_text)) forms.end() html.write('</div>') @@ -5496,7 +5501,7 @@ def mode_edit_group(phase, what): html.begin_form("group") forms.header(_("Properties")) - forms.section(_("Name")) + forms.section(_("Name"), simple = not new) html.help(_("The name of the group is used as an internal key. It cannot be " "changed later. It is also visible in the status GUI.")) if new: @@ -5885,7 +5890,7 @@ def mode_edit_timeperiod(phase): forms.header(_("Timeperiod")) # Name - forms.section(_("Internal name")) + forms.section(_("Internal name"), simple = not new) if new: html.text_input("name") html.set_focus("name") @@ -6399,7 +6404,7 @@ def mode_edit_site(phase): # ID forms.header(_("Basic settings")) - forms.section(_("Site ID")) + forms.section(_("Site ID"), simple = not new) if new: html.text_input("id", siteid) html.set_focus("id") @@ -6414,7 +6419,7 @@ def mode_edit_site(phase): html.help(_("An alias or description of the site")) # Disabled - forms.section(_("Disable")) + forms.section(_("Disable"), simple=True) html.checkbox("disabled", site.get("disabled", False), label = _("Disable this connection")) html.help( _("If you disable a connection, then it will not be shown in the " "status display and no replication will be done.")) @@ -6445,7 +6450,7 @@ def mode_edit_site(phase): "performed.")) # Persistent connections - forms.section(_("Persistent Connection")) + forms.section(_("Persistent Connection"), simple=True) html.checkbox("persist", site.get("persist", False), label=_("Use persistent connections")) html.help(_("If you enable persistent connections then Multisite will try to keep open " "the connection to the remote sites. This brings a great speed up in high-latency " @@ -6514,7 +6519,7 @@ def mode_edit_site(phase): "that URL will be fetched by the Apache server of the local " "site itself, whilst the URL-Prefix is used by your local Browser.")) - forms.section(_("SSL")) + forms.section(_("SSL"), simple=True) html.checkbox("insecure", site.get("insecure", False), label = _('Ignore SSL certificate errors')) html.help( _('This might be needed to make the synchronization accept problems with ' 'SSL certificates when using an SSL secured connection.')) @@ -7514,7 +7519,7 @@ def mode_edit_user(phase): forms.header(_("Identity")) # ID - forms.section(_("Username")) + forms.section(_("Username"), simple = not new) if new: html.text_input("userid", userid) html.set_focus("userid") @@ -7570,7 +7575,7 @@ def mode_edit_user(phase): "a webservice without any further configuration.")) # Locking - forms.section(_("Disable password")) + forms.section(_("Disable password"), simple=True) html.checkbox("locked", user.get("locked", False), label = _("disable the login to this account")) html.help(_("Disabling the password will prevent a user from logging in while " "retaining the original password. Notifications are not affected " @@ -7617,7 +7622,7 @@ def mode_edit_user(phase): forms.header(_("Notifications"), isopen=False) - forms.section(_("Enabling")) + forms.section(_("Enabling"), simple=True) html.checkbox("notifications_enabled", user.get("notifications_enabled", True), label = _("enable notifications")) html.help(_("Notifications are sent out " @@ -8078,7 +8083,7 @@ def mode_edit_role(phase): # ID forms.header(_("Basic Properties")) - forms.section(_("Internal ID")) + forms.section(_("Internal ID"), simple = "builtin" in role) if role.get("builtin"): html.write("%s (%s)" % (id, _("builtin role"))) html.hidden_field("id", id) @@ -10257,7 +10262,7 @@ def page_user_profile(): html.write('<div class=wato>') forms.header(_("Personal Settings")) - forms.section(_("Name")) + forms.section(_("Name"), simple=True) html.write(config.user_id) if config.may('edit_profile'):
12 years, 3 months
1
0
0
0
Check_MK Git: check_mk: Use dynamic items in rule editor for hosts and items
by git@mathias-kettner.de
Module: check_mk Branch: master Commit: 2f88f9125573200226981b015a809da867275075 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=2f88f912557320…
Author: Mathias Kettner <mk(a)mathias-kettner.de> Date: Fri May 18 17:21:13 2012 +0200 Use dynamic items in rule editor for hosts and items --- ChangeLog | 2 + web/htdocs/check_mk.css | 25 ++++++++++++++ web/htdocs/pages.css | 1 + web/htdocs/wato.py | 84 ++++++++++------------------------------------- 4 files changed, 46 insertions(+), 66 deletions(-) diff --git a/ChangeLog b/ChangeLog index 67a9bf4..52f994d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -21,6 +21,8 @@ * New layout and new internal implementation of input forms * New layout for view overview and view editor * Split up host search in two distinct pages + * Use dynamic items in rule editor for hosts and items (making use + of ListOfStrings()) * FIX: audit log was not shown if no entry for today existed * FIX: fix parent scan on single site installations * FIX: fix folder visibility permission handling diff --git a/web/htdocs/check_mk.css b/web/htdocs/check_mk.css index 416c201..8c12bcc 100644 --- a/web/htdocs/check_mk.css +++ b/web/htdocs/check_mk.css @@ -137,6 +137,28 @@ select.icon option { input.buttonlink { padding: 1px; font-size: 8pt; +} + +input.button { + border-color: #86A9B8 #22404D #22414D #86A9B8; + border-radius: 5px 5px 5px 5px; + border-style: solid; + border-width: 1px; + box-shadow: 0 0 1.5px #000000; + margin-left: 5px; + padding: 2px 6px; + background-color: #497E95; + color: white; +} + +input.button:hover { + background-color: #6da1b8; + text-decoration: none; +} +input.button:active { + border-color: #22414d #86a9b8 #86a9b8 #22404d; + background-color: #3b6678; + box-shadow: inset 0 0 0.5px #444444; } a.button { @@ -443,6 +465,9 @@ div.listofstrings.horizontal > div { float: left; margin-right: 2px; } +div.listofstrings.horizontal > div:last-child { + float: none; +} table.listchoice { cell-spacing: 0px; diff --git a/web/htdocs/pages.css b/web/htdocs/pages.css index bec54c3..50418a3 100644 --- a/web/htdocs/pages.css +++ b/web/htdocs/pages.css @@ -635,6 +635,7 @@ div.help { font-weight: normal; text-align: left; color: black; + display: inline-block; } table.data div.help { diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py index 732dded..a96106f 100644 --- a/web/htdocs/wato.py +++ b/web/htdocs/wato.py @@ -9705,17 +9705,7 @@ def get_rule_conditions(ruleset): else: negate = html.get_checkbox("negate_hosts") nr = 0 - host_list = [] - while True: - var = "host_%d" % nr - host = html.var(var) - if nr > config.wato_num_itemspecs and not host: - break - if host: - if negate: - host = "!" + host - host_list.append(host) - nr += 1 + host_list = ListOfStrings().from_html_vars("hostlist") # append ALL_HOSTS to negated host lists if len(host_list) > 0 and host_list[0][0] == '!': host_list += ALL_HOSTS @@ -9734,16 +9724,8 @@ def get_rule_conditions(ruleset): itemspec = ListChoice(choices = itemenum, columns = 3) item_list = [ x+"$" for x in itemspec.from_html_vars("item") ] else: - nr = 0 - item_list = [] - while True: - var = "item_%d" % nr - item = html.var(var, "").strip() - if nr > config.wato_num_itemspecs and not item: - break - if item: - item_list.append(item) - nr += 1 + item_list = ListOfStrings().from_html_vars("itemlist") + if len(item_list) == 0: raise MKUserError("item_0", _("Please specify at least one %s or " "this rule will never match.") % ruleset["itemname"]) @@ -9857,29 +9839,13 @@ def mode_edit_rule(phase): div_id, not checked and "none" or "")) negate_hosts = len(host_list) > 0 and host_list[0].startswith("!") - html.write("<table class=itemlist>") - num_cols = 3 - for nr in range(config.wato_num_itemspecs): - x = nr % num_cols - if x == 0: - html.write("<tr>") - if nr < len(host_list) and host_list[nr] != ALL_HOSTS[0]: - host_name = host_list[nr].strip("!") - else: - host_name = "" - html.write("<td>") - html.text_input("host_%d" % nr, host_name) - html.write("</td>") - if x == num_cols - 1: - html.write("</tr>") - while x < num_cols - 1: - html.write("<td></td>") - if x == num_cols - 1: - html.write("</tr>") - x += 1 - html.write("</table>") - html.checkbox("negate_hosts", negate_hosts) - html.write(" " + _("<b>Negate:</b> make Rule apply for <b>all but</b> the above hosts") + "\n") + explicit_hosts = [ h.strip("!") for h in host_list if h != ALL_HOSTS[0] ] + ListOfStrings( + orientation = "horizontal", + valuespec = TextAscii(size = 30)).render_input("hostlist", explicit_hosts) + + html.checkbox("negate_hosts", negate_hosts, label = + _("<b>Negate:</b> make Rule apply for <b>all but</b> the above hosts")) html.write("</div>") html.help(_("You can enter a number of explicit host names that rule should or should " "not apply to here. Leave this option disabled if you want the rule to " @@ -9914,9 +9880,9 @@ def mode_edit_rule(phase): checked = html.get_checkbox("explicit_services") if checked == None: # read from rule itself checked = len(item_list) == 0 or item_list[0] != "" - div_id = "itemlist" - html.checkbox("explicit_services", checked, onclick="valuespec_toggle_option(this, %r)" % div_id) - html.write(" " + _("Specify explicit values")) + div_id = "item_list" + html.checkbox("explicit_services", checked, onclick="valuespec_toggle_option(this, %r)" % div_id, + label = _("Specify explicit values")) html.write('<div id="%s" style="display: %s; padding: 0px;">' % ( div_id, not checked and "none" or "")) itemenum = rulespec["itemenum"] @@ -9925,25 +9891,11 @@ def mode_edit_rule(phase): itemspec = ListChoice(choices = itemenum, columns = 3) itemspec.render_input("item", value) else: - html.write("<table class=itemlist>") - num_cols = 3 - for nr in range(config.wato_num_itemspecs): - x = nr % num_cols - if x == 0: - html.write("<tr>") - html.write("<td>") - item = nr < len(item_list) and item_list[nr] or "" - html.text_input("item_%d" % nr, item) - html.write("</td>") - if x == num_cols - 1: - html.write("</tr>") - while x < num_cols - 1: - html.write("<td></td>") - if x == num_cols - 1: - html.write("</tr>") - x += 1 - html.write("</table>") - html.write(_("The entries here are regular expressions to match the beginning. " + ListOfStrings( + orientation = "horizontal", + valuespec = TextAscii(size = 30)).render_input("itemlist", item_list) + + html.help(_("The entries here are regular expressions to match the beginning. " "Add a <tt>$</tt> for an exact match. An arbitrary substring is matched " "with <tt>.*</tt>")) html.write("</div>")
12 years, 3 months
1
0
0
0
Check_MK Git: check_mk: More tolerance to host tags with dependencies
by git@mathias-kettner.de
Module: check_mk Branch: master Commit: 71c4e17f371b64983316510285f480fe995bdcde URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=71c4e17f371b64…
Author: Mathias Kettner <mk(a)mathias-kettner.de> Date: Fri May 18 16:49:02 2012 +0200 More tolerance to host tags with dependencies --- web/htdocs/wato.py | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py index 6034a4e..732dded 100644 --- a/web/htdocs/wato.py +++ b/web/htdocs/wato.py @@ -8349,7 +8349,8 @@ def mode_hosttags(phase): "<th>" + _("Demonstration") + "</th>" "</tr>") odd = "even" - for nr, (tag_id, title, choices) in enumerate(hosttags): + for nr, entry in enumerate(hosttags): + tag_id, title, choices = entry[:3] # forth: dependency information odd = odd == "odd" and "even" or "odd" html.write('<tr class="data %s0">' % odd) edit_url = make_link([("mode", "edit_hosttag"), ("edit", tag_id)]) @@ -8530,7 +8531,8 @@ def mode_edit_hosttag(phase): title = "" choices = [] if not new: - for id, tit, ch in hosttags: + for entry in hosttags: + id, tit, ch = entry[:3] if id == tag_id: title = tit choices = ch
12 years, 3 months
1
0
0
0
Check_MK Git: check_mk: Better styling for ListOf()
by git@mathias-kettner.de
Module: check_mk Branch: master Commit: 365ce35ce3e578dd699430adcc8a2627a405c68c URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=365ce35ce3e578…
Author: Mathias Kettner <mk(a)mathias-kettner.de> Date: Fri May 18 16:48:47 2012 +0200 Better styling for ListOf() --- web/htdocs/check_mk.css | 22 ++++++++++++++++++---- 1 files changed, 18 insertions(+), 4 deletions(-) diff --git a/web/htdocs/check_mk.css b/web/htdocs/check_mk.css index d0f13cc..416c201 100644 --- a/web/htdocs/check_mk.css +++ b/web/htdocs/check_mk.css @@ -407,15 +407,29 @@ table.vs_date th { padding: 0px; } +table.valuespec_listof { + width: 100%; +} + +table.valuespec_listof > tbody > tr > td:first-child { + padding-bottom: 5px; +} +table.valuespec_listof > tbody > tr > td { + padding: 3px 0px 5px 0px; + border-bottom: 1px solid #9bc; +} +table.valuespec_listof > tbody > tr:last-child > td { + padding-top: 3px; + border-bottom-style: none; +} + table.valuespec_listof td.vlof_buttons { margin-right: 5px; white-space: nowrap; + vertical-align: middle; + width: 1px; } table.valuespec_listof td.vlof_content { - /* border: 1px solid white; - box-shadow: 1px 1px 2px #808080; */ - background-image: url("images/form_background.png"); - background-repeat: repeat; } table.valuespec_listof option[selected] { font-weight: bold;
12 years, 3 months
1
0
0
0
Check_MK Git: check_mk: Added missing images for new buttons
by git@mathias-kettner.de
Module: check_mk Branch: master Commit: f4cef3e2f648ed0021bea6f64bb5a0b864990ff5 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=f4cef3e2f648ed…
Author: Mathias Kettner <mk(a)mathias-kettner.de> Date: Fri May 18 16:26:01 2012 +0200 Added missing images for new buttons --- web/htdocs/images/button_back_hi.png | Bin 0 -> 2262 bytes web/htdocs/images/button_back_lo.png | Bin 0 -> 2687 bytes web/htdocs/images/button_end_hi.png | Bin 0 -> 2534 bytes web/htdocs/images/button_end_lo.png | Bin 0 -> 3043 bytes web/htdocs/images/button_forth_hi.png | Bin 0 -> 2396 bytes web/htdocs/images/button_forth_lo.png | Bin 0 -> 2892 bytes web/htdocs/images/button_start_hi.png | Bin 0 -> 2425 bytes web/htdocs/images/button_start_lo.png | Bin 0 -> 2875 bytes 8 files changed, 0 insertions(+), 0 deletions(-) diff --git a/web/htdocs/images/button_back_hi.png b/web/htdocs/images/button_back_hi.png new file mode 100644 index 0000000..3d5522b Binary files /dev/null and b/web/htdocs/images/button_back_hi.png differ diff --git a/web/htdocs/images/button_back_lo.png b/web/htdocs/images/button_back_lo.png new file mode 100644 index 0000000..753b14f Binary files /dev/null and b/web/htdocs/images/button_back_lo.png differ diff --git a/web/htdocs/images/button_end_hi.png b/web/htdocs/images/button_end_hi.png new file mode 100644 index 0000000..5b7256d Binary files /dev/null and b/web/htdocs/images/button_end_hi.png differ diff --git a/web/htdocs/images/button_end_lo.png b/web/htdocs/images/button_end_lo.png new file mode 100644 index 0000000..6c4e737 Binary files /dev/null and b/web/htdocs/images/button_end_lo.png differ diff --git a/web/htdocs/images/button_forth_hi.png b/web/htdocs/images/button_forth_hi.png new file mode 100644 index 0000000..f0052e3 Binary files /dev/null and b/web/htdocs/images/button_forth_hi.png differ diff --git a/web/htdocs/images/button_forth_lo.png b/web/htdocs/images/button_forth_lo.png new file mode 100644 index 0000000..88eb4cf Binary files /dev/null and b/web/htdocs/images/button_forth_lo.png differ diff --git a/web/htdocs/images/button_start_hi.png b/web/htdocs/images/button_start_hi.png new file mode 100644 index 0000000..a2b0d4c Binary files /dev/null and b/web/htdocs/images/button_start_hi.png differ diff --git a/web/htdocs/images/button_start_lo.png b/web/htdocs/images/button_start_lo.png new file mode 100644 index 0000000..1587072 Binary files /dev/null and b/web/htdocs/images/button_start_lo.png differ
12 years, 3 months
1
0
0
0
Check_MK Git: check_mk: FIX: audit log was not shown if no entry for today existed
by git@mathias-kettner.de
Module: check_mk Branch: master Commit: 51e838ad97623bc3ec70c07ec4ea405034c1f93e URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=51e838ad97623b…
Author: Mathias Kettner <mk(a)mathias-kettner.de> Date: Fri May 18 16:25:39 2012 +0200 FIX: audit log was not shown if no entry for today existed --- ChangeLog | 1 + web/htdocs/wato.css | 13 ++----------- web/htdocs/wato.py | 49 +++++++++++++++++++++++++++++-------------------- 3 files changed, 32 insertions(+), 31 deletions(-) diff --git a/ChangeLog b/ChangeLog index b44149d..67a9bf4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -21,6 +21,7 @@ * New layout and new internal implementation of input forms * New layout for view overview and view editor * Split up host search in two distinct pages + * FIX: audit log was not shown if no entry for today existed * FIX: fix parent scan on single site installations * FIX: fix folder visibility permission handling * FIX: honor folder-permissions when creating, deleting diff --git a/web/htdocs/wato.css b/web/htdocs/wato.css index 280e35d..1cb7d5f 100644 --- a/web/htdocs/wato.css +++ b/web/htdocs/wato.css @@ -162,17 +162,6 @@ Boston, MA 02110-1301 USA. padding: 2px 6px; } -.wato table.auditlog.pending td { - border-color: #f80; -} -.wato table.auditlog.pending tr.even0 { - background-color: #fda; -} - -.wato table.auditlog.pending tr.odd0 { - background-color: #fc8; -} - .wato td.dns { color: #666; } @@ -477,6 +466,8 @@ table.validationerror img { /* Controls for the audit log paged mechanism */ .wato div.paged_controls { float: right; + position: relative; + top: 3px; } /* Special styles for configuration and rule editor */ diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py index fbdad5b..6034a4e 100644 --- a/web/htdocs/wato.py +++ b/web/htdocs/wato.py @@ -3654,11 +3654,20 @@ def fmt_time(t): return time.strftime('%H:%M:%S', time.localtime(t)) def paged_log(log): - start = html.var('start', None) + start = int(html.var('start', 0)) if not start: - start = time.time() - start_time, end_time = get_timerange(int(start)) + start = int(time.time()) + + while True: + log_today, times = paged_log_from(log, start) + if len(log) == 0 or len(log_today) > 0: + return log_today, times + else: # No entries today, but log not empty -> go back in time + start -= 24 * 3600 + +def paged_log_from(log, start): + start_time, end_time = get_timerange(start) previous_log_time = None next_log_time = None first_log_index = None @@ -3693,23 +3702,22 @@ def paged_log(log): def display_paged((start_time, end_time, previous_log_time, next_log_time)): html.write('<div class=paged_controls>') - html.write(' <b>%s</b> ' % (_('%s to %s') % (fmt_date(start_time), - fmt_date(end_time)))) - - if previous_log_time is not None: - html.buttonlink(html.makeuri([('start', previous_log_time)]), _("<"), - title = '%s: %s' % (_("Older events"), fmt_date(previous_log_time))) + if next_log_time is not None: + html.icon_button(html.makeuri([('start', get_timerange(int(time.time()))[0])]), + _("Most recent events"), "start") + html.icon_button(html.makeuri([('start', next_log_time)]), + '%s: %s' % (_("Newer events"), fmt_date(next_log_time)), + "back") else: - html.buttonlink(html.makeuri([]), _("<"), disabled = True) - - html.buttonlink(html.makeuri([('start', get_timerange(int(time.time()))[0])]), _("o"), - title = _("Todays events")) + html.empty_icon_button() + html.empty_icon_button() - if next_log_time is not None: - html.buttonlink(html.makeuri([('start', next_log_time)]), _(">"), - title = '%s: %s' % (_("Newer events"), fmt_date(next_log_time))) + if previous_log_time is not None: + html.icon_button(html.makeuri([('start', previous_log_time)]), + '%s: %s' % (_("Older events"), fmt_date(previous_log_time)), + "forth") else: - html.buttonlink(html.makeuri([]), _(">"), disabled = True) + html.empty_icon_button() html.write('</div>') @@ -3722,10 +3730,12 @@ def render_audit_log(log, what, with_filename = False): empty_msg = _("No pending changes, monitoring server is up to date.") if len(log) == 0: - htmlcode += "<div class=info>%s</div>" % empty_msg + html.write("<div class=info>%s</div>" % empty_msg) return + elif what == 'audit': - htmlcode += "<h3>" + _("Audit logfile") + "</h3>" + htmlcode += "<h3>" + _("Audit logfile for %s") % fmt_date(times[0]) + "</h3>" + elif what == 'pending': if is_distributed(): htmlcode += "<h3>" + _("Changes that are not activated on all sites:") + "</h3>" @@ -3752,7 +3762,6 @@ def render_audit_log(log, what, with_filename = False): display_paged(times) else: html.write(htmlcode) - # html.show_warning(htmlcode) def export_audit_log(): html.req.content_type = "text/csv; charset=UTF-8"
12 years, 3 months
1
0
0
0
Check_MK Git: check_mk: Minor styling change in forms
by git@mathias-kettner.de
Module: check_mk Branch: master Commit: 859987170445ea2185c31854da27d58f0570e6a7 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=859987170445ea…
Author: Mathias Kettner <mk(a)mathias-kettner.de> Date: Fri May 18 15:52:37 2012 +0200 Minor styling change in forms --- web/htdocs/images/nform_background.png | Bin 214 -> 214 bytes web/htdocs/pages.css | 2 +- 2 files changed, 1 insertions(+), 1 deletions(-) diff --git a/web/htdocs/images/nform_background.png b/web/htdocs/images/nform_background.png index 781f4e6..c5452b8 100644 Binary files a/web/htdocs/images/nform_background.png and b/web/htdocs/images/nform_background.png differ diff --git a/web/htdocs/pages.css b/web/htdocs/pages.css index 1154487..bec54c3 100644 --- a/web/htdocs/pages.css +++ b/web/htdocs/pages.css @@ -503,7 +503,7 @@ table.nform tr.heading td { } table.nform tr.heading > td { border-radius: 5px 5px 0px 0px; - background-image: url("images/white_10percent.png"); + background-image: url("images/white_20percent.png"); background-repeat: repeat; height: 20px; vertical-align: middle;
12 years, 3 months
1
0
0
0
Check_MK Git: check_mk: Splitup host search in two modes
by git@mathias-kettner.de
Module: check_mk Branch: master Commit: a80a77ae11207f86b46667458acbf2d99e668956 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=a80a77ae11207f…
Author: Mathias Kettner <mk(a)mathias-kettner.de> Date: Fri May 18 15:41:55 2012 +0200 Splitup host search in two modes --- ChangeLog | 1 + web/htdocs/wato.py | 76 ++++++++++++++++++++++++++++------------------------ 2 files changed, 42 insertions(+), 35 deletions(-) diff --git a/ChangeLog b/ChangeLog index a411f84..b44149d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -20,6 +20,7 @@ * Added automation_commands to make automations pluginable * New layout and new internal implementation of input forms * New layout for view overview and view editor + * Split up host search in two distinct pages * FIX: fix parent scan on single site installations * FIX: fix folder visibility permission handling * FIX: honor folder-permissions when creating, deleting diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py index 2b4b37a..fbdad5b 100644 --- a/web/htdocs/wato.py +++ b/web/htdocs/wato.py @@ -2155,54 +2155,59 @@ def show_service_table(host, firsttime): def mode_search(phase): if phase == "title": - return _("Search for hosts in %s and below" % (g_folder["title"])) + return _("Search for hosts") elif phase == "buttons": + global_buttons() html.context_button(_("Folder"), make_link([("mode", "folder")]), "back") + return elif phase == "action": - pass + return "search_results" - else: - render_folder_path() + render_folder_path() - html.write("<table><tr><td>") - ## # Show search form - html.begin_form("search") - forms.header(_("General Properties")) - forms.section(_("Hostname")) - html.text_input("host") - html.set_focus("host") + ## # Show search form + html.begin_form("search") + forms.header(_("General Properties")) + forms.section(_("Hostname")) + html.text_input("host") + html.set_focus("host") - # Attributes - configure_attributes({}, "search", parent = None) + # Attributes + configure_attributes({}, "search", parent = None) - # Button - forms.end() - html.button("_global", _("Search globally"), "submit") - html.button("_local", _("Search in %s") % g_folder["title"], "submit") - html.hidden_fields() - html.end_form() + # Button + forms.end() + html.button("_global", _("Search globally"), "submit") + html.button("_local", _("Search in %s") % g_folder["title"], "submit") + html.hidden_fields() + html.end_form() - # Show search results - if html.transaction_valid(): - html.write("</td><td>") - crit = { - ".name" : html.var("host"), - } - crit.update(collect_attributes(do_validate = False)) - html.write("<h3>" + _("Search results:") + "</h3>") - if html.has_var("_local"): - folder = g_folder - else: - folder = g_root_folder +def mode_search_results(phase): + if phase == "title": + return _("Search results") + + elif phase == "buttons": + global_buttons() + html.context_button(_("New Search"), html.makeuri([("mode", "search")]), "back") + return + + elif phase == "action": + return + + crit = { ".name" : html.var("host") } + crit.update(collect_attributes(do_validate = False)) + + if html.has_var("_local"): + folder = g_folder + else: + folder = g_root_folder - # html.write("<pre>%s</pre>" % pprint.pformat(crit)) - if not search_hosts_in_folders(folder, crit): - html.message(_("No matching hosts found.")) + if not search_hosts_in_folders(folder, crit): + html.message(_("No matching hosts found.")) - html.write("</td></tr></table>") @@ -11148,6 +11153,7 @@ modes = { "firstinventory" : (["hosts", "services"], lambda phase: mode_inventory(phase, True)), "inventory" : (["hosts"], lambda phase: mode_inventory(phase, False)), "search" : (["hosts"], mode_search), + "search_results" : (["hosts"], mode_search_results), "bulkinventory" : (["hosts", "services"], mode_bulk_inventory), "bulkedit" : (["hosts", "edit_hosts"], mode_bulk_edit), "bulkcleanup" : (["hosts", "edit_hosts"], mode_bulk_cleanup),
12 years, 3 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: 46cf8c49915624bca442237eccee62fadaa8f4b9 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=46cf8c49915624…
Author: Mathias Kettner <mk(a)mathias-kettner.de> Date: Fri May 18 10:49:27 2012 +0200 Merge branch 'master' of ssh://mathias-kettner.de/check_mk ---
12 years, 3 months
1
0
0
0
← Newer
1
...
21
22
23
24
25
26
27
...
44
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
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
Results per page:
10
25
50
100
200