Exemple #1
0
    def __init__(self, app, name, cls, frame, static):
        super(MonitorSelfTable, self).__init__(app, name, cls)

        # Do we want the name column to link to the objects page?
        # In the case of collector we don't
        if frame:
            col = ObjectLinkColumn(app, "name", cls.Name, cls._id, frame)
        else:
            col = ObjectTableColumn(app, cls.Name.name, cls.Name)
        col.static_header = static
        self.add_column(col)

        stat = MonitorSelfAgeColumn(app, "monitorSelfAge", cls.MonitorSelfAge)
        stat.static_header = static
        self.add_column(stat)
        
        stat = MonitorSelfStatColumn(app, cls.MonitorSelfRegisteredSocketCount.name, cls.MonitorSelfRegisteredSocketCount)
        stat.static_header = static
        self.add_column(stat)

        stat = MonitorSelfStatColumn(app, cls.MonitorSelfCPUUsage.name, cls.MonitorSelfCPUUsage)
        stat.static_header = static
        self.add_column(stat)

        stat = MonitorSelfStatColumn(app, cls.MonitorSelfImageSize.name, cls.MonitorSelfImageSize)
        stat.static_header = static
        self.add_column(stat)

        self.enable_csv_export()
Exemple #2
0
    def __init__(self, app, name):
        cls = app.model.com_redhat_sesame.Sysimage

        super(SystemSelector, self).__init__(app, name, cls)

        self.table.adapter = WallabyAndSqlAdapter(app, cls)

        frame = "main.inventory.system"
        col = ObjectLinkColumn(app, "name", cls.nodeName, cls._id, frame)
        self.add_column(col)
        self.add_search_filter(col)

        self.add_attribute_column(cls.osName)
        self.add_attribute_column(cls.machine)
        self.add_attribute_column(cls.memFree)
        
        col = self.LoadAverageColumn(app, "loadavg", cls.loadAverage1Min)
        self.add_column(col)
        
        col = SystemTagsColumn(app, "Tags", app.model.com_redhat_cumin_grid.Node.Tags, "Tags")
        self.add_column(col)
        col.cumin_module = "configuration"

        col = SystemCheckinColumn(app, "Checkin", app.model.com_redhat_cumin_grid.Node.Checkin, "Checkin")
        self.add_column(col)
        col.cumin_module = "configuration"

        self.enable_csv_export()