Module: check_mk
Branch: master
Commit: 8cac50b0d0d40352e213ba4f11516ea79ec7b815
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=8cac50b0d0d403…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Feb 11 15:23:45 2019 +0100
Fixed site status update with only single sites
Change-Id: I533380f07e7ebeb9459eb582e080e91aeb04c538
---
cmk/gui/wato/pages/sites.py | 8 +++-----
web/htdocs/js/modules/sites.js | 2 +-
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/cmk/gui/wato/pages/sites.py b/cmk/gui/wato/pages/sites.py
index e9b2f42..5c303db 100644
--- a/cmk/gui/wato/pages/sites.py
+++ b/cmk/gui/wato/pages/sites.py
@@ -649,9 +649,7 @@ class ModeDistributedMonitoring(WatoMode):
self._show_livestatus_status(table, site_id, site)
self._show_replication_status(table, site_id, site)
- has_replication_sites = any(e[1]["replication"] for e in sites)
- if has_replication_sites:
- html.javascript("cmk.sites.fetch_replication_status();")
+ html.javascript("cmk.sites.fetch_site_status();")
def _show_buttons(self, table, site_id, site):
table.cell(_("Actions"), css="buttons")
@@ -794,8 +792,8 @@ class ModeAjaxFetchSiteStatus(WatoWebApiMode):
return html.drain()
-cmk.gui.pages.register_page_handler("wato_ajax_fetch_site_status",
- lambda: ModeAjaxFetchSiteStatus().handle_page())
+cmk.gui.pages.register_page_handler(
+ "wato_ajax_fetch_site_status", lambda:
ModeAjaxFetchSiteStatus().handle_page())
PingResult = NamedTuple("PingResult", [
("version", str),
diff --git a/web/htdocs/js/modules/sites.js b/web/htdocs/js/modules/sites.js
index 58ddec4..dfb3eb6 100644
--- a/web/htdocs/js/modules/sites.js
+++ b/web/htdocs/js/modules/sites.js
@@ -25,7 +25,7 @@
import * as ajax from "ajax";
import $ from "jquery";
-export function fetch_replication_status()
+export function fetch_site_status()
{
ajax.call_ajax("wato_ajax_fetch_site_status.py", {
response_handler : function (handler_data, response_json) {