|
|
@ -3,8 +3,6 @@
|
|
|
|
import { FormBuilder, FormGroup, Validators } from "@angular/forms";
|
|
|
|
import { FormBuilder, FormGroup, Validators } from "@angular/forms";
|
|
|
|
import { NotificationService, SettingsService } from "../../services";
|
|
|
|
import { NotificationService, SettingsService } from "../../services";
|
|
|
|
|
|
|
|
|
|
|
|
import { ICronTestModel } from "../../interfaces";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Component({
|
|
|
|
@Component({
|
|
|
|
templateUrl: "./jobs.component.html",
|
|
|
|
templateUrl: "./jobs.component.html",
|
|
|
|
})
|
|
|
|
})
|
|
|
@ -13,8 +11,6 @@ export class JobsComponent implements OnInit {
|
|
|
|
public form: FormGroup;
|
|
|
|
public form: FormGroup;
|
|
|
|
|
|
|
|
|
|
|
|
public profilesRunning: boolean;
|
|
|
|
public profilesRunning: boolean;
|
|
|
|
public testModel: ICronTestModel;
|
|
|
|
|
|
|
|
public displayTest: boolean;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
constructor(private readonly settingsService: SettingsService,
|
|
|
|
constructor(private readonly settingsService: SettingsService,
|
|
|
|
private readonly fb: FormBuilder,
|
|
|
|
private readonly fb: FormBuilder,
|
|
|
@ -45,8 +41,7 @@ export class JobsComponent implements OnInit {
|
|
|
|
public testCron(expression: string) {
|
|
|
|
public testCron(expression: string) {
|
|
|
|
this.settingsService.testCron({ expression }).subscribe(x => {
|
|
|
|
this.settingsService.testCron({ expression }).subscribe(x => {
|
|
|
|
if(x.success) {
|
|
|
|
if(x.success) {
|
|
|
|
this.testModel = x;
|
|
|
|
this.notificationService.success("Cron is Valid");
|
|
|
|
this.displayTest = true;
|
|
|
|
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
this.notificationService.error(x.message);
|
|
|
|
this.notificationService.error(x.message);
|
|
|
|
}
|
|
|
|
}
|
|
|
|