コード例 #1
0
ファイル: inventory.py プロジェクト: TheAlex88/checkmk
    def render(self, what, row, tags, custom_vars):
        if (what == "host" or row.get("service_check_command","").startswith("check_mk_active-cmk_inv!")) \
            and inventory.has_inventory(row["host_name"]):

            if not config.user.may("view.inv_host"):
                return

            return 'inv', _("Show Hardware/Software Inventory of this host"), url_to_view(
                row, 'inv_host')
コード例 #2
0
    def render(self, what, row, tags, custom_vars):
        if (what == "host" or row.get("service_check_command", "").startswith(
                "check_mk_active-cmk_inv!")) and inventory.has_inventory(
                    row["host_name"]):

            if not user.may("view.inv_host"):
                return

            return (
                "inventory",
                _("Show Hardware/Software Inventory of this host"),
                url_to_visual(row, VisualLinkSpec("views", "inv_host")),
            )