Module: check_mk
Branch: master
Commit: 1cb5de948cf5e09201ae876f3437fac83071d91f
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=1cb5de948cf5e0…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Tue Feb 2 18:12:27 2016 +0100
Added helper function for graph designer
---
web/htdocs/pagetypes.py | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/web/htdocs/pagetypes.py b/web/htdocs/pagetypes.py
index 20d1907..8f454e2 100644
--- a/web/htdocs/pagetypes.py
+++ b/web/htdocs/pagetypes.py
@@ -555,6 +555,11 @@ class Overridable:
return sorted(pages.values(), cmp = lambda a, b: cmp(a.title(), b.title()))
+ @classmethod
+ def page_choices(self):
+ return [(page.name(), page.title()) for page in self.pages()]
+
+
# Find a page by name, implements shadowing and
# publishing und overriding by admins
@classmethod