mirror of
https://github.com/YunoHost/yunorunner.git
synced 2024-09-03 20:05:52 +02:00
[enh] add a button to restart a job
This commit is contained in:
parent
f51a322a51
commit
a62aa571f6
1 changed files with 7 additions and 1 deletions
|
@ -8,7 +8,10 @@
|
||||||
<span v-if="job.deleted"><s>Job '{{job.name}}'</s> DELETED</span>
|
<span v-if="job.deleted"><s>Job '{{job.name}}'</s> DELETED</span>
|
||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
<div style="margin-bottom: 15px" v-if="!job.deleted"><button class="button is-warning" v-on:click="cancelJob">Cancel job</button> </div>
|
<div style="margin-bottom: 15px" v-if="!job.deleted">
|
||||||
|
<button class="button is-warning" v-on:click="cancelJob">Cancel job</button>
|
||||||
|
<button class="button is-default" v-on:click="restartJob">Restart job</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
<table class="table is-bordered">
|
<table class="table is-bordered">
|
||||||
<tr><th>State</th><td>{{job.state}}</td></tr>
|
<tr><th>State</th><td>{{job.state}}</td></tr>
|
||||||
|
@ -39,6 +42,9 @@
|
||||||
},
|
},
|
||||||
cancelJob: function() {
|
cancelJob: function() {
|
||||||
$.post("/api/job/" + this.job.id + "/stop")
|
$.post("/api/job/" + this.job.id + "/stop")
|
||||||
|
},
|
||||||
|
restartJob: function() {
|
||||||
|
$.post("/api/job/" + this.job.id + "/restart")
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|
Loading…
Add table
Reference in a new issue