Module: check_mk
Branch: master
Commit: f9dd882cf4b4d361e7c1a6a6539b2772485531be
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=f9dd882cf4b4d3…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Fri May 20 15:36:11 2016 +0200
Fetched livestatus from downstream.
---
livestatus/src/TableEventConsole.h | 7 +++++--
livestatus/src/TableEventConsoleEvents.cc | 4 ++--
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/livestatus/src/TableEventConsole.h b/livestatus/src/TableEventConsole.h
index f6f4314..9fbe442 100644
--- a/livestatus/src/TableEventConsole.h
+++ b/livestatus/src/TableEventConsole.h
@@ -129,13 +129,16 @@ protected:
public:
ListEventConsoleColumn(std::string name, std::string description)
: ListColumn(name, description, -1, -1)
- , _ecc(name, _column_t(),
- [](std::string x) { return split(x, '\001'); }) {}
+ , _ecc(name, _column_t(), [](std::string x) {
+ return x.empty() || x == "\002" ? _column_t()
+ : split(x.substr(1), '\001');
+ }) {}
void output(void *data, Query *query) override {
query->outputBeginList();
bool first = true;
for (const auto &elem : _ecc.getValue(data)) {
+ printf("-------------------- [%s]\n", elem.c_str());
if (first) {
first = false;
} else {
diff --git a/livestatus/src/TableEventConsoleEvents.cc
b/livestatus/src/TableEventConsoleEvents.cc
index 656d26f..083687d 100644
--- a/livestatus/src/TableEventConsoleEvents.cc
+++ b/livestatus/src/TableEventConsoleEvents.cc
@@ -70,8 +70,8 @@ void TableEventConsoleEvents::addColumns(Table *table) {
new StringEventConsoleColumn("event_owner", "The owner of the
event"));
table->addColumn(new ListEventConsoleColumn(
"event_match_groups", "Text groups from regular expression
match"));
- table->addColumn(new StringEventConsoleColumn("event_contact_groups",
- "Contact groups")); // list
+ table->addColumn(
+ new ListEventConsoleColumn("event_contact_groups", "Contact
groups"));
table->addColumn(new StringEventConsoleColumn(
"event_ipaddress", "The IP address where the event
originated"));
}