Пример #1
0
    def get_ui(self):
        ui = self.app.inflate("sysmon:main")
        self._mgr.refresh()

        self.fill("l", self._mgr.list_left(), ui, "cleft")
        self.fill("r", self._mgr.list_right(), ui, "cright")

        ui.insertText("host", platform.node())
        ui.insertText("distro", detect_distro())
        ui.find("icon").set("src", "/dl/sysmon/distributor-logo-%s.png" % detect_platform(mapping=False))

        if self._adding_widget == True:
            dlg = self.app.inflate("sysmon:add-widget")
            idx = 0
            for prov in sorted(self.app.grab_plugins(apis.dashboard.IWidget)):
                if hasattr(prov, "hidden"):
                    continue
                dlg.append(
                    "list",
                    UI.ListItem(
                        UI.HContainer(UI.IconFont(iconfont=prov.iconfont), UI.Label(text=prov.name)), id=prov.plugin_id
                    ),
                )
                idx += 1
            ui.append("main", dlg)

        elif self._adding_widget != None:
            ui.append("main", self._mgr.get_by_name(self._adding_widget).get_config_dialog())

        if UpdateCheck.get().get_status()[0] == True:
            self.put_message("info", "An update for Genesis is available. See the Settings pane for details.")

        return ui
Пример #2
0
    def get_ui(self):
        ui = self.app.inflate('sysmon:main')
        self._mgr = apis.dashboard.WidgetManager(self.app)
        self._mgr.refresh()
        self._failed = []

        self.fill('l', self._mgr.list_left(), ui, 'cleft')
        self.fill('c', self._mgr.list_center(), ui, 'cmiddle')
        self.fill('r', self._mgr.list_right(), ui, 'cright')

        if self._failed != []:
            ui.find('ui-dashboard-buttons').append(UI.Btn(id='btnCleanUp', text='Clean Up', iconfont='gen-remove'))

        ui.insertText('host', platform.node())
        ui.insertText('distro', detect_distro())
        ui.find('icon').set('src', '/dl/sysmon/distributor-logo-%s.png'%detect_platform(mapping=False))

        if self._adding_widget == True:
            dlg = self.app.inflate('sysmon:add-widget')
            idx = 0
            for prov in sorted(self.app.grab_plugins(apis.dashboard.IWidget)):
                if hasattr(prov, 'hidden'):
                    continue
                dlg.append('list', UI.ListItem(
                    UI.Label(text=prov.name),
                    iconfont=prov.iconfont,
                    id=prov.plugin_id,
                ))
                idx += 1
            ui.append('main', dlg)

        elif self._adding_widget != None:
            ui.append('main', self._mgr.get_by_name(self._adding_widget).get_config_dialog())

        return ui
Пример #3
0
    def get_ui(self):
        ui = self.app.inflate("sysmon:main")
        self._mgr = apis.dashboard.WidgetManager(self.app)
        self._mgr.refresh()
        self._failed = []

        self.fill("l", self._mgr.list_left(), ui, "cleft")
        self.fill("c", self._mgr.list_center(), ui, "cmiddle")
        self.fill("r", self._mgr.list_right(), ui, "cright")

        if self._failed != []:
            ui.find("ui-dashboard-buttons").append(UI.Btn(id="btnCleanUp", text="Clean Up", iconfont="gen-remove"))

        ui.insertText("host", platform.node())
        ui.insertText("distro", detect_distro())
        ui.find("icon").set("src", "/dl/sysmon/distributor-logo-%s.png" % detect_platform(mapping=False))

        if self._adding_widget == True:
            dlg = self.app.inflate("sysmon:add-widget")
            idx = 0
            for prov in sorted(self.app.grab_plugins(apis.dashboard.IWidget)):
                if hasattr(prov, "hidden"):
                    continue
                dlg.append("list", UI.ListItem(UI.Label(text=prov.name), iconfont=prov.iconfont, id=prov.plugin_id))
                idx += 1
            ui.append("main", dlg)

        elif self._adding_widget != None:
            ui.append("main", self._mgr.get_by_name(self._adding_widget).get_config_dialog())

        return ui
Пример #4
0
    def get_ui(self):
        ui = self.app.inflate('dashboard:main')
        self._mgr.refresh()

        self.fill('l', self._mgr.list_left(), ui, 'cleft')
        self.fill('r', self._mgr.list_right(), ui, 'cright')

        ui.insertText('host', platform.node())
        ui.insertText('distro', detect_distro())
        ui.find('icon').set('src', '/dl/dashboard/distributor-logo-%s.png'%detect_platform(mapping=False))

        if self._adding_widget == True:
            dlg = self.app.inflate('dashboard:add-widget')
            idx = 0
            for prov in sorted(self.app.grab_plugins(apis.dashboard.IWidget)):
                if hasattr(prov, 'hidden'):
                    continue
                dlg.append('list', UI.ListItem(
                    UI.HContainer(
                        UI.Image(file=prov.icon),
                        UI.Label(text=prov.name),
                    ),
                    id=prov.plugin_id,
                ))
                idx += 1
            ui.append('main', dlg)

        elif self._adding_widget != None:
            ui.append('main', self._mgr.get_by_name(self._adding_widget).get_config_dialog())

        return ui
Пример #5
0
    def get_ui(self):
        ui = self.app.inflate('sysmon:main')
        self._mgr = apis.dashboard.WidgetManager(self.app)
        self._mgr.refresh()
        self._failed = []

        self.fill('l', self._mgr.list_left(), ui, 'cleft')
        self.fill('c', self._mgr.list_center(), ui, 'cmiddle')
        self.fill('r', self._mgr.list_right(), ui, 'cright')

        if self._failed != []:
            ui.find('ui-dashboard-buttons').append(UI.Btn(id='btnCleanUp', text='Clean Up', iconfont='gen-remove'))

        ui.insertText('host', platform.node())
        ui.insertText('distro', detect_distro())
        ui.find('icon').set('src', '/dl/sysmon/distributor-logo-%s.png'%detect_platform(mapping=False))

        if self._adding_widget == True:
            dlg = self.app.inflate('sysmon:add-widget')
            idx = 0
            for prov in sorted(self.app.grab_plugins(apis.dashboard.IWidget)):
                if hasattr(prov, 'hidden'):
                    continue
                dlg.append('list', UI.ListItem(
                    UI.Label(text=prov.name),
                    iconfont=prov.iconfont,
                    id=prov.plugin_id,
                ))
                idx += 1
            ui.append('main', dlg)

        elif self._adding_widget != None:
            ui.append('main', self._mgr.get_by_name(self._adding_widget).get_config_dialog())

        return ui
Пример #6
0
    def get_ui(self):
        ui = self.app.inflate('sysmon:main')
        self._mgr = apis.dashboard.WidgetManager(self.app)
        self._mgr.refresh()
        self._failed = []

        self.fill('l', self._mgr.list_left(), ui, 'cleft')
        self.fill('r', self._mgr.list_right(), ui, 'cright')

        if self._failed != []:
            ui.find('ui-dashboard-buttons').append(
                UI.Button(id='btnCleanUp',
                          text='Clean Up',
                          iconfont='gen-remove'))

        ui.insertText('host', platform.node())
        ui.insertText('distro', detect_distro())
        ui.find('icon').set(
            'src', '/dl/sysmon/distributor-logo-%s.png' %
            detect_platform(mapping=False))

        if self._adding_widget == True:
            dlg = self.app.inflate('sysmon:add-widget')
            idx = 0
            for prov in sorted(self.app.grab_plugins(apis.dashboard.IWidget)):
                if hasattr(prov, 'hidden'):
                    continue
                dlg.append(
                    'list',
                    UI.ListItem(
                        UI.HContainer(
                            UI.IconFont(iconfont=prov.iconfont),
                            UI.Label(text=' ' + prov.name),
                        ),
                        id=prov.plugin_id,
                    ))
                idx += 1
            ui.append('main', dlg)

        elif self._adding_widget != None:
            ui.append(
                'main',
                self._mgr.get_by_name(self._adding_widget).get_config_dialog())

        if UpdateCheck.get().get_status()[0] == True:
            self.put_message(
                'info',
                'An update for Genesis is available. See the Settings pane for details.'
            )

        return ui
Пример #7
0
    def get_ui(self):
        ui = self.app.inflate('sysmon:main')
        self._mgr = apis.dashboard.WidgetManager(self.app)
        self._mgr.refresh()
        self._failed = []

        self.fill('l', self._mgr.list_left(), ui, 'cleft')
        self.fill('r', self._mgr.list_right(), ui, 'cright')

        if self._failed != []:
            ui.find('ui-dashboard-buttons').append(UI.Button(id='btnCleanUp', text='Clean Up', iconfont='gen-remove'))

        ui.insertText('host', platform.node())
        ui.insertText('distro', detect_distro())
        ui.find('icon').set('src', '/dl/sysmon/distributor-logo-%s.png'%detect_platform(mapping=False))

        if self._adding_widget == True:
            dlg = self.app.inflate('sysmon:add-widget')
            idx = 0
            for prov in sorted(self.app.grab_plugins(apis.dashboard.IWidget)):
                if hasattr(prov, 'hidden'):
                    continue
                dlg.append('list', UI.ListItem(
                    UI.HContainer(
                        UI.IconFont(iconfont=prov.iconfont),
                        UI.Label(text=' '+prov.name),
                    ),
                    id=prov.plugin_id,
                ))
                idx += 1
            ui.append('main', dlg)

        elif self._adding_widget != None:
            ui.append('main', self._mgr.get_by_name(self._adding_widget).get_config_dialog())

        if UpdateCheck.get().get_status()[0] == True:
            self.put_message('info', 'An update for Genesis is available. See the Settings pane for details.')

        return ui