mirror of
https://github.com/YunoHost/yunorunner.git
synced 2024-09-03 20:05:52 +02:00
[enh] link to the app page of a job on the job page
This commit is contained in:
parent
43f6b31fda
commit
243ab5e53a
2 changed files with 9 additions and 3 deletions
7
run.py
7
run.py
|
@ -719,7 +719,12 @@ async def html_job(request, job_id):
|
|||
if job.count == 0:
|
||||
raise NotFound()
|
||||
|
||||
return {"job": job[0], 'relative_path_to_root': '../', 'path': request.path}
|
||||
job = job[0]
|
||||
|
||||
app = Repo.select().where(Repo.url == job.url_or_path)
|
||||
app = app[0] if app else None
|
||||
|
||||
return {"job": job, 'app': app, 'relative_path_to_root': '../', 'path': request.path}
|
||||
|
||||
|
||||
@app.route('/apps/')
|
||||
|
|
|
@ -4,8 +4,9 @@
|
|||
<section class="section" id="job">
|
||||
<div class="container" v-bind:class="{deleted: job.deleted}">
|
||||
<h1 class="title">
|
||||
<span v-if="!job.deleted">Job '{{job.name}}'</span>
|
||||
<span v-if="job.deleted"><s>Job '{{job.name}}'</s> DELETED</span>
|
||||
<span v-if="!job.deleted">Job '{{job.name}}' #{{job.id}}</span>
|
||||
<span v-if="job.deleted"><s>Job '{{job.name}}' #{{job.id}}</s> DELETED</span>
|
||||
<% if app %>for <a href="<{ relative_path_to_root }>apps/<{ app.name }>/"><{ app.name }> </a><% endif %>
|
||||
<a target="_blank" v-bind:href="job.url_or_path">↪</a>
|
||||
</h1>
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue