Changeset 64719 in vbox
- Timestamp:
- Nov 19, 2016 7:17:11 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/testmanager/webui/wuiadmintestbox.py
r62484 r64719 177 177 ]; 178 178 179 ## Boxes which doesn't report in for more than 15 min are considered dead. 180 kcSecMaxStatusDeltaAlive = 15*60 181 179 182 def __init__(self, aoEntries, iPage, cItemsPerPage, tsEffective, fnDPrint, oDisp): 180 183 # type: (list[TestBoxDataForListing], int, int, datetime.datetime, ignore, WuiAdmin) -> None … … 193 196 self._sCheckboxName = TestBoxData.ksParam_idTestBox; 194 197 198 def show(self, fShowNavigation = True): 199 """ Adds some stats at the bottom of the page """ 200 (sTitle, sBody) = super(WuiTestBoxList, self).show(fShowNavigation); 201 202 # Count boxes in interesting states. 203 if len(self._aoEntries) > 0: 204 cActive = 0; 205 cDead = 0; 206 for oTestBox in self._aoEntries: 207 oDelta = oTestBox.tsCurrent - oTestBox.oStatus.tsUpdated; 208 if oDelta.days <= 0 and oDelta.seconds <= self.kcSecMaxStatusDeltaAlive: 209 if oTestBox.fEnabled: 210 cActive += 1; 211 else: 212 cDead += 1; 213 sBody += '<div id="testboxsummary"><p>\n' \ 214 '%s testboxes of which %s are active and %s dead' \ 215 '</p></div>\n' \ 216 % (len(self._aoEntries), cActive, cDead,) 217 return (sTitle, sBody); 218 195 219 def _formatListEntry(self, iEntry): # pylint: disable=R0914 196 220 from testmanager.webui.wuiadmin import WuiAdmin; … … 219 243 else: 220 244 oDelta = oEntry.tsCurrent - oEntry.oStatus.tsUpdated; 221 if oDelta.days <= 0 and oDelta.seconds <= 15*60: # 15 mins and we consider you dead.245 if oDelta.days <= 0 and oDelta.seconds <= self.kcSecMaxStatusDeltaAlive: 222 246 oSeen = WuiSpanText('tmspan-online', u'%s\u00a0s\u00a0ago' % (oDelta.days * 24 * 3600 + oDelta.seconds,)); 223 247 else:
Note:
See TracChangeset
for help on using the changeset viewer.