[ML] Update job service id schema (#67462)

This commit is contained in:
James Gowdy 2020-05-28 11:50:56 +01:00 committed by GitHub
parent a5e717c032
commit dcca06bad2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 5 deletions

View file

@ -19,7 +19,7 @@ import { mlCalendarService } from '../../../services/calendar_service';
export function loadFullJob(jobId) {
return new Promise((resolve, reject) => {
ml.jobs
.jobs(jobId)
.jobs([jobId])
.then((jobs) => {
if (jobs.length) {
resolve(jobs[0]);

View file

@ -40,10 +40,8 @@ export const forceStartDatafeedSchema = schema.object({
});
export const jobIdsSchema = schema.object({
/** Optional list of job ID(s). */
jobIds: schema.maybe(
schema.oneOf([schema.string(), schema.arrayOf(schema.maybe(schema.string()))])
),
/** Optional list of job IDs. */
jobIds: schema.maybe(schema.arrayOf(schema.maybe(schema.string()))),
});
export const jobsWithTimerangeSchema = {