Пример #1
0
 def _page_no_groups(self):
     menu = MainMenu()
     menu.add_item(
         MenuItem(
             mode_or_url="edit_host_group",
             title=_("Create new host group"),
             icon="new",
             permission="groups",
             description=
             _("Host groups are used for visualization and filtering of host"
               ),
         ))
     menu.show()
Пример #2
0
    def page(self):
        if not self._tag_config.tag_groups + self._tag_config.get_aux_tags():
            MainMenu([
                MenuItem(
                    "edit_ttag", _("Create new tag group"), "new", "hosttags",
                    _("Each tag group will create one dropdown choice in the host configuration."
                      )),
                MenuItem(
                    "edit_auxtag", _("Create new auxiliary tag"), "new",
                    "hosttags",
                    _("You can have these tags automatically added if certain primary tags are set."
                      )),
            ]).show()
            return

        self._show_customized_builtin_warning()

        self._render_tag_group_list()
        self._render_aux_tag_list()
Пример #3
0
    def _show_empty_folder_menu(self):
        menu_items = []

        if not self._folder.locked_hosts():
            menu_items.extend([
                MenuItem(
                    mode_or_url=makeuri_contextless(global_request,
                                                    [("mode", "newhost"),
                                                     ("folder", self._folder.path())]),
                    title=_("Add host to the monitoring"),
                    icon="new",
                    permission="hosts",
                    description=
                    _("The host must have the Checkmk agent or SNMP or an API integration prepared."
                     ),
                ),
                MenuItem(
                    mode_or_url=makeuri_contextless(global_request,
                                                    [("mode", "newcluster"),
                                                     ("folder", self._folder.path())]),
                    title=_("Create cluster"),
                    icon="new_cluster",
                    permission="hosts",
                    description=_("Use Checkmk clusters if an item can move from one host "
                                  "to another at runtime."),
                )
            ])

        if not self._folder.locked_subfolders():
            menu_items.extend([
                MenuItem(
                    mode_or_url=makeuri_contextless(global_request,
                                                    [("mode", "newfolder"),
                                                     ("folder", self._folder.path())]),
                    title=_("Add folder"),
                    icon="newfolder",
                    permission="hosts",
                    description=_(
                        "Folders group your hosts, can inherit attributes and can have permissions."
                    ))
            ])

        MainMenu(menu_items).show()
Пример #4
0
    def _show_empty_folder_menu(self):
        menu_items = []

        if not self._folder.locked_hosts():
            menu_items.extend([
                MenuItem("newhost", _("Create new host"), "new", "hosts",
                         _("Add a new host to the monitoring (agent must be installed)")),
                MenuItem(
                    "newcluster", _("Create new cluster"), "new_cluster", "hosts",
                    _("Use Check_MK clusters if an item can move from one host "
                      "to another at runtime"))
            ])

        if not self._folder.locked_subfolders():
            menu_items.extend([
                MenuItem(
                    "newfolder", _("Create new folder"), "newfolder", "hosts",
                    _("Folders group your hosts, can inherit attributes and can have permissions."))
            ])

        MainMenu(menu_items).show()
Пример #5
0
    def page(self):
        html.help(
            _("This catalog of check plugins gives you a complete listing of all plugins "
              "that are shipped with your Check_MK installation. It also allows you to "
              "access the rule sets for configuring the parameters of the checks and to "
              "manually create services in case you cannot or do not want to rely on the "
              "automatic service discovery."))

        menu = MainMenu()
        for topic, _has_second_level, title, helptext in _man_page_catalog_topics():
            menu.add_item(
                MenuItem(mode_or_url=makeuri(
                    request,
                    [("mode", "check_plugin_topic"), ("topic", topic)],
                ),
                         title=title,
                         icon="plugins_" + topic,
                         permission=None,
                         description=helptext))
        menu.show()
Пример #6
0
 def page(self):
     MainMenu(get_modules()).show()