[Infra UI] Correctly interpret the resetting and reverting job states (#129570)

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
Felix Stürmer 2022-04-19 12:32:19 +02:00 committed by GitHub
parent ef5637030f
commit b62c81506f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 12 additions and 4 deletions

View file

@ -47,6 +47,7 @@ const datafeedStateRT = rt.keyof({
'': null,
});
// this is the union of the ML API's job state and block reasons
const jobStateRT = rt.keyof({
closed: null,
closing: null,
@ -54,6 +55,8 @@ const jobStateRT = rt.keyof({
failed: null,
opened: null,
opening: null,
resetting: null,
reverting: null,
});
const jobAnalysisConfigRT = rt.partial({

View file

@ -225,8 +225,9 @@ const getJobStatus =
) {
return 'stopped';
} else if (
jobSummary.jobState === 'opening' &&
jobSummary.awaitingNodeAssignment === false
(jobSummary.jobState === 'opening' && jobSummary.awaitingNodeAssignment === false) ||
jobSummary.jobState === 'resetting' ||
jobSummary.jobState === 'reverting'
) {
return 'initializing';
} else if (

View file

@ -47,6 +47,7 @@ const datafeedStateRT = rt.keyof({
'': null,
});
// this is the union of the ML API's job state and block reasons
const jobStateRT = rt.keyof({
closed: null,
closing: null,
@ -54,6 +55,8 @@ const jobStateRT = rt.keyof({
failed: null,
opened: null,
opening: null,
resetting: null,
reverting: null,
});
const jobCategorizationStatusRT = rt.keyof({

View file

@ -225,8 +225,9 @@ const getJobStatus =
) {
return 'stopped';
} else if (
jobSummary.jobState === 'opening' &&
jobSummary.awaitingNodeAssignment === false
(jobSummary.jobState === 'opening' && jobSummary.awaitingNodeAssignment === false) ||
jobSummary.jobState === 'resetting' ||
jobSummary.jobState === 'reverting'
) {
return 'initializing';
} else if (