-
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.
Merge branch 'main' into lens-serverless-fnt
- Loading branch information
Showing
236 changed files
with
5,610 additions
and
1,185 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
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
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import type { Logger } from '@kbn/core/server'; | ||
import type { CasesSetup } from '@kbn/cases-plugin/server'; | ||
import { CASES_ATTACHMENT_CHANGE_POINT_CHART } from '../common/constants'; | ||
|
||
export function registerCasesPersistableState(cases: CasesSetup | undefined, logger: Logger) { | ||
if (cases) { | ||
try { | ||
cases.attachmentFramework.registerPersistableState({ | ||
id: CASES_ATTACHMENT_CHANGE_POINT_CHART, | ||
}); | ||
} catch (error) { | ||
logger.warn( | ||
`AIOPs failed to register cases persistable state for ${CASES_ATTACHMENT_CHANGE_POINT_CHART}` | ||
); | ||
} | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
export const APM_CUSTOM_DASHBOARDS_SAVED_OBJECT_TYPE = 'apm-custom-dashboards'; | ||
|
||
export interface ApmCustomDashboard { | ||
dashboardSavedObjectId: string; | ||
serviceNameFilterEnabled: boolean; | ||
serviceEnvironmentFilterEnabled: boolean; | ||
kuery?: string; | ||
} | ||
|
||
export interface SavedApmCustomDashboard extends ApmCustomDashboard { | ||
id: string; | ||
updatedAt: number; | ||
} |
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
44 changes: 44 additions & 0 deletions
44
x-pack/plugins/apm/public/components/app/service_dashboards/actions/edit_dashboard.tsx
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,44 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
import { EuiButtonEmpty } from '@elastic/eui'; | ||
import { i18n } from '@kbn/i18n'; | ||
import React, { useState } from 'react'; | ||
import { SaveDashboardModal } from './save_dashboard_modal'; | ||
import { MergedServiceDashboard } from '..'; | ||
|
||
export function EditDashboard({ | ||
onRefresh, | ||
currentDashboard, | ||
}: { | ||
onRefresh: () => void; | ||
currentDashboard: MergedServiceDashboard; | ||
}) { | ||
const [isModalVisible, setIsModalVisible] = useState(false); | ||
return ( | ||
<> | ||
<EuiButtonEmpty | ||
color="text" | ||
size="s" | ||
iconType={'pencil'} | ||
data-test-subj="apmEditServiceDashboardMenu" | ||
onClick={() => setIsModalVisible(!isModalVisible)} | ||
> | ||
{i18n.translate('xpack.apm.serviceDashboards.editEmptyButtonLabel', { | ||
defaultMessage: 'Edit dashboard link', | ||
})} | ||
</EuiButtonEmpty> | ||
|
||
{isModalVisible && ( | ||
<SaveDashboardModal | ||
onClose={() => setIsModalVisible(!isModalVisible)} | ||
onRefresh={onRefresh} | ||
currentDashboard={currentDashboard} | ||
/> | ||
)} | ||
</> | ||
); | ||
} |
41 changes: 41 additions & 0 deletions
41
x-pack/plugins/apm/public/components/app/service_dashboards/actions/goto_dashboard.tsx
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,41 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
import { EuiButtonEmpty } from '@elastic/eui'; | ||
import { useKibana } from '@kbn/kibana-react-plugin/public'; | ||
import { i18n } from '@kbn/i18n'; | ||
import React from 'react'; | ||
import { ApmPluginStartDeps } from '../../../../plugin'; | ||
import { SavedApmCustomDashboard } from '../../../../../common/custom_dashboards'; | ||
|
||
export function GotoDashboard({ | ||
currentDashboard, | ||
}: { | ||
currentDashboard: SavedApmCustomDashboard; | ||
}) { | ||
const { | ||
services: { | ||
dashboard: { locator: dashboardLocator }, | ||
}, | ||
} = useKibana<ApmPluginStartDeps>(); | ||
|
||
const url = dashboardLocator?.getRedirectUrl({ | ||
dashboardId: currentDashboard?.dashboardSavedObjectId, | ||
}); | ||
return ( | ||
<EuiButtonEmpty | ||
data-test-subj="apmGotoDashboardGoToDashboardButton" | ||
color="text" | ||
size="s" | ||
iconType={'visGauge'} | ||
href={url} | ||
> | ||
{i18n.translate('xpack.apm.serviceDashboards.contextMenu.goToDashboard', { | ||
defaultMessage: 'Go to dashboard', | ||
})} | ||
</EuiButtonEmpty> | ||
); | ||
} |
12 changes: 12 additions & 0 deletions
12
x-pack/plugins/apm/public/components/app/service_dashboards/actions/index.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,12 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import { LinkDashboard } from './link_dashboard'; | ||
import { GotoDashboard } from './goto_dashboard'; | ||
import { EditDashboard } from './edit_dashboard'; | ||
|
||
export { LinkDashboard, GotoDashboard, EditDashboard }; |
Oops, something went wrong.