Commit 41eff92e authored by Joel Collins's avatar Joel Collins
Browse files

Updated Action status strings

parent a34f9827
Loading
Loading
Loading
Loading
+31 −38
Original line number Diff line number Diff line
@@ -16,7 +16,7 @@
        class="uk-button uk-button-danger uk-margin-remove uk-float-right uk-width-1-1"
        @click="terminateTask()"
      >
        Terminate
        Cancel
      </button>
    </div>

@@ -193,9 +193,7 @@ export default {

      var checkCondition = (resolve, reject) => {
        // If the condition is met, we're done!
        axios
          .get(this.taskUrl)
          .then(response => {
        axios.get(this.taskUrl).then(response => {
          console.log(response.data.status);
          var result = response.data.status;
          // If the task ends with success
@@ -211,8 +209,7 @@ export default {
          else if (result == "cancelled") {
            // Pass a generic termination error back with reject
            reject(new Error("Task cancelled"));
            }
            else {
          } else {
            // Since the task is still running, we can update the progress bar
            this.progress = response.data.progress;
            // Check again after timeout
@@ -227,18 +224,14 @@ export default {
    pollProgress: function() {
      console.log("Starting progress polling");

      axios
        .get(this.taskUrl)
        .then(response => {
      axios.get(this.taskUrl).then(response => {
        console.log("PROGRESS RESPONSE: ", response.data.progress);
        this.progress = response.data.progress;
      });
    },

    terminateTask: function() {
      axios
        .delete(this.taskUrl)
        .then(response => {
      axios.delete(this.taskUrl).then(response => {
        console.log("TERMINATION RESPONSE: ", response.data);
      });
    }