Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ML] Add Custom URLs and Calendars to the Job wizards #51281

Merged
merged 44 commits into from
Nov 29, 2019
Merged
Show file tree
Hide file tree
Changes from 42 commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
c447911
[ML] editor to ts
darnautov Nov 19, 2019
e429cde
[ML] custom_urls component to ts
darnautov Nov 21, 2019
7d99acd
[ML] custom urls in job creator, define CustomSettings interface
darnautov Nov 21, 2019
67648c7
[ML] custom urls selection
darnautov Nov 21, 2019
663cf5b
[ML] custom urls description text
darnautov Nov 21, 2019
5d6e264
[ML] description for calendars
darnautov Nov 21, 2019
c69e4c0
[ML] update layout to full width
darnautov Nov 21, 2019
e7c0183
[ML] fix i18n
darnautov Nov 22, 2019
0542a7f
[ML] adjust editor test
darnautov Nov 22, 2019
5c3bc92
Merge remote-tracking branch 'upstream/master' into ML-51010-add-cust…
darnautov Nov 24, 2019
aaf6ee2
[ML] fix type for FormattedMessage
darnautov Nov 25, 2019
37b27c6
[ML] fix types
darnautov Nov 25, 2019
998f9a9
[ML] add modal edit mode to the custom urls editor
darnautov Nov 25, 2019
ef67a77
[ML] fix calendars saving
darnautov Nov 25, 2019
ade15e3
[ML] update snapshot
darnautov Nov 25, 2019
fafe042
Merge remote-tracking branch 'upstream/master' into ML-51010-add-cust…
darnautov Nov 26, 2019
cfdd966
[ML] add test support
darnautov Nov 26, 2019
8438634
[ML] update form description text
darnautov Nov 26, 2019
fa3992a
[ML] adjust layout
darnautov Nov 26, 2019
5ed4794
[ML] set modal width
darnautov Nov 26, 2019
dd8f58c
[ML] fix total value condition in getTestUrl
darnautov Nov 26, 2019
d5e2ce3
[ML] fix token replacement for string values
darnautov Nov 26, 2019
524d833
[ML] align calendar selection
darnautov Nov 26, 2019
3186be8
[ML] manage calendars link
darnautov Nov 26, 2019
46d3a96
[ML] fix form description ids
darnautov Nov 27, 2019
ae71fda
[ML] styles for custom urls description
darnautov Nov 27, 2019
a5331aa
[ML] manage calendars as a link
darnautov Nov 27, 2019
7e5b22e
[ML] refresh calendars button
darnautov Nov 27, 2019
6b9a50e
[ML] remove redundant css rule
darnautov Nov 27, 2019
0d9b005
Revert "[ML] remove redundant css rule"
darnautov Nov 27, 2019
6ac3d5d
[ML] update calendar service, move calendars out of the job config
darnautov Nov 27, 2019
b2dffd8
Merge remote-tracking branch 'upstream/master' into ML-51010-add-cust…
darnautov Nov 27, 2019
647458c
[ML] fix translation key
darnautov Nov 27, 2019
88de465
[ML] fix i18n
darnautov Nov 27, 2019
548c1a1
[ML] alight calendars selection
darnautov Nov 27, 2019
92d893c
[ML] calendar types
darnautov Nov 27, 2019
045da76
[ML] update calendars description
darnautov Nov 28, 2019
59be3f9
[ML] calendars cloning
darnautov Nov 28, 2019
15a2d28
[ML] align additional settings with advanced
darnautov Nov 28, 2019
b153888
[ML] fix typo, clean up calendars
darnautov Nov 28, 2019
8e122c8
[ML] persist created_by for custom urls
darnautov Nov 28, 2019
81a0754
[ML] fix fetchCalendarsByIds
darnautov Nov 28, 2019
02f9e98
[ML] extend stashCombinedJob with calendars
darnautov Nov 28, 2019
58e5372
[ML] remove redundant check and fallback for calendars
darnautov Nov 28, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions x-pack/legacy/plugins/ml/common/types/calendars.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/

export type CalendarId = string;

export interface Calendar {
calendar_id: CalendarId;
description: string;
events: any[];
job_ids: string[];
}

export interface UpdateCalendar extends Calendar {
calendarId: CalendarId;
}
9 changes: 7 additions & 2 deletions x-pack/legacy/plugins/ml/common/types/custom_urls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,20 @@

import { AnomalyRecordDoc } from './anomalies';

export interface UrlConfig {
/**
* Base Interface for basic custom URL.
*/
export interface BaseUrlConfig {
url_name: string;
url_value: string;
}

export interface KibanaUrlConfig extends UrlConfig {
export interface KibanaUrlConfig extends BaseUrlConfig {
time_range: string;
}

export type UrlConfig = BaseUrlConfig | KibanaUrlConfig;

export interface CustomUrlAnomalyRecordDoc extends AnomalyRecordDoc {
earliest: string;
latest: string;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
@import 'components/custom_url_editor/index';
@import 'jobs_list/index'; // SASSTODO: Various EUI overwrites throughout this folder
@import 'new_job/pages/components/job_details_step/components/additional_section/components/custom_urls/index';

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,6 @@ export const URL_TYPE = {
export const TIME_RANGE_TYPE = {
AUTO: 'auto',
INTERVAL: 'interval',
};
} as const;

export type TimeRangeType = typeof TIME_RANGE_TYPE[keyof typeof TIME_RANGE_TYPE];
Loading