VirtualBox

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

Last change on this file was 106061, checked in by vboxsync, 4 months ago

Copyright year updates by scm.

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