analyze
This commit is contained in:
parent
450be793d0
commit
42ec2d22c8
@ -11,6 +11,15 @@
|
|||||||
(change)="readList()"
|
(change)="readList()"
|
||||||
[(ngModel)]="onlyTagless"
|
[(ngModel)]="onlyTagless"
|
||||||
/>
|
/>
|
||||||
|
<div class="basis-auto">
|
||||||
|
<button (click)="analyze()">
|
||||||
|
<div
|
||||||
|
class="block px-3 py-1.5 rounded rounded-lg bg-zinc-700 hover:bg-zinc-900 font-bold text-black dark:text-white"
|
||||||
|
>
|
||||||
|
Analyze
|
||||||
|
</div>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<shared-table [items]="videos" [columns]="videoListColumns" />
|
<shared-table [items]="videos" [columns]="videoListColumns" />
|
||||||
|
|||||||
@ -12,7 +12,7 @@ import { ColumnDefinition } from 'src/app/shared/components/table/table.componen
|
|||||||
export class ListComponent {
|
export class ListComponent {
|
||||||
query$ = new Subject<string>();
|
query$ = new Subject<string>();
|
||||||
query: string = '';
|
query: string = '';
|
||||||
onlyTagless: boolean = false;
|
onlyTagless: boolean = true;
|
||||||
videos: VideoListEntry[] = [];
|
videos: VideoListEntry[] = [];
|
||||||
total: number = 0;
|
total: number = 0;
|
||||||
page: number = 1;
|
page: number = 1;
|
||||||
@ -57,9 +57,18 @@ export class ListComponent {
|
|||||||
this.readList();
|
this.readList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
analyze(): void {
|
||||||
|
this.requestService.post('analyze/analyze-videos', {}, (response: any) => {
|
||||||
|
if (response.length > 0) {
|
||||||
|
alert(response.length + ' videos were updated');
|
||||||
|
this.readList();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
readList(): void {
|
readList(): void {
|
||||||
this.requestService.post(
|
this.requestService.post(
|
||||||
'video-list/read-list',
|
'analyze/read-video-list',
|
||||||
{
|
{
|
||||||
query: this.query,
|
query: this.query,
|
||||||
page: this.page,
|
page: this.page,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user