diff --git a/src/components/rundetail.vue b/src/components/rundetail.vue
index 41612c6..6eeb545 100644
--- a/src/components/rundetail.vue
+++ b/src/components/rundetail.vue
@@ -32,12 +32,12 @@
From start
From failed tasks
@@ -45,7 +45,7 @@
@@ -93,7 +93,7 @@
diff --git a/src/util/data.js b/src/util/data.js
index b8e83ca..c1f6659 100644
--- a/src/util/data.js
+++ b/src/util/data.js
@@ -72,6 +72,31 @@ export async function deleteUserToken(username, tokenname) {
return res.text();
}
+export async function restartRun(runid, fromStart) {
+ let path = "/runs/" + runid + "/actions"
+ let init = {
+ method: "PUT",
+ body: JSON.stringify({
+ action_type: "restart",
+ from_start: fromStart
+ })
+ }
+ let res = await fetch(apiurl(path), init)
+ return res.json();
+}
+
+export async function stopRun(runid) {
+ let path = "/runs/" + runid + "/actions"
+ let init = {
+ method: "PUT",
+ body: JSON.stringify({
+ action_type: "stop"
+ })
+ }
+ let res = await fetch(apiurl(path), init)
+ return res.json();
+}
+
export async function approveTask(runid, taskid) {
let path = "/runs/" + runid + "/tasks/" + taskid + "/actions"
let init = {