More cosmetics / simpler job names

This commit is contained in:
Alexandre Aubin 2021-01-05 17:21:31 +01:00
parent 3a1c355472
commit 016d032020
3 changed files with 4 additions and 5 deletions

2
run.py
View file

@ -181,7 +181,7 @@ async def create_job(app_id, app_list_name, repo, job_command_last_part):
else: else:
for i in job_command_last_part: for i in job_command_last_part:
job_name = f"{app_id} ({app_list_name})" + i job_name = f"{app_id}" + i
# avoid scheduling twice # avoid scheduling twice
if Job.select().where(Job.name == job_name, Job.state == "scheduled").count() > 0: if Job.select().where(Job.name == job_name, Job.state == "scheduled").count() > 0:

View file

@ -14,7 +14,7 @@
<th>End time</th> <th>End time</th>
</thead> </thead>
<tr v-for="(job, index) in jobs" :id="job.id" v-bind:class="[{deleted: job.deleted}, job.state + 'Job']"> <tr v-for="(job, index) in jobs" :id="job.id" v-bind:class="[{deleted: job.deleted}, job.state + 'Job']">
<td><a v-if="!job.deleted" v-bind:href="'<{ relative_path_to_root }>job/' + job.id">{{job.name}}</a><span v-if="job.deleted">{{job.name}} (deleted)</span> <small title="job's id">#{{job.id}} </small></td> <td><a v-if="!job.deleted" v-bind:href="'<{ relative_path_to_root }>job/' + job.id">#{{job.id}}</a><span v-if="job.deleted">#{{job.id}} (deleted)</span></td>
<td>{{job.state}}</td> <td>{{job.state}}</td>
<td>{{timestampToDate(job.created_time)}}</td> <td>{{timestampToDate(job.created_time)}}</td>
<td>{{timestampToDate(job.started_time)}}</td> <td>{{timestampToDate(job.started_time)}}</td>

View file

@ -4,9 +4,8 @@
<section class="section" id="job"> <section class="section" id="job">
<div class="container" v-bind:class="{deleted: job.deleted}"> <div class="container" v-bind:class="{deleted: job.deleted}">
<h1 class="title"> <h1 class="title">
<span v-if="!job.deleted">Job '{{job.name}}' #{{job.id}}</span> <span v-if="job.deleted">(DELETED)</span>
<span v-if="job.deleted"><s>Job '{{job.name}}' #{{job.id}}</s> DELETED</span> Job #{{job.id}} <% if app %>for <a href="<{ relative_path_to_root }>apps/<{ app.name }>/"><{ app.name }> </a><% endif %>
<% 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> <a target="_blank" v-bind:href="job.url_or_path"></a>
</h1> </h1>