@firestitch/system 12.2.2 → 12.2.4
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/components/crons/crons.component.d.ts +2 -0
- package/bundles/firestitch-system.umd.js +12 -3
- package/bundles/firestitch-system.umd.js.map +1 -1
- package/esm2015/app/components/crons/crons.component.js +11 -3
- package/esm2015/app/components/process/process.component.js +5 -2
- package/esm2015/app/components/processes/processes.component.js +2 -2
- package/fesm2015/firestitch-system.js +14 -5
- package/fesm2015/firestitch-system.js.map +1 -1
- package/package.json +1 -1
|
@@ -3,6 +3,7 @@ import { MatDialog } from '@angular/material/dialog';
|
|
|
3
3
|
import { FsMessage } from '@firestitch/message';
|
|
4
4
|
import { FsListConfig, FsListComponent } from '@firestitch/list';
|
|
5
5
|
import { Observable } from 'rxjs';
|
|
6
|
+
import { CronState } from '../../enums';
|
|
6
7
|
import { FsPrompt } from '@firestitch/prompt';
|
|
7
8
|
import * as i0 from "@angular/core";
|
|
8
9
|
export declare class CronsComponent implements OnInit, OnDestroy {
|
|
@@ -24,6 +25,7 @@ export declare class CronsComponent implements OnInit, OnDestroy {
|
|
|
24
25
|
bulk: (actionName: string, data: any[]) => Observable<any>;
|
|
25
26
|
config: FsListConfig;
|
|
26
27
|
cronStates: {};
|
|
28
|
+
CronState: typeof CronState;
|
|
27
29
|
private _destroy$;
|
|
28
30
|
constructor(_message: FsMessage, _dialog: MatDialog, _prompt: FsPrompt);
|
|
29
31
|
ngOnInit(): void;
|
|
@@ -681,6 +681,7 @@
|
|
|
681
681
|
this._prompt = _prompt;
|
|
682
682
|
this.config = null;
|
|
683
683
|
this.cronStates = indexNameValue(CronStates);
|
|
684
|
+
this.CronState = exports.CronState;
|
|
684
685
|
this._destroy$ = new rxjs.Subject();
|
|
685
686
|
}
|
|
686
687
|
CronsComponent.prototype.ngOnInit = function () {
|
|
@@ -707,7 +708,12 @@
|
|
|
707
708
|
fetch: function (query) {
|
|
708
709
|
query.timezone = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
709
710
|
return _this.loadCrons(query)
|
|
710
|
-
.pipe(operators.map(function (
|
|
711
|
+
.pipe(operators.map(function (crons) { return ({
|
|
712
|
+
data: crons
|
|
713
|
+
.map(function (cron) {
|
|
714
|
+
return Object.assign(Object.assign({}, cron), { runningDuration: dateFns.differenceInSeconds(i3.parse(cron.createDate), new Date()) });
|
|
715
|
+
})
|
|
716
|
+
}); }));
|
|
711
717
|
},
|
|
712
718
|
};
|
|
713
719
|
if (this.bulk) {
|
|
@@ -846,7 +852,7 @@
|
|
|
846
852
|
return CronsComponent;
|
|
847
853
|
}());
|
|
848
854
|
CronsComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: CronsComponent, deps: [{ token: i1__namespace.FsMessage }, { token: i1__namespace$1.MatDialog }, { token: i3__namespace$2.FsPrompt }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
849
|
-
CronsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", 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: i2$3.FsListComponent, descendants: true, static: true }], ngImport: i0__namespace, template: "<fs-list [config]=\"config\">\r\n <fs-list-column>\r\n <ng-template fs-list-header>Name</ng-template>\r\n <ng-template fs-list-cell let-row=\"row\">\r\n <a (click)=\"open(row)\">{{row.name}}</a>\r\n <div *ngIf=\"row.cronSetting\">\r\n <small>{{row.cronSetting.summary}}</small>\r\n </div>\r\n </ng-template>\r\n </fs-list-column>\r\n <fs-list-column align=\"center\">\r\n <ng-template fs-list-header>Status</ng-template>\r\n <ng-template fs-list-cell let-row=\"row\">\r\n <ng-container *ngIf=\"row.host || row.processId; else status\">\r\n <fs-popover \r\n [maxWidth]=\"
|
|
855
|
+
CronsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", 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: i2$3.FsListComponent, descendants: true, static: true }], ngImport: i0__namespace, template: "<fs-list [config]=\"config\">\r\n <fs-list-column>\r\n <ng-template fs-list-header>Name</ng-template>\r\n <ng-template fs-list-cell let-row=\"row\">\r\n <a (click)=\"open(row)\">{{row.name}}</a>\r\n <div *ngIf=\"row.cronSetting\">\r\n <small>{{row.cronSetting.summary}}</small>\r\n </div>\r\n </ng-template>\r\n </fs-list-column>\r\n <fs-list-column align=\"center\">\r\n <ng-template fs-list-header>Status</ng-template>\r\n <ng-template fs-list-cell let-row=\"row\">\r\n <ng-container *ngIf=\"row.host || row.processId; else status\">\r\n <fs-popover \r\n [maxWidth]=\"null\"\r\n [template]=\"statusPopover\" \r\n size=\"small\">\r\n <ng-container *ngTemplateOutlet=\"status\"></ng-container>\r\n </fs-popover>\r\n <ng-template #statusPopover>\r\n <div *ngIf=\"row.host\">Host: {{row.host}}</div>\r\n <div *ngIf=\"row.processId\">Process ID: {{row.processId}}</div>\r\n </ng-template>\r\n </ng-container>\r\n <ng-template #status>\r\n {{cronStates[row.state]}}\r\n <ng-container *ngIf=\"row.state === CronState.Running\">\r\n <div class=\"small\">\r\n Duration: {{ row.runningDuration | fsDateDuration: { hours: true, minutes: true, seconds: true } }}\r\n </div>\r\n </ng-container>\r\n </ng-template>\r\n </ng-template>\r\n </fs-list-column>\r\n <fs-list-column>\r\n <ng-template fs-list-header>Last Ran</ng-template>\r\n <ng-template fs-list-cell let-row=\"row\">\r\n <ng-container *ngIf=\"row.duration===null; else lastRan\">\r\n Never\r\n </ng-container>\r\n <ng-template #lastRan>\r\n <fs-date-ago [date]=\"row.createDate\"></fs-date-ago>\r\n <div class=\"small\" *ngIf=\"row.duration\">\r\n Duration: {{ row.duration | fsDateDuration: { hours: true, minutes: true, seconds: true } }}\r\n </div>\r\n </ng-template>\r\n </ng-template>\r\n </fs-list-column>\r\n</fs-list>\r\n", styles: [""], components: [{ type: i2__namespace$3.FsListComponent, selector: "fs-list", inputs: ["config", "loaderLines"], outputs: ["filtersReady"] }, { type: i5__namespace$1.FsPopoverComponent, selector: "fs-popover", inputs: ["template", "data", "leaveDelay", "showDelay", "maxWidth", "wrapperClass", "autoShow", "autoClose", "loadingDiameter", "loading", "indication", "position", "theme", "size", "trigger"] }, { type: i3__namespace.FsDateAgoComponent, selector: "fs-date-ago", inputs: ["date", "showTime", "format", "showTooltip", "tooltipDateFormat"] }], directives: [{ type: i2__namespace$3.FsListColumnDirective, selector: "fs-list-column", inputs: ["title", "name", "show", "customize", "sortable", "sortableDefault", "direction", "align", "width", "class"] }, { type: i2__namespace$3.FsListHeaderDirective, selector: "[fs-list-header]", inputs: ["colspan", "align", "class"] }, { type: i2__namespace$3.FsListCellDirective, selector: "[fs-list-cell]", inputs: ["colspan", "align", "class"] }, { type: i9__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i9__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], pipes: { "fsDateDuration": i3__namespace.FsDateDurationPipe } });
|
|
850
856
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: CronsComponent, decorators: [{
|
|
851
857
|
type: i0.Component,
|
|
852
858
|
args: [{
|
|
@@ -1095,11 +1101,14 @@
|
|
|
1095
1101
|
};
|
|
1096
1102
|
ProcessComponent.prototype.run = function () {
|
|
1097
1103
|
var _this = this;
|
|
1104
|
+
this._message.success('Running process');
|
|
1098
1105
|
this.data.run(this.data.process)
|
|
1099
1106
|
.subscribe(function () {
|
|
1100
|
-
_this._message.success('Running process');
|
|
1101
1107
|
_this.load();
|
|
1102
1108
|
});
|
|
1109
|
+
setTimeout(function () {
|
|
1110
|
+
_this.load();
|
|
1111
|
+
}, 1000);
|
|
1103
1112
|
};
|
|
1104
1113
|
ProcessComponent.prototype.download = function () {
|
|
1105
1114
|
this.data.download(this.data.process);
|