Changeset 65226 in vbox for trunk/src/VBox/ValidationKit/testmanager/webui
- Timestamp:
- Jan 10, 2017 3:36:36 PM (8 years ago)
- Location:
- trunk/src/VBox/ValidationKit/testmanager/webui
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/testmanager/webui/wuiadmintestbox.py
r64986 r65226 39 39 from testmanager.core.db import TMDatabaseConnection; 40 40 from testmanager.core.schedgroup import SchedGroupLogic, SchedGroupData; 41 from testmanager.core.testbox import TestBoxData, TestBoxDataEx ;41 from testmanager.core.testbox import TestBoxData, TestBoxDataEx, TestBoxLogic; 42 42 from testmanager.core.testset import TestSetData; 43 43 from testmanager.core.db import isDbTimestampInfinity; … … 192 192 '', '', '', 'align="left"', 'align="right"', 'align="right"', 'align="right"', 193 193 'align="center"' ]); 194 self._aaiColumnSorting.extend([ 195 (TestBoxLogic.kiSortColumn_sName,), 196 None, # LOM 197 None, # Status 198 None, # Cmd 199 None, # Note 200 (TestBoxLogic.kiSortColumn_iTestBoxScriptRev,), 201 (TestBoxLogic.kiSortColumn_iPythonHexVersion,), 202 None, # Group 203 (TestBoxLogic.kiSortColumn_sOs, TestBoxLogic.kiSortColumn_sOsVersion, TestBoxLogic.kiSortColumn_sCpuArch,), 204 (TestBoxLogic.kiSortColumn_sCpuVendor, TestBoxLogic.kiSortColumn_lCpuRevision,), 205 (TestBoxLogic.kiSortColumn_fNestedPaging,), 206 (TestBoxLogic.kiSortColumn_cCpus,), 207 (TestBoxLogic.kiSortColumn_cMbMemory,), 208 (TestBoxLogic.kiSortColumn_cMbScratch,), 209 None, # Actions 210 ]); 211 assert len(self._aaiColumnSorting) == len(self._asColumnHeaders); 194 212 self._aoActions = list(self.kasTestBoxActionDescs); 195 213 self._sAction = oDisp.ksActionTestBoxListPost; -
trunk/src/VBox/ValidationKit/testmanager/webui/wuibase.py
r65086 r65226 82 82 ## The name of the list-action parameter (WuiListContentWithActionBase). 83 83 ksParamListAction = 'ListAction'; 84 85 ## One or more columns to sort by. 86 ksParamSortColumns = 'SortBy'; 84 87 85 88 ## The name of the change log enabled/disabled parameter. … … 801 804 cItemsPerPage = self.getIntParam(self.ksParamItemsPerPage, iMin = 2, iMax = 9999, iDefault = 300); 802 805 iPage = self.getIntParam(self.ksParamPageNo, iMin = 0, iMax = 999999, iDefault = 0); 806 aiSortColumnsDup = self.getListOfIntParams(self.ksParamSortColumns, iMin = 0, 807 iMax = getattr(oLogicType, 'kcMaxSortColumns', 0), aiDefaults = []); 808 aiSortColumns = []; 809 for iSortColumn in aiSortColumnsDup: 810 if iSortColumn not in aiSortColumns: 811 aiSortColumns.append(iSortColumn); 803 812 self._checkForUnknownParameters(); 804 813 805 aoEntries = oLogicType(self._oDb).fetchForListing(iPage * cItemsPerPage, cItemsPerPage + 1, tsEffective );814 aoEntries = oLogicType(self._oDb).fetchForListing(iPage * cItemsPerPage, cItemsPerPage + 1, tsEffective, aiSortColumns); 806 815 oContent = oListContentType(aoEntries, iPage, cItemsPerPage, tsEffective, 807 816 fnDPrint = self._oSrvGlue.dprint, oDisp = self); -
trunk/src/VBox/ValidationKit/testmanager/webui/wuicontentbase.py
r65052 r65226 749 749 self._asColumnHeaders = []; 750 750 self._asColumnAttribs = []; 751 self._aaiColumnSorting = []; ##< list of list of integers 751 752 752 753 def _formatCommentCell(self, sComment, cMaxLines = 3, cchMaxLine = 63): … … 944 945 945 946 sHtml = ' <thead class="tmheader"><tr>'; 946 for oHeader in self._asColumnHeaders:947 for iHeader, oHeader in enumerate(self._asColumnHeaders): 947 948 if isinstance(oHeader, WuiHtmlBase): 948 949 sHtml += '<th>' + oHeader.toHtml() + '</th>'; 950 elif iHeader < len(self._aaiColumnSorting) and self._aaiColumnSorting[iHeader] is not None: 951 sHtml += '<th>' 952 sHtml += '<a href="javascript:ahrefActionSortByColumns(\'%s\', [%s]);">' \ 953 % (WuiDispatcherBase.ksParamSortColumns, ','.join([str(i) for i in self._aaiColumnSorting[iHeader]])); 954 sHtml += webutils.escapeElem(oHeader) + '</a></th>'; 949 955 else: 950 956 sHtml += '<th>' + webutils.escapeElem(oHeader) + '</th>'; … … 1024 1030 % ('' if sId is None else sId)), ]; 1025 1031 self._asColumnAttribs = [ 'align="center"', ]; 1032 self._aaiColumnSorting = [ None, ]; 1026 1033 1027 1034 def _getCheckBoxColumn(self, iEntry, sValue):
Note:
See TracChangeset
for help on using the changeset viewer.