Skip to content
Snippets Groups Projects
Select Git revision
1 result Searching

isis-control-networks.md

Blame
  • Jobs.vue 977 B
    <template>
    <div>
      <h3>Async recall jobs</h3>
      <table class="table b-table table-striped table-hover">
        <thead>
          <tr>
            <th>Creation time</th>
            <th>Id</th>
            <th>Phase</th>
          </tr>
        </thead>
        <tbody>
          <tr v-for="job in jobs" :key="job.id">
            <td>{{job.creationTime}}</td>
            <td>{{job.id}}</td>
            <td>{{job.phase}}</td>
          </tr>
        </tbody>
      </table>
      <div id="jobs-loading" v-if="jobsLoading" class="loading">
        <div class="spinner-wrapper">
          <b-spinner variant="primary" style="width: 3rem; height: 3rem;" label="Loading"></b-spinner>
        </div>
      </div>
    </div>
    </template>
    
    <script>
    export default {
      computed: {
        jobs() { return this.$store.state.jobs },
        jobsLoading() { return this.$store.state.jobsLoading }
      },
      mounted() {
        this.loadJobs();
        this.$store.commit('setLoading', false);
      },
      methods: {
        loadJobs() {
          this.$store.dispatch('loadJobs');
        }
      }
    }
    </script>