From b7906786bb943d838cee1c12cd597d9554008f32 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Bidoul?=
- - - + + +
`; } startHandler(e) { - fetch(`/api/v1/builds/${this.build.name}/start`, {method: 'POST'}); + this.actionHandler("start"); } stopHandler(e) { - fetch(`/api/v1/builds/${this.build.name}/stop`, {method: 'POST'}); + this.actionHandler("stop"); } resetHandler(e) { - fetch(`/api/v1/builds/${this.build.name}/reset`, {method: 'POST'}); + this.actionHandler("reset"); + } + + static clickedStatus = "⏳"; + + actionHandler(action) { + this.build.status = RunboatBuildElement.clickedStatus; + this.requestUpdate(); + fetch(`/api/v1/builds/${this.build.name}/${action}`, {method: 'POST'}); } }