1
0
mirror of https://github.com/xuthus83/pigallery2.git synced 2024-11-03 21:04:03 +08:00

fixing start stop buttons

This commit is contained in:
Patrik J. Braun 2019-12-29 13:48:45 +01:00
parent 6c458e2dbb
commit c2d7931d8d
4 changed files with 12 additions and 11 deletions

View File

@ -30,12 +30,12 @@
<button class="btn btn-danger job-control-button" (click)="remove(i)"><span class="oi oi-trash"></span>
</button>
<button class="btn btn-success job-control-button"
*ngIf="!jobsService.progress.value[schedule.jobName]"
*ngIf="!getProgress(schedule)"
[disabled]="disableButtons"
(click)="start(schedule); $event.stopPropagation();"><span class="oi oi-media-play"></span>
</button>
<button class="btn btn-secondary job-control-button"
*ngIf="jobsService.progress.value[schedule.jobName]"
*ngIf="getProgress(schedule)"
[disabled]="disableButtons || jobsService.progress.value[schedule.jobName].state !== JobProgressStates.running"
(click)="stop(schedule); $event.stopPropagation();"><span class="oi oi-media-stop"></span>
</button>
@ -121,14 +121,14 @@
<div class="col-md-3">
<button class="btn btn-success float-right"
*ngIf="!jobsService.progress.value[schedule.jobName]"
*ngIf="!getProgress(schedule)"
[disabled]="disableButtons"
title="Trigger job run manually"
i18n-title
(click)="start(schedule)" i18n>Start now
</button>
<button class="btn btn-secondary float-right"
*ngIf="jobsService.progress.value[schedule.jobName]"
*ngIf="getProgress(schedule)"
[disabled]="disableButtons || jobsService.progress.value[schedule.jobName].state !== JobProgressStates.running"
(click)="stop(schedule)" i18n>Stop
</button>

View File

@ -40,7 +40,7 @@
aria-valuemin="0"
aria-valuemax="100"
style="min-width: 2em;"
[style.width.%]="(progress.steps.processed+progress.steps.skipped/(progress.steps.all))*100">
[style.width.%]="((progress.steps.processed+progress.steps.skipped)/progress.steps.all)*100">
{{progress.steps.processed}}+{{progress.steps.skipped}}/{{progress.steps.all}}
</div>
<div

View File

@ -49,7 +49,8 @@ export class ThumbnailSettingsComponent
}
get Progress() {
return this.jobsService.progress.value[JobDTO.getHashName(DefaultsJobs[DefaultsJobs['Thumbnail Generation']])];
return this.jobsService.progress.value[JobDTO.getHashName(DefaultsJobs[DefaultsJobs['Thumbnail Generation']],
{sizes: this.original.client.thumbnailSizes[0]})];
}
ngOnInit() {