@@ -114,149 +199,22 @@ const progressPercentages = computed(() => {
Started: {{ formatDateTime(task.started_at) }}
-
-
-
-
-
-
-
-
- Platforms
- {{ progressPercentages.platforms }}%
-
-
-
-
-
- ROMs
- {{ progressPercentages.roms }}%
-
-
-
-
-
-
-
-
- Platforms: {{ scanProgress.platforms }}
-
-
- ROMs: {{ scanProgress.roms }}
-
-
- Added: {{ scanProgress.addedRoms }}
-
-
- Metadata: {{ scanProgress.metadataRoms }}
-
-
- Firmware: {{ scanProgress.scannedFirmware }}
-
-
-
-
-
-
-
-
- Detailed Statistics
-
-
-
- Total Platforms
-
- {{ scanStats.total_platforms || 0 }}
-
-
-
- Scanned Platforms
-
- {{ scanStats.scanned_platforms || 0 }}
-
-
-
- New Platforms
-
- {{ scanStats.new_platforms || 0 }}
-
-
-
- Identified Platforms
-
- {{ scanStats.identified_platforms || 0 }}
-
-
-
- Total ROMs
-
- {{ scanStats.total_roms || 0 }}
-
-
-
- Scanned ROMs
-
- {{ scanStats.scanned_roms || 0 }}
-
-
-
- Added ROMs
-
- {{ scanStats.added_roms || 0 }}
-
-
-
- Metadata ROMs
-
- {{ scanStats.metadata_roms || 0 }}
-
-
-
- Scanned Firmware
-
- {{ scanStats.scanned_firmware || 0 }}
-
-
-
- Added Firmware
-
- {{ scanStats.added_firmware || 0 }}
-
-
-
-
-
-
-
+
+
diff --git a/frontend/src/components/Settings/Administration/Tasks.vue b/frontend/src/components/Settings/Administration/Tasks.vue
index a9132b1e9..0d458c2b2 100644
--- a/frontend/src/components/Settings/Administration/Tasks.vue
+++ b/frontend/src/components/Settings/Administration/Tasks.vue
@@ -10,7 +10,6 @@ import { convertCronExperssion } from "@/utils";
const tasksStore = storeTasks();
const { watcherTasks, scheduledTasks, manualTasks, taskStatuses } =
storeToRefs(tasksStore);
-const isLoadingRunningTasks = ref(false);
const watcherTasksUI = computed(() =>
watcherTasks.value.map((task) => ({
@@ -103,13 +102,10 @@ const getManualTaskIcon = (taskName: string) => {
// Fetch task status
const fetchTaskStatus = async () => {
- isLoadingRunningTasks.value = true;
try {
await tasksStore.fetchTaskStatus();
} catch (error) {
console.error("Error fetching task status:", error);
- } finally {
- isLoadingRunningTasks.value = false;
}
};
@@ -199,31 +195,18 @@ onUnmounted(() => {
-
+
mdi-information-outline
- No tasks currently running
+ No currently running tasks
-
-
-
-
-
-
- Loading running tasks...
-
-
-
+import type { CleanupStats } from "./task-types";
+
+defineProps<{
+ cleanupStats: CleanupStats;
+}>();
+
+
+
+
+
+ Removed: {{ cleanupStats.removed }} items
+
+
+
diff --git a/frontend/src/components/Settings/Administration/tasks/ConversionTaskProgress.vue b/frontend/src/components/Settings/Administration/tasks/ConversionTaskProgress.vue
new file mode 100644
index 000000000..933c5e1dc
--- /dev/null
+++ b/frontend/src/components/Settings/Administration/tasks/ConversionTaskProgress.vue
@@ -0,0 +1,58 @@
+
+
+
+
+
+
+
+ Conversion Progress
+ {{ progressPercentages.conversion }}%
+
+
+
+
+
+
+
+ Processed: {{ conversionProgress.processed }}
+
+
+ Errors: {{ conversionProgress.errors }}
+
+
+ Success Rate: {{ conversionProgress.successRate }}%
+
+
+
+
diff --git a/frontend/src/components/Settings/Administration/tasks/ScanTaskProgress.vue b/frontend/src/components/Settings/Administration/tasks/ScanTaskProgress.vue
new file mode 100644
index 000000000..6d77eaba1
--- /dev/null
+++ b/frontend/src/components/Settings/Administration/tasks/ScanTaskProgress.vue
@@ -0,0 +1,81 @@
+
+
+
+
+
+
+
+
+ Platforms
+ {{ progressPercentages.platforms }}%
+
+
+
+
+
+ ROMs
+ {{ progressPercentages.roms }}%
+
+
+
+
+
+
+
+
+ Platforms: {{ scanProgress.platforms }}
+
+
+ ROMs: {{ scanProgress.roms }}
+
+
+ Added: {{ scanProgress.addedRoms }}
+
+
+ Metadata: {{ scanProgress.metadataRoms }}
+
+
+ Firmware: {{ scanProgress.scannedFirmware }}
+
+
+
+
diff --git a/frontend/src/components/Settings/Administration/tasks/TaskDetailedStats.vue b/frontend/src/components/Settings/Administration/tasks/TaskDetailedStats.vue
new file mode 100644
index 000000000..b59fb7cd0
--- /dev/null
+++ b/frontend/src/components/Settings/Administration/tasks/TaskDetailedStats.vue
@@ -0,0 +1,117 @@
+
+
+
+
+
+ Detailed Statistics
+
+
+
+
+
+ Total Platforms
+ {{ scanStats.total_platforms || 0 }}
+
+
+ Scanned Platforms
+ {{ scanStats.scanned_platforms || 0 }}
+
+
+ New Platforms
+ {{ scanStats.new_platforms || 0 }}
+
+
+ Identified Platforms
+ {{ scanStats.identified_platforms || 0 }}
+
+
+ Total ROMs
+ {{ scanStats.total_roms || 0 }}
+
+
+ Scanned ROMs
+ {{ scanStats.scanned_roms || 0 }}
+
+
+ Added ROMs
+ {{ scanStats.added_roms || 0 }}
+
+
+ Metadata ROMs
+ {{ scanStats.metadata_roms || 0 }}
+
+
+ Scanned Firmware
+ {{ scanStats.scanned_firmware || 0 }}
+
+
+ Added Firmware
+ {{ scanStats.added_firmware || 0 }}
+
+
+
+
+
+
+ Total Files
+ {{ conversionStats.total }}
+
+
+ Processed
+ {{ conversionStats.processed }}
+
+
+ Errors
+ {{ conversionStats.errors }}
+
+
+ Error Details
+
+ {{ conversionStats.errorList.slice(0, 5).join(", ") }}
+ ...
+
+
+
+
+
+
+
+ Removed Items
+ {{ cleanupStats.removed }}
+
+
+
+
+
+
+ Downloaded
+
+ {{ downloadProgress.current }}/{{ downloadProgress.total }}
+
+
+
+ Progress
+ {{ downloadProgress.progress }}%
+
+
+
+
diff --git a/frontend/src/components/Settings/Administration/tasks/TaskProgressDisplay.vue b/frontend/src/components/Settings/Administration/tasks/TaskProgressDisplay.vue
new file mode 100644
index 000000000..f62939e13
--- /dev/null
+++ b/frontend/src/components/Settings/Administration/tasks/TaskProgressDisplay.vue
@@ -0,0 +1,114 @@
+
+
+
+
+
+
+
+ {{ progressTitle }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/frontend/src/components/Settings/Administration/tasks/UpdateTaskProgress.vue b/frontend/src/components/Settings/Administration/tasks/UpdateTaskProgress.vue
new file mode 100644
index 000000000..339fad0e0
--- /dev/null
+++ b/frontend/src/components/Settings/Administration/tasks/UpdateTaskProgress.vue
@@ -0,0 +1,45 @@
+
+
+
+
+
+
+
+ Download Progress
+ {{ progressPercentages.download }}%
+
+
+
+
+
+
+
+ Downloaded: {{ updateProgress.downloaded }}
+
+
+
+
diff --git a/frontend/src/components/Settings/Administration/tasks/task-types.ts b/frontend/src/components/Settings/Administration/tasks/task-types.ts
new file mode 100644
index 000000000..9b6de9912
--- /dev/null
+++ b/frontend/src/components/Settings/Administration/tasks/task-types.ts
@@ -0,0 +1,59 @@
+// Shared types for task components
+export interface ScanStats {
+ total_platforms: number;
+ total_roms: number;
+ scanned_platforms: number;
+ new_platforms: number;
+ identified_platforms: number;
+ scanned_roms: number;
+ added_roms: number;
+ metadata_roms: number;
+ scanned_firmware: number;
+ added_firmware: number;
+}
+
+export interface ConversionStats {
+ processed: number;
+ errors: number;
+ total: number;
+ errorList: string[];
+}
+
+export interface CleanupStats {
+ removed: number;
+}
+
+export interface DownloadProgress {
+ progress: number;
+ total: number;
+ current: number;
+}
+
+export interface TaskProgress {
+ platforms?: string;
+ roms?: string;
+ addedRoms?: number;
+ metadataRoms?: number;
+ scannedFirmware?: number;
+ addedFirmware?: number;
+ processed?: string;
+ errors?: number;
+ successRate?: number;
+ removed?: number;
+ downloaded?: string;
+}
+
+export interface ProgressPercentages {
+ platforms?: number;
+ roms?: number;
+ conversion?: number;
+ download?: number;
+}
+
+export type TaskType =
+ | "scan"
+ | "conversion"
+ | "cleanup"
+ | "update"
+ | "watcher"
+ | "generic";