コード例 #1
0
ファイル: inventory.py プロジェクト: tboerger/checkmk
 def display(self) -> None:
     html.text_input(self._varprefix + "name")
     html.br()
     html.begin_radio_group(horizontal=True)
     html.radiobutton(self._varprefix + "match",
                      "exact",
                      True,
                      label=_("exact match"))
     html.radiobutton(self._varprefix + "match",
                      "regex",
                      False,
                      label=_("regular expression, substring match"))
     html.end_radio_group()
     html.br()
     html.open_span(class_="min_max_row")
     html.write_text(_("Min. Version: "))
     html.text_input(self._varprefix + "version_from", size=9)
     html.write_text("   ")
     html.write_text(_("Max. Vers.: "))
     html.text_input(self._varprefix + "version_to", size=9)
     html.close_span()
     html.br()
     html.checkbox(
         self._varprefix + "negate",
         False,
         label=_("Negate: find hosts <b>not</b> having this package"))
コード例 #2
0
ファイル: inventory.py プロジェクト: tboerger/checkmk
 def display(self) -> None:
     html.begin_radio_group(horizontal=True)
     for value, text in [("1", _("up")), ("2", _("down")),
                         ("-1", _("(ignore)"))]:
         html.radiobutton(self.ident, value, value == "-1",
                          text + " &nbsp; ")
     html.end_radio_group()
コード例 #3
0
ファイル: inventory.py プロジェクト: mazen-hasoun/checkmk
 def display(self):
     # type: () -> None
     html.begin_radio_group(horizontal=True)
     for value, text in [("no", _("used")), ("yes", _("free")),
                         ("", _("(ignore)"))]:
         html.radiobutton(self.ident, value, value == "", text + " &nbsp; ")
     html.end_radio_group()
コード例 #4
0
 def display(self):
     current = html.request.var(self.varname)
     html.begin_radio_group(horizontal=True)
     for value, text in [("1", _("yes")), ("0", _("no")), ("-1", _("(ignore)"))]:
         checked = current == value or (current in [None, ""] and int(value) == self.deflt)
         html.radiobutton(self.varname, value, checked, text + u" &nbsp; ")
     html.end_radio_group()
コード例 #5
0
ファイル: utils.py プロジェクト: petrows/checkmk
def display_filter_radiobuttons(*, varname: str, options: List[Tuple[str, str]], default: str,
                                value: FilterHTTPVariables) -> None:
    pick = value.get(varname, default)
    html.begin_radio_group(horizontal=True)
    for state, text in options:
        html.radiobutton(varname, state, pick == state, text + " &nbsp; ")
    html.end_radio_group()