/[pdpsoft]/nl.nikhef.ndpf.groupviews/trunk/ndpf-gv-mkplots
ViewVC logotype

Diff of /nl.nikhef.ndpf.groupviews/trunk/ndpf-gv-mkplots

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3130 by templon, Tue Sep 27 09:15:32 2016 UTC revision 3131 by templon, Tue Oct 25 10:18:12 2016 UTC
# Line 155  def doplot(glist, dbtype, psize, timetag Line 155  def doplot(glist, dbtype, psize, timetag
155    
156      gcolors = dict()      gcolors = dict()
157            
158      for idx in range(len(grouplist)):      skipgroup = 0
         gcolors[grouplist[idx]] = colors[idx]  
   
159      if ranktype == 'bottom':      if ranktype == 'bottom':
160          if 'unused'  in grouplist:          if 'unused'  in grouplist:
161              grouplist.remove('unused')              grouplist.remove('unused')
# Line 165  def doplot(glist, dbtype, psize, timetag Line 163  def doplot(glist, dbtype, psize, timetag
163          if 'offline'  in grouplist:          if 'offline'  in grouplist:
164              grouplist.remove('offline')              grouplist.remove('offline')
165              grouplist.insert(0,'offline')              grouplist.insert(0,'offline')
166                    else:
167            if 'unused'  in grouplist:
168                skipgroup += 1
169            if 'offline'  in grouplist:
170                skipgroup += 1
171    
172        print grouplist
173        for idx in range(len(grouplist)):
174            thisgrp = grouplist[idx]
175            if thisgrp == 'unused':
176                gcolors[thisgrp] = '#d8d8d8'
177            elif thisgrp == "offline":
178                gcolors[thisgrp] = "#790ead"
179            else:
180                gcolors[thisgrp] = colors[idx+skipgroup]
181    
182      if dbtype == 'queued':      if dbtype == 'queued':
183          if 'unused'  in grouplist: grouplist.remove('unused')          if 'unused'  in grouplist: grouplist.remove('unused')
184          if 'offline' in grouplist: grouplist.remove('offline')          if 'offline' in grouplist: grouplist.remove('offline')
# Line 190  def doplot(glist, dbtype, psize, timetag Line 203  def doplot(glist, dbtype, psize, timetag
203      sumshown = 0      sumshown = 0
204      for idx in range(len(grouplist)):      for idx in range(len(grouplist)):
205          group = grouplist[idx]          group = grouplist[idx]
206          if group == 'unused':          acolor = gcolors[group]
             acolor = '#d8d8d8'  
         elif group == "offline":  
             acolor = "#790ead"  
         else:  
             acolor = gcolors[group]  
207          pdefstr = 'AREA' ':' + group + acolor + ':' + "%8s" % (group)          pdefstr = 'AREA' ':' + group + acolor + ':' + "%8s" % (group)
208          if pcents:          if pcents:
209              pdefstr = pdefstr + ' (' + "%4.1f" % (pcents[group]) + ')'              pdefstr = pdefstr + ' (' + "%4.1f" % (pcents[group]) + ')'
# Line 226  def doplot_wait(glist, dbtype, psize, ti Line 234  def doplot_wait(glist, dbtype, psize, ti
234      data_defs = list()      data_defs = list()
235      plot_defs = list()      plot_defs = list()
236    
237        skipgroup = 0
238      if dbtype == 'waittime':      if dbtype == 'waittime':
239          if 'unused'  in grouplist: grouplist.remove('unused')          if 'unused'  in grouplist:
240          if 'offline' in grouplist: grouplist.remove('offline')              grouplist.remove('unused')
241                skipgroup += 1
242            if 'offline' in grouplist:
243                grouplist.remove('offline')
244                skipgroup += 1
245    
246      for group in (grouplist + ['rollover','lastroll']):      for group in (grouplist + ['rollover','lastroll']):
247          data_defs.append('DEF:'+group+'='+DATADIR+group+'.'+dbtype+'.rrd:'+dbtype+':AVERAGE')          data_defs.append('DEF:'+group+'='+DATADIR+group+'.'+dbtype+'.rrd:'+dbtype+':AVERAGE')
# Line 237  def doplot_wait(glist, dbtype, psize, ti Line 250  def doplot_wait(glist, dbtype, psize, ti
250          group = grouplist[idx]          group = grouplist[idx]
251          if group == 'unused':          if group == 'unused':
252              acolor = '#d8d8d8'              acolor = '#d8d8d8'
253                skipgroup += 1
254          elif group == "offline":          elif group == "offline":
255              acolor = "#790ead"              acolor = "#790ead"
256                skipgroup += 1
257          else:          else:
258              acolor = colors[idx]              acolor = colors[idx+skipgroup]
259          pdefstr = 'LINE3' ':' + group + acolor + ':' + group          pdefstr = 'LINE3' ':' + group + acolor + ':' + group
260          pdefstr = pdefstr + '\\n'          pdefstr = pdefstr + '\\n'
261          plot_defs.append(pdefstr)          plot_defs.append(pdefstr)

Legend:
Removed from v.3130  
changed lines
  Added in v.3131

grid.support@nikhef.nl
ViewVC Help
Powered by ViewVC 1.1.28