Loading back/myfab/queue.py +2 −1 Original line number Diff line number Diff line Loading @@ -102,7 +102,8 @@ def get_queue_elements_list(qid): for ql in PrintRequest.select().join(QueueElement).where((QueueElement.queue == qid and QueueElement.state == QUEUE_ELEMENT_STATE_INQUEUE)).order_by(QueueElement.id): elems.append({ "id": ql.id, "author": ql.author.username, "author": ql.author.fullname, "username": ql.author.username, "title": ql.title }) return elems Loading ui/src/components/QueueManagement.vue +22 −2 Original line number Diff line number Diff line Loading @@ -27,7 +27,15 @@ <v-card-subtitle align="left"> Printers: <div v-for="printer in item.printers" :key="printer"> <div>{{ printer.name }}</div> <div>- {{ printer.name }}</div> </div> </v-card-subtitle> <v-card-subtitle align="left"> In Queue: <div v-for="elem in item.elements" :key="elem.id"> <div><v-icon>mdi-folder-cog</v-icon> {{ elem.title }} <v-icon>mdi-account</v-icon> {{ elem.author }} <v-btn @click="dequeue(elem.id)"><v-icon color="red">mdi-close-octagon</v-icon></v-btn> </div> </div> </v-card-subtitle> </v-card> Loading Loading @@ -67,6 +75,15 @@ export default { this.$stire.dispatch("display_error", err) }) }, dequeue(id) { axios.get("/requests/" + id + "/dequeue") .then((resp) => { this.reload() }).catch((error) => { console.log("[DEBUG] Could not dequue, ignoring") this.reload() }) }, alert_type(item) { return item.enabled? 'info':'error' }, Loading Loading @@ -102,9 +119,12 @@ export default { }) } }, mounted() { reload() { this.$store.dispatch("load_queues") }, mounted() { this.reload() }, computed: { queues() { return this.$store.state.queues Loading Loading
back/myfab/queue.py +2 −1 Original line number Diff line number Diff line Loading @@ -102,7 +102,8 @@ def get_queue_elements_list(qid): for ql in PrintRequest.select().join(QueueElement).where((QueueElement.queue == qid and QueueElement.state == QUEUE_ELEMENT_STATE_INQUEUE)).order_by(QueueElement.id): elems.append({ "id": ql.id, "author": ql.author.username, "author": ql.author.fullname, "username": ql.author.username, "title": ql.title }) return elems Loading
ui/src/components/QueueManagement.vue +22 −2 Original line number Diff line number Diff line Loading @@ -27,7 +27,15 @@ <v-card-subtitle align="left"> Printers: <div v-for="printer in item.printers" :key="printer"> <div>{{ printer.name }}</div> <div>- {{ printer.name }}</div> </div> </v-card-subtitle> <v-card-subtitle align="left"> In Queue: <div v-for="elem in item.elements" :key="elem.id"> <div><v-icon>mdi-folder-cog</v-icon> {{ elem.title }} <v-icon>mdi-account</v-icon> {{ elem.author }} <v-btn @click="dequeue(elem.id)"><v-icon color="red">mdi-close-octagon</v-icon></v-btn> </div> </div> </v-card-subtitle> </v-card> Loading Loading @@ -67,6 +75,15 @@ export default { this.$stire.dispatch("display_error", err) }) }, dequeue(id) { axios.get("/requests/" + id + "/dequeue") .then((resp) => { this.reload() }).catch((error) => { console.log("[DEBUG] Could not dequue, ignoring") this.reload() }) }, alert_type(item) { return item.enabled? 'info':'error' }, Loading Loading @@ -102,9 +119,12 @@ export default { }) } }, mounted() { reload() { this.$store.dispatch("load_queues") }, mounted() { this.reload() }, computed: { queues() { return this.$store.state.queues Loading