def __init__(self, parent, start, end, first, **kw): CommonFrame.__init__(self, parent, **kw) self.parent = parent self.current_row = 0 self.headers = ["name", "date", "cpu", "memory"] self.web = Web() self.btn = ThemedButton(self.topFrame, text="OK", command=self.accept) self.start = SmartEntry(self.topFrame, start, first) self.end = SmartEntry(self.topFrame, end, first) self.amountOfEntries = 0
def __init__(self, parent, **kw): CommonFrame.__init__(self, parent, **kw) self.parent = parent self.current_row = 0 self.headers = ["name", "state", "cpu", "memory"] self.web = Web() try: self.agents, self.statuses, self.last_info = self.web.get_current() except requests.RequestException: showerror("error!", "Не могу соединиться с веб службой") self.agents = [] self.amountOfAgents = len(self.agents)
def __init__(self, parent, **kw): CommonFrame.__init__(self, parent, **kw) self.buttonText = ["+", "-", "M"] self.handlers = [self.add, self.delete, self.modify] self.labelText = ["name", "http", "period"] self.rawArray = [] self.web = Web() try: self.agent = self.web.create_agent() except requests.RequestException: self.agent = Agent([], [], [], [], {}) self.amountOfAgents = len(self.agent.agents) + 1 self.current_row = 0 self.checked_row = 0