@firestitch/system 13.0.3 → 13.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/modules/system/components/cron-next-run/cron-next-run.component.d.ts +18 -0
- package/app/modules/system/components/cron-next-run/index.d.ts +1 -0
- package/app/modules/system/fs-system.module.d.ts +37 -36
- package/esm2020/app/modules/system/components/cron/cron.component.mjs +3 -3
- package/esm2020/app/modules/system/components/cron-log/cron-log.component.mjs +1 -1
- package/esm2020/app/modules/system/components/cron-next-run/cron-next-run.component.mjs +99 -0
- package/esm2020/app/modules/system/components/cron-next-run/index.mjs +2 -0
- package/esm2020/app/modules/system/components/crons/crons.component.mjs +5 -5
- package/esm2020/app/modules/system/fs-system.module.mjs +4 -1
- package/fesm2015/firestitch-system.mjs +102 -8
- package/fesm2015/firestitch-system.mjs.map +1 -1
- package/fesm2020/firestitch-system.mjs +101 -8
- package/fesm2020/firestitch-system.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -28,7 +28,7 @@ import { FsListComponent, FsListModule } from '@firestitch/list';
|
|
|
28
28
|
import * as i7 from '@firestitch/popover';
|
|
29
29
|
import { FsPopoverModule } from '@firestitch/popover';
|
|
30
30
|
import { ItemType } from '@firestitch/filter';
|
|
31
|
-
import { map, tap,
|
|
31
|
+
import { map, tap, takeUntil, switchMap } from 'rxjs/operators';
|
|
32
32
|
import * as i4$3 from '@angular/material/expansion';
|
|
33
33
|
import { MatExpansionModule } from '@angular/material/expansion';
|
|
34
34
|
import * as i7$1 from '@angular/material/form-field';
|
|
@@ -52,11 +52,11 @@ import * as i6 from '@firestitch/menu';
|
|
|
52
52
|
import { FsMenuModule } from '@firestitch/menu';
|
|
53
53
|
import * as i5 from '@firestitch/skeleton';
|
|
54
54
|
import { FsSkeletonModule } from '@firestitch/skeleton';
|
|
55
|
+
import { Subject, timer } from 'rxjs';
|
|
56
|
+
import { addMinutes, addHours, addDays, subSeconds, differenceInSeconds, getDaysInMonth, differenceInMinutes } from 'date-fns';
|
|
55
57
|
import * as i1$1 from '@firestitch/message';
|
|
56
58
|
import * as i3$3 from '@firestitch/prompt';
|
|
57
59
|
import { SelectionActionType } from '@firestitch/selection';
|
|
58
|
-
import { Subject } from 'rxjs';
|
|
59
|
-
import { differenceInSeconds, differenceInMinutes } from 'date-fns';
|
|
60
60
|
import * as i2$3 from '@firestitch/build';
|
|
61
61
|
import * as i9$1 from '@angular/material/core';
|
|
62
62
|
|
|
@@ -565,15 +565,107 @@ class CronComponent {
|
|
|
565
565
|
}
|
|
566
566
|
}
|
|
567
567
|
CronComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: CronComponent, deps: [{ token: MAT_DIALOG_DATA }, { token: i1.MatDialog }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
568
|
-
CronComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: CronComponent, selector: "ng-component", ngImport: i0, template: "<fs-dialog *fsSkeleton=\"cron\">\
|
|
568
|
+
CronComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: CronComponent, selector: "ng-component", ngImport: i0, template: "<fs-dialog *fsSkeleton=\"cron\">\n <h1 mat-dialog-title>\n Cron\n <div class=\"small\">{{cron.name}}</div>\n </h1>\n <mat-dialog-content>\n <mat-tab-group (selectedIndexChange)=\"selectedIndexChange($event)\">\n <mat-tab label=\"Overview\">\n <div class=\"row\">\n <fs-label-field>\n <fs-label>\n Status\n </fs-label>\n {{CronStates[cron.state]}}\n </fs-label-field>\n\n <fs-label-field *ngIf=\"cron.cronSetting\">\n <fs-label>\n Run Frequency\n </fs-label>\n {{cron.cronSetting.summary}}\n </fs-label-field>\n\n <fs-label-field *ngIf=\"cron.processId\">\n <fs-label>\n Process\n </fs-label>\n {{cron.processId}}\n <ng-container *ngIf=\"cron.processState\">\n <div class=\"small\">\n {{CronProcessStates[cron.processState]}}\n </div>\n </ng-container>\n </fs-label-field>\n\n <fs-label-field>\n <fs-label>\n Last Ran\n </fs-label>\n <ng-container *ngIf=\"cron.duration===null; else lastRan\">\n Never\n </ng-container>\n <ng-template #lastRan>\n <fs-date-ago [date]=\"cron.createDate\"></fs-date-ago>\n <div><small *ngIf=\"cron.duration\">Duration: {{ cron.duration | fsDateDuration }}</small></div>\n </ng-template>\n </fs-label-field>\n </div>\n\n <fs-label-field *ngIf=\"cron.message\">\n <fs-label>\n Last Message\n </fs-label>\n <div class=\"message\">{{cron.message}}</div>\n </fs-label-field>\n </mat-tab>\n <mat-tab label=\"Logs\" *ngIf=\"config\">\n <ng-template matTabContent>\n <fs-list [config]=\"config\">\n <fs-list-column name=\"state\" title=\"Status\">\n <ng-template fs-list-cell let-row=\"row\">\n <a \n (click)=\"cronLogOpen(row)\"\n [ngStyle]=\"{ color: CronLogStateColors[row.state] }\">\n {{CronLogStates[row.state] || row.state}}\n </a>\n </ng-template>\n </fs-list-column>\n \n <fs-list-column title=\"Message\" class=\"col-message\">\n <ng-template fs-list-cell let-row=\"row\">\n <div class=\"message\">{{row.message}}</div>\n </ng-template>\n </fs-list-column>\n \n <fs-list-column title=\"Duration\" class=\"col-message\">\n <ng-template fs-list-cell let-row=\"row\">\n <ng-container *ngIf=\"row.duration\">\n {{row.duration | fsDateDuration: 'hour-minute-second'}}\n </ng-container>\n </ng-template>\n </fs-list-column>\n\n <fs-list-column name=\"create_date\" title=\"Date\" class=\"col-date\">\n <ng-template fs-list-cell let-row=\"row\">\n <fs-date-ago [date]=\"row.createDate\"></fs-date-ago>\n </ng-template>\n </fs-list-column>\n </fs-list> \n </ng-template>\n </mat-tab>\n </mat-tab-group>\n\n </mat-dialog-content>\n <mat-dialog-actions> \n <button \n mat-button \n [mat-dialog-close]=\"true\" \n color=\"primary\">\n Done\n </button>\n <ng-container *ngIf=\"tabIndex === 0\">\n <button \n *ngFor=\"let cronAction of cronActions\"\n mat-button \n (click)=\"cronActionClick(cronAction)\">\n {{cronAction.label}}\n </button> \n </ng-container>\n </mat-dialog-actions>\n</fs-dialog>\n", styles: [":host ::ng-deep .col-message .message{white-space:break-spaces;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden}:host ::ng-deep .col-date{white-space:nowrap}h1 .small{line-height:normal}.row{display:flex;flex-wrap:wrap}.row fs-label-field:not(:last-child){margin-right:40px}.message{white-space:pre-line}\n"], components: [{ type: i2.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode", "mobileButtonPlacement", "mobileWidth", "mode", "buttonLayout"] }, { type: i3$1.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "disableRipple"], exportAs: ["matTabGroup"] }, { type: i3$1.MatTab, selector: "mat-tab", inputs: ["disabled", "label", "aria-label", "aria-labelledby", "labelClass", "bodyClass"], exportAs: ["matTab"] }, { type: i3.FsLabelFieldComponent, selector: "fs-label-field", inputs: ["bottomMargin", "topMargin", "labelMargin"] }, { type: i3.FsLabelComponent, selector: "fs-label" }, { type: i4$2.FsDateAgoComponent, selector: "fs-date-ago", inputs: ["date", "showTime", "format", "showTooltip", "tooltipDateFormat"] }, { type: i2$2.FsListComponent, selector: "fs-list", inputs: ["config", "loaderLines"], outputs: ["filtersReady"] }, { type: i4.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i5.FsSkeletonContentDirective, selector: "[fsSkeleton]", inputs: ["fsSkeleton", "fsSkeletonPattern"] }, { type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i8.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3$1.MatTabContent, selector: "[matTabContent]" }, { type: i2$2.FsListColumnDirective, selector: "fs-list-column", inputs: ["show", "title", "name", "customize", "sortable", "sortableDefault", "direction", "align", "width", "class"] }, { type: i2$2.FsListCellDirective, selector: "[fs-list-cell]", inputs: ["colspan", "align", "class"] }, { type: i8.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { type: i8.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "fsDateDuration": i4$2.FsDateDurationPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
569
569
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: CronComponent, decorators: [{
|
|
570
570
|
type: Component,
|
|
571
|
-
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, template: "<fs-dialog *fsSkeleton=\"cron\">\
|
|
571
|
+
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, template: "<fs-dialog *fsSkeleton=\"cron\">\n <h1 mat-dialog-title>\n Cron\n <div class=\"small\">{{cron.name}}</div>\n </h1>\n <mat-dialog-content>\n <mat-tab-group (selectedIndexChange)=\"selectedIndexChange($event)\">\n <mat-tab label=\"Overview\">\n <div class=\"row\">\n <fs-label-field>\n <fs-label>\n Status\n </fs-label>\n {{CronStates[cron.state]}}\n </fs-label-field>\n\n <fs-label-field *ngIf=\"cron.cronSetting\">\n <fs-label>\n Run Frequency\n </fs-label>\n {{cron.cronSetting.summary}}\n </fs-label-field>\n\n <fs-label-field *ngIf=\"cron.processId\">\n <fs-label>\n Process\n </fs-label>\n {{cron.processId}}\n <ng-container *ngIf=\"cron.processState\">\n <div class=\"small\">\n {{CronProcessStates[cron.processState]}}\n </div>\n </ng-container>\n </fs-label-field>\n\n <fs-label-field>\n <fs-label>\n Last Ran\n </fs-label>\n <ng-container *ngIf=\"cron.duration===null; else lastRan\">\n Never\n </ng-container>\n <ng-template #lastRan>\n <fs-date-ago [date]=\"cron.createDate\"></fs-date-ago>\n <div><small *ngIf=\"cron.duration\">Duration: {{ cron.duration | fsDateDuration }}</small></div>\n </ng-template>\n </fs-label-field>\n </div>\n\n <fs-label-field *ngIf=\"cron.message\">\n <fs-label>\n Last Message\n </fs-label>\n <div class=\"message\">{{cron.message}}</div>\n </fs-label-field>\n </mat-tab>\n <mat-tab label=\"Logs\" *ngIf=\"config\">\n <ng-template matTabContent>\n <fs-list [config]=\"config\">\n <fs-list-column name=\"state\" title=\"Status\">\n <ng-template fs-list-cell let-row=\"row\">\n <a \n (click)=\"cronLogOpen(row)\"\n [ngStyle]=\"{ color: CronLogStateColors[row.state] }\">\n {{CronLogStates[row.state] || row.state}}\n </a>\n </ng-template>\n </fs-list-column>\n \n <fs-list-column title=\"Message\" class=\"col-message\">\n <ng-template fs-list-cell let-row=\"row\">\n <div class=\"message\">{{row.message}}</div>\n </ng-template>\n </fs-list-column>\n \n <fs-list-column title=\"Duration\" class=\"col-message\">\n <ng-template fs-list-cell let-row=\"row\">\n <ng-container *ngIf=\"row.duration\">\n {{row.duration | fsDateDuration: 'hour-minute-second'}}\n </ng-container>\n </ng-template>\n </fs-list-column>\n\n <fs-list-column name=\"create_date\" title=\"Date\" class=\"col-date\">\n <ng-template fs-list-cell let-row=\"row\">\n <fs-date-ago [date]=\"row.createDate\"></fs-date-ago>\n </ng-template>\n </fs-list-column>\n </fs-list> \n </ng-template>\n </mat-tab>\n </mat-tab-group>\n\n </mat-dialog-content>\n <mat-dialog-actions> \n <button \n mat-button \n [mat-dialog-close]=\"true\" \n color=\"primary\">\n Done\n </button>\n <ng-container *ngIf=\"tabIndex === 0\">\n <button \n *ngFor=\"let cronAction of cronActions\"\n mat-button \n (click)=\"cronActionClick(cronAction)\">\n {{cronAction.label}}\n </button> \n </ng-container>\n </mat-dialog-actions>\n</fs-dialog>\n", styles: [":host ::ng-deep .col-message .message{white-space:break-spaces;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden}:host ::ng-deep .col-date{white-space:nowrap}h1 .small{line-height:normal}.row{display:flex;flex-wrap:wrap}.row fs-label-field:not(:last-child){margin-right:40px}.message{white-space:pre-line}\n"] }]
|
|
572
572
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
573
573
|
type: Inject,
|
|
574
574
|
args: [MAT_DIALOG_DATA]
|
|
575
575
|
}] }, { type: i1.MatDialog }, { type: i0.ChangeDetectorRef }]; } });
|
|
576
576
|
|
|
577
|
+
class CronNextRunComponent {
|
|
578
|
+
constructor(_cdRef) {
|
|
579
|
+
this._cdRef = _cdRef;
|
|
580
|
+
this._destroy$ = new Subject();
|
|
581
|
+
}
|
|
582
|
+
ngOnInit() {
|
|
583
|
+
this.update();
|
|
584
|
+
}
|
|
585
|
+
calculateDuration() {
|
|
586
|
+
const now = new Date();
|
|
587
|
+
const nextMinutes = this._getNextMinutes(now);
|
|
588
|
+
const nextHours = this._getNextHours(now);
|
|
589
|
+
const nextDays = this._getNextDays(now);
|
|
590
|
+
if (this.cron.cronSetting.minutes.length ||
|
|
591
|
+
this.cron.cronSetting.hours.length ||
|
|
592
|
+
this.cron.cronSetting.days.length) {
|
|
593
|
+
let next = new Date();
|
|
594
|
+
next = addMinutes(next, nextMinutes);
|
|
595
|
+
next = addHours(next, nextHours);
|
|
596
|
+
next = addDays(next, nextDays);
|
|
597
|
+
next = subSeconds(next, next.getSeconds());
|
|
598
|
+
this.duration = differenceInSeconds(next, now);
|
|
599
|
+
}
|
|
600
|
+
else {
|
|
601
|
+
this.duration = 60 - now.getSeconds();
|
|
602
|
+
}
|
|
603
|
+
}
|
|
604
|
+
update() {
|
|
605
|
+
this.calculateDuration();
|
|
606
|
+
timer(0, 1000)
|
|
607
|
+
.pipe(tap(() => {
|
|
608
|
+
this.duration -= 1;
|
|
609
|
+
if (this.duration % 60 === 0 || this.duration < (60 * 5)) {
|
|
610
|
+
this._cdRef.markForCheck();
|
|
611
|
+
}
|
|
612
|
+
if (this.duration <= 0) {
|
|
613
|
+
this.calculateDuration();
|
|
614
|
+
this._cdRef.markForCheck();
|
|
615
|
+
}
|
|
616
|
+
}), takeUntil(this._destroy$))
|
|
617
|
+
.subscribe();
|
|
618
|
+
}
|
|
619
|
+
ngOnDestroy() {
|
|
620
|
+
this._destroy$.next();
|
|
621
|
+
this._destroy$.complete();
|
|
622
|
+
}
|
|
623
|
+
_getNextMinutes(now) {
|
|
624
|
+
const minutes = this.cron.cronSetting.minutes;
|
|
625
|
+
if (minutes.length) {
|
|
626
|
+
for (let i = minutes.length - 1; i >= 0; i--) {
|
|
627
|
+
if (now.getUTCMinutes() >= minutes[i]) {
|
|
628
|
+
return (minutes[i + 1] ? minutes[i + 1] - now.getUTCMinutes() : (60 - now.getUTCMinutes() + minutes[i]));
|
|
629
|
+
}
|
|
630
|
+
}
|
|
631
|
+
return minutes[0] - now.getMinutes();
|
|
632
|
+
}
|
|
633
|
+
return 0;
|
|
634
|
+
}
|
|
635
|
+
_getNextHours(now) {
|
|
636
|
+
const hours = this.cron.cronSetting.hours;
|
|
637
|
+
if (hours.length) {
|
|
638
|
+
for (let i = hours.length - 1; i >= 0; i--) {
|
|
639
|
+
if (now.getUTCHours() >= hours[i]) {
|
|
640
|
+
return (hours[i + 1] ? hours[i + 1] - now.getUTCHours() : (24 - now.getUTCHours() + hours[i]));
|
|
641
|
+
}
|
|
642
|
+
}
|
|
643
|
+
return hours[0] - now.getUTCHours();
|
|
644
|
+
}
|
|
645
|
+
return 0;
|
|
646
|
+
}
|
|
647
|
+
_getNextDays(now) {
|
|
648
|
+
const days = this.cron.cronSetting.days;
|
|
649
|
+
if (days.length) {
|
|
650
|
+
for (let i = days.length - 1; i >= 0; i--) {
|
|
651
|
+
if (now.getDate() >= days[i]) {
|
|
652
|
+
return (days[i + 1] ? days[i + 1] : getDaysInMonth(now)) - now.getDate();
|
|
653
|
+
}
|
|
654
|
+
}
|
|
655
|
+
return days[0] - getDaysInMonth(now);
|
|
656
|
+
}
|
|
657
|
+
return 0;
|
|
658
|
+
}
|
|
659
|
+
}
|
|
660
|
+
CronNextRunComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: CronNextRunComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
661
|
+
CronNextRunComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: CronNextRunComponent, selector: "app-next-run", inputs: { cron: "cron" }, ngImport: i0, template: "<ng-container *ngIf=\"duration > 60; else seconds\">\n {{duration | fsDateDuration: { hours: true, seconds: true, minutes: true, days: true} }}\n</ng-container>\n\n<ng-template #seconds>\n {{duration}}s\n</ng-template>\n\n", styles: [""], directives: [{ type: i8.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "fsDateDuration": i4$2.FsDateDurationPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
662
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: CronNextRunComponent, decorators: [{
|
|
663
|
+
type: Component,
|
|
664
|
+
args: [{ selector: 'app-next-run', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"duration > 60; else seconds\">\n {{duration | fsDateDuration: { hours: true, seconds: true, minutes: true, days: true} }}\n</ng-container>\n\n<ng-template #seconds>\n {{duration}}s\n</ng-template>\n\n", styles: [""] }]
|
|
665
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { cron: [{
|
|
666
|
+
type: Input
|
|
667
|
+
}] } });
|
|
668
|
+
|
|
577
669
|
class CronsComponent {
|
|
578
670
|
constructor(_message, _dialog, _prompt) {
|
|
579
671
|
this._message = _message;
|
|
@@ -718,7 +810,6 @@ class CronsComponent {
|
|
|
718
810
|
fetch: (query) => {
|
|
719
811
|
query = {
|
|
720
812
|
...query,
|
|
721
|
-
processStates: true,
|
|
722
813
|
timezone: Intl.DateTimeFormat().resolvedOptions().timeZone,
|
|
723
814
|
};
|
|
724
815
|
return this.loadCrons(query)
|
|
@@ -760,10 +851,10 @@ class CronsComponent {
|
|
|
760
851
|
}
|
|
761
852
|
}
|
|
762
853
|
CronsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: CronsComponent, deps: [{ token: i1$1.FsMessage }, { token: i1.MatDialog }, { token: i3$3.FsPrompt }], target: i0.ɵɵFactoryTarget.Component });
|
|
763
|
-
CronsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: CronsComponent, selector: "fs-system-crons", inputs: { enable: "enable", disable: "disable", kill: "kill", queue: "queue", run: "run", loadCrons: "loadCrons", loadCron: "loadCron", loadCronLogs: "loadCronLogs", bulk: "bulk" }, viewQueries: [{ propertyName: "list", first: true, predicate: FsListComponent, descendants: true, static: true }], ngImport: i0, template: "<fs-list [config]=\"config\">\
|
|
854
|
+
CronsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: CronsComponent, selector: "fs-system-crons", inputs: { enable: "enable", disable: "disable", kill: "kill", queue: "queue", run: "run", loadCrons: "loadCrons", loadCron: "loadCron", loadCronLogs: "loadCronLogs", bulk: "bulk" }, viewQueries: [{ propertyName: "list", first: true, predicate: FsListComponent, descendants: true, static: true }], ngImport: i0, template: "<fs-list [config]=\"config\">\n <fs-list-column>\n <ng-template fs-list-header>Name</ng-template>\n <ng-template fs-list-cell let-row=\"row\">\n <a (click)=\"open(row)\">{{row.name}}</a>\n <div *ngIf=\"row.cronSetting\">\n <small>{{row.cronSetting.summary}}</small>\n </div>\n </ng-template>\n </fs-list-column>\n <fs-list-column align=\"center\">\n <ng-template fs-list-header>Status</ng-template>\n <ng-template fs-list-cell let-row=\"row\">\n <ng-container *ngIf=\"row.host || row.processId; else status\">\n <fs-popover \n [maxWidth]=\"null\"\n [template]=\"statusPopover\" \n size=\"small\">\n <ng-container *ngTemplateOutlet=\"status\"></ng-container>\n </fs-popover>\n <ng-template #statusPopover>\n <div *ngIf=\"row.host\">Host: {{row.host}}</div>\n <div *ngIf=\"row.processId\">Process ID: {{row.processId}}</div>\n <div *ngIf=\"row.processState\">Process State: {{CronProcessStates[row.processState]}}</div>\n </ng-template>\n </ng-container>\n <ng-template #status>\n {{CronStates[row.state]}}\n </ng-template>\n <ng-container *ngIf=\"row.state === CronState.Running\">\n <div class=\"small\">\n Duration: {{ row.runningDuration | fsDateDuration: { hours: true, minutes: true, seconds: true } }}\n </div>\n </ng-container> \n </ng-template>\n </fs-list-column>\n <fs-list-column>\n <ng-template fs-list-header>Last Ran</ng-template>\n <ng-template fs-list-cell let-row=\"row\">\n <ng-container *ngIf=\"row.duration===null; else lastRan\">\n Never\n </ng-container>\n <ng-template #lastRan>\n <fs-date-ago [date]=\"row.createDate\"></fs-date-ago>\n <div class=\"small\" *ngIf=\"row.duration\">\n Duration: {{ row.duration | fsDateDuration: { hours: true, minutes: true, seconds: true } }}\n </div>\n </ng-template>\n </ng-template>\n </fs-list-column>\n <fs-list-column>\n <ng-template fs-list-header>Next Run</ng-template>\n <ng-template fs-list-cell let-row=\"row\">\n <ng-container *ngIf=\"row.state !== CronState.Disabled\">\n <app-next-run [cron]=\"row\"></app-next-run>\n </ng-container>\n </ng-template>\n </fs-list-column>\n</fs-list>\n", styles: [""], components: [{ type: i2$2.FsListComponent, selector: "fs-list", inputs: ["config", "loaderLines"], outputs: ["filtersReady"] }, { type: i7.FsPopoverComponent, selector: "fs-popover" }, { type: i4$2.FsDateAgoComponent, selector: "fs-date-ago", inputs: ["date", "showTime", "format", "showTooltip", "tooltipDateFormat"] }, { type: CronNextRunComponent, selector: "app-next-run", inputs: ["cron"] }], directives: [{ type: i2$2.FsListColumnDirective, selector: "fs-list-column", inputs: ["show", "title", "name", "customize", "sortable", "sortableDefault", "direction", "align", "width", "class"] }, { type: i2$2.FsListHeaderDirective, selector: "[fs-list-header]", inputs: ["colspan", "align", "class"] }, { type: i2$2.FsListCellDirective, selector: "[fs-list-cell]", inputs: ["colspan", "align", "class"] }, { type: i8.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i8.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], pipes: { "fsDateDuration": i4$2.FsDateDurationPipe } });
|
|
764
855
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: CronsComponent, decorators: [{
|
|
765
856
|
type: Component,
|
|
766
|
-
args: [{ selector: 'fs-system-crons', template: "<fs-list [config]=\"config\">\
|
|
857
|
+
args: [{ selector: 'fs-system-crons', template: "<fs-list [config]=\"config\">\n <fs-list-column>\n <ng-template fs-list-header>Name</ng-template>\n <ng-template fs-list-cell let-row=\"row\">\n <a (click)=\"open(row)\">{{row.name}}</a>\n <div *ngIf=\"row.cronSetting\">\n <small>{{row.cronSetting.summary}}</small>\n </div>\n </ng-template>\n </fs-list-column>\n <fs-list-column align=\"center\">\n <ng-template fs-list-header>Status</ng-template>\n <ng-template fs-list-cell let-row=\"row\">\n <ng-container *ngIf=\"row.host || row.processId; else status\">\n <fs-popover \n [maxWidth]=\"null\"\n [template]=\"statusPopover\" \n size=\"small\">\n <ng-container *ngTemplateOutlet=\"status\"></ng-container>\n </fs-popover>\n <ng-template #statusPopover>\n <div *ngIf=\"row.host\">Host: {{row.host}}</div>\n <div *ngIf=\"row.processId\">Process ID: {{row.processId}}</div>\n <div *ngIf=\"row.processState\">Process State: {{CronProcessStates[row.processState]}}</div>\n </ng-template>\n </ng-container>\n <ng-template #status>\n {{CronStates[row.state]}}\n </ng-template>\n <ng-container *ngIf=\"row.state === CronState.Running\">\n <div class=\"small\">\n Duration: {{ row.runningDuration | fsDateDuration: { hours: true, minutes: true, seconds: true } }}\n </div>\n </ng-container> \n </ng-template>\n </fs-list-column>\n <fs-list-column>\n <ng-template fs-list-header>Last Ran</ng-template>\n <ng-template fs-list-cell let-row=\"row\">\n <ng-container *ngIf=\"row.duration===null; else lastRan\">\n Never\n </ng-container>\n <ng-template #lastRan>\n <fs-date-ago [date]=\"row.createDate\"></fs-date-ago>\n <div class=\"small\" *ngIf=\"row.duration\">\n Duration: {{ row.duration | fsDateDuration: { hours: true, minutes: true, seconds: true } }}\n </div>\n </ng-template>\n </ng-template>\n </fs-list-column>\n <fs-list-column>\n <ng-template fs-list-header>Next Run</ng-template>\n <ng-template fs-list-cell let-row=\"row\">\n <ng-container *ngIf=\"row.state !== CronState.Disabled\">\n <app-next-run [cron]=\"row\"></app-next-run>\n </ng-container>\n </ng-template>\n </fs-list-column>\n</fs-list>\n", styles: [""] }]
|
|
767
858
|
}], ctorParameters: function () { return [{ type: i1$1.FsMessage }, { type: i1.MatDialog }, { type: i3$3.FsPrompt }]; }, propDecorators: { list: [{
|
|
768
859
|
type: ViewChild,
|
|
769
860
|
args: [FsListComponent, { static: true }]
|
|
@@ -1342,6 +1433,7 @@ class FsSystemModule {
|
|
|
1342
1433
|
}
|
|
1343
1434
|
FsSystemModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FsSystemModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1344
1435
|
FsSystemModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FsSystemModule, declarations: [DashboardComponent,
|
|
1436
|
+
CronNextRunComponent,
|
|
1345
1437
|
CronsComponent,
|
|
1346
1438
|
SettingsComponent,
|
|
1347
1439
|
KeyNameValuePipe,
|
|
@@ -1446,6 +1538,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImpor
|
|
|
1446
1538
|
],
|
|
1447
1539
|
declarations: [
|
|
1448
1540
|
DashboardComponent,
|
|
1541
|
+
CronNextRunComponent,
|
|
1449
1542
|
CronsComponent,
|
|
1450
1543
|
SettingsComponent,
|
|
1451
1544
|
KeyNameValuePipe,
|