Loading vospace-ui-frontend/src/App.vue +3 −0 Original line number Diff line number Diff line Loading @@ -28,6 +28,9 @@ export default { }), components: { TopMenu }, mounted() { this.$store.dispatch('loadJobs'); } } </script> Loading vospace-ui-frontend/src/api/mock/data/job.json +2 −1 Original line number Diff line number Diff line { "id": "1234", "status": "EXECUTING" "status": "EXECUTING", "read": true } vospace-ui-frontend/src/api/mock/data/jobs.json 0 → 100644 +11 −0 Original line number Diff line number Diff line [{ "id": "1", "status": "COMPLETED", "read": true }, { "id": "2", "status": "COMPLETED", "read": true } ] vospace-ui-frontend/src/api/mock/index.js +4 −0 Original line number Diff line number Diff line Loading @@ -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) => { Loading Loading @@ -36,5 +37,8 @@ export default { }, startRecallFromTapeJob() { return fetch(job); }, loadJobs() { return fetch(jobs, false); } } vospace-ui-frontend/src/components/Jobs.vue 0 → 100644 +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
vospace-ui-frontend/src/App.vue +3 −0 Original line number Diff line number Diff line Loading @@ -28,6 +28,9 @@ export default { }), components: { TopMenu }, mounted() { this.$store.dispatch('loadJobs'); } } </script> Loading
vospace-ui-frontend/src/api/mock/data/job.json +2 −1 Original line number Diff line number Diff line { "id": "1234", "status": "EXECUTING" "status": "EXECUTING", "read": true }
vospace-ui-frontend/src/api/mock/data/jobs.json 0 → 100644 +11 −0 Original line number Diff line number Diff line [{ "id": "1", "status": "COMPLETED", "read": true }, { "id": "2", "status": "COMPLETED", "read": true } ]
vospace-ui-frontend/src/api/mock/index.js +4 −0 Original line number Diff line number Diff line Loading @@ -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) => { Loading Loading @@ -36,5 +37,8 @@ export default { }, startRecallFromTapeJob() { return fetch(job); }, loadJobs() { return fetch(jobs, false); } }
vospace-ui-frontend/src/components/Jobs.vue 0 → 100644 +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>