Example #1
0
   def doQuery(self,site='ALL',From='Jun_2011',To='May_2012',type='7'):
      """ Process the query request 
         Arguments:
            site  -- the site name to present the analystics for site
            month --
            year  --
            type  --
      """
      data =  { "site" : site, "from" : From, "to" : To, "type" :  type }
      self.publishTitle("Panda Analytics %(type)s of %(site)s site from %(from)s to %(to)s" % data )

      types = ['filetype_jobsets', 'jobs_filetype' ,'filetype_popularity', 'jobs_per_jobset'] 
#       data["filename"] = self.server().fileImageURL() + "/analytics/pic/%(type)s_%(month)s_%(year)s_ANALY_%(site)s.png" % data
      files = []
      for type in types:
         files.append('%(site)s_%(type)s_%(from)s_%(to)s' % {'site': site, 'type' : type, 'from' : From, 'to' : To } )
      data["filenames"] = files
      # self.server().fileImageURL() + "/analytics/pic/%(type)s_%(month)s_%(year)s_ANALY_%(site)s.png" % data
      self.publishMain(main=data,role=pmRoles.object())
Example #2
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