diff --git a/README.md b/README.md index 09deceeb8..b3deed64f 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ $ java -jar service/build/libs/service.jar ``` ### From IntelliJ - Right-click on `BackfilaService.kt` and select `Run` + Right-click on `BackfilaDevelopmentService.kt` and select `Run` ### From Docker diff --git a/service/web/tabs/app/src/components/StopAllBackfillsButton.tsx b/service/web/tabs/app/src/components/StopAllBackfillsButton.tsx new file mode 100644 index 000000000..cf64a3882 --- /dev/null +++ b/service/web/tabs/app/src/components/StopAllBackfillsButton.tsx @@ -0,0 +1,74 @@ +import * as React from "react" +import Axios from "axios" +import { Button, Intent, Toaster, Classes, Popover } from "@blueprintjs/core" + +interface IStopAllBackillsProps { + onUpdate?: () => void +} + +interface IStopAllBackfillsState { + loading: boolean +} + +class StopAllRealButton extends React.Component { + public state: IStopAllBackfillsState = { + loading: false + } + + stopall() { + const url = `/backfills/stop_all` + this.setState({loading: true}) + Axios.post(url, {}) + .then(response => { + if (this.props.onUpdate) { + this.props.onUpdate() + } + }) + .catch(error => { + Toaster.create().show({ + intent: Intent.DANGER, + message: `Error: ${error.response.data}` + }) + }) + .finally(() => this.setState({loading: false})) + } + + render() { + return( +