mirror of
https://github.com/YunoHost/yunorunner.git
synced 2024-09-03 20:05:52 +02:00
[enh] modify index on a deleted job
This commit is contained in:
parent
573d5099fc
commit
65a959c37e
2 changed files with 15 additions and 2 deletions
|
@ -7,3 +7,8 @@
|
||||||
padding-bottom: 1.25rem;
|
padding-bottom: 1.25rem;
|
||||||
padding-left: 1.5rem;
|
padding-left: 1.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.deleted {
|
||||||
|
font-style: italic;
|
||||||
|
color: darkgrey;
|
||||||
|
}
|
|
@ -15,8 +15,8 @@
|
||||||
<th>Started time</th>
|
<th>Started time</th>
|
||||||
<th>End time</th>
|
<th>End time</th>
|
||||||
</thead>
|
</thead>
|
||||||
<tr v-for="(job, index) in jobs" :id="job.id">
|
<tr v-for="(job, index) in jobs" :id="job.id" v-bind:class="{deleted: job.deleted}">
|
||||||
<td><a v-bind:href="'job/' + job.id">{{job.name}}</a></td>
|
<td><a v-if="!job.deleted" v-bind:href="'job/' + job.id">{{job.name}}</a><span v-if="job.deleted">{{job.name}} (deleted)</span></td>
|
||||||
<td>{{job.state}}</td>
|
<td>{{job.state}}</td>
|
||||||
<td>{{job.target_revision}}</td>
|
<td>{{job.target_revision}}</td>
|
||||||
<td>{{job.yunohost_version}}</td>
|
<td>{{job.yunohost_version}}</td>
|
||||||
|
@ -63,6 +63,14 @@
|
||||||
}
|
}
|
||||||
} else if (action == "new_job") {
|
} else if (action == "new_job") {
|
||||||
app.jobs.splice(0, 0, data);
|
app.jobs.splice(0, 0, data);
|
||||||
|
} else if (action == "delete_job") {
|
||||||
|
for (var i = 0; i < app.jobs.length; ++i) {
|
||||||
|
if (app.jobs[i].id == data.id) {
|
||||||
|
Vue.set(app.jobs[i], 'deleted', true);
|
||||||
|
Vue.set(app.jobs[i], 'state', 'deleted');
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
})()
|
})()
|
||||||
|
|
Loading…
Add table
Reference in a new issue