Added the newsletter job to the UI and fully wired it up !wip

pull/2090/head
Jamie 7 years ago
parent 5ea81568e5
commit ccd873584b

@ -11,5 +11,6 @@
public string UserImporter { get; set; }
public string SickRageSync { get; set; }
public string RefreshMetadata { get; set; }
public string Newsletter { get; set; }
}
}

@ -1,4 +1,5 @@
using Ombi.Helpers;
using System;
using Ombi.Helpers;
namespace Ombi.Settings.Settings.Models
{
@ -35,6 +36,10 @@ namespace Ombi.Settings.Settings.Models
{
return Get(s.UserImporter, Cron.Daily());
}
public static string Newsletter(JobSettings s)
{
return Get(s.Newsletter, Cron.Weekly(DayOfWeek.Friday, 12));
}
public static string SickRageSync(JobSettings s)
{
return Get(s.SickRageSync, Cron.Hourly(35));

@ -127,6 +127,7 @@ export interface IJobSettings {
userImporter: string;
sickRageSync: string;
refreshMetadata: string;
newsletter: string;
}
export interface IIssueSettings extends ISettings {

@ -73,11 +73,19 @@
</div>
<div class="form-group">
<label for="userImporter" class="control-label">Refresh Metadata</label>
<input type="text" class="form-control form-control-custom" [ngClass]="{'form-error': form.get('refreshMetadata').hasError('required')}" id="refreshMetadata" name="refreshMetadata" formControlName="refreshMetadata">
<small *ngIf="form.get('refreshMetadata').hasError('required')" class="error-text">The Refresh Metadata is required</small>
<button type="button" class="btn btn-sm btn-primary-outline" (click)="testCron(form.get('refreshMetadata')?.value)">Test</button>
</div>
<label for="userImporter" class="control-label">Refresh Metadata</label>
<input type="text" class="form-control form-control-custom" [ngClass]="{'form-error': form.get('refreshMetadata').hasError('required')}" id="refreshMetadata" name="refreshMetadata" formControlName="refreshMetadata">
<small *ngIf="form.get('refreshMetadata').hasError('required')" class="error-text">The Refresh Metadata is required</small>
<button type="button" class="btn btn-sm btn-primary-outline" (click)="testCron(form.get('refreshMetadata')?.value)">Test</button>
</div>
<div class="form-group">
<label for="userImporter" class="control-label">Newsletter</label>
<input type="text" class="form-control form-control-custom" [ngClass]="{'form-error': form.get('newsletter').hasError('required')}" id="newsletter" name="newsletter" formControlName="newsletter">
<small *ngIf="form.get('newsletter').hasError('required')" class="error-text">The Newsletter is required</small>
<button type="button" class="btn btn-sm btn-primary-outline" (click)="testCron(form.get('newsletter')?.value)">Test</button>
</div>
</div>
</form>

@ -32,6 +32,7 @@ export class JobsComponent implements OnInit {
radarrSync: [x.sonarrSync, Validators.required],
sickRageSync: [x.sickRageSync, Validators.required],
refreshMetadata: [x.refreshMetadata, Validators.required],
newsletter: [x.newsletter, Validators.required],
});
});
}

Loading…
Cancel
Save