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
October
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
April 2019
----- 2024 -----
October 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
15 participants
599 discussions
Start a n
N
ew thread
GUI CSS: Deployed logwatch styles (CMK-1171)
by Kenneth Okoh
Module: check_mk Branch: master Commit: 5ce3e722c2c0bc4d8b0e4aa70758abf33dc36ec3 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=5ce3e722c2c0bc…
Author: Kenneth Okoh <ko(a)mathias-kettner.de> Date: Wed Apr 10 10:48:28 2019 +0200 GUI CSS: Deployed logwatch styles (CMK-1171) Change-Id: Iec8816140e4b5097ae4dbd523de6d64b0fd3740c --- web/htdocs/themes/facelift/scss/_logwatch.scss | 314 ++++++++++++------------- web/htdocs/themes/facelift/theme.scss | 1 - 2 files changed, 157 insertions(+), 158 deletions(-) diff --git a/web/htdocs/themes/facelift/scss/_logwatch.scss b/web/htdocs/themes/facelift/scss/_logwatch.scss index 0dfe1d4..ca1cf28 100644 --- a/web/htdocs/themes/facelift/scss/_logwatch.scss +++ b/web/htdocs/themes/facelift/scss/_logwatch.scss @@ -22,164 +22,164 @@ ails. You should have received a copy of the GNU General Public License along with GNU Make; see the file COPYING. If not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - */ /* Styles used in the logwatch pages */ -//#logwatch { -// margin-top: 1ex; -// color: #000; -//} -// -//#logwatch div.chunk { -// border-width: 1px; -// border-style: solid; -// margin-bottom: 1em; -// padding: 0.5ex; -// border-color: #bbb #555 #222 #bbb; -// background-color: #fff; -//} -// -//#logwatch a { -// font-family: sans-serif; -// font-weight: bold; -// width: 4em; -// color: #008; -//} -// -//#logwatch a b { -// color: #08f; -//} -// -//#logwatch a.ack { -// background-color: #33c; -// color: #fff; -// text-decoration: none; -// border-width: 2px; -// border-style: solid; -// border-color: #ccc #888 #333 #777; -// padding: 0.3ex 1ex; -// border-radius: 6px; -//} -// -//#logwatch p { -// font-family: courier, monospace; -// margin: 0; -// padding: 0.2ex 0 0.5ex 0.2ex; -// border-left: 1px solid #888; -// border-right: 1px solid #888; -// font-size: 10pt; -// background-color: #ddd; -// text-indent: -1.0ex; -// padding-left: 1.5ex; -//} -// -//#logwatch p img { -// margin-right: 2px; -//} -// -//#logwatch .WARN { -// background-color: #ff8; -// border-bottom: 1px solid #cc0; -//} -// -//#logwatch .CRIT { -// background-color: #f88; -// border-bottom: 1px solid #c00; -//} -// -//#logwatch .OK { -// background-color: #0b3; -// border-bottom: 1px solid #0c0; -//} -// -//#logwatch td.WARN, td.CRIT, td.OK { -// width: 5em; -// text-align: center; -// padding: 0em 0.5ex; -// margin: 0; -// font-weight: bold; -//} -// -//#logwatch td.WARN { -// border: 1px solid #000; -// background-color: #ff0; -//} -// -//#logwatch td.CRIT { -// border: 1px solid #000; -// background-color: #f00; -// color: #fff; -//} -// -//#logwatch td.OK { -// background-color: #0b3; -// border: 1px solid #000; -// color: #fff; -//} -// -//#logwatch table.section { -// margin: 0ex 0ex 0.8ex 0ex; -// width: 100% -//} -// -//#logwatch .date { -// font-weight: normal; -// padding-left: 1ex; -// color: #666; -//} -// -//#logwatch td.button { -// text-align: right; -//} -// -//#logwatch td.button a { -// background-color: #cca; -// color: #000; -// text-decoration: none; -// font-weight: normal; -// border-width: 1px; -// border-style: solid; -// border-color: #ddd #888 #333 #ddd; -// padding: 0.1ex 1ex; -// border-radius: 4px; -//} -// -//#logwatch td.button a:active { -// background-color: #aa8; -//} -// -///* --- navigation tabs in logwatch ------------------ */ -// -//#logwatch a.tab, #logwatch a.tabactive { -// border-radius: 12px 12px 0px 0px; -// display: block; -// margin-bottom: 0px; -// color: #000; -// padding: 0.4ex 1em; -// border-style: none; -// vertical-align: top; -// margin-right: 0.3ex; -// background-color: #fc0; -// border-bottom: 1px solid #000; -// text-decoration: none; -// width: 140px; -//} -// -//#logwatch a.tab:hover { -// padding-bottom: 10px; -//} -// -//#logwatch a.tabactive { -// padding-bottom: 6px; -// border-bottom-style: none; -//} -// -//#logwatch p { -// white-space: pre-wrap; /* CSS3 */ -// white-space: -moz-pre-wrap; /* Firefox */ -// white-space: -pre-wrap; /* Opera <7 */ -// white-space: -o-pre-wrap; /* Opera 7 */ -// word-wrap: break-word; /* IE */ -//} +#logwatch { + margin-top: 1ex; + color: #000; +} + +#logwatch div.chunk { + border-width: 1px; + border-style: solid; + margin-bottom: 1em; + padding: 0.5ex; + border-color: #bbb #555 #222 #bbb; + background-color: #fff; +} + +#logwatch a { + font-family: sans-serif; + font-weight: bold; + width: 4em; + color: #008; +} + +/* TODO: Reproduce this html element */ +#logwatch a b { + color: #08f; +} + +/* TODO: Reproduce this html element */ +#logwatch a.ack { + background-color: #33c; + color: #fff; + text-decoration: none; + border-width: 2px; + border-style: solid; + border-color: #ccc #888 #333 #777; + padding: 0.3ex 1ex; + border-radius: 6px; +} + +#logwatch p { + font-family: courier, monospace; + margin: 0; + padding: 0.2ex 0 0.5ex 0.2ex; + border-left: 1px solid #888; + border-right: 1px solid #888; + font-size: 10pt; + background-color: #ddd; + text-indent: -1.0ex; + padding-left: 1.5ex; + white-space: pre-wrap; /* CSS3 */ + white-space: -moz-pre-wrap; /* Firefox */ + white-space: -pre-wrap; /* Opera <7 */ + white-space: -o-pre-wrap; /* Opera 7 */ + word-wrap: break-word; /* IE */ +} + +#logwatch p img { + margin-right: 2px; +} + +#logwatch .WARN { + background-color: #ff8; + border-bottom: 1px solid #cc0; +} + +#logwatch .CRIT { + background-color: #f88; + border-bottom: 1px solid #c00; +} + +#logwatch .OK { + background-color: #0b3; + border-bottom: 1px solid #0c0; +} + +#logwatch td.WARN, td.CRIT, td.OK { + width: 5em; + text-align: center; + padding: 0em 0.5ex; + margin: 0; + font-weight: bold; +} + +#logwatch td.WARN { + border: 1px solid #000; + background-color: #ff0; +} + +#logwatch td.CRIT { + border: 1px solid #000; + background-color: #f00; + color: #fff; +} + +#logwatch td.OK { + background-color: #0b3; + border: 1px solid #000; + color: #fff; +} + +#logwatch table.section { + margin: 0ex 0ex 0.8ex 0ex; + width: 100% +} + +#logwatch .date { + font-weight: normal; + padding-left: 1ex; + color: #666; +} + +/* TODO: Reproduce these three td.button elements */ +#logwatch td.button { + text-align: right; +} + +#logwatch td.button a { + background-color: #cca; + color: #000; + text-decoration: none; + font-weight: normal; + border-width: 1px; + border-style: solid; + border-color: #ddd #888 #333 #ddd; + padding: 0.1ex 1ex; + border-radius: 4px; +} + +#logwatch td.button a:active { + background-color: #aa8; +} + +/* --- navigation tabs in logwatch ------------------ */ +/* TODO: Reproduce these .tab and .tabactive elements */ + +#logwatch a.tab, #logwatch a.tabactive { + border-radius: 12px 12px 0px 0px; + display: block; + margin-bottom: 0px; + color: #000; + padding: 0.4ex 1em; + border-style: none; + vertical-align: top; + margin-right: 0.3ex; + background-color: #fc0; + border-bottom: 1px solid #000; + text-decoration: none; + width: 140px; +} + +#logwatch a.tab:hover { + padding-bottom: 10px; +} + +#logwatch a.tabactive { + padding-bottom: 6px; + border-bottom-style: none; +} diff --git a/web/htdocs/themes/facelift/theme.scss b/web/htdocs/themes/facelift/theme.scss index 59dc684..117da1e 100644 --- a/web/htdocs/themes/facelift/theme.scss +++ b/web/htdocs/themes/facelift/theme.scss @@ -11,7 +11,6 @@ @import "../classic/scss/_check_mk.scss"; @import "../classic/scss/_pages.scss"; @import "../classic/scss/_status.scss"; -@import "../classic/scss/_logwatch.scss"; @import "../classic/scss/_prediction.scss"; @import "../classic/scss/_wato.scss"; @import "../classic/scss/_mobile.scss";
5 years, 5 months
1
0
0
0
Add source columns.
by Sven Panne
Module: check_mk Branch: master Commit: 7d42d85c94dfae8c5895b67cfe6bc3dc3cebce81 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=7d42d85c94dfae…
Author: Sven Panne <sp(a)mathias-kettner.de> Date: Wed Apr 10 09:52:11 2019 +0200 Add source columns. Some cleanups on the way. Still things a bit too much copy-n-paste for the myriads of new columns, though... CMK-1939 Change-Id: Ia940203735c5dffd7d379b13cf083653a5a19f0a --- livestatus/src/MonitoringCore.h | 18 +++++++++++++++++- livestatus/src/NagiosCore.cc | 19 +++---------------- livestatus/src/TableContacts.cc | 14 ++++++++++++++ livestatus/src/TableHosts.cc | 15 +++++++++++++++ livestatus/src/TableServices.cc | 15 +++++++++++++++ 5 files changed, 64 insertions(+), 17 deletions(-) diff --git a/livestatus/src/MonitoringCore.h b/livestatus/src/MonitoringCore.h index 7262617..d4505e7 100644 --- a/livestatus/src/MonitoringCore.h +++ b/livestatus/src/MonitoringCore.h @@ -28,8 +28,10 @@ #include "config.h" // IWYU pragma: keep #include <chrono> #include <string> +#include <tuple> #include <unordered_map> #include <vector> +#include "StringUtils.h" #include "Triggers.h" #include "auth.h" #include "data_encoding.h" @@ -63,7 +65,21 @@ struct CommentData { }; using Attributes = std::unordered_map<std::string, std::string>; -enum class AttributeKind { custom_variables, tags, labels }; +enum class AttributeKind { custom_variables, tags, labels, sources }; + +inline std::tuple<AttributeKind, std::string> to_attribute_kind( + const std::string &name) { + if (mk::starts_with(name, "_TAG_")) { + return {AttributeKind::tags, name.substr(5)}; + } + if (mk::starts_with(name, "_LABEL_")) { + return {AttributeKind::labels, name.substr(7)}; + } + if (mk::starts_with(name, "_SOURCES_")) { + return {AttributeKind::sources, name.substr(9)}; + } + return {AttributeKind::custom_variables, name}; +} /// An abstraction layer for the monitoring core (nagios or cmc) class MonitoringCore { diff --git a/livestatus/src/NagiosCore.cc b/livestatus/src/NagiosCore.cc index 3b17a26..52404a8 100644 --- a/livestatus/src/NagiosCore.cc +++ b/livestatus/src/NagiosCore.cc @@ -210,22 +210,9 @@ Attributes NagiosCore::customAttributes(const void *holder, auto h = *static_cast<const customvariablesmember *const *>(holder); Attributes attrs; for (auto cvm = h; cvm != nullptr; cvm = cvm->next) { - bool is_tag = mk::starts_with(cvm->variable_name, "_TAG_"); - bool is_label = mk::starts_with(cvm->variable_name, "_LABEL_"); - bool part_of_result = false; - switch (kind) { - case AttributeKind::custom_variables: - part_of_result = !is_tag && !is_label; - break; - case AttributeKind::tags: - part_of_result = is_tag; - break; - case AttributeKind::labels: - part_of_result = is_label; - break; - } - if (part_of_result) { - attrs.emplace(cvm->variable_name, cvm->variable_value); + auto [k, name] = to_attribute_kind(cvm->variable_name); + if (k == kind) { + attrs.emplace(name, cvm->variable_value); } } return attrs; diff --git a/livestatus/src/TableContacts.cc b/livestatus/src/TableContacts.cc index c7cb62b..d2f1351 100644 --- a/livestatus/src/TableContacts.cc +++ b/livestatus/src/TableContacts.cc @@ -149,6 +149,20 @@ void TableContacts::addColumns(Table *table, const std::string &prefix, -1, DANGEROUS_OFFSETOF(contact, custom_variables), table->core(), AttributeKind::labels)); + table->addColumn(std::make_unique<CustomVarsNamesColumn>( + prefix + "source_names", "A list of all sources of the contact", + indirect_offset, -1, -1, DANGEROUS_OFFSETOF(contact, custom_variables), + table->core(), AttributeKind::sources)); + table->addColumn(std::make_unique<CustomVarsValuesColumn>( + prefix + "source_values", + "A list of the values of all sources of the contact", indirect_offset, + -1, -1, DANGEROUS_OFFSETOF(contact, custom_variables), table->core(), + AttributeKind::sources)); + table->addColumn(std::make_unique<CustomVarsDictColumn>( + prefix + "sources", "A dictionary of the sources", indirect_offset, -1, + -1, DANGEROUS_OFFSETOF(contact, custom_variables), table->core(), + AttributeKind::sources)); + table->addColumn(std::make_unique<AttributeListAsIntColumn>( prefix + "modified_attributes", "A bitmask specifying which attributes have been modified", diff --git a/livestatus/src/TableHosts.cc b/livestatus/src/TableHosts.cc index 9c3ef2f..14e8f3e 100644 --- a/livestatus/src/TableHosts.cc +++ b/livestatus/src/TableHosts.cc @@ -532,6 +532,21 @@ void TableHosts::addColumns(Table *table, const std::string &prefix, extra_offset, -1, DANGEROUS_OFFSETOF(host, custom_variables), table->core(), AttributeKind::labels)); + table->addColumn(std::make_unique<CustomVarsNamesColumn>( + prefix + "source_names", "A list of the names of all sources", + indirect_offset, extra_offset, -1, + DANGEROUS_OFFSETOF(host, custom_variables), table->core(), + AttributeKind::sources)); + table->addColumn(std::make_unique<CustomVarsValuesColumn>( + prefix + "source_values", "A list of the values of the sources", + indirect_offset, extra_offset, -1, + DANGEROUS_OFFSETOF(host, custom_variables), table->core(), + AttributeKind::sources)); + table->addColumn(std::make_unique<CustomVarsDictColumn>( + prefix + "sources", "A dictionary of the sources", indirect_offset, + extra_offset, -1, DANGEROUS_OFFSETOF(host, custom_variables), + table->core(), AttributeKind::sources)); + // Add direct access to the custom macro _FILENAME. In a future version of // Livestatus this will probably be configurable so access to further custom // variable can be added, such that those variables are presented like diff --git a/livestatus/src/TableServices.cc b/livestatus/src/TableServices.cc index 0384588..885d84a 100644 --- a/livestatus/src/TableServices.cc +++ b/livestatus/src/TableServices.cc @@ -488,6 +488,21 @@ void TableServices::addColumns(Table *table, const std::string &prefix, -1, DANGEROUS_OFFSETOF(service, custom_variables), table->core(), AttributeKind::labels)); + table->addColumn(std::make_unique<CustomVarsNamesColumn>( + prefix + "source_names", + "A list of the names of all sources of the service", indirect_offset, + -1, -1, DANGEROUS_OFFSETOF(service, custom_variables), table->core(), + AttributeKind::sources)); + table->addColumn(std::make_unique<CustomVarsValuesColumn>( + prefix + "source_values", + "A list of the values of all sources of the service", indirect_offset, + -1, -1, DANGEROUS_OFFSETOF(service, custom_variables), table->core(), + AttributeKind::sources)); + table->addColumn(std::make_unique<CustomVarsDictColumn>( + prefix + "sources", "A dictionary of the sources", indirect_offset, -1, + -1, DANGEROUS_OFFSETOF(service, custom_variables), table->core(), + AttributeKind::sources)); + table->addColumn(std::make_unique<ServiceGroupsColumn>( prefix + "groups", "A list of all service groups the service is in", indirect_offset, -1, -1, DANGEROUS_OFFSETOF(service, servicegroups_ptr),
5 years, 5 months
1
0
0
0
Unit Test small fix to improve diagnostic
by Sergey Kipnis
Module: check_mk Branch: master Commit: d505a7b9e36afb488422f68cfc65c224af95d28a URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=d505a7b9e36afb…
Author: Sergey Kipnis <sk(a)mathias-kettner.de> Date: Wed Apr 10 11:56:55 2019 +0200 Unit Test small fix to improve diagnostic Change-Id: I34e4889e6ae66c937b4cb47eeaf6e2d744a7c031 --- agents/wnx/watest/test-upgrade.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/agents/wnx/watest/test-upgrade.cpp b/agents/wnx/watest/test-upgrade.cpp index 24a96a0..4f626a7 100644 --- a/agents/wnx/watest/test-upgrade.cpp +++ b/agents/wnx/watest/test-upgrade.cpp @@ -2,7 +2,6 @@ // complicated things LWA -> NWA - #include "pch.h" #include <filesystem> @@ -407,7 +406,8 @@ TEST(UpgradeTest, StopStartStopOhm) { std::error_code ec; ASSERT_TRUE(fs::exists(ohm)) << "OpenHardwareMonitor not installed, please, add it to the Legacy Agent folder"; - RunDetachedProcess(ohm.wstring()); + auto ret = RunDetachedProcess(ohm.wstring()); + ASSERT_TRUE(ret); auto status = WaitForStatus(GetServiceStatusByName, L"WinRing0_1_2_0", SERVICE_RUNNING, 5000); @@ -419,7 +419,8 @@ TEST(UpgradeTest, StopStartStopOhm) { SERVICE_STOPPED, 5000); EXPECT_EQ(status, SERVICE_STOPPED); - RunDetachedProcess(ohm.wstring()); + ret = RunDetachedProcess(ohm.wstring()); + ASSERT_TRUE(ret); tools::sleep(1000); status = WaitForStatus(GetServiceStatusByName, L"WinRing0_1_2_0", SERVICE_RUNNING, 5000);
5 years, 5 months
1
0
0
0
GUI CSS: Decoupled remaining view styles for inventory (CMK-1171)
by Kenneth Okoh
Module: check_mk Branch: master Commit: 6bced6901cb633fda4b318a55e0b6de8f597e3a3 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=6bced6901cb633…
Author: Kenneth Okoh <ko(a)mathias-kettner.de> Date: Tue Apr 9 11:13:18 2019 +0200 GUI CSS: Decoupled remaining view styles for inventory (CMK-1171) Change-Id: Id0ce6ba976fb875ee80ae61cca9f4b09a7bbab53 --- web/htdocs/themes/facelift/scss/_main.scss | 60 --- web/htdocs/themes/facelift/scss/_views.scss | 569 +++++++++++++++------------- web/htdocs/themes/facelift/theme.scss | 1 - 3 files changed, 311 insertions(+), 319 deletions(-) Diff:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commitdiff;h=6bced6901c…
5 years, 5 months
1
0
0
0
GUI CSS: Refactored view styles to nested structure meeting sasslint requirements (CMK-1171)
by Kenneth Okoh
Module: check_mk Branch: master Commit: 38103d34880e8df900f78640cb9488f2a50a5b6b URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=38103d34880e8d…
Author: Kenneth Okoh <ko(a)mathias-kettner.de> Date: Tue Apr 9 17:25:25 2019 +0200 GUI CSS: Refactored view styles to nested structure meeting sasslint requirements (CMK-1171) Change-Id: I17545b5bda9d917122bdba28d931c55b67c13360 --- web/htdocs/themes/facelift/scss/_views.scss | 1874 ++++++++++++++------------- 1 file changed, 950 insertions(+), 924 deletions(-) Diff:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commitdiff;h=38103d3488…
5 years, 5 months
1
0
0
0
agent_vsphere: refactor for testing with tracefile (III)
by Moritz Kiemer
Module: check_mk Branch: master Commit: b13b8cc002187642a1b39d23db2e2b9b9d35c249 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b13b8cc0021876…
Author: Moritz Kiemer <mo(a)mathias-kettner.de> Date: Wed Apr 10 08:31:12 2019 +0200 agent_vsphere: refactor for testing with tracefile (III) Change-Id: I2ee59d8ec63afa0e836a98cee47dc7b1339234dc --- agents/special/agent_vsphere | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/agents/special/agent_vsphere b/agents/special/agent_vsphere index 3c4438f..40541f1 100755 --- a/agents/special/agent_vsphere +++ b/agents/special/agent_vsphere @@ -998,10 +998,11 @@ class ESXConnection(object): def send_soapdata(self, soapdata, payload_params): self._init_headers(soapdata) - response_data = [] - time_sent = time.time() + if tracefile: + tracefile.write("#### Sent ####\n%s" % soapdata) + time_sent = time.time() self._server_handle.send(soapdata) response = self._server_handle.getresponse() @@ -1025,14 +1026,12 @@ class ESXConnection(object): else: break - time_response = time.time() - + respose_text = "".join(response_data) if tracefile: - tracefile.write("#### Sent ####\n%s" % soapdata) - timing_info = "Response took: %f" % (time_response - time_sent) - tracefile.write("\n#### Received #### %s\n%s\n" % (timing_info, "".join(response_data))) + timing_info = "Response took: %f" % (time.time() - time_sent) + tracefile.write("\n#### Received #### %s\n%s\n" % (timing_info, respose_text)) - return response, "".join(response_data) + return response, respose_text def query_server(self, payload, payload_params=None): soapdata, payload_params = self.prepare_soapdata(payload, payload_params)
5 years, 5 months
1
0
0
0
GUI CSS: Removed some deprecated styles from _views.scss (CMK-1171)
by Kenneth Okoh
Module: check_mk Branch: master Commit: 638e0399c71ff9e1a42424cfdead37fa4c63d960 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=638e0399c71ff9…
Author: Kenneth Okoh <ko(a)mathias-kettner.de> Date: Wed Apr 10 10:05:12 2019 +0200 GUI CSS: Removed some deprecated styles from _views.scss (CMK-1171) Change-Id: I17e4d7582bf0ce7345a8ea2291c0510b1776e5a8 --- web/htdocs/themes/facelift/scss/_views.scss | 71 +++-------------------------- 1 file changed, 7 insertions(+), 64 deletions(-) diff --git a/web/htdocs/themes/facelift/scss/_views.scss b/web/htdocs/themes/facelift/scss/_views.scss index f538371..cee4721 100644 --- a/web/htdocs/themes/facelift/scss/_views.scss +++ b/web/htdocs/themes/facelift/scss/_views.scss @@ -521,25 +521,6 @@ table.tiled td { height: 20px; } } - - &.sstate0, &.hhstate0 { - border-color: #0f0; - } - - &.sstate1 { - background-color: #ff0; - border-color: #ff0; - } - - &.sstate2, &.hhstate1 { - background-color: #f88; - border-color: #f00; - } - - &.sstate3, &.hhstate2 { - background-color: #fc8; - border-color: #f80; - } } table.data.tiled td.tiles { @@ -624,13 +605,6 @@ table.data.single { border-left-style: none; } - /* #TODO: Check whether this style is redundant - * see styles for table.data.single tr.data > td - */ - &.age, &.number, &.count { - text-align: left; - } - &.perfometer div.glass { width: 100%; } @@ -655,14 +629,6 @@ table.data.matrix { transition: .15s ease-in-out; } - /* #TODO: Reproduce this html element - * .perfometer seems to always be one table level lower than tr.data, so - * not a direct child - */ - &.perfometer { - width: 180px; - } - &.cell td.perfometer { div.title, div.content { padding: 0; @@ -691,12 +657,8 @@ table.data.matrix { } tr.even0 { - td.left { - background-color: #bbb; - - &.minority { - background-color: #bdd; - } + td.left.minority { + background-color: #bdd; } td.matrixhead { @@ -705,12 +667,8 @@ table.data.matrix { } tr.odd0 { - td.left { - background-color: #ccc; - - &.minority { - background-color: #cee; - } + td.left.minority { + background-color: #cee; } td.matrixhead { @@ -733,19 +691,6 @@ table.data.matrix { padding: 0; } } - - /* #TODO: Reproduce this html element */ - table.cell > tbody > tr > td { - padding: 0; - border: 1px solid #f00; - } - - /* #TODO: Reproduce this html element */ - tr.matrixhead td.left { - &, a { - color: #fff; - } - } } .even0 .minority { @@ -886,7 +831,6 @@ div.avlegend.timeline div.state.unmonitored { table.timeline td.ooservice, div.avlegend.timeline div.state.ooservice { background-color: #cacaca; - /* #TODO: Check whether this image can be dropped (seems not to be available anymore */ background-image: url("images/ooservice.png"); background-repeat: repeat; } @@ -938,7 +882,6 @@ table.timeline { padding: 0; border-style: none; - /* #TODO: Reproduce this html element */ &.hilite { padding: 0; background-color: #0091b6; @@ -1164,15 +1107,15 @@ td.if_state { table.data.single tr.data td.invtree table td.if_state { &.if_state_up { background-color: $theme-color-state-success-background; - box-shadow: none; } + } &.if_state_down { background-color: $theme-color-state-2-background; - box-shadow: none; } + } &.if_state_other { background-color: $theme-color-state-9-background; - box-shadow: none; } + } &.if_available { color: $theme-color-black;
5 years, 5 months
1
0
0
0
GUI CSS: Moved commented out logwatch styles from classic to facelift theme ( CMK-1171)
by Kenneth Okoh
Module: check_mk Branch: master Commit: d841d567b51436538ed3c97e1000362d02795eb7 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=d841d567b51436…
Author: Kenneth Okoh <ko(a)mathias-kettner.de> Date: Wed Apr 10 10:08:31 2019 +0200 GUI CSS: Moved commented out logwatch styles from classic to facelift theme (CMK-1171) Change-Id: I8988c05fb896b3d396dedd5e498b95f157594fb3 --- web/htdocs/themes/facelift/scss/_logwatch.scss | 185 +++++++++++++++++++++++++ web/htdocs/themes/facelift/theme.scss | 1 + 2 files changed, 186 insertions(+) diff --git a/web/htdocs/themes/facelift/scss/_logwatch.scss b/web/htdocs/themes/facelift/scss/_logwatch.scss new file mode 100644 index 0000000..0dfe1d4 --- /dev/null +++ b/web/htdocs/themes/facelift/scss/_logwatch.scss @@ -0,0 +1,185 @@ +/* ++------------------------------------------------------------------+ +| ____ _ _ __ __ _ __ | +| / ___| |__ ___ ___| | __ | \/ | |/ / | +| | | | '_ \ / _ \/ __| |/ / | |\/| | ' / | +| | |___| | | | __/ (__| < | | | | . \ | +| \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ | +| | +| Copyright Mathias Kettner 2012 mk(a)mathias-kettner.de | ++------------------------------------------------------------------+ + +This file is part of Check_MK. +The official homepage is at
http://mathias-kettner.de/check_mk
. + +check_mk is free software; you can redistribute it and/or modify it +under the terms of the GNU General Public License as published by +the Free Software Foundation in version 2. check_mk is distributed +in the hope that it will be useful, but WITHOUT ANY WARRANTY; with- +out even the implied warranty of MERCHANTABILITY or FITNESS FOR A +PARTICULAR PURPOSE. See the GNU General Public License for more de- +ails. You should have received a copy of the GNU General Public +License along with GNU Make; see the file COPYING. If not, write +to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, +Boston, MA 02110-1301 USA. + +*/ + +/* Styles used in the logwatch pages */ + +//#logwatch { +// margin-top: 1ex; +// color: #000; +//} +// +//#logwatch div.chunk { +// border-width: 1px; +// border-style: solid; +// margin-bottom: 1em; +// padding: 0.5ex; +// border-color: #bbb #555 #222 #bbb; +// background-color: #fff; +//} +// +//#logwatch a { +// font-family: sans-serif; +// font-weight: bold; +// width: 4em; +// color: #008; +//} +// +//#logwatch a b { +// color: #08f; +//} +// +//#logwatch a.ack { +// background-color: #33c; +// color: #fff; +// text-decoration: none; +// border-width: 2px; +// border-style: solid; +// border-color: #ccc #888 #333 #777; +// padding: 0.3ex 1ex; +// border-radius: 6px; +//} +// +//#logwatch p { +// font-family: courier, monospace; +// margin: 0; +// padding: 0.2ex 0 0.5ex 0.2ex; +// border-left: 1px solid #888; +// border-right: 1px solid #888; +// font-size: 10pt; +// background-color: #ddd; +// text-indent: -1.0ex; +// padding-left: 1.5ex; +//} +// +//#logwatch p img { +// margin-right: 2px; +//} +// +//#logwatch .WARN { +// background-color: #ff8; +// border-bottom: 1px solid #cc0; +//} +// +//#logwatch .CRIT { +// background-color: #f88; +// border-bottom: 1px solid #c00; +//} +// +//#logwatch .OK { +// background-color: #0b3; +// border-bottom: 1px solid #0c0; +//} +// +//#logwatch td.WARN, td.CRIT, td.OK { +// width: 5em; +// text-align: center; +// padding: 0em 0.5ex; +// margin: 0; +// font-weight: bold; +//} +// +//#logwatch td.WARN { +// border: 1px solid #000; +// background-color: #ff0; +//} +// +//#logwatch td.CRIT { +// border: 1px solid #000; +// background-color: #f00; +// color: #fff; +//} +// +//#logwatch td.OK { +// background-color: #0b3; +// border: 1px solid #000; +// color: #fff; +//} +// +//#logwatch table.section { +// margin: 0ex 0ex 0.8ex 0ex; +// width: 100% +//} +// +//#logwatch .date { +// font-weight: normal; +// padding-left: 1ex; +// color: #666; +//} +// +//#logwatch td.button { +// text-align: right; +//} +// +//#logwatch td.button a { +// background-color: #cca; +// color: #000; +// text-decoration: none; +// font-weight: normal; +// border-width: 1px; +// border-style: solid; +// border-color: #ddd #888 #333 #ddd; +// padding: 0.1ex 1ex; +// border-radius: 4px; +//} +// +//#logwatch td.button a:active { +// background-color: #aa8; +//} +// +///* --- navigation tabs in logwatch ------------------ */ +// +//#logwatch a.tab, #logwatch a.tabactive { +// border-radius: 12px 12px 0px 0px; +// display: block; +// margin-bottom: 0px; +// color: #000; +// padding: 0.4ex 1em; +// border-style: none; +// vertical-align: top; +// margin-right: 0.3ex; +// background-color: #fc0; +// border-bottom: 1px solid #000; +// text-decoration: none; +// width: 140px; +//} +// +//#logwatch a.tab:hover { +// padding-bottom: 10px; +//} +// +//#logwatch a.tabactive { +// padding-bottom: 6px; +// border-bottom-style: none; +//} +// +//#logwatch p { +// white-space: pre-wrap; /* CSS3 */ +// white-space: -moz-pre-wrap; /* Firefox */ +// white-space: -pre-wrap; /* Opera <7 */ +// white-space: -o-pre-wrap; /* Opera 7 */ +// word-wrap: break-word; /* IE */ +//} diff --git a/web/htdocs/themes/facelift/theme.scss b/web/htdocs/themes/facelift/theme.scss index 02c1f3e..59dc684 100644 --- a/web/htdocs/themes/facelift/theme.scss +++ b/web/htdocs/themes/facelift/theme.scss @@ -38,6 +38,7 @@ @import "scss/_bi.scss"; @import "scss/_dashboard.scss"; @import "scss/_login.scss"; +@import "scss/_logwatch.scss"; @import "scss/_views.scss"; @import "scss/_tables.scss"; @import "scss/_sidebar.scss";
5 years, 5 months
1
0
0
0
agent_vsphere: refactor for testing with tracefile (I)
by Moritz Kiemer
Module: check_mk Branch: master Commit: c49561381dcb1051d5dba0108ae84b4301698a49 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=c49561381dcb10…
Author: Moritz Kiemer <mo(a)mathias-kettner.de> Date: Wed Apr 10 08:12:45 2019 +0200 agent_vsphere: refactor for testing with tracefile (I) Change-Id: I6626568b618875e20535e83e20622d56ce5c6b64 --- agents/special/agent_vsphere | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/agents/special/agent_vsphere b/agents/special/agent_vsphere index 81a5c8c..84d5097 100755 --- a/agents/special/agent_vsphere +++ b/agents/special/agent_vsphere @@ -986,7 +986,7 @@ class ESXConnection(object): return system_info - def query_server(self, payload, payload_params=None): + def prepare_soapdata(self, payload, payload_params): if payload_params is None: payload_params = {} @@ -994,7 +994,10 @@ class ESXConnection(object): if self.system_info: payload_params.update(self.system_info) soapdata = put_in_envelope(payload) - soapdata = soapdata % payload_params + return soapdata % payload_params + + def query_server(self, payload, payload_params=None): + soapdata = self.prepare_soapdata(payload, payload_params) self._init_headers(soapdata)
5 years, 5 months
1
0
0
0
agent_vsphere: refactor for testing with tracefile (II)
by Moritz Kiemer
Module: check_mk Branch: master Commit: 0e4aa746d5b4a699a2134ac563ea65e3945ee9df URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=0e4aa746d5b4a6…
Author: Moritz Kiemer <mo(a)mathias-kettner.de> Date: Wed Apr 10 08:24:02 2019 +0200 agent_vsphere: refactor for testing with tracefile (II) Change-Id: I8e9be6d5abfcef26bc05af50d97cfe62da95c9cf --- agents/special/agent_vsphere | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/agents/special/agent_vsphere b/agents/special/agent_vsphere index 84d5097..3c4438f 100755 --- a/agents/special/agent_vsphere +++ b/agents/special/agent_vsphere @@ -994,11 +994,9 @@ class ESXConnection(object): if self.system_info: payload_params.update(self.system_info) soapdata = put_in_envelope(payload) - return soapdata % payload_params - - def query_server(self, payload, payload_params=None): - soapdata = self.prepare_soapdata(payload, payload_params) + return soapdata % payload_params, payload_params + def send_soapdata(self, soapdata, payload_params): self._init_headers(soapdata) response_data = [] @@ -1036,6 +1034,10 @@ class ESXConnection(object): return response, "".join(response_data) + def query_server(self, payload, payload_params=None): + soapdata, payload_params = self.prepare_soapdata(payload, payload_params) + return self.send_soapdata(soapdata, payload_params) + def _init_headers(self, soapdata): self._server_handle.putrequest("POST", "/sdk") self._server_handle.putheader("Content-Length", "%d" % len(soapdata))
5 years, 5 months
1
0
0
0
← Newer
1
...
30
31
32
33
34
35
36
...
60
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
Results per page:
10
25
50
100
200