From 6b4d8b18e0dacb93b226d86fc25dad739e8f376a Mon Sep 17 00:00:00 2001
From: Michael Shamoon <4887959+shamoon@users.noreply.github.com>
Date: Thu, 26 May 2022 23:09:24 -0700
Subject: [PATCH] show failed tasks badge in sidebar
---
src-ui/src/app/components/app-frame/app-frame.component.html | 2 +-
src-ui/src/app/components/app-frame/app-frame.component.ts | 5 ++++-
src-ui/src/app/components/manage/tasks/tasks.component.html | 2 +-
3 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/src-ui/src/app/components/app-frame/app-frame.component.html b/src-ui/src/app/components/app-frame/app-frame.component.html
index daf4120f7..a745f9de4 100644
--- a/src-ui/src/app/components/app-frame/app-frame.component.html
+++ b/src-ui/src/app/components/app-frame/app-frame.component.html
@@ -145,7 +145,7 @@
File Tasks
+ File Tasks 0">{{tasksService.failedFileTasks.length}}
diff --git a/src-ui/src/app/components/app-frame/app-frame.component.ts b/src-ui/src/app/components/app-frame/app-frame.component.ts
index 6641d133d..441a75330 100644
--- a/src-ui/src/app/components/app-frame/app-frame.component.ts
+++ b/src-ui/src/app/components/app-frame/app-frame.component.ts
@@ -22,6 +22,7 @@ import {
AppRemoteVersion,
} from 'src/app/services/rest/remote-version.service'
import { SettingsService } from 'src/app/services/settings.service'
+import { TasksService } from 'src/app/services/tasks.service'
@Component({
selector: 'app-app-frame',
@@ -37,13 +38,15 @@ export class AppFrameComponent {
public savedViewService: SavedViewService,
private remoteVersionService: RemoteVersionService,
private list: DocumentListViewService,
- public settingsService: SettingsService
+ public settingsService: SettingsService,
+ public tasksService: TasksService
) {
this.remoteVersionService
.checkForUpdates()
.subscribe((appRemoteVersion: AppRemoteVersion) => {
this.appRemoteVersion = appRemoteVersion
})
+ tasksService.reload()
}
versionString = `${environment.appTitle} ${environment.version}`
diff --git a/src-ui/src/app/components/manage/tasks/tasks.component.html b/src-ui/src/app/components/manage/tasks/tasks.component.html
index 99a49887f..cc17b289d 100644
--- a/src-ui/src/app/components/manage/tasks/tasks.component.html
+++ b/src-ui/src/app/components/manage/tasks/tasks.component.html
@@ -98,7 +98,7 @@
- Failed {{tasksService.failedFileTasks.length}}
+ Failed {{tasksService.failedFileTasks.length}}