src/app/jobs/model/job-execution.model.ts
Properties |
|
Methods |
|
Accessors |
constructor()
|
Defined in src/app/jobs/model/job-execution.model.ts:24
|
Static fromJSON | ||||||||
fromJSON(input: )
|
||||||||
Defined in src/app/jobs/model/job-execution.model.ts:34
|
||||||||
Parameters :
Returns :
JobExecution
|
Static fromThinJSON | ||||||||
fromThinJSON(input: )
|
||||||||
Defined in src/app/jobs/model/job-execution.model.ts:61
|
||||||||
Parameters :
Returns :
JobExecution
|
Static pageFromJSON | ||||||||
pageFromJSON(input: )
|
||||||||
Defined in src/app/jobs/model/job-execution.model.ts:78
|
||||||||
Parameters :
Returns :
Page<JobExecution>
|
Public abandonable |
abandonable:
|
Type : boolean
|
Defined in src/app/jobs/model/job-execution.model.ts:22
|
Public defined |
defined:
|
Type : boolean
|
Defined in src/app/jobs/model/job-execution.model.ts:24
|
Public endTime |
endTime:
|
Type : DateTime
|
Defined in src/app/jobs/model/job-execution.model.ts:12
|
Public exitCode |
exitCode:
|
Type : string
|
Defined in src/app/jobs/model/job-execution.model.ts:16
|
Public exitMessage |
exitMessage:
|
Type : string
|
Defined in src/app/jobs/model/job-execution.model.ts:17
|
Public jobExecutionId |
jobExecutionId:
|
Type : number
|
Defined in src/app/jobs/model/job-execution.model.ts:10
|
Public jobInstanceId |
jobInstanceId:
|
Type : number
|
Defined in src/app/jobs/model/job-execution.model.ts:9
|
Public jobParametersString |
jobParametersString:
|
Type : string
|
Defined in src/app/jobs/model/job-execution.model.ts:15
|
Public name |
name:
|
Type : string
|
Defined in src/app/jobs/model/job-execution.model.ts:7
|
Public restartable |
restartable:
|
Type : boolean
|
Defined in src/app/jobs/model/job-execution.model.ts:21
|
Public startTime |
startTime:
|
Type : DateTime
|
Defined in src/app/jobs/model/job-execution.model.ts:11
|
Public status |
status:
|
Type : string
|
Defined in src/app/jobs/model/job-execution.model.ts:14
|
Public stepExecutionCount |
stepExecutionCount:
|
Type : number
|
Defined in src/app/jobs/model/job-execution.model.ts:13
|
Public stepExecutions |
stepExecutions:
|
Type : Array<StepExecution>
|
Defined in src/app/jobs/model/job-execution.model.ts:19
|
Public stoppable |
stoppable:
|
Type : boolean
|
Defined in src/app/jobs/model/job-execution.model.ts:23
|
Public taskExecutionId |
taskExecutionId:
|
Type : number
|
Defined in src/app/jobs/model/job-execution.model.ts:8
|
startTimeFormatted |
getstartTimeFormatted()
|
Defined in src/app/jobs/model/job-execution.model.ts:30
|
Returns :
string
|
import { DateTimeUtils } from '../../shared/support/date-time.utils';
import { StepExecution } from './step-execution.model';
import { Page } from '../../shared/model/page';
import { DateTime } from 'luxon';
export class JobExecution {
public name: string;
public taskExecutionId: number;
public jobInstanceId: number;
public jobExecutionId: number;
public startTime: DateTime;
public endTime: DateTime;
public stepExecutionCount: number;
public status: string;
public jobParametersString: string;
public exitCode: string;
public exitMessage: string;
public stepExecutions: Array<StepExecution>;
public restartable: boolean;
public abandonable: boolean;
public stoppable: boolean;
public defined: boolean;
constructor() {
this.stepExecutions = [];
}
public get startTimeFormatted(): string {
return DateTimeUtils.formatAsDateTime(this.startTime);
}
static fromJSON(input): JobExecution {
const jobExecution: JobExecution = new JobExecution();
jobExecution.name = input.name;
jobExecution.startTime = DateTime.fromISO(input.jobExecution.startTime);
jobExecution.stepExecutionCount = input.stepExecutionCount;
jobExecution.status = input.jobExecution.status;
jobExecution.jobExecutionId = input.jobExecution.id;
jobExecution.taskExecutionId = input.taskExecutionId;
jobExecution.jobInstanceId = input.jobExecution.jobInstance.id;
jobExecution.restartable = input.restartable;
jobExecution.abandonable = input.abandonable;
jobExecution.stoppable = input.stoppable;
jobExecution.defined = input.defined;
if (input.jobExecution.endTime) {
jobExecution.endTime = DateTime.fromISO(input.jobExecution.endTime);
}
if (input.jobExecution.exitStatus) {
jobExecution.exitCode = input.jobExecution.exitStatus.exitCode;
jobExecution.exitMessage = input.jobExecution.exitStatus.exitDescription;
}
jobExecution.jobParametersString = input.jobParametersString;
if (input.jobExecution.stepExecutions) {
jobExecution.stepExecutions = input.jobExecution.stepExecutions.map(StepExecution.fromJSON);
}
return jobExecution;
}
static fromThinJSON(input): JobExecution {
const jobExecution: JobExecution = new JobExecution();
jobExecution.name = input.name;
jobExecution.startTime = DateTime.fromISO(input.startDateTime);
jobExecution.stepExecutionCount = input.stepExecutionCount;
jobExecution.status = input.status;
jobExecution.jobExecutionId = input.executionId;
jobExecution.taskExecutionId = input.taskExecutionId;
jobExecution.jobInstanceId = input.instanceId;
jobExecution.restartable = input.restartable;
jobExecution.abandonable = input.abandonable;
jobExecution.stoppable = input.stoppable;
jobExecution.defined = input.defined;
jobExecution.jobParametersString = input.jobParametersString;
return jobExecution;
}
static pageFromJSON(input): Page<JobExecution> {
const page = Page.fromJSON<JobExecution>(input);
if (input && input._embedded) {
if (input._embedded.jobExecutionResourceList) {
page.items = input._embedded.jobExecutionResourceList.map(JobExecution.fromJSON);
}
if (input._embedded.jobExecutionThinResourceList) {
page.items = input._embedded.jobExecutionThinResourceList.map(JobExecution.fromThinJSON);
}
}
return page;
}
}