Ejemplo n.º 1
0
 def help(self):
     url = makeuri_contextless_ruleset_group(request, 'grouping')
     return _(
         "Only members of the contact groups listed here have WATO permission "
         "to the host / folder. If you want, you can make those contact groups "
         "automatically also <b>monitoring contacts</b>. This is completely "
         "optional. Assignment of host and services to contact groups "
         "can be done by <a href='%s'>rules</a> as well.") % url
Ejemplo n.º 2
0
    def _topic_from_group_name(self, group_name: str) -> str:

        main_group = self._rulespec_group_registry[group_name]()
        if isinstance(main_group, RulespecSubGroup):
            main_group = main_group.main_group()

        main_module_cls = self._main_module_registry.get(
            makeuri_contextless_ruleset_group(
                request,
                main_group.name,
            ))
        if main_module_cls:
            topic_prefix = main_module_cls().topic.title
        else:
            topic_prefix = _('Rules')

        return f"{topic_prefix} > {main_group.title}"
Ejemplo n.º 3
0
 def mode_or_url(self):
     return makeuri_contextless_ruleset_group(request, 'custom_checks')
Ejemplo n.º 4
0
 def mode_or_url(self):
     return makeuri_contextless_ruleset_group(request, 'inventory')
Ejemplo n.º 5
0
 def mode_or_url(self):
     return makeuri_contextless_ruleset_group(request, 'host_monconf')
Ejemplo n.º 6
0
 def mode_or_url(self):
     return makeuri_contextless_ruleset_group(request,
                                              'datasource_programs')
Ejemplo n.º 7
0
 def mode_or_url(self):
     return makeuri_contextless_ruleset_group(request, 'vm_cloud_container')
Ejemplo n.º 8
0
 def mode_or_url(self):
     return makeuri_contextless_ruleset_group(request, 'snmp')