feat: add backgroundJobTracking initial view

This commit is contained in:
Matthias 2024-11-03 09:32:58 +01:00
parent 8aaab341a2
commit e012da9d18
3 changed files with 19 additions and 0 deletions

4
src/components.d.ts vendored
View File

@ -7,6 +7,7 @@ export {}
/* prettier-ignore */
declare module 'vue' {
export interface GlobalComponents {
BackgroundJobTracking: typeof import('./components/ftbot/BackgroundJobTracking.vue')['default']
BacktestGraphs: typeof import('./components/ftbot/BacktestGraphs.vue')['default']
BacktestHistoryLoad: typeof import('./components/ftbot/BacktestHistoryLoad.vue')['default']
BacktestResultAnalysis: typeof import('./components/ftbot/BacktestResultAnalysis.vue')['default']
@ -62,6 +63,8 @@ declare module 'vue' {
BotStatus: typeof import('./components/ftbot/BotStatus.vue')['default']
BPagination: typeof import('bootstrap-vue-next/components/BPagination')['BPagination']
BPopover: typeof import('bootstrap-vue-next/components/BPopover')['BPopover']
BProgress: typeof import('bootstrap-vue-next/components/BProgress')['BProgress']
BProgressBar: typeof import('bootstrap-vue-next/components/BProgress')['BProgressBar']
BRow: typeof import('bootstrap-vue-next/components/BContainer')['BRow']
BSpinner: typeof import('bootstrap-vue-next/components/BSpinner')['BSpinner']
BTab: typeof import('bootstrap-vue-next/components/BTabs')['BTab']
@ -117,6 +120,7 @@ declare module 'vue' {
IMdiContentSave: typeof import('~icons/mdi/content-save')['default']
IMdiDelete: typeof import('~icons/mdi/delete')['default']
IMdiDiceMultiple: typeof import('~icons/mdi/dice-multiple')['default']
IMdiDownloadBoxOutline: typeof import('~icons/mdi/download-box-outline')['default']
IMdiEye: typeof import('~icons/mdi/eye')['default']
IMdiEyeOff: typeof import('~icons/mdi/eye-off')['default']
IMdiFolderLock: typeof import('~icons/mdi/folder-lock')['default']

View File

@ -0,0 +1,14 @@
<script setup lang="ts">
const { runningJobs } = useBackgroundJob();
</script>
<template>
<BListGroup class="ms-2">
<BListGroupItem v-for="(job, key) in runningJobs" :key="key" class="d-flex gap-2" :title="key">
<i-mdi-download-box-outline v-if="job.job_category === 'download_data'" />
<div>{{ job.job_category }} {{ job.status }} {{ job.progress }}</div>
<BProgress class="w-100 flex-grow" :value="job.progress" show-progress :max="100" striped />
</BListGroupItem>
</BListGroup>
</template>

View File

@ -42,6 +42,7 @@ async function startDownload() {
<template>
<div class="container">
<BackgroundJobTracking />
<BCard header="Downloading Data">
<div class="d-flex px-3 mb-3 gap-3 flex-column flex-lg-column">
<div class="d-flex flex-row gap-5">