(request, uid)
return render(request, "job_view.html", context=context)
Views the state of a single job.
Views the state of a single job.
Views the state of a single job .
def job_view(request, uid):
    '''
    Views the state of a single job.
    '''
    job = Job.objects.filter(uid=uid).first()
    project = job.project

    stdout = job.stdout_log
    stderr = job.stderr_log
    if job.is_running():
        # Pass the most current stderr and stdout
        stdout_path = os.path.join(job.path, settings.JOB_STDOUT)
        stderr_path = os.path.join(job.path, settings.JOB_STDERR)
        stdout = open(stdout_path, 'r').read()
        stderr = open(stderr_path, 'r').read()

    paths = auth.listing(root=job.get_data_dir())

    # Pass along any plugins this job has.
    plugin = job.json_data.get('settings', {}).get('plugin')

    context = dict(job=job, project=project, stderr=stderr, stdout=stdout,uid=job.uid, show_all=True,
                   activate='View Result', paths=paths, serve_view="job_serve",
                   plugin=plugin)

    counts = get_counts(project)
    context.update(counts)

    return render(request, "job_view.html", context=context)
def job_view ( request , uid ) : job = Job . objects . filter ( uid = uid ) . first ( ) project = job . project stdout = job . stdout_log stderr = job . stderr_log if job . is_running ( ) : # Pass the most current stderr and stdout stdout_path = os . path . join ( job . path , settings . JOB_STDOUT ) stderr_path = os . path . join ( job . path , settings . JOB_STDERR ) stdout = open ( stdout_path , 'r' ) . read ( ) stderr = open ( stderr_path , 'r' ) . read ( ) paths = auth . listing ( root = job . get_data_dir ( ) ) # Pass along any plugins this job has. plugin = job . json_data . get ( 'settings' , { } ) . get ( 'plugin' ) context = dict ( job = job , project = project , stderr = stderr , stdout = stdout , uid = job . uid , show_all = True , activate = 'View Result' , paths = paths , serve_view = "job_serve" , plugin = plugin ) counts = get_counts ( project ) context . update ( counts ) return render ( request , "job_view.html" , context = context )