-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add date histogram step to Create Rollup Job Wizard (#22789)
* Condense app teardown logic. * Fix React form error with null values by substituting empty strings. * Block progression if the form contains errors. * Validate index pattern as you type. - Add /api/rollup/index_pattern_validity/{indexPattern} API endpoint. - Check that the index pattern matches indices, does not match rollup indices, and contains time fields. * Validate that index pattern and rollup index aren't the same. * Add validation for date histogram step. - Require date field and interval. - Parse interval and delay for valid format. - Add ParseEsIntervalInvalidFormatError and ParseEsIntervalInvalidCalendarIntervalError to parseEsInterval module. * Apply maxWidth to detail panel. * Show success toasts when jobs are deleted.
- Loading branch information
Showing
30 changed files
with
944 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/* | ||
* Licensed to Elasticsearch B.V. under one or more contributor | ||
* license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright | ||
* ownership. Elasticsearch B.V. licenses this file to you under | ||
* the Apache License, Version 2.0 (the "License"); you may | ||
* not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
|
||
export { parseEsInterval } from './parse_es_interval'; | ||
export { ParseEsIntervalInvalidCalendarIntervalError } from './parse_es_interval_invalid_calendar_interval_error'; | ||
export { ParseEsIntervalInvalidFormatError } from './parse_es_interval_invalid_format_error'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
src/ui/public/utils/parse_es_interval/parse_es_interval_invalid_calendar_interval_error.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/* | ||
* Licensed to Elasticsearch B.V. under one or more contributor | ||
* license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright | ||
* ownership. Elasticsearch B.V. licenses this file to you under | ||
* the Apache License, Version 2.0 (the "License"); you may | ||
* not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
|
||
export class ParseEsIntervalInvalidCalendarIntervalError extends Error { | ||
constructor(public readonly interval: string) { | ||
super(`Invalid calendar interval: ${interval}, value must be 1`); | ||
this.name = 'ParseEsIntervalInvalidCalendarIntervalError'; | ||
|
||
// captureStackTrace is only available in the V8 engine, so any browser using | ||
// a different JS engine won't have access to this method. | ||
if (Error.captureStackTrace) { | ||
Error.captureStackTrace(this, ParseEsIntervalInvalidCalendarIntervalError); | ||
} | ||
|
||
// Babel doesn't support traditional `extends` syntax for built-in classes. | ||
// https://babeljs.io/docs/en/caveats/#classes | ||
Object.setPrototypeOf(this, ParseEsIntervalInvalidCalendarIntervalError.prototype); | ||
} | ||
} |
35 changes: 35 additions & 0 deletions
35
src/ui/public/utils/parse_es_interval/parse_es_interval_invalid_format_error.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/* | ||
* Licensed to Elasticsearch B.V. under one or more contributor | ||
* license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright | ||
* ownership. Elasticsearch B.V. licenses this file to you under | ||
* the Apache License, Version 2.0 (the "License"); you may | ||
* not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
|
||
export class ParseEsIntervalInvalidFormatError extends Error { | ||
constructor(public readonly interval: string) { | ||
super(`Invalid interval format: ${interval}`); | ||
this.name = 'ParseEsIntervalInvalidFormatError'; | ||
|
||
// captureStackTrace is only available in the V8 engine, so any browser using | ||
// a different JS engine won't have access to this method. | ||
if (Error.captureStackTrace) { | ||
Error.captureStackTrace(this, ParseEsIntervalInvalidFormatError); | ||
} | ||
|
||
// Babel doesn't support traditional `extends` syntax for built-in classes. | ||
// https://babeljs.io/docs/en/caveats/#classes | ||
Object.setPrototypeOf(this, ParseEsIntervalInvalidFormatError.prototype); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.