Don't show buttons for ongoing scans.

This commit is contained in:
Julian Stirling 2025-09-19 18:29:34 +01:00
parent 29a62a278b
commit cd6bcd196f
3 changed files with 100 additions and 56 deletions

View file

@ -88,6 +88,7 @@
<scan-card
:scan-data="scanData"
:scans-uri="scansUri"
:ongoing="isOngoing(scanData.name)"
@viewer-requested="showScan"
@update-requested="updateScans"
/>
@ -112,6 +113,7 @@ export default {
data: function() {
return {
scans: [],
ongoing: null,
selectedScan: null,
osdViewer: null
};
@ -191,7 +193,9 @@ export default {
},
async updateScans() {
try {
let scans = await this.readThingProperty("smart_scan", "scans");
let scans_information = await this.readThingProperty("smart_scan", "scans");
let scans = scans_information.scans
this.ongoing = scans_information.ongoing
if (!scans | (scans.length == 0)) {
this.scans = scans;
}
@ -208,6 +212,9 @@ export default {
this.scans = [];
}
},
isOngoing(name) {
return name === this.ongoing
},
async deleteAllScans() {
try {
await this.modalConfirm(