More Polishing (#428)

# Added
- Added: Added a new button on admin dashboard to clear cache for the whole server

# Changed
- Changed: Moved the download logs to the new System page
- Changed: Tag Badges now show the correct cursor to help indication actions. For example, Collection badges on series detail page can be clicked, while type cannot.

# Fixed
- Fixed: Fixed an issue in develop builds where Pagination no longer worked due to Header not being exposed
- Fixed: After Scanning a series, clear out any cached chapters

=======================================================
* After Scanning a series, clear out any cached chapters.


* Implemented cursor overrides for tag badges

* Fixed pagination no longer working due to Pagination header not being able to be read from the UI.

* Fixed some css things with icons within tagbadges not taking the selection mode styling

* Moved download logs button to the system page

* Implemented the ability to clear cache for the whole server from admin dashboard

* Removed debug code

* Up the Regex Timeout for the Github Build System
This commit is contained in:
Joseph Milazzo 2021-07-24 19:14:38 -05:00 committed by GitHub
parent 107b70226c
commit 4f3461710c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 141 additions and 36 deletions

View file

@ -1,5 +1,18 @@
<div class="container-fluid">
<div class="float-right">
<button class="btn btn-secondary mr-2" (click)="clearCache()" [disabled]="clearCacheInProgress">
<ng-container *ngIf="clearCacheInProgress">
<span class="spinner-border spinner-border-sm" role="status" aria-hidden="true"></span>
<span class="sr-only">Loading...</span>
</ng-container>
Clear Cache
</button>
<button class="btn btn-secondary" (click)="downloadService.downloadLogs()">
Download Logs
</button>
</div>
<h3>About System</h3>
<hr/>
<div class="form-group" *ngIf="serverInfo">

View file

@ -1,7 +1,9 @@
import { Component, OnInit } from '@angular/core';
import { FormControl, FormGroup, Validators } from '@angular/forms';
import { Title } from '@angular/platform-browser';
import { ToastrService } from 'ngx-toastr';
import { take } from 'rxjs/operators';
import { DownloadService } from 'src/app/shared/_services/download.service';
import { ServerService } from 'src/app/_services/server.service';
import { SettingsService } from '../settings.service';
import { ServerInfo } from '../_models/server-info';
@ -18,7 +20,10 @@ export class ManageSystemComponent implements OnInit {
serverSettings!: ServerSettings;
serverInfo!: ServerInfo;
constructor(private settingsService: SettingsService, private toastr: ToastrService, private serverService: ServerService) { }
clearCacheInProgress: boolean = false;
constructor(private settingsService: SettingsService, private toastr: ToastrService,
private serverService: ServerService, public downloadService: DownloadService) { }
ngOnInit(): void {
@ -58,4 +63,12 @@ export class ManageSystemComponent implements OnInit {
});
}
clearCache() {
this.clearCacheInProgress = true;
this.serverService.clearCache().subscribe(res => {
this.clearCacheInProgress = false;
this.toastr.success('Cache has been cleared');
});
}
}