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 Anomaly Swimlane Embeddable to the dashboard from the Anomaly Explorer page #68784

Merged
merged 40 commits into from
Jun 17, 2020
Merged
Show file tree
Hide file tree
Changes from 24 commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
67e588f
[ML] WIP attach swimlane embeddable to dashboard from the explorer page
darnautov Jun 10, 2020
2281ea2
[ML] fix deps
darnautov Jun 10, 2020
224065c
[ML] getDefaultPanelTitle
darnautov Jun 11, 2020
792ab70
[ML] fix TS issue
darnautov Jun 11, 2020
08f4301
[ML] DashboardService
darnautov Jun 11, 2020
b90dad0
[ML] unit tests
darnautov Jun 11, 2020
f9d4007
[ML] redirect to the dashboard
darnautov Jun 11, 2020
88a1112
[ML] swimlane_panel
darnautov Jun 12, 2020
bbca125
Merge remote-tracking branch 'upstream/master' into ML-66553-add-from…
darnautov Jun 12, 2020
10c05e4
[ML] Anomaly Timeline panel
darnautov Jun 12, 2020
a6529eb
[ML] swimlane container
darnautov Jun 12, 2020
28e943b
Merge remote-tracking branch 'upstream/master' into ML-66553-add-from…
darnautov Jun 12, 2020
17afe0e
[ML] fix ts
darnautov Jun 12, 2020
33cecfb
[ML] Add multiple swimlanes
darnautov Jun 15, 2020
76d101a
Merge remote-tracking branch 'upstream/master' into ML-66553-add-from…
darnautov Jun 15, 2020
6abefdc
[ML] fix SwimlaneType usage
darnautov Jun 15, 2020
a67a257
[ML] disable edit button on update
darnautov Jun 15, 2020
80cfac3
[ML] fix i18n translation key
darnautov Jun 15, 2020
457172c
[ML] use ViewMode enum
darnautov Jun 15, 2020
0a6cdc6
[ML] use navigateToUrl
darnautov Jun 15, 2020
1c3e127
[ML] TODO for edit dashboard
darnautov Jun 15, 2020
5b43d5a
[ML] check kibana dashboard capabilities
darnautov Jun 15, 2020
283c336
[ML] mlApiServicesProvider
darnautov Jun 16, 2020
ab5719e
[ML] mlResultsServiceProvider
darnautov Jun 16, 2020
8b4ebea
[ML] fix alignment
darnautov Jun 16, 2020
eef0cc7
[ML] labels and tooltips
darnautov Jun 16, 2020
9fe10f6
[ML] fix ts issue for proxyHttpStart
darnautov Jun 16, 2020
2030fd5
[ML] canEditDashboards check
darnautov Jun 16, 2020
f63e59e
[ML] fix TS
darnautov Jun 16, 2020
c5dff67
[ML] update add_to_dashboard_control.tsx
darnautov Jun 16, 2020
e7cdf42
Merge remote-tracking branch 'upstream/master' into ML-66553-add-from…
darnautov Jun 16, 2020
5eb6b45
[ML] add form label, disable control on empty swimlanes selection
darnautov Jun 17, 2020
87faf26
[ML] resolve PR review comments
darnautov Jun 17, 2020
3a387e5
[ML] e2e test
darnautov Jun 17, 2020
72d28ed
[ML] increase panel padding
darnautov Jun 17, 2020
7d3e4e1
[ML] position in row
darnautov Jun 17, 2020
c509d2f
[ML] update e2e
darnautov Jun 17, 2020
5a097ab
Merge remote-tracking branch 'upstream/master' into ML-66553-add-from…
darnautov Jun 17, 2020
50fb091
[ML] add data-test-subj for search box
darnautov Jun 17, 2020
9a29a0c
[ML] PR remarks
darnautov Jun 17, 2020
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
4 changes: 3 additions & 1 deletion src/plugins/dashboard/public/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,10 @@ export {
export { DashboardConstants, createDashboardEditUrl } from './dashboard_constants';

export { DashboardStart, DashboardUrlGenerator } from './plugin';
export { DASHBOARD_APP_URL_GENERATOR } from './url_generator';
export { DASHBOARD_APP_URL_GENERATOR, createDashboardUrlGenerator } from './url_generator';
export { addEmbeddableToDashboardUrl } from './url_utils/url_helper';
export { SavedObjectDashboard } from './saved_dashboards';
export { SavedDashboardPanel } from './types';

export function plugin(initializerContext: PluginInitializerContext) {
return new DashboardPlugin(initializerContext);
Expand Down
7 changes: 7 additions & 0 deletions src/plugins/dashboard/public/url_generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import {
import { setStateToKbnUrl } from '../../kibana_utils/public';
import { UrlGeneratorsDefinition, UrlGeneratorState } from '../../share/public';
import { SavedObjectLoader } from '../../saved_objects/public';
import { ViewMode } from '../../embeddable/public';

export const STATE_STORAGE_KEY = '_a';
export const GLOBAL_STATE_STORAGE_KEY = '_g';
Expand Down Expand Up @@ -73,6 +74,11 @@ export type DashboardAppLinkGeneratorState = UrlGeneratorState<{
* true is default
*/
preserveSavedFilters?: boolean;

/**
* View mode of the dashboard.
*/
viewMode?: ViewMode;
}>;

export const createDashboardUrlGenerator = (
Expand Down Expand Up @@ -123,6 +129,7 @@ export const createDashboardUrlGenerator = (
cleanEmptyKeys({
query: state.query,
filters: filters?.filter((f) => !esFilters.isFilterPinned(f)),
viewMode: state.viewMode,
}),
{ useHash },
`${appBasePath}#/${hash}`
Expand Down
1 change: 1 addition & 0 deletions x-pack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
"@types/d3-shape": "^1.3.1",
"@types/d3-time": "^1.0.10",
"@types/d3-time-format": "^2.1.1",
"@types/dragselect": "^1.13.1",
"@types/elasticsearch": "^5.0.33",
"@types/fancy-log": "^1.3.1",
"@types/file-saver": "^2.0.0",
Expand Down
2 changes: 2 additions & 0 deletions x-pack/plugins/ml/public/application/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ const App: FC<AppProps> = ({ coreStart, deps }) => {
};
const services = {
appName: 'ML',
kibanaVersion: deps.kibanaVersion,
share: deps.share,
data: deps.data,
security: deps.security,
licenseManagement: deps.licenseManagement,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@
* you may not use this file except in compliance with the Elastic License.
*/

import PropTypes from 'prop-types';
import React from 'react';
import React, { FC } from 'react';

import { EuiLoadingChart, EuiSpacer } from '@elastic/eui';

export function LoadingIndicator({ height, label }) {
export const LoadingIndicator: FC<{ height?: number; label?: string }> = ({ height, label }) => {
height = height ? +height : 100;
return (
<div
Expand All @@ -21,13 +20,9 @@ export function LoadingIndicator({ height, label }) {
{label && (
<>
<EuiSpacer size="s" />
<div ml-loading-indicator-label="true">{label}</div>
<div>{label}</div>
</>
)}
</div>
);
}
LoadingIndicator.propTypes = {
height: PropTypes.number,
label: PropTypes.string,
};
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,14 @@ import {
} from '../../../../../../../src/plugins/kibana_react/public';
import { SecurityPluginSetup } from '../../../../../security/public';
import { LicenseManagementUIPluginSetup } from '../../../../../license_management/public';
import { SharePluginStart } from '../../../../../../../src/plugins/share/public';

interface StartPlugins {
data: DataPublicPluginStart;
security?: SecurityPluginSetup;
licenseManagement?: LicenseManagementUIPluginSetup;
kibanaVersion: string;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i don't think kibanaVersion should be in here as it's not a plugin.
it could just be added to StartServices below.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed in 87faf26

share: SharePluginStart;
}
export type StartServices = CoreStart & StartPlugins;
// eslint-disable-next-line react-hooks/rules-of-hooks
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export interface MlContextValue {
currentSavedSearch: SavedSearchSavedObject | null;
indexPatterns: IndexPatternsContract;
kibanaConfig: any; // IUiSettingsClient;
kibanaVersion: string;
}

export type SavedSearchQuery = object;
Expand Down
Loading