def RefrshHist(self): self.histres.destr() histrows = statistic.stats(self.schema, self.table).history_stat(self) self.histres = results.history_stat(self, self.histcols, histrows, self.schema, self.table) sb = wx.StaticBox(self.panelHist) sbs = wx.StaticBoxSizer(sb, orient=wx.VERTICAL) sizer = wx.BoxSizer(wx.VERTICAL) sizer.Add(self.histres.list, 1, wx.EXPAND) sbs.Add(sizer, proportion=1, flag=wx.EXPAND | wx.ALL) self.panelHist.SetSizer(sbs) self.panelHist.Layout()
def HistDQ(self, event): try: logging.info(u"open local history") self.panelHist = wx.Panel(self.notebook, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.TAB_TRAVERSAL) hist_title = u"История оценки качества данных %s.%s" % (self.schema, self.table) self.notebook.AddPage(self.panelHist, hist_title, False, wx.NullBitmap) self.histcols = self.main_stat_columns histrows = statistic.stats(self.schema, self.table).history_stat(self) self.histres = results.history_stat(self, self.histcols, histrows, self.schema, self.table) sb = wx.StaticBox(self.panelHist) sbs = wx.StaticBoxSizer(sb, orient=wx.VERTICAL) sizer = wx.BoxSizer(wx.VERTICAL) sizer.Add(self.histres.list, 1, wx.EXPAND) sbs.Add(sizer, proportion=1, flag=wx.EXPAND | wx.ALL) self.panelHist.SetSizer(sbs) self.panelHist.Layout() except TypeError, info: wx.MessageBox(str(info)) logging.error(u"error while looking history - code: 289 - %s" % str(info))