Ejemplo n.º 1
0
 def __init__(self,name=None,parent=None,obj=None):
    pmModule.__init__(self,name,parent,obj)
    self._errors = monitorerrors.getErrorList()
    self._errorFields, self._errorCodes, self._errorStages = monitorerrors.getErrorCodes()
    self._errorFields = list( self._errorFields)
    self._errorFields.append('transExit')
    self.publishUI(self.doJson)
Ejemplo n.º 2
0
   def __init__(self,name=None,parent=None,obj=None):
      pmModule.__init__(self,name,parent,obj)

      self.publishUI(self.doQuery,role=pmRoles.json())
      self.publishUI(self.doScript,role=pmRoles.script())
      self.publishUI(self.doQuery2,role=pmRoles.json(),alias="site")
      self.publishUI(self.doScript2,role=pmRoles.script(),alias="site")
Ejemplo n.º 3
0
 def __init__(self,name=None,parent=None,obj=None):
    """ Construct the custom web 'hellojs' application """
    pmModule.__init__(self,name,parent,obj) # Initialize the base class
    self.publishUI(self.doJson)             # Publish the method 'doJson' to delivery 
                                            # the Web application  content
                                            
    self.publishUI(self.doScript,role=pmRoles.script()) # Publish the method 'hellojs.doScript'
Ejemplo n.º 4
0
 def __init__(self, name=None, parent=None, obj=None):
     pmModule.__init__(self, name, parent, obj)
     self.publishUI(self.doJson)
     c = pycurl.Curl()
     c.setopt(c.WRITEFUNCTION, self.bodyCallBack)
     self._curl = c
     self._sites = []
     self.reset()
Ejemplo n.º 5
0
 def __init__(self,name=None,parent=None,obj=None):
    pmModule.__init__(self,name,parent,obj)
    self.publishUI(self.doJson)
    c = pycurl.Curl()
    c.setopt(c.WRITEFUNCTION, self.bodyCallBack)
    self._curl = c
    self._sites = []
    self.reset()
Ejemplo n.º 6
0
 def __init__(self, name=None, parent=None, obj=None):
     pmModule.__init__(self, name, parent, obj)
     self._faxVariables = 'WithFAX WithoutFAX bytesWithFAX bytesWithoutFAX timeToCopy'.split(
     )
     self._sites, self._cloud4sites, sname, nicks = pmt.getSiteInfo(
         'region')
     self._description, params = utils.normalizeDbSchema(
         pmt, 'jobsarchived4')
     self.publishUI(self.doQuery, params=params)
Ejemplo n.º 7
0
    def __init__(self, name=None, parent=None, obj=None):
        pmModule.__init__(self, name, parent, obj)
        self._description, params = utils.normalizeDbSchema(
            pmt, 'jobsarchived4')
        self._jobParametersName = 'jobParameters'
        self._allparams = ','.join(params.keys())
        self._colNames = 'jobStatus prodUserID prodUserName nInputFiles AtlasRelease transformation \
            homepackage prodDBlock destinationDBlock destinationSE computingSite creationTime startTime endTime \
            modificationTime jobName attemptNr prodSourceLabel jobDefinitionID jobsetID taskID pilotID \
            schedulerID pilotErrorCode workingGroup creationHost parentID\
            pilotErrorDiag ddmErrorCode ddmErrorDiag jobDispatcherErrorCode jobDispatcherErrorDiag taskBufferErrorCode \
            taskBufferErrorDiag brokerageErrorCode brokerageErrorDiag exeErrorCode exeErrorDiag supErrorCode supErrorDiag \
            transExitCode currentPriority cloud countryGroup processingType VO JediTaskID'.split(
        )

        self._jobSum = [
            ['States', 'jobStatus'],
            ['Users', 'prodUserName'],
            ['Releases', 'AtlasRelease'],
            ['Processing Types', 'processingType']
            #                       ,['Analysis Tasks' , 'destinationDBlock']   # jobtype = 'analysis'
            #                       ,['Output dataset',  'destinationDBlock']   # jobtype = 'analysis'
            ,
            ['Job Types', 'prodSourceLabel']
            #                        ,['Job Series'      , 'prodSeriesLabel']
            #                       , ['Task ID'       , 'taskID'] # if ['prodSourceLabel'] == 'managed' and 'taskID' in job,
            #                       ,['Batch system ID','batchID' ]
            ,
            ['Transformations', 'transformation']
            #                       ,['Input dataset' , 'prodDBlock']
            ,
            ['Working Groups', 'workingGroup'],
            ['Creation Hosts', 'creationHost']
            #                       ,['Packages'      , 'homepackage']  #  need constrain
            ,
            ['Sites', 'computingSite']
            #                       , ['Regions'      , 'Region']
            ,
            ['Clouds', 'cloud'],
            ['Jedi ID', 'JediTaskID'],
            ['Jedi ID', 'JediTaskID']
            #                        ,[ 'CPU Type','cpuConsumptionUnit']
            #                       ,['Analysis Tasks', 'destinationDBlock']
            #                       ,['Job Priorities' , 'currentPriority' ]# need constrain
        ]
        self._errorFields, self._errorCodes, self._errorStages = errorcodes.getErrorCodes(
        )
        self._extraFields = ['tostart', 'duration', 'endt', 'transfert']
        self._region4sites, self._site4regions = setutils.region4Sites(pmt)
        self._siteId, self._siteRegions, self._siteNames, self._siteNicks = pmt.getSiteInfo(
            'region')
        ## 'publishUI' must be the last init statement  !
        # aliase
        self._alias = {'username': '******'}
        for a in self._alias:
            params[a] = None
        self.publishUI(self.doJson, params=params)
Ejemplo n.º 8
0
 def __init__(self, name=None, parent=None, obj=None):
     pmModule.__init__(self, name, parent, obj)
     self.jobstates = utils.jobStates
     self.lstates = len(self.jobstates)
     self.cloudList = pmt.getCloudList()
     self.clouds = ['ALL']
     self.clouds += self.cloudList.keys()
     #      self.clouds = 'ALL CA CERN DE ES FR IT ND NL TW UK US OSG '.split()
     self.publishUI(self.doQuery)
Ejemplo n.º 9
0
    def __init__(self, name=None, parent=None, obj=None):
        """ Construct the custom web 'hellojs' application """
        pmModule.__init__(self, name, parent, obj)  # Initialize the base class
        self.publishUI(self.doJson)  # Publish the method 'doJson' to delivery
        # the Web application  content

        self.publishUI(
            self.doScript,
            role=pmRoles.script())  # Publish the method 'hellojs.doScript'
Ejemplo n.º 10
0
   def __init__(self,name=None,parent=None,obj=None):
      pmModule.__init__(self,name,parent,obj)
      self.publishMenu('Hello Word example')

      #  register UI to provide the default 'http:<hostname>/hellohi' UI
      self.publishUI(self.doQuery,role='html')
      
      #  register UI to provide : 'http:<hostname>/hellohi?_mode=hi' UI
      self.publishUI(self.doHi,role='html',alias='hi')
Ejemplo n.º 11
0
    def __init__(self, name=None, parent=None, obj=None):
        pmModule.__init__(self, name, parent, obj)
        self.publishMenu('Hello Word example')

        #  register UI to provide the default 'http:<hostname>/hellohi' UI
        self.publishUI(self.doQuery, role='html')

        #  register UI to provide : 'http:<hostname>/hellohi?_mode=hi' UI
        self.publishUI(self.doHi, role='html', alias='hi')
Ejemplo n.º 12
0
   def __init__(self,name=None,parent=None,obj=None):
      pmModule.__init__(self,name,parent,obj)
      self.jobstates = utils.jobStates
      self.lstates = len(self.jobstates)
      self.cloudList= pmt.getCloudList()
      self.clouds = ['ALL']
      self.clouds +=  self.cloudList.keys()
#      self.clouds = 'ALL CA CERN DE ES FR IT ND NL TW UK US OSG '.split()
      self.publishUI(self.doQuery)
Ejemplo n.º 13
0
 def __init__(self,name='browser',parent=None,obj=None,server=None,config=None):
    pmModule.__init__(self,name,parent,obj,server,config)
    self._menu = None
    try:
       menu = self.config().config.frontpage['menu']
       self._menu = self.factory(menu,parent=self)
    except:
      raise
      pass
Ejemplo n.º 14
0
    def __init__(self, name=None, parent=None, obj=None):
        pmModule.__init__(self, name, parent, obj)
        self._description, params = utils.normalizeDbSchema(pmt, "jobsarchived4")
        self._jobParametersName = "jobParameters"
        self._allparams = ",".join(params.keys())
        self._colNames = "jobStatus prodUserID prodUserName nInputFiles AtlasRelease transformation \
            homepackage prodDBlock destinationDBlock destinationSE computingSite creationTime startTime endTime \
            modificationTime jobName attemptNr prodSourceLabel jobDefinitionID jobsetID taskID pilotID \
            schedulerID pilotErrorCode workingGroup creationHost parentID\
            pilotErrorDiag ddmErrorCode ddmErrorDiag jobDispatcherErrorCode jobDispatcherErrorDiag taskBufferErrorCode \
            taskBufferErrorDiag brokerageErrorCode brokerageErrorDiag exeErrorCode exeErrorDiag supErrorCode supErrorDiag \
            transExitCode currentPriority cloud countryGroup processingType VO JediTaskID".split()

        self._jobSum = [
            ["States", "jobStatus"],
            ["Users", "prodUserName"],
            ["Releases", "AtlasRelease"],
            ["Processing Types", "processingType"]
            #                       ,['Analysis Tasks' , 'destinationDBlock']   # jobtype = 'analysis'
            #                       ,['Output dataset',  'destinationDBlock']   # jobtype = 'analysis'
            ,
            ["Job Types", "prodSourceLabel"]
            #                        ,['Job Series'      , 'prodSeriesLabel']
            #                       , ['Task ID'       , 'taskID'] # if ['prodSourceLabel'] == 'managed' and 'taskID' in job,
            #                       ,['Batch system ID','batchID' ]
            ,
            ["Transformations", "transformation"]
            #                       ,['Input dataset' , 'prodDBlock']
            ,
            ["Working Groups", "workingGroup"],
            ["Creation Hosts", "creationHost"]
            #                       ,['Packages'      , 'homepackage']  #  need constrain
            ,
            ["Sites", "computingSite"]
            #                       , ['Regions'      , 'Region']
            ,
            ["Clouds", "cloud"],
            ["Jedi ID", "JediTaskID"],
            ["Jedi ID", "JediTaskID"]
            #                        ,[ 'CPU Type','cpuConsumptionUnit']
            #                       ,['Analysis Tasks', 'destinationDBlock']
            #                       ,['Job Priorities' , 'currentPriority' ]# need constrain
        ]
        self._errorFields, self._errorCodes, self._errorStages = errorcodes.getErrorCodes()
        self._extraFields = ["tostart", "duration", "endt", "transfert"]
        self._region4sites, self._site4regions = setutils.region4Sites(pmt)
        self._siteId, self._siteRegions, self._siteNames, self._siteNicks = pmt.getSiteInfo("region")
        ## 'publishUI' must be the last init statement  !
        # aliase
        self._alias = {"username": "******"}
        for a in self._alias:
            params[a] = None
        self.publishUI(self.doJson, params=params)
Ejemplo n.º 15
0
 def __init__(self,
              name='handler',
              parent=None,
              obj=None,
              server=None,
              config=None):
     pmModule.__init__(self, name, parent, obj, server, config)
     try:
         srvname = self.config().config.frontpage['browser']
         self._browser = self.factory(srvname, parent=self)
     except:
         from pmUtils.pmBrowser import pmBrowser
         self._browser = pmBrowser(parent=self)
Ejemplo n.º 16
0
 def __init__(self, name=None, parent=None, obj=None):
     pmModule.__init__(self, name, parent, obj)
     self.publishUI(self.doJson)
     self._db = {}
     if pmt != None: self._db['pmt'] = pmt
     if gmt != None: self._db['gmt'] = gmt
     try:
         if jmt != None: self._db['jmt'] = pmt
     except:
         pass
     try:
         if pdf != None: self._db['pdf'] = pdf
     except:
         pass
Ejemplo n.º 17
0
 def __init__(self,name=None,parent=None,obj=None):
    pmModule.__init__(self,name,parent,obj)
    self.publishUI(self.doJson)
    self._db = {}
    if pmt != None: self._db['pmt']=  pmt
    if gmt != None: self._db['gmt']=  gmt
    try:
       if jmt != None: self._db['jmt']=  pmt
    except:
       pass 
    try:
       if pdf != None: self._db['pdf']=  pdf
    except:
       pass      
Ejemplo n.º 18
0
    def __init__(self, name=None, parent=None, obj=None):
        pmModule.__init__(self, name, parent, obj)
        self.jobstates = ('Pilots', '%fail',
                          'Latest') + utils.jobStates + ('unassigned', )
        self._ALL = ' ALL'
        self.lstates = len(self.jobstates)
        self.cloudList = pmt.getCloudList()
        self.clouds = [self._ALL]
        self.clouds += self.cloudList.keys() + ['CMS', 'AMS']
        self._region4sites, self._sites4region = setutils.region4Sites(pmt)
        self._iFailed = utils.name2Index(self.jobstates, 'failed')
        self._iFinished = utils.name2Index(self.jobstates, 'finished')
        self._iRation = utils.name2Index(self.jobstates, '%fail')
        self._iPilots = utils.name2Index(self.jobstates, 'Pilots')
        self._iLatest = utils.name2Index(self.jobstates, 'Latest')

        self._jobSum = [
            ['States', 'status'],
            ['Users', 'username'],
            ['Releases', 'transUses'],
            ['Processing Types', 'processingType']
            #                       ,['Analysis Tasks' , 'destinationDBlock']   # tasktype = 'analysis'
            #                       ,['Output Dataset',  'destinationDBlock']   # tasktype = 'analysis'
            ,
            ['Task Labels', 'prodSourceLabel']
            #                       , ['Task ID'       , 'JEDITASKID']
            #                       ,['Batch system ID','batchID' ]
            ,
            ['Transformations', 'transPath']
            #                       ,['Input dataset' , 'prodDBlock']
            ,
            ['Working groups', 'workingGroup']
            #                       ,['Creation Hosts' , 'creationHost']
            #                       ,['Packages'      , 'homepackage']  #  need constrain
            #                       ,['Sites'          , 'computingSite']
            #                       , ['Regions'      , 'Region']
            ,
            ['Clouds', 'cloud'],
            ['Task Types', 'taskType'],
            ['Jobs', 'JediTaskID']
            #                       ,['Analysis Tasks', 'destinationDBlock']
            #                       ,['Task Priorities' , 'currentPriority' ]# need constrain
        ]
        #      self.clouds = 'ALL CA CERN DE ES FR IT ND NL RU TW UK US OSG CMS AMS'.split()
        self._description, params = utils.normalizeDbSchema(
            pmt, 'jobsarchived4')

        self.publishUI(self.doQuery, params=params)
Ejemplo n.º 19
0
 def __init__(self,name=None,parent=None,obj=None):
    pmModule.__init__(self,name,parent,obj)
    
    self._jobstates = utils.jobStates
    self._lstates = len(self._jobstates)
    actIndex = utils.name2Index(self._jobstates,'activated')+1
    canIndex = utils.name2Index(self._jobstates,'cancelled')+1
    self._jobsFactoryStates = utils.parseArray(self._jobstates[:actIndex])
    self._jobsWNStates = utils.parseArray(self._jobstates[actIndex:canIndex-1])
    self._jobsCaneledStates = utils.parseArray(self._jobstates[canIndex:])
    shift = 1
    self._shift = shift
    self._ifailed =  utils.name2Index(self._jobstates,'failed')+shift
    self._itotal = self._lstates+shift
    self._ifail = 0
    self._description,params = utils.normalizeDbSchema(pmt,'jobsarchived4')
    self.publishUI(self.doQuery,params = params)
Ejemplo n.º 20
0
   def __init__(self,name=None,parent=None,obj=None):
      pmModule.__init__(self,name,parent,obj)
      self.jobstates = ('Pilots','%fail','Latest')+utils.jobStates + ('unassigned',)
      self._ALL = ' ALL'
      self.lstates = len(self.jobstates)
      self.cloudList= pmt.getCloudList()
      self.clouds = [self._ALL]
      self.clouds +=  self.cloudList.keys() + ['CMS','AMS']
      self._region4sites,self._sites4region = setutils.region4Sites(pmt)
      self._iFailed = utils.name2Index(self.jobstates,'failed')
      self._iFinished  = utils.name2Index(self.jobstates,'finished')
      self._iRation    = utils.name2Index(self.jobstates,'%fail')
      self._iPilots    = utils.name2Index(self.jobstates,'Pilots');
      self._iLatest    = utils.name2Index(self.jobstates,'Latest');

      self._jobSum = [
                         ['States'         , 'status']
                        ,['Users'        , 'username']
                        ,['Releases'      ,'transUses']
                        ,['Processing Types' , 'processingType']
#                       ,['Analysis Tasks' , 'destinationDBlock']   # tasktype = 'analysis'
#                       ,['Output Dataset',  'destinationDBlock']   # tasktype = 'analysis'
                        ,['Task Labels'       , 'prodSourceLabel']
#                       , ['Task ID'       , 'JEDITASKID']
#                       ,['Batch system ID','batchID' ]
                       ,['Transformations', 'transPath']
#                       ,['Input dataset' , 'prodDBlock']
                        ,['Working groups', 'workingGroup']
#                       ,['Creation Hosts' , 'creationHost']
#                       ,['Packages'      , 'homepackage']  #  need constrain
#                       ,['Sites'          , 'computingSite']
#                       , ['Regions'      , 'Region']
                       , ['Clouds'        , 'cloud']
                       , ['Task Types'        , 'taskType']
                       , ['Jobs','JediTaskID'] 
#                       ,['Analysis Tasks', 'destinationDBlock']
#                       ,['Task Priorities' , 'currentPriority' ]# need constrain 
                  ]
 #      self.clouds = 'ALL CA CERN DE ES FR IT ND NL RU TW UK US OSG CMS AMS'.split()
      self._description,params = utils.normalizeDbSchema(pmt,'jobsarchived4')

      self.publishUI(self.doQuery,params=params)
Ejemplo n.º 21
0
 def __init__(self, name=None, parent=None, obj=None):
     pmModule.__init__(self, name, parent, obj)
     self._description = pmt.describe('^PANDALOG$')
     # add the optional parameters:
     params = {}
     ci = utils.name2Index(self._description['header'], 'column_name')
     collist = 'name message asctime Type PandaID loglevel levelname filename lineno module'.split(
     )
     exclude = "pid line type name levelname BINTIME LOGUSER".upper().split(
     )
     nmap = {}
     for c in collist:
         nmap[c.upper()] = c
     for c in self._description['rows']:
         p = not c[ci] in exclude
         nm = nmap.get(c[ci], c[ci])
         c[ci] = nm
         if p: params[nm] = ' '
     self._allparams = ','.join(params.keys())
     self._levelmap = {'INFO': 20, 'WARNING': 30, 'DEBUG': 10, 'ERROR': 40}
     ## 'publishUI' must be the last init statement  !
     self.publishUI(self.doJson, params=params)
     self.publishUI(self.doScript, role=pmRoles.script())
Ejemplo n.º 22
0
 def __init__(self,name=None,parent=None,obj=None):
    pmModule.__init__(self,name,parent,obj)
    self.publishUI(self.doJson)
    self._doc = None
Ejemplo n.º 23
0
 def __init__(self,name=None,parent=None,obj=None):
    pmModule.__init__(self,name,parent,obj)
    self.publishUI(self.doJson,role=pmRoles.object())
    self.publishUI(self.doScript,role=pmRoles.script() )
    
    self._doc = None
Ejemplo n.º 24
0
 def __init__(self,name=None,parent=None,obj=None):
    pmModule.__init__(self,name,parent,obj)      
    self.publishUI(self.doJson)
    pattern = '.*\\.py$'
    self._lut = re.compile(pattern)
Ejemplo n.º 25
0
 def __init__(self, name=None, parent=None, obj=None):
     pmModule.__init__(self, name, parent, obj)
     self.publishUI(self.doQuery, role='html')
Ejemplo n.º 26
0
 def __init__(self, name=None, parent=None, obj=None):
     pmModule.__init__(self, name, parent, obj)
     self.publishUI(self.doJson)
     self.publishUI(self.doScript, role=pmRoles.script())
Ejemplo n.º 27
0
 def __init__(self,name=None,parent=None,obj=None):
    pmModule.__init__(self,name,parent,obj)
Ejemplo n.º 28
0
 def __init__(self,name=None,parent=None,obj=None):
    pmModule.__init__(self,name,parent,obj)
    params = {}
    for c in knownKeys: params[c] = None
    self.publishUI(self.doQuery,role='html',params=params)
Ejemplo n.º 29
0
 def __init__(self,name=None,parent=None,obj=None):
    pmModule.__init__(self,name,parent,obj)
    self.publishUI(self.doQuery,role='html')
    self.publishUI(self.doJson)
    self.publishUI(self.doScript,role=pmRoles.script())
Ejemplo n.º 30
0
 def __init__(self,name=None,parent=None,obj=None):
    pmModule.__init__(self,name,parent,obj)
    self.publishUI(self.doQuery,role=pmRoles.html())
Ejemplo n.º 31
0
 def __init__(self, name=None, parent=None, obj=None):
     pmModule.__init__(self, name, parent, obj)
     params = {}
     for c in knownKeys:
         params[c] = None
     self.publishUI(self.doQuery, role='html', params=params)
Ejemplo n.º 32
0
 def __init__(self, name=None, parent=None, obj=None):
     pmModule.__init__(self, name, parent, obj)
     self.publishUI(self.doJson)
     self._plots = 'twall,tcpu,twait,trun'
     self._app = 'prun,pathena,ganga'
     self._dimension = 'h1'
Ejemplo n.º 33
0
 def __init__(self, name=None, parent=None, obj=None):
     pmModule.__init__(self, name, parent, obj)
     self.publishUI(self.doJson)
Ejemplo n.º 34
0
 def __init__(self,name=None,parent=None,obj=None):
    pmModule.__init__(self,name,parent,obj)
    self.publishUI(self.doQuery)
Ejemplo n.º 35
0
 def __init__(self, name=None, parent=None, obj=None):
     pmModule.__init__(self, name, parent, obj)
     self.publishUI(self.doJson)
     self._plots = 'data_mc,user'
Ejemplo n.º 36
0
 def __init__(self,name=None,parent=None,obj=None):
    pmModule.__init__(self,name,parent,obj)
    self._faxVariables = 'WithFAX WithoutFAX bytesWithFAX bytesWithoutFAX timeToCopy'.split()
    self._sites,self._cloud4sites, sname, nicks = pmt.getSiteInfo('region')
    self._description,params = utils.normalizeDbSchema(pmt,'jobsarchived4')
    self.publishUI(self.doQuery,params=params)
Ejemplo n.º 37
0
 def __init__(self,name=None,parent=None,obj=None):
    pmModule.__init__(self,name,parent,obj)      
    self.publishUI(self.doJson)
    self._plots= 'twall,tcpu,twait,trun'
    self._app= 'prun,pathena,ganga'
    self._dimension='h1'