- Timestamp:
- Mar 24, 2020 4:59:31 PM (5 years ago)
- Location:
- trunk/src/VBox/ValidationKit/testmanager/webui
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/testmanager/webui/wuibase.py
r83360 r83391 356 356 # 357 357 358 def getUrlNoParams(self): 359 """ 360 Returns the base URL without any parameters (no trailing '?' or &). 361 """ 362 return self._sUrlBase[:self._sUrlBase.rindex('?')]; 363 364 def getUrlBase(self): 365 """ 366 Returns the base URL, ending with '?' or '&'. 367 This may already include some debug parameters. 368 """ 369 return self._sUrlBase; 370 358 371 def getParameters(self): 359 372 """ -
trunk/src/VBox/ValidationKit/testmanager/webui/wuicontentbase.py
r83366 r83391 485 485 486 486 @staticmethod 487 def formatChangeLogEntry(aoEntries, iEntry ):487 def formatChangeLogEntry(aoEntries, iEntry, sUrl, dParams): 488 488 """ 489 489 Formats one change log entry into one or more HTML table rows. 490 491 The sUrl and dParams arguments are used to construct links to historical 492 data using the tsEffective value. If no links wanted, they'll both be None. 490 493 491 494 Note! The parameters are given as array + index in case someone wishes … … 494 497 """ 495 498 oEntry = aoEntries[iEntry]; 499 500 # Turn the effective date into a URL if we can: 501 if sUrl: 502 dParams[WuiDispatcherBase.ksParamEffectiveDate] = oEntry.tsEffective; 503 sEffective = WuiLinkBase(WuiFormContentBase.formatTsShort(oEntry.tsEffective), sUrl, 504 dParams, fBracketed = False).toHtml(); 505 else: 506 sEffective = webutils.escapeElem(WuiFormContentBase.formatTsShort(oEntry.tsEffective)) 496 507 497 508 # The primary row. … … 503 514 ' </tr>\n' \ 504 515 % ( sRowClass, 505 len(oEntry.aoChanges) + 1, webutils.escapeElem(WuiFormContentBase.formatTsShort(oEntry.tsEffective)),516 len(oEntry.aoChanges) + 1, sEffective, 506 517 len(oEntry.aoChanges) + 1, webutils.escapeElem(WuiFormContentBase.formatTsShort(oEntry.tsExpire)), 507 518 WuiFormContentBase._guessChangeLogEntryDescription(aoEntries, iEntry), … … 624 635 ' <tbody>\n'; 625 636 637 if self._sMode == self.ksMode_Show: 638 sUrl = self._oDisp.getUrlNoParams(); 639 dParams = self._oDisp.getParameters(); 640 else: 641 sUrl = None; 642 dParams = None; 643 626 644 for iEntry, _ in enumerate(aoEntries): 627 sContent += self.formatChangeLogEntry(aoEntries, iEntry );645 sContent += self.formatChangeLogEntry(aoEntries, iEntry, sUrl, dParams); 628 646 629 647 sContent += ' <tbody>\n' \
Note:
See TracChangeset
for help on using the changeset viewer.