VirtualBox

Ignore:
Timestamp:
Jan 10, 2017 3:36:36 PM (8 years ago)
Author:
vboxsync
Message:

TestManager: Hacked up some basic testbox sorting during the weekly meeting.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/testmanager/webui/wuibase.py

    r65086 r65226  
    8282    ## The name of the list-action parameter (WuiListContentWithActionBase).
    8383    ksParamListAction    = 'ListAction';
     84
     85    ## One or more columns to sort by.
     86    ksParamSortColumns   = 'SortBy';
    8487
    8588    ## The name of the change log enabled/disabled parameter.
     
    801804        cItemsPerPage   = self.getIntParam(self.ksParamItemsPerPage, iMin = 2, iMax =   9999, iDefault = 300);
    802805        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);
    803812        self._checkForUnknownParameters();
    804813
    805         aoEntries  = oLogicType(self._oDb).fetchForListing(iPage * cItemsPerPage, cItemsPerPage + 1, tsEffective);
     814        aoEntries  = oLogicType(self._oDb).fetchForListing(iPage * cItemsPerPage, cItemsPerPage + 1, tsEffective, aiSortColumns);
    806815        oContent   = oListContentType(aoEntries, iPage, cItemsPerPage, tsEffective,
    807816                                      fnDPrint = self._oSrvGlue.dprint, oDisp = self);
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette