VirtualBox

source: vbox/trunk/src/VBox/ValidationKit/testmanager/webui/wuiadminschedqueue.py@ 90802

Last change on this file since 90802 was 83362, checked in by vboxsync, 5 years ago

TestManager/wui: No trailing separator..

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.0 KB
Line 
1# -*- coding: utf-8 -*-
2# "$Id: wuiadminschedqueue.py 83362 2020-03-21 17:06:38Z vboxsync $"
3
4"""
5Test Manager WUI - Admin - Scheduling Queue.
6"""
7
8__copyright__ = \
9"""
10Copyright (C) 2012-2020 Oracle Corporation
11
12This file is part of VirtualBox Open Source Edition (OSE), as
13available from http://www.virtualbox.org. This file is free software;
14you can redistribute it and/or modify it under the terms of the GNU
15General Public License (GPL) as published by the Free Software
16Foundation, in version 2 as it comes in the "COPYING" file of the
17VirtualBox OSE distribution. VirtualBox OSE is distributed in the
18hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
19
20The contents of this file may alternatively be used under the terms
21of the Common Development and Distribution License Version 1.0
22(CDDL) only, as it comes in the "COPYING.CDDL" file of the
23VirtualBox OSE distribution, in which case the provisions of the
24CDDL are applicable instead of those of the GPL.
25
26You may elect to license modified versions of this file under the
27terms and conditions of either the GPL or the CDDL or both.
28"""
29__version__ = "$Revision: 83362 $"
30
31
32# Validation Kit imports
33from testmanager.webui.wuicontentbase import WuiListContentBase
34
35
36class WuiAdminSchedQueueList(WuiListContentBase):
37 """
38 WUI Scheduling Queue Content Generator.
39 """
40 def __init__(self, aoEntries, iPage, cItemsPerPage, tsEffective, fnDPrint, oDisp, aiSelectedSortColumns = None):
41 tsEffective = None; # Not relevant, no history on the scheduling queue.
42 WuiListContentBase.__init__(self, aoEntries, iPage, cItemsPerPage, tsEffective, 'Scheduling Queue',
43 fnDPrint = fnDPrint, oDisp = oDisp, aiSelectedSortColumns = aiSelectedSortColumns,
44 fTimeNavigation = False);
45 self._asColumnHeaders = [
46 'Last Run', 'Scheduling Group', 'Test Group', 'Test Case', 'Config State', 'Item ID'
47 ];
48 self._asColumnAttribs = [
49 'align="center"', 'align="center"', 'align="center"', 'align="center"', 'align="center"', 'align="center"'
50 ];
51 self._iPrevPerSchedGroupRowNumber = 0;
52
53 def _formatListEntry(self, iEntry):
54 oEntry = self._aoEntries[iEntry] # type: SchedQueueEntry
55 sState = 'up-to-date' if oEntry.fUpToDate else 'outdated';
56 return [ oEntry.tsLastScheduled, oEntry.sSchedGroup, oEntry.sTestGroup, oEntry.sTestCase, sState, oEntry.idItem ];
57
58 def _formatListEntryHtml(self, iEntry):
59 sHtml = WuiListContentBase._formatListEntryHtml(self, iEntry);
60
61 # Insert separator row?
62 if iEntry < len(self._aoEntries):
63 oEntry = self._aoEntries[iEntry] # type: SchedQueueEntry
64 if oEntry.iPerSchedGroupRowNumber != self._iPrevPerSchedGroupRowNumber:
65 if iEntry > 0 and iEntry + 1 < min(len(self._aoEntries), self._cItemsPerPage):
66 sHtml += '<tr class="tmseparator"><td colspan=%s> </td></tr>\n' % (len(self._asColumnHeaders),);
67 self._iPrevPerSchedGroupRowNumber = oEntry.iPerSchedGroupRowNumber;
68 return sHtml;
69
Note: See TracBrowser for help on using the repository browser.

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