Newer
Older
import {ProductVersion} from "./product";
export class JobQueue {
label: string;
name: string;
constructor(label: string, name: string) {
this.label = label;
this.name = name;
}
}
export class Job {
job_arch_status: string;
job_endtime: number;
job_endtime_formatted: string;
job_id: number;
job_name: string;
job_starttime: number;
job_starttime_formatted: string;
job_status: string;
jobspec_creation_date: number;
jobspec_creation_date_formatted: string;
jobspec_id: number;
jobspec_name: string;
jobspec_sdm_id: string;
jobspec_status: string;
static QUEUES = [
new JobQueue('Calibration', 'calibration'),
new JobQueue('Quicklook', 'quicklook'),
new JobQueue('SE Calibration', 'se_calibration'),
//new JobQueue('SE Cont', 'se_cont'),
new JobQueue('SE Continuum Image', 'se_continuum_imaging'),
new JobQueue('SE Coarse Cube Image', 'se_coarse_cube_imaging')
];
static getQueueFromName(queueName: string): JobQueue {
for (const queue of this.QUEUES) {
if (queue.name === queueName) {
return queue;
}
}
}
static SORT_COLUMNS = ['id', 'name', 'start_date', 'end_date', 'status'];
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
}
export class Task {
end: number;
endDate: string;
finalTask: boolean;
id: number;
name: string;
pbsJobId: string;
results: object;
start: number;
startDate: string;
status: string;
}
export class JobExecution {
analyst: string;
archivalJob: string;
archiveStatus: string;
end: number;
endDate: string;
id: number;
jobSpecId: number;
jsonResults: string;
name: string;
notes: string;
queueName: string;
sdmId: string;
start: number;
startDate: string;
status: string;
tasks: Array<Task>;
}
export class JobSpecFile {
id: number;
name: string;
contentType: string;
}
export class JobSpec {
creationDate: number;
executions: Array<JobExecution>;
files: Array<JobSpecFile>;
id: number;
inputs: object; // object = named array of ProductVersion
lastJob: JobExecution;
name: string;
queueName: string;
sbId: number;
sdmId: string;
status: string;
targets: Array<ProductVersion>;
static SORT_COLUMNS = ['id', 'name', 'creation_date', 'status'];