ajack 2004/06/26 09:42:42
Modified: python/gump/test Tag: CleanUp updater.py
template/xhtml/css Tag: CleanUp style.css
python/gump/document/xdocs Tag: CleanUp xdoc.py
documenter.py
Log:
Style fixes.
Revision Changes Path
No revision
No revision
1.7.2.1 +3 -5 gump/python/gump/test/updater.py
Index: updater.py
===================================================================
RCS file: /home/cvs/gump/python/gump/test/updater.py,v
retrieving revision 1.7
retrieving revision 1.7.2.1
diff -u -r1.7 -r1.7.2.1
--- updater.py 21 May 2004 23:15:00 -0000 1.7
+++ updater.py 26 Jun 2004 16:42:42 -0000 1.7.2.1
@@ -53,9 +53,7 @@
def testCommandLines(self):
- pass
-
- #
# Hmm, need to test checkouts and updates and status...
- # but how, since we now delegate more
- #
\ No newline at end of file
+ # but how, since we now delegate more
+
+ pass
\ No newline at end of file
No revision
No revision
1.1.2.7 +1 -1 gump/template/xhtml/css/Attic/style.css
Index: style.css
===================================================================
RCS file: /home/cvs/gump/template/xhtml/css/Attic/style.css,v
retrieving revision 1.1.2.6
retrieving revision 1.1.2.7
diff -u -r1.1.2.6 -r1.1.2.7
--- style.css 25 Jun 2004 23:27:22 -0000 1.1.2.6
+++ style.css 26 Jun 2004 16:42:42 -0000 1.1.2.7
@@ -1 +1 @@
-img { border: 0 }
HR { color: #8EB4D9; height: 1px; text-align: center; width: 90%; position:
relative }
TABLE.TRANSPARENT { border: none; width: 100% }
TABLE { border: thin solid #000000; width: 100% }
/* Annotations */
.DEBUG { background-color: #000000 }
.INFO { background-color: #99CC66 }
.WARN { background-color: #FFFF99 }
.ERROR { background-color: #CC0000 }
/* State */
.SUCCESS { background-color: #99CC66 }
.FAILED { background-color: #CC0000; color: #FFFFFF }
.PREREQFAILED { background-color: #FFFF99 }
.COMPLETE { background-color: #00CCFF }
.UNSET { background-color: #CCCCCC }
\ No newline at end of file
+img { border: 0 }
HR { color: #8EB4D9; height: 1px; text-align: center; width: 90%; position:
relative }
TABLE.TRANSPARENT { border: none; width: 100% }
TABLE { border: thin solid #000000; width: 100% }
/* Annotations */
.DEBUG { background-color: #000000 }
.INFO { background-color: #99CC66 }
.WARN { background-color: #FFFF99 }
.ERROR { background-color: #CC0000 }
/* Note and Warning boxes, (WARN from above) */
.NOTE { background-color: #99CC66 }
/* State */
.SUCCESS { background-color: #99CC66 }
.FAILED { background-color: #CC0000; color: #FFFFFF }
.PREREQFAILED { background-color: #FFFF99 }
.COMPLETE { background-color: #00CCFF }
.UNSET { background-color: #CCCCCC }
\ No newline at end of file
No revision
No revision
1.2.2.14 +14 -5 gump/python/gump/document/xdocs/xdoc.py
Index: xdoc.py
===================================================================
RCS file: /home/cvs/gump/python/gump/document/xdocs/xdoc.py,v
retrieving revision 1.2.2.13
retrieving revision 1.2.2.14
diff -u -r1.2.2.13 -r1.2.2.14
--- xdoc.py 25 Jun 2004 23:24:53 -0000 1.2.2.13
+++ xdoc.py 26 Jun 2004 16:42:42 -0000 1.2.2.14
@@ -27,10 +27,9 @@
import logging
import types
-from types import NoneType
+from types import NoneType, TupleType
from xml.sax.saxutils import escape
-
from gump import log
from gump.utils import *
@@ -216,6 +215,7 @@
return self.keeper
def setStyle(self,style):
+ # Force Style to be upper case
self.style=style
def getStyle(self,style):
@@ -417,7 +417,11 @@
if headings:
headerRow=self.createRow()
for heading in headings:
- headerRow.createHeader(heading)
+ if isinstance(heading,TupleType):
+ (title,style)=heading
+ headerRow.createHeader(title).setStyle(style)
+ else:
+ headerRow.createHeader(heading)
def start(self):
self.context.writeLineIndented('<table>')
@@ -432,7 +436,12 @@
row=self.createRow()
if isinstance(datum,list):
for data in datum:
- row.createData(data)
+ if isinstance(data,TupleType):
+ (value,style)=data
+ row.createData(value).setStyle(style)
+ else:
+ row.createData(data)
+
else:
row.createData(datum)
return row
@@ -472,7 +481,7 @@
self.createText(text)
def start(self):
- self.context.writeIndented('<th>')
+ self.context.writeIndented('<th' + self.getStyleAttribute() + '>')
def end(self):
self.context.writeLine('</th>')
1.9.2.22 +59 -43 gump/python/gump/document/xdocs/documenter.py
Index: documenter.py
===================================================================
RCS file: /home/cvs/gump/python/gump/document/xdocs/documenter.py,v
retrieving revision 1.9.2.21
retrieving revision 1.9.2.22
diff -u -r1.9.2.21 -r1.9.2.22
--- documenter.py 25 Jun 2004 23:08:52 -0000 1.9.2.21
+++ documenter.py 26 Jun 2004 16:42:42 -0000 1.9.2.22
@@ -739,43 +739,44 @@
if not realTime:
self.documentSummary(document, self.workspace.getProjectSummary())
- #
- # Modules...
- #
- modulesSection=document.createSection('Modules (in update order)')
-
modulesTable=modulesSection.createTable(['Index','Updated','Name','State','Duration\nin
state','Last Modified','Notes'])
- mcount=0
- for module in self.gumpSet.getCompletedModules():
+ if not realTime:
+ #
+ # Modules...
+ #
+ modulesSection=document.createSection('Modules (in update order)')
+
modulesTable=modulesSection.createTable(['Index','Updated','Name','State','Duration\nin
state','Last Modified','Notes'])
+ mcount=0
+ for module in self.gumpSet.getCompletedModules():
- mcount+=1
+ mcount+=1
- moduleRow=modulesTable.createRow()
- moduleRow.createComment(module.getName())
+ moduleRow=modulesTable.createRow()
+ moduleRow.createComment(module.getName())
- self.setStyleFromState(moduleRow,module.getStatePair())
+ self.setStyleFromState(moduleRow,module.getStatePair())
- moduleRow.createData(module.getPositionIndex())
+ moduleRow.createData(module.getPositionIndex())
- startData=moduleRow.createData(secsToTime(module.getStartSecs()))
- self.setStyleFromState(startData,module.getStatePair())
+ startData=moduleRow.createData(secsToTime(module.getStartSecs()))
+ self.setStyleFromState(startData,module.getStatePair())
- self.insertLink(module,self.workspace,moduleRow.createData())
- self.insertStateIcon(module,self.workspace,moduleRow.createData())
- moduleRow.createData(module.getStats().sequenceInState)
- moduleRow.createData( \
- getGeneralSinceDescription( \
- module.getStats().getLastModified()))
+ self.insertLink(module,self.workspace,moduleRow.createData())
+ self.insertStateIcon(module,self.workspace,moduleRow.createData())
+ moduleRow.createData(module.getStats().sequenceInState)
+ moduleRow.createData( \
+ getGeneralSinceDescription( \
+ module.getStats().getLastModified()))
- notes=''
- if module.isVerbose():
- if notes: notes += ' '
- notes += 'Verbose'
- if module.isDebug():
- if notes: notes += ' '
- notes += 'Debug'
- moduleRow.createData(notes)
+ notes=''
+ if module.isVerbose():
+ if notes: notes += ' '
+ notes += 'Verbose'
+ if module.isDebug():
+ if notes: notes += ' '
+ notes += 'Debug'
+ moduleRow.createData(notes)
- if not mcount: modulesTable.createLine('None')
+ if not mcount: modulesTable.createLine('None')
#
# Projects...
@@ -2144,20 +2145,35 @@
summarySection.createParagraph('Overall project success : ' + \
'%02.2f' % summary.overallPercentage + '%')
-
summaryTable=summarySection.createTable(['Projects','Successes','Failures','Prereqs',
\
- 'No Works','Packages'])
-
- summaryTable.createRow([ '%02d' % summary.projects, \
- '%02d' % summary.successes + \
- ' (' + '%02.2f' % summary.successesPercentage +
'%)', \
- '%02d' % summary.failures + \
- ' (' + '%02.2f' % summary.failuresPercentage +
'%)', \
- '%02d' % summary.prereqs + \
- ' (' + '%02.2f' % summary.prereqsPercentage + '%)',
\
- '%02d' % summary.noworks + \
- ' (' + '%02.2f' % summary.noworksPercentage + '%)',
\
- '%02d' % summary.packages + \
- ' (' + '%02.2f' % summary.packagesPercentage +
'%)'] )
+ successStyle=stateName(STATE_SUCCESS).upper()
+ failedStyle=stateName(STATE_FAILED).upper()
+ prereqStyle=stateName(STATE_PREREQ_FAILED).upper()
+ noworkStyle=stateName(STATE_UNSET).upper()
+ completeStyle=stateName(STATE_COMPLETE).upper()
+
+ summaryTable=summarySection.createTable(['Projects',
+ ('Successes', successStyle),
+ ('Failures',failedStyle),
+ ('Prereqs', prereqStyle),
+ ('No Works', noworkStyle),
+ ('Packages', completeStyle) ])
+
+ summaryTable.createRow([ '%02d' % summary.projects,
+ ('%02d' % summary.successes + \
+ ' (' + '%02.2f' % summary.successesPercentage +
'%)',
+ successStyle),
+ ('%02d' % summary.failures + \
+ ' (' + '%02.2f' % summary.failuresPercentage + '%)',
+ failedStyle),
+ ('%02d' % summary.prereqs + \
+ ' (' + '%02.2f' % summary.prereqsPercentage + '%)',
+ prereqStyle),
+ ('%02d' % summary.noworks + \
+ ' (' + '%02.2f' % summary.noworksPercentage + '%)',
+ noworkStyle),
+ ('%02d' % summary.packages + \
+ ' (' + '%02.2f' % summary.packagesPercentage + '%)',
+ completeStyle) ])
def
documentWorkList(self,xdocNode,workable,description='Work',tailFail=1,note='',warn=''):
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]