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:
parent
6c458e2dbb
commit
c2d7931d8d
@ -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>
|
||||
|
@ -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
|
||||
|
@ -20,8 +20,8 @@ import {JobProgressStates} from '../../../../../common/entities/job/JobProgressD
|
||||
providers: [ThumbnailSettingsService],
|
||||
})
|
||||
export class ThumbnailSettingsComponent
|
||||
extends SettingsComponent<{ server: ServerConfig.ThumbnailConfig, client: ClientConfig.ThumbnailConfig }>
|
||||
implements OnInit {
|
||||
extends SettingsComponent<{ server: ServerConfig.ThumbnailConfig, client: ClientConfig.ThumbnailConfig }>
|
||||
implements OnInit {
|
||||
JobProgressStates = JobProgressStates;
|
||||
|
||||
constructor(_authService: AuthenticationService,
|
||||
@ -44,12 +44,13 @@ export class ThumbnailSettingsComponent
|
||||
value = value.replace(new RegExp(',', 'g'), ';');
|
||||
value = value.replace(new RegExp(' ', 'g'), ';');
|
||||
this.settings.client.thumbnailSizes = value.split(';')
|
||||
.map(s => parseInt(s, 10))
|
||||
.filter(i => !isNaN(i) && i > 0);
|
||||
.map(s => parseInt(s, 10))
|
||||
.filter(i => !isNaN(i) && i > 0);
|
||||
}
|
||||
|
||||
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() {
|
||||
|
@ -84,7 +84,7 @@ export class VideoSettingsComponent extends SettingsComponent<{ server: ServerCo
|
||||
|
||||
updateBitRate() {
|
||||
this.settings.server.transcoding.bitRate = this.getRecommendedBitRate(this.settings.server.transcoding.resolution,
|
||||
this.settings.server.transcoding.fps);
|
||||
this.settings.server.transcoding.fps);
|
||||
}
|
||||
|
||||
formatChanged(format: ServerConfig.formatType) {
|
||||
|
Loading…
Reference in New Issue
Block a user