You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@gump.apache.org by aj...@apache.org on 2003/10/09 02:22:16 UTC

cvs commit: jakarta-gump/python/gump launcher.py context.py document.py conf.py

ajack       2003/10/08 17:22:16

  Modified:    python/gump launcher.py context.py document.py conf.py
  Log:
  Step #1 in linkable icons. Goes to project now.
  
  Revision  Changes    Path
  1.11      +2 -2      jakarta-gump/python/gump/launcher.py
  
  Index: launcher.py
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/python/gump/launcher.py,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- launcher.py	6 Oct 2003 14:04:15 -0000	1.10
  +++ launcher.py	9 Oct 2003 00:22:16 -0000	1.11
  @@ -348,10 +348,10 @@
           # Process Outputs (exit_code and stderr/stdout)
           if result.exit_code < 0:
             result.status=CMD_STATUS_TIMED_OUT
  -          log.error('Failed to launch/execute command. ExitCode: ' + str(result.exit_code))
  +          log.error('Failed to launch/execute command. [' + execString + ']. ExitCode: ' + str(result.exit_code))
           elif result.exit_code > 0:    
             result.status=CMD_STATUS_FAILED
  -          log.error('Failed to launch/execute command. ExitCode: ' + str(result.exit_code))
  +          log.error('Failed to launch/execute command. [' + execString + ']. ExitCode: ' + str(result.exit_code))
           else:
             result.status=CMD_STATUS_SUCCESS
             
  
  
  
  1.17      +8 -5      jakarta-gump/python/gump/context.py
  
  Index: context.py
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/python/gump/context.py,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- context.py	7 Oct 2003 19:19:31 -0000	1.16
  +++ context.py	9 Oct 2003 00:22:16 -0000	1.17
  @@ -345,12 +345,15 @@
       def aggregateStates(self, states=None):
           if not states: states=[]
           
  -        # Just do subordinates...
  -        #
  -        # pair=self.getStatePair()
  +        pair=self.getStatePair()
           # Add state, if not already there
  -        #if not stateUnset(pair.status) and not pair in states: \
  -        #    states.append(pair)
  +        if not stateUnset(pair.status) and not pair in states: \
  +            states.append(pair)
  +        
  +        return states + self.getSubbordinateStates();
  +        
  +    def getSubbordinateStates(self, states=None):
  +        if not states: states=[]
           
           # Subbordinates
           for ctxt in self:
  
  
  
  1.68      +33 -18    jakarta-gump/python/gump/document.py
  
  Index: document.py
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/python/gump/document.py,v
  retrieving revision 1.67
  retrieving revision 1.68
  diff -u -r1.67 -r1.68
  --- document.py	8 Oct 2003 00:36:10 -0000	1.67
  +++ document.py	9 Oct 2003 00:22:16 -0000	1.68
  @@ -349,7 +349,7 @@
           x.write('      <td><link href=\'%s\'>%s</link></td><td>%s</td><td>%s</td>\n' % \
             (getModuleRelativeUrl(mname),mname,	\
                 getStatePairIcon(mctxt.getStatePair()),	\
  -              getStateIcons(mctxt.aggregateStates())))    
  +              getStateIcons(mctxt)))    
           x.write('      <td>%s</td>\n' % elapsedTimeToString(mctxt.elapsedTime()))    
           x.write('     </tr>\n\n')
       if not mcount: x.write('	<tr><td>None</td></tr>')
  @@ -387,7 +387,7 @@
           x.write('      <td><link href=\'%s\'>%s</link></td><td>%s</td><td>%s</td>\n' % \
             (getModuleRelativeUrl(mname),mname,\
                 getStatePairIcon(mctxt.getStatePair()),	\
  -              getStateIcons(mctxt.aggregateStates())))    
  +              getStateIcons(mctxt)))    
           x.write('      <td>%s</td>\n' % elapsedTimeToString(mctxt.elapsedTime()))    
           x.write('     </tr>\n\n')
       if not mcount: x.write('	<tr><td>None</td></tr>')
  @@ -430,7 +430,7 @@
   
           x.write('     <tr><!-- %s -->\n' % (mname))        
           x.write('      <td><link href=\'%s\'>%s</link></td><td>%s</td>\n' % \
  -          (getModuleRelativeUrl(mname),mname,getStateIcons(mctxt.aggregateStates())))    
  +          (getModuleRelativeUrl(mname),mname,getStateIcons(mctxt)))    
           x.write('      <td>%s</td>\n' % elapsedTimeToString(mctxt.elapsedTime()))    
           x.write('     </tr>\n\n')
       if not mcount: x.write('	<tr><td>None</td></tr>')
  @@ -482,10 +482,17 @@
       xml = xmlize('workspace',workspace,f)
       f.close()  
       
  -def getStateIcons(pairs):
  +def getStateIcons(modulecontext):
       icons=''
  -    for pair in pairs:
  -        icons+=getStatePairIcon(pair)
  +    for projectcontext in modulecontext:
  +        # :TODO: Dig in and get the first 'failed' 
  +        # launched task to use as link
  +        
  +        # :TODO: Wrap (via paragraph?) after a
  +        # small number, 5 or so...
  +        icon=getStatePairIcon(projectcontext.getStatePair())
  +        href=getContextLink(projectcontext,0,icon)
  +        icons+=href+' '
       return icons
       
   def documentModule(workspace,context,wdir,modulename,modulecontext,db,projectFilterList=None):
  @@ -1120,20 +1127,23 @@
       return url
   
   def getTypedContextLink(context,depth=1):
  -    return getContextLink(context,depth,1)
  +    return getContextLink(context,depth,None,1)
   
  -def getContextLink(context,depth=1,typed=0):
  -    description=""
  -    if typed:
  -        if isinstance(context,GumpContext):
  -            description="Gump: "
  -        elif isinstance(context,ModuleContext):
  -            description="Module: "
  -        else:        
  -            description="Project: "
  -    description+=context.name
  +def getContextLink(context,depth=1,xdata=None,typed=0):
  +    if not xdata:
  +        description=""
  +        if typed:
  +            if isinstance(context,GumpContext):
  +                description="Gump: "
  +            elif isinstance(context,ModuleContext):
  +                description="Module: "
  +            else:        
  +                description="Project: "
  +        description+=context.name
       
  -    return getLink(getContextUrl(context,depth),description)
  +        return getLink(getContextUrl(context,depth),description)
  +    else:
  +        return getXLink(getContextUrl(context,depth),xdata)
       
   def getContextStateDescription(context):
       xdoc=stateName(context.status)
  @@ -1209,6 +1219,11 @@
   def getLink(href,name=None):
       if not name: name = href
       link='<link href=\'%s\'>%s</link>' % (escape(href),escape(name))
  +    return link
  +    
  +def getXLink(href,xdata=None):
  +    if not xdata: xdata = escape(href)
  +    link='<link href=\'%s\'>%s</link>' % (escape(href),xdata)
       return link
              
   #####################################################################           
  
  
  
  1.18      +4 -4      jakarta-gump/python/gump/conf.py
  
  Index: conf.py
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/python/gump/conf.py,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- conf.py	6 Oct 2003 14:04:15 -0000	1.17
  +++ conf.py	9 Oct 2003 00:22:16 -0000	1.18
  @@ -92,7 +92,7 @@
       project    = "jakarta-gump"
       merge      = os.path.normpath('%s/%s' % (dir.work, 'merge.xml'))
       date       = time.strftime('%Y%m%d')
  -    logLevel   = logging.INFO
  +    logLevel   = logging.WARN
       classpath = (os.getenv('CLASSPATH') or '').split(os.pathsep)  
       
       logurl		=	'http://cvs.apache.org/builds/gump/nightly/'