def adminhome(request, path): g = 3 inst = Adm() app = 0 progress = 100.0 if len(path) > 1: g = 1 # print "ooooooooooooo",path.split('_')[0] if path.split('_')[0] == "/application": ra.appsInfo() path = path.split('/') path = path[-1] print "\n\ncheck\n\n", ra.apps_info[path], '\n' app = 1 dic_apps = ra.apps_info[path] for key in dic_apps.keys(): print "m in" if key == "progress": # print "inside" progress = dic_apps[key] else: path = path.split('/') path = path[-1] print ":::::::::::::::::path:::::::::", path # print more_info else: g = 0 usr_name = 'saumyad' #just for testing path = unicodedata.normalize('NFKD', path).encode('ascii', 'ignore') ra.appsInfo() dic_running = ra.app_vs_userfunc(usr_name) dic_finished = hs.get_jobinfo(usr_name) print "ppppp", dic_finished final_dic = [] user = [] user = dic_finished.keys() print user final_list = [] for u in user: # final_list.append(dic_finished[u]) for dic in dic_finished[u]: final_list.append(dic) print "::::::::::finished list:::::****************::", user, final_list print "::::::::::finished job:::::::", dic_finished progress = int(progress) return render( request, 'adminhome.html', { 'progress': progress, 'app': app, 'g': g, 'dic_running': dic_running, 'dic_finished': final_list, 'path': path })
def adminhome(request,path): g=3 inst=Adm() app=0 progress = 100.0 if len(path)>1: g=1 # print "ooooooooooooo",path.split('_')[0] if path.split('_')[0] == "/application": ra.appsInfo() path=path.split('/') path=path[-1] print "\n\ncheck\n\n",ra.apps_info[path],'\n' app=1 dic_apps = ra.apps_info[path] for key in dic_apps.keys(): print "m in" if key=="progress": # print "inside" progress = dic_apps[key] else: path=path.split('/') path=path[-1] print ":::::::::::::::::path:::::::::",path # print more_info else: g=0 usr_name = 'saumyad' #just for testing path=unicodedata.normalize('NFKD',path).encode('ascii','ignore') ra.appsInfo() dic_running = ra.app_vs_userfunc(usr_name) dic_finished = hs.get_jobinfo(usr_name) print "ppppp",dic_finished final_dic = [] user = [] user = dic_finished.keys() print user final_list = [] for u in user: # final_list.append(dic_finished[u]) for dic in dic_finished[u]: final_list.append(dic) print "::::::::::finished list:::::****************::",user, final_list print "::::::::::finished job:::::::",dic_finished progress = int(progress) return render(request,'adminhome.html',{'progress':progress,'app':app,'g':g,'dic_running':dic_running,'dic_finished':final_list,'path':path})
def userjob(request, path): global usr_name g = 3 app = 0 progress = 100.0 if len(path) > 1: g = 1 # print "ooooooooooooo",path.split('_')[0] if path.split('_')[0] == "/application": ra.appsInfo() path = path.split('/') path = path[-1] print "\n\ncheck\n\n", ra.apps_info[path], '\n' app = 1 dic_apps = ra.apps_info[path] for key in dic_apps.keys(): print "m in" if key == "progress": # print "inside" progress = dic_apps[key] else: path = path.split('/') path = path[-1] print ":::::::::::::::::path:::::::::", path # print more_info else: g = 0 usr_name = 'saumyad' #just for testing path = unicodedata.normalize('NFKD', path).encode('ascii', 'ignore') ra.appsInfo() dic_running = ra.app_vs_userfunc(usr_name) dic_finished = hs.get_jobinfo(usr_name) if usr_name in dic_finished: dic_finished = dic_finished[usr_name] print "::::::::::finished job:::::::", dic_finished progress = int(progress) return render( request, 'userjob.html', { 'progress': progress, 'app': app, 'g': g, 'dic_running': dic_running, 'dic_finished': dic_finished, 'path': path })
def userjob(request, path): global usr_name g = 3 app = 0 if len(path) > 1: g = 1 # print "ooooooooooooo",path.split('_')[0] if path.split('_')[0] == "/application": ra.appsInfo() path = path.split('/') path = path[-1] print "\n\ncheck\n\n", ra.apps_info[path], '\n' app = 1 dic_apps = ra.apps_info[path] else: path = path.split('/') path = path[-1] print ":::::::::::::::::path:::::::::", path # job_h.main_func(path) # more_info = job_h.more_job_details # print more_info else: g = 0 usr_name = 'surya' #just for testing path = unicodedata.normalize('NFKD', path).encode('ascii', 'ignore') ra.appsInfo() print " inside views " dic_running = ra.app_vs_userfunc("saumyad") print "########running list", dic_running dic_finished = hs.get_jobinfo(usr_name) if usr_name in dic_finished: print dic_finished[usr_name] print dic_running # print path return render( request, 'userjob.html', { 'app': app, 'g': g, 'dic_running': dic_running, 'dic_finished': dic_finished[usr_name], 'path': path })
def userjob(request,path): global usr_name g=3 app=0 progress = 100.0 if len(path)>1: g=1 # print "ooooooooooooo",path.split('_')[0] if path.split('_')[0] == "/application": ra.appsInfo() path=path.split('/') path=path[-1] print "\n\ncheck\n\n",ra.apps_info[path],'\n' app=1 dic_apps = ra.apps_info[path] for key in dic_apps.keys(): print "m in" if key=="progress": # print "inside" progress = dic_apps[key] else: path=path.split('/') path=path[-1] print ":::::::::::::::::path:::::::::",path # print more_info else: g=0 usr_name = 'saumyad' #just for testing path=unicodedata.normalize('NFKD',path).encode('ascii','ignore') ra.appsInfo() dic_running = ra.app_vs_userfunc(usr_name) dic_finished = hs.get_jobinfo(usr_name) if usr_name in dic_finished: dic_finished = dic_finished[usr_name] print "::::::::::finished job:::::::",dic_finished progress = int(progress) return render(request,'userjob.html',{'progress':progress,'app':app,'g':g,'dic_running':dic_running,'dic_finished':dic_finished,'path':path})
def userjob(request,path): global usr_name g=3 app=0 if len(path)>1: g=1 # print "ooooooooooooo",path.split('_')[0] if path.split('_')[0] == "/application": ra.appsInfo() path=path.split('/') path=path[-1] print "\n\ncheck\n\n",ra.apps_info[path],'\n' app=1 dic_apps = ra.apps_info[path] else: path=path.split('/') path=path[-1] print ":::::::::::::::::path:::::::::",path # job_h.main_func(path) # more_info = job_h.more_job_details # print more_info else: g=0 usr_name = 'surya' #just for testing path=unicodedata.normalize('NFKD',path).encode('ascii','ignore') ra.appsInfo() print " inside views " dic_running = ra.app_vs_userfunc("saumyad") print "########running list",dic_running dic_finished = hs.get_jobinfo(usr_name) if usr_name in dic_finished: print dic_finished[usr_name] print dic_running # print path return render(request,'userjob.html',{'app':app,'g':g,'dic_running':dic_running,'dic_finished':dic_finished[usr_name],'path':path})