def post(self): try: jsonobj = json.loads(self.request.body) UserName = jsonobj['UserName'] JenkinsURL = jsonobj['JenkinsURL'] nodelist = querynodes.querynodes(JenkinsURL) print nodelist ret_info = {"ret": nodelist} self.write(json.dumps(ret_info)) except Exception as e: print(e) ret_info = {"ret": "ERROR : internal error"} self.write(json.dumps(ret_info))
def post(self): try: jsonobj = json.loads(self.request.body) UserName = jsonobj['UserName'] JenkinsURL = jsonobj['JenkinsURL'] nodelist = querynodes.querynodes(JenkinsURL) print nodelist ret_info = {"ret":nodelist} self.write(json.dumps(ret_info)) except Exception as e: print(e) ret_info = {"ret":"ERROR : internal error"} self.write(json.dumps(ret_info))
def get(self): userid=self.get_cookie_user() service_type = int(self.get_argument("type").encode('utf-8')) JenkinsURL = JENKINSURL nodelist = querynodes.querynodes(JenkinsURL) if(userid): if(service_type == 1): self.render("./taskmanagement/nextstop_pbdownload.html",usrname=userid,nodelist=nodelist) if(service_type == 2): self.render("./taskmanagement/nextstop_pbclient.html",usrname=userid,nodelist=nodelist) if(service_type == 3): self.render("./taskmanagement/nextstop_pbbenchmark.html",usrname=userid,nodelist=nodelist) else: redirect_url=CAS_SETTINGS[ 'cas_server' ] + '/login?service=' + CAS_SETTINGS[ 'service_url' ] self.redirect(redirect_url)