Initial
This commit is contained in:
@@ -200,6 +200,55 @@ export function camelRunPlan(row) {
|
||||
};
|
||||
}
|
||||
|
||||
export function camelRunPlanSchedule(row) {
|
||||
const occurrences = parseJson(row.preview_json, []);
|
||||
return {
|
||||
id: row.id,
|
||||
name: row.name,
|
||||
description: row.description || '',
|
||||
runplanId: row.runplan_id,
|
||||
runplanName: row.runplan_name || null,
|
||||
scriptId: row.script_id || null,
|
||||
scriptName: row.script_name || null,
|
||||
enabled: Boolean(row.enabled),
|
||||
scheduleType: row.schedule_type || 'once',
|
||||
startAt: row.start_at,
|
||||
endAt: row.end_at || '',
|
||||
timeOfDay: row.time_of_day || '',
|
||||
intervalValue: row.interval_value || 1,
|
||||
intervalUnit: row.interval_unit || 'hours',
|
||||
daysOfWeek: parseJson(row.days_of_week, []),
|
||||
dayOfMonth: row.day_of_month || null,
|
||||
monthOfYear: row.month_of_year || null,
|
||||
nextRunAt: row.next_run_at || '',
|
||||
lastRunAt: row.last_run_at || '',
|
||||
lastJobId: row.last_job_id || '',
|
||||
visibility: row.visibility || 'personal',
|
||||
ownerUserId: row.owner_user_id || null,
|
||||
groupId: row.group_id || null,
|
||||
groupName: row.group_name || null,
|
||||
preview: occurrences,
|
||||
createdBy: row.created_by || null,
|
||||
createdAt: row.created_at,
|
||||
updatedAt: row.updated_at
|
||||
};
|
||||
}
|
||||
|
||||
export function camelRunPlanScheduleRun(row) {
|
||||
return {
|
||||
id: row.id,
|
||||
scheduleId: row.schedule_id,
|
||||
runplanId: row.runplan_id,
|
||||
runplanName: row.runplan_name || null,
|
||||
jobId: row.job_id || '',
|
||||
jobStatus: row.job_status || '',
|
||||
plannedFor: row.planned_for,
|
||||
status: row.status,
|
||||
message: row.message || '',
|
||||
createdAt: row.created_at
|
||||
};
|
||||
}
|
||||
|
||||
export function camelCustomVariable(row, includeValue = false) {
|
||||
return {
|
||||
id: row.id,
|
||||
@@ -403,6 +452,29 @@ export function camelJobLog(row) {
|
||||
};
|
||||
}
|
||||
|
||||
export function camelJobOutput(row) {
|
||||
return {
|
||||
id: row.id,
|
||||
jobId: row.job_id,
|
||||
kind: row.kind,
|
||||
name: row.name,
|
||||
mimeType: row.mime_type,
|
||||
sizeBytes: row.size_bytes || 0,
|
||||
checksum: row.checksum,
|
||||
metadata: parseJson(row.metadata_json, {}),
|
||||
runplanId: row.runplan_id || null,
|
||||
runplanName: row.runplan_name || null,
|
||||
scriptId: row.script_id || null,
|
||||
scriptName: row.script_name || null,
|
||||
jobStatus: row.job_status || row.status || '',
|
||||
triggeredBy: row.triggered_by || null,
|
||||
createdAt: row.created_at,
|
||||
updatedAt: row.updated_at,
|
||||
downloadUrl: `/api/job-output/${row.id}/download`,
|
||||
viewUrl: `/api/job-output/${row.id}/view`
|
||||
};
|
||||
}
|
||||
|
||||
export function camelSystemJobAction(row) {
|
||||
return {
|
||||
id: row.id,
|
||||
|
||||
Reference in New Issue
Block a user