Commit 14fadb27 authored by Sonia Zorba's avatar Sonia Zorba
Browse files

UI: implemented jobs listing

parent 9da22b03
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -28,6 +28,9 @@ export default {
  }),
  components: {
    TopMenu
  },
  mounted() {
    this.$store.dispatch('loadJobs');
  }
}
</script>
+2 −1
Original line number Diff line number Diff line
{
  "id": "1234",
  "status": "EXECUTING"
  "status": "EXECUTING",
  "read": true
}
+11 −0
Original line number Diff line number Diff line
[{
    "id": "1",
    "status": "COMPLETED",
    "read": true
  },
  {
    "id": "2",
    "status": "COMPLETED",
    "read": true
  }
]
+4 −0
Original line number Diff line number Diff line
@@ -2,6 +2,7 @@ import root from 'raw-loader!./data/nodes/root.html';
import folder1 from 'raw-loader!./data/nodes/folder1.html';
import folder2 from 'raw-loader!./data/nodes/folder2.html';
import job from './data/job';
import jobs from './data/jobs';
import store from '../../store';

const fetch = (mockData, showLoading = true, time = 500) => {
@@ -36,5 +37,8 @@ export default {
  },
  startRecallFromTapeJob() {
    return fetch(job);
  },
  loadJobs() {
    return fetch(jobs, false);
  }
}
+24 −0
Original line number Diff line number Diff line
<template>
<table class="table b-table table-striped table-hover">
  <thead>
    <tr>
      <th>Id</th>
      <th>Status</th>
    </tr>
  </thead>
  <tbody>
    <tr v-for="job in jobs" :key="job.id">
      <td>{{job.id}}</td>
      <td>{{job.status}}</td>
    </tr>
  </tbody>
</table>
</template>

<script>
export default {
  computed: {
    jobs() { return this.$store.state.jobs }
  }
}
</script>
Loading