Ejemplo n.º 1
0
 def __init__(self, aoEntries, iPage, cItemsPerPage, tsEffective, fnDPrint,
              oDisp):
     # type: (list[TestBoxDataForListing], int, int, datetime.datetime, ignore, WuiAdmin) -> None
     WuiListContentWithActionBase.__init__(self,
                                           aoEntries,
                                           iPage,
                                           cItemsPerPage,
                                           tsEffective,
                                           sTitle='TestBoxes',
                                           sId='users',
                                           fnDPrint=fnDPrint,
                                           oDisp=oDisp)
     self._asColumnHeaders.extend([
         'Name', 'LOM', 'Status', 'Cmd', 'Note', 'Script', 'Python',
         'Group', 'OS', 'CPU', 'Features', 'CPUs', 'RAM', 'Scratch',
         'Actions'
     ])
     self._asColumnAttribs.extend([
         'align="center"', 'align="center"', 'align="center"',
         'align="center"'
         'align="center"', 'align="center"', 'align="center"',
         'align="center"', '', '', '', 'align="left"', 'align="right"',
         'align="right"', 'align="right"', 'align="center"'
     ])
     self._aoActions = list(self.kasTestBoxActionDescs)
     self._sAction = oDisp.ksActionTestBoxListPost
     self._sCheckboxName = TestBoxData.ksParam_idTestBox
Ejemplo n.º 2
0
 def __init__(self, aoEntries, iPage, cItemsPerPage, tsEffective, fnDPrint, oDisp, aiSelectedSortColumns = None):
     # type: (list[TestBoxDataForListing], int, int, datetime.datetime, ignore, WuiAdmin) -> None
     WuiListContentWithActionBase.__init__(self, aoEntries, iPage, cItemsPerPage, tsEffective,
                                           sTitle = 'TestBoxes', sId = 'users', fnDPrint = fnDPrint, oDisp = oDisp,
                                           aiSelectedSortColumns = aiSelectedSortColumns);
     self._asColumnHeaders.extend([ 'Name', 'LOM', 'Status', 'Cmd',
                                    'Note', 'Script', 'Python', 'Group',
                                    'OS', 'CPU', 'Features', 'CPUs', 'RAM', 'Scratch',
                                    'Actions' ]);
     self._asColumnAttribs.extend([ 'align="center"', 'align="center"', 'align="center"', 'align="center"'
                                    'align="center"', 'align="center"', 'align="center"', 'align="center"',
                                    '', '', '', 'align="left"', 'align="right"', 'align="right"', 'align="right"',
                                    'align="center"' ]);
     self._aaiColumnSorting.extend([
         (TestBoxLogic.kiSortColumn_sName,),
         None, # LOM
         (-TestBoxLogic.kiSortColumn_fEnabled, TestBoxLogic.kiSortColumn_enmState, -TestBoxLogic.kiSortColumn_tsUpdated,),
         (TestBoxLogic.kiSortColumn_enmPendingCmd,),
         None, # Note
         (TestBoxLogic.kiSortColumn_iTestBoxScriptRev,),
         (TestBoxLogic.kiSortColumn_iPythonHexVersion,),
         None, # Group
         (TestBoxLogic.kiSortColumn_sOs, TestBoxLogic.kiSortColumn_sOsVersion, TestBoxLogic.kiSortColumn_sCpuArch,),
         (TestBoxLogic.kiSortColumn_sCpuVendor, TestBoxLogic.kiSortColumn_lCpuRevision,),
         (TestBoxLogic.kiSortColumn_fCpuNestedPaging,),
         (TestBoxLogic.kiSortColumn_cCpus,),
         (TestBoxLogic.kiSortColumn_cMbMemory,),
         (TestBoxLogic.kiSortColumn_cMbScratch,),
         None, # Actions
     ]);
     assert len(self._aaiColumnSorting) == len(self._asColumnHeaders);
     self._aoActions     = list(self.kasTestBoxActionDescs);
     self._sAction       = oDisp.ksActionTestBoxListPost;
     self._sCheckboxName = TestBoxData.ksParam_idTestBox;
Ejemplo n.º 3
0
 def __init__(self, aoEntries, iPage, cItemsPerPage, tsEffective, fnDPrint, oDisp):
     # type: (list[TestBoxDataForListing], int, int, datetime.datetime, ignore, WuiAdmin) -> None
     WuiListContentWithActionBase.__init__(self, aoEntries, iPage, cItemsPerPage, tsEffective,
                                           sTitle = 'TestBoxes', sId = 'users', fnDPrint = fnDPrint, oDisp = oDisp);
     self._asColumnHeaders.extend([ 'Name', 'LOM', 'Status', 'Cmd',
                                    'Note', 'Script', 'Python', 'Group',
                                    'OS', 'CPU', 'Features', 'CPUs', 'RAM', 'Scratch',
                                    'Actions' ]);
     self._asColumnAttribs.extend([ 'align="center"', 'align="center"', 'align="center"', 'align="center"'
                                    'align="center"', 'align="center"', 'align="center"', 'align="center"',
                                    '', '', '', 'align="left"', 'align="right"', 'align="right"', 'align="right"',
                                    'align="center"' ]);
     self._aoActions     = list(self.kasTestBoxActionDescs);
     self._sAction       = oDisp.ksActionTestBoxListPost;
     self._sCheckboxName = TestBoxData.ksParam_idTestBox;
Ejemplo n.º 4
0
 def __init__(self, aoEntries, iPage, cItemsPerPage, tsEffective, fnDPrint, oDisp):
     WuiListContentWithActionBase.__init__(self, aoEntries, iPage, cItemsPerPage, tsEffective,
                                           sTitle = 'TestBoxes', sId = 'users', fnDPrint = fnDPrint, oDisp = oDisp);
     self._asColumnHeaders.extend([ 'Name', 'LOM', 'Status',
                                    'Cmd', 'Script', 'Python', 'Group',
                                    'OS', 'CPU', 'Features', 'CPUs', 'RAM', 'Scratch',
                                    'Actions' ]);
     self._asColumnAttribs.extend([ 'align="center"', 'align="center"', 'align="center"',
                                    'align="center"', 'align="center"', 'align="center"', 'align="center"',
                                    '', '', '', 'align="right"', 'align="right"', 'align="right"',
                                    'align="center"' ]);
     self._aoActions     = list(self.kasTestBoxActionDescs);
     self._aoSchedGroups = SchedGroupLogic(self._oDisp.getDb()).fetchOrderedByName();
     self._dSchedGroups  = dict();
     for oSchedGroup in self._aoSchedGroups:
         self._aoActions.append([ 'setgroup-%u' % (oSchedGroup.idSchedGroup,),
                                  'Migrate to group %s (#%u)' % (oSchedGroup.sName, oSchedGroup.idSchedGroup,),
                                  oSchedGroup.sDescription ]);
         self._dSchedGroups[oSchedGroup.idSchedGroup] = oSchedGroup;
     self._sAction       = oDisp.ksActionTestBoxListPost;
     self._sCheckboxName = TestBoxData.ksParam_idTestBox;