def get(self): params = { "host_url": self.request.host_url, "is_admin": acl.is_admin(), "is_bot": acl.is_bot(), "is_privileged_user": acl.is_privileged_user(), "is_user": acl.is_user(), "mapreduce_jobs": [], "user_type": acl.get_user_type(), } if acl.is_admin(): params["mapreduce_jobs"] = [ {"id": job_id, "name": job_def["name"]} for job_id, job_def in mapreduce_jobs.MAPREDUCE_JOBS.iteritems() ] params["xsrf_token"] = self.generate_xsrf_token() self.response.write(template.render("swarming/root.html", params))
def get(self): params = { 'host_url': self.request.host_url, 'is_admin': acl.is_admin(), 'is_bot': acl.is_bot(), 'is_privileged_user': acl.is_privileged_user(), 'is_user': acl.is_user(), 'mapreduce_jobs': [], 'user_type': acl.get_user_type(), } if acl.is_admin(): params['mapreduce_jobs'] = [ {'id': job_id, 'name': job_def['name']} for job_id, job_def in mapreduce_jobs.MAPREDUCE_JOBS.iteritems() ] params['xsrf_token'] = self.generate_xsrf_token() self.response.write(template.render('swarming/root.html', params))
def get(self): params = { 'host_url': self.request.host_url, 'is_admin': acl.is_admin(), 'is_bot': acl.is_bot(), 'is_privileged_user': acl.is_privileged_user(), 'is_user': acl.is_user(), 'mapreduce_jobs': [], 'user_type': acl.get_user_type(), } if acl.is_admin(): params['mapreduce_jobs'] = [ {'id': job_id, 'name': job_def['job_name']} for job_id, job_def in mapreduce_jobs.MAPREDUCE_JOBS.iteritems() ] params['xsrf_token'] = self.generate_xsrf_token() self.response.write(template.render('swarming/root.html', params))