Beispiel #1
0
 def add_group(self, **kwds):
     """add_group action"""
     rows = self.admin_group.get()
     print "\n### GROUPS", [r for r in rows]
     rid = genid(kwds)
     status = "ok" # chagne to whatever it would be
     content = self.templatepage('confirm', ticket=rid, user=self.user(), status=status)
     return self.abs_page('admin', content)
Beispiel #2
0
 def add_user(self, **kwds):
     """add_user action"""
     rid = genid(kwds)
     status = "ok"  # chagne to whatever it would be
     content = self.templatepage('confirm',
                                 ticket=rid,
                                 user=self.user(),
                                 status=status)
     return self.abs_page('admin', content)
Beispiel #3
0
 def add_team(self, **kwds):
     """add_team action"""
     rows = self.admin_team.get()
     print "\n### TEAMS", kwds, [r for r in rows]
     print "request to add", kwds
     rid = genid(kwds)
     status = "ok" # chagne to whatever it would be
     content = self.templatepage('confirm', ticket=rid, user=self.user(), status=status)
     return self.abs_page('admin', content)
Beispiel #4
0
 def add_group(self, **kwds):
     """add_group action"""
     rows = self.admin_group.get()
     print "\n### GROUPS", [r for r in rows]
     rid = genid(kwds)
     status = "ok"  # chagne to whatever it would be
     content = self.templatepage('confirm',
                                 ticket=rid,
                                 user=self.user(),
                                 status=status)
     return self.abs_page('admin', content)
Beispiel #5
0
 def add_team(self, **kwds):
     """add_team action"""
     rows = self.admin_team.get()
     print "\n### TEAMS", kwds, [r for r in rows]
     print "request to add", kwds
     rid = genid(kwds)
     status = "ok"  # chagne to whatever it would be
     content = self.templatepage('confirm',
                                 ticket=rid,
                                 user=self.user(),
                                 status=status)
     return self.abs_page('admin', content)
Beispiel #6
0
 def request(self, **kwargs):
     "Get data example and expose it as json"
     dataset = kwargs.get('uinput', '')
     if not dataset:
         return {'error': 'no input dataset'}
     url = 'https://cmsweb.cern.ch/reqmgr/rest/outputdataset/%s' % dataset
     params = {}
     wdata = getdata(url, params)
     wdict = dict(date=time.ctime(), team='Team-A', status='Running', ID=genid(wdata))
     winfo = self.templatepage('workflow', wdict=wdict,
                               dataset=dataset, code=pprint.pformat(wdata))
     content = self.templatepage('search', content=winfo)
     return self.abs_page('request', content)
Beispiel #7
0
 def request(self, **kwargs):
     "Get data example and expose it as json"
     dataset = kwargs.get('uinput', '')
     if not dataset:
         return {'error': 'no input dataset'}
     url = 'https://cmsweb.cern.ch/reqmgr2/data/request?outputdataset=%s' % dataset
     params = {}
     headers = {'Accept': 'application/json'}
     wdata = getdata(url, params, headers)
     wdict = dict(date=time.ctime(), team='Team-A', status='Running', ID=genid(wdata))
     winfo = self.templatepage('workflow', wdict=wdict,
                               dataset=dataset, code=pprint.pformat(wdata))
     content = self.templatepage('search', content=winfo)
     return self.abs_page('request', content)
Beispiel #8
0
 def add_user(self, **kwds):
     """add_user action"""
     rid = genid(kwds)
     status = "ok" # chagne to whatever it would be
     content = self.templatepage('confirm', ticket=rid, user=self.user(), status=status)
     return self.abs_page('admin', content)