Module: check_mk
Branch: master
Commit: e726c3c41f0fcb9f98f3b5858330a0c44487ca4e
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=e726c3c41f0fcb…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Feb 22 13:22:10 2017 +0100
CME: GUI werk list: Add option to filter for CME werks
Change-Id: I26abab56bfe7af58f7980bac95f284639166b988
---
.werks/.f12 | 4 ++++
web/htdocs/werks.py | 8 +++-----
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/.werks/.f12 b/.werks/.f12
index 1fc7145..bb0ab06 100644
--- a/.werks/.f12
+++ b/.werks/.f12
@@ -4,4 +4,8 @@ SITE=${SITE:-$(omd sites --bare | head -n 1)}
sudo mkdir -p /omd/sites/$SITE/share/check_mk/werks/
make -C .. .werks/werks
sudo install -m 644 -g $SITE -o $SITE werks /omd/sites/$SITE/share/check_mk/werks/werks
+make -C .. enterprise/werks
+sudo install -m 644 -g $SITE -o $SITE ../enterprise/werks
/omd/sites/$SITE/share/check_mk/werks/werks-cmc
+make -C .. managed/werks
+sudo install -m 644 -g $SITE -o $SITE ../managed/werks
/omd/sites/$SITE/share/check_mk/werks/werks-cme
sudo omd restart $SITE apache
diff --git a/web/htdocs/werks.py b/web/htdocs/werks.py
index 0a5f9c6..284bdc2 100644
--- a/web/htdocs/werks.py
+++ b/web/htdocs/werks.py
@@ -245,6 +245,7 @@ def werk_table_option_entries():
title = _("Edition"),
choices = [
( None, _("All editions") ),
+ ( "cme", _("Werks only concerning the Managed Service
Edition") ),
( "cee", _("Werks only concerning the Enterprise
Edition") ),
( "cre", _("Werks also concerning the Raw
Edition") ),
],
@@ -371,11 +372,8 @@ def werk_matches_options(werk, werk_table_options):
return False
- if werk_table_options["edition"]:
- if werk_table_options["edition"] == "cre" and
werk["id"] >= 8000:
- return False
- if werk_table_options["edition"] == "cee" and
werk["id"] < 8000:
- return False
+ if werk_table_options["edition"] and werk["edition"] !=
werk_table_options["edition"]:
+ return False
from_version, to_version = werk_table_options["version"]
if from_version and cmp_version(werk["version"], from_version) < 0: