UI for basic import and preparation phase of CSV.
This commit is contained in:
parent
877e0a857d
commit
739b9452de
24 changed files with 907 additions and 138 deletions
|
@ -12,22 +12,60 @@ const ImportType = {
|
|||
const ImportStatus = {
|
||||
PREP_SCHEDULED: 0,
|
||||
PREP_RUNNING: 1,
|
||||
PREP_FINISHED: 2,
|
||||
PREP_FAILED: 3,
|
||||
PREP_STOPPING: 2,
|
||||
PREP_FINISHED: 3,
|
||||
PREP_FAILED: 4,
|
||||
|
||||
RUN_SCHEDULED: 4,
|
||||
RUN_RUNNING: 5,
|
||||
RUN_FINISHED: 6,
|
||||
RUN_FAILED: 7
|
||||
RUN_SCHEDULED: 5,
|
||||
RUN_RUNNING: 6,
|
||||
RUN_STOPPING: 7,
|
||||
RUN_FINISHED: 8,
|
||||
RUN_FAILED: 9
|
||||
};
|
||||
|
||||
const RunStatus = {
|
||||
RUNNING: 0,
|
||||
FINISHED: 1
|
||||
SCHEDULED: 0,
|
||||
RUNNING: 1,
|
||||
STOPPING: 2,
|
||||
FINISHED: 3
|
||||
};
|
||||
|
||||
function prepInProgress(status) {
|
||||
return status === ImportStatus.PREP_SCHEDULED || status === ImportStatus.PREP_RUNNING || status === ImportStatus.PREP_STOPPING;
|
||||
}
|
||||
|
||||
function runInProgress(status) {
|
||||
return status === ImportStatus.RUN_SCHEDULED || status === ImportStatus.RUN_RUNNING || status === ImportStatus.RUN_STOPPING;
|
||||
}
|
||||
|
||||
function inProgress(status) {
|
||||
return status === ImportStatus.PREP_SCHEDULED || status === ImportStatus.PREP_RUNNING || status === ImportStatus.PREP_STOPPING ||
|
||||
status === ImportStatus.RUN_SCHEDULED || status === ImportStatus.RUN_RUNNING || status === ImportStatus.RUN_STOPPING;
|
||||
}
|
||||
|
||||
function prepFinished(status) {
|
||||
return status === ImportStatus.PREP_FINISHED ||
|
||||
status === ImportStatus.RUN_SCHEDULED || status === ImportStatus.RUN_RUNNING || status === ImportStatus.RUN_STOPPING ||
|
||||
status === ImportStatus.RUN_FINISHED || status === ImportStatus.RUN_FAILED;
|
||||
}
|
||||
|
||||
function prepFinishedAndNotInProgress(status) {
|
||||
return status === ImportStatus.PREP_FINISHED ||
|
||||
status === ImportStatus.RUN_FINISHED || status === ImportStatus.RUN_FAILED;
|
||||
}
|
||||
|
||||
function runStatusInProgress(status) {
|
||||
return status === RunStatus.SCHEDULED || status === RunStatus.RUNNING || status === RunStatus.STOPPING;
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
ImportType,
|
||||
ImportStatus,
|
||||
RunStatus
|
||||
RunStatus,
|
||||
prepInProgress,
|
||||
runInProgress,
|
||||
prepFinished,
|
||||
prepFinishedAndNotInProgress,
|
||||
inProgress,
|
||||
runStatusInProgress
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue