Ejemplo n.º 1
0
    def buttons(self):
        global_buttons()
        html.context_button(_("Host Properties"), self._host.edit_url(),
                            "back")

        host_renaming_job = RenameHostBackgroundJob(self._host)
        if host_renaming_job.is_available():
            html.context_button(_("Last result"),
                                host_renaming_job.detail_url(),
                                "background_job_details")
Ejemplo n.º 2
0
 def buttons(self):
     global_buttons()
     html.context_button(
         _("New tag group"),
         watolib.folder_preserving_link([("mode", "edit_tag")]), "new")
     html.context_button(
         _("New aux tag"),
         watolib.folder_preserving_link([("mode", "edit_auxtag")]), "new")
     html.context_button(
         _("Tag usage"),
         watolib.folder_preserving_link([("mode", "tag_usage")]), "tag")
Ejemplo n.º 3
0
    def buttons(self):
        global_buttons()
        if html.request.has_var("back"):
            back_url = html.get_url_input("back")
            html.context_button(_("Back"), back_url, "back")

        html.context_button(_("All Check Plugins"),
                            html.makeuri_contextless([("mode", "check_plugins")]), "check_plugins")

        if self._check_type.startswith("check_"):
            command = "check_mk_active-" + self._check_type[6:]
        else:
            command = "check_mk-" + self._check_type

        url = html.makeuri_contextless([("view_name", "searchsvc"), ("check_command", command),
                                        ("filled_in", "filter")],
                                       filename="view.py")
        html.context_button(_("Find usage"), url, "status")
Ejemplo n.º 4
0
    def buttons(self):
        global_buttons()
        if self._host:
            if self._item:
                title = _("Show Logfile")
            else:
                title = _("Host Logfiles")

            html.context_button(
                title,
                html.makeuri_contextless([("host", self._hostname), ("file", self._item)],
                                         filename="logwatch.py"), 'logwatch')

        html.context_button(
            _('Logfile patterns'),
            watolib.folder_preserving_link([
                ('mode', 'edit_ruleset'),
                ('varname', 'logwatch_rules'),
            ]), 'rulesets')
Ejemplo n.º 5
0
    def buttons(self):
        global_buttons()
        html.context_button(_("New user"), watolib.folder_preserving_link([("mode", "edit_user")]),
                            "new")
        if config.user.may("wato.custom_attributes"):
            html.context_button(_("Custom attributes"),
                                watolib.folder_preserving_link([("mode", "user_attrs")]),
                                "custom_attr")
        if userdb.sync_possible():
            if not self._job_snapshot.is_active():
                html.context_button(_("Sync users"), html.makeactionuri([("_sync", 1)]),
                                    "replicate")
                html.context_button(_("Last sync result"), self._job.detail_url(),
                                    "background_job_details")

        if config.user.may("general.notify"):
            html.context_button(_("Notify users"), 'notify.py', "notification")
        html.context_button(_("LDAP connections"),
                            watolib.folder_preserving_link([("mode", "ldap_config")]), "ldap")
Ejemplo n.º 6
0
    def buttons(self) -> None:
        global_buttons()

        if self.name() != "download_agents_windows":
            html.context_button(
                _("Windows files"),
                folder_preserving_link([("mode", "download_agents_windows")]),
                "download_agents")
        if self.name() != "download_agents_linux":
            html.context_button(
                _("Linux files"),
                folder_preserving_link([("mode", "download_agents_linux")]),
                "download_agents")
        if self.name() != "download_agents":
            html.context_button(
                _("Other files"),
                folder_preserving_link([("mode", "download_agents")]),
                "download_agents")

        if watolib.has_agent_bakery():
            html.context_button(
                _("Baked agents"),
                watolib.folder_preserving_link([("mode", "agents")]), "agents")
Ejemplo n.º 7
0
 def buttons(self) -> None:
     global_buttons()
Ejemplo n.º 8
0
 def buttons(self):
     # type: () -> None
     global_buttons()
Ejemplo n.º 9
0
 def buttons(self):
     global_buttons()
     html.context_button(_("Back"), watolib.folder_preserving_link([("mode", "roles")]), "back")
Ejemplo n.º 10
0
 def buttons(self):
     global_buttons()
     html.context_button(
         _("Matrix"), watolib.folder_preserving_link([("mode", "role_matrix")]), "matrix")
Ejemplo n.º 11
0
 def buttons(self):
     global_buttons()
Ejemplo n.º 12
0
 def buttons(self):
     back_url = html.get_url_input("back", "")
     if back_url:
         html.context_button(_("Back"), back_url, "back")
     else:
         global_buttons()
Ejemplo n.º 13
0
 def buttons(self):
     global_buttons()
     html.context_button(_("Back"), watolib.folder_preserving_link([("mode", "users")]), "back")
     html.context_button(_("New connection"),
                         watolib.folder_preserving_link([("mode", "edit_ldap_connection")]),
                         "new")
Ejemplo n.º 14
0
 def buttons(self):
     global_buttons()
     html.context_button(_("New Timeperiod"),
                         watolib.folder_preserving_link([("mode", "edit_timeperiod")]), "new")
     html.context_button(_("Import iCalendar"),
                         watolib.folder_preserving_link([("mode", "import_ical")]), "ical")