Skip to content

Commit 2f2991c

Browse files
Merge branch '7.11' into backport/7.11/pr-86739
2 parents fbab8f5 + d4eac7c commit 2f2991c

170 files changed

Lines changed: 2760 additions & 1740 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/development/plugins/embeddable/public/kibana-plugin-plugins-embeddable-public.openaddpanelflyout.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export declare function openAddPanelFlyout(options: {
1414
overlays: OverlayStart;
1515
notifications: NotificationsStart;
1616
SavedObjectFinder: React.ComponentType<any>;
17-
}): Promise<void>;
17+
}): OverlayRef;
1818
```
1919

2020
## Parameters
@@ -25,5 +25,5 @@ export declare function openAddPanelFlyout(options: {
2525

2626
<b>Returns:</b>
2727

28-
`Promise<void>`
28+
`OverlayRef`
2929

docs/discover/search.asciidoc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ status codes, you could enter `status:[400 TO 499]`.
7474
codes and have an extension of `php` or `html`, you could enter `status:[400 TO
7575
499] AND (extension:php OR extension:html)`.
7676

77-
IMPORTANT: When you use the Lucene Query Syntax in the *KQL* search bar, {kib} is unable to search on nested objects and perform aggregations across fields that contain nested objects.
77+
IMPORTANT: When you use the Lucene Query Syntax in the *KQL* search bar, {kib} is unable to search on nested objects and perform aggregations across fields that contain nested objects.
7878
Using `include_in_parent` or `copy_to` as a workaround can cause {kib} to fail.
7979

8080
For more detailed information about the Lucene query syntax, see the
@@ -107,7 +107,8 @@ To save the current search:
107107
. Click *Save* in the Kibana toolbar.
108108
. Enter a name for the search and click *Save*.
109109

110-
To import, export, and delete saved searches, open the main menu, then click *Stack Management > Saved Ojbects*.
110+
To import, export, and delete saved searches, open the main menu,
111+
then click *Stack Management > Saved Objects*.
111112

112113
==== Open a saved search
113114
To load a saved search into Discover:

docs/user/alerting/alerting-getting-started.asciidoc

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -123,14 +123,15 @@ image::images/alert-concepts-connectors.svg[Connectors provide a central place t
123123
[float]
124124
=== Summary
125125

126-
An _alert_ consists of conditions, _actions_, and a schedule. When conditions are met, _alert instances_ are created that render _actions_ and invoke them. To make action setup and update easier, actions refer to _connectors_ that centralize the information used to connect with {kib} services and third-party integrations.
126+
An _alert_ consists of conditions, _actions_, and a schedule. When conditions are met, _alert instances_ are created that render _actions_ and invoke them. To make action setup and update easier, actions refer to _connectors_ that centralize the information used to connect with {kib} services and third-party integrations. The following example ties these concepts together:
127127

128128
image::images/alert-concepts-summary.svg[Alerts, actions, alert instances and connectors work together to convert detection into action]
129129

130-
* *Alert*: a specification of the conditions to be detected, the schedule for detection, and the response when detection occurs.
131-
* *Action*: the response to a detected condition defined in the alert. Typically actions specify a service or third party integration along with alert details that will be sent to it.
132-
* *Alert instance*: state tracked by {kib} for every occurrence of a detected condition. Actions as well as controls like muting and re-notification are controlled at the instance level.
133-
* *Connector*: centralized configurations for services and third party integration that are referenced by actions.
130+
. Anytime an *alert*'s conditions are met, an *alert instance* is created. This example checks for servers with average CPU > 0.9. Three servers meet the condition, so three instances are created.
131+
. Instances create *actions* as long as they are not muted or throttled. When actions are created, the template that was setup in the alert is filled with actual values. In this example three actions are created, and the template string {{server}} is replaced with the server name for each instance.
132+
. {kib} invokes the actions, sending them to a 3rd party *integration* like an email service.
133+
. If the 3rd party integration has connection parameters or credentials, {kib} will fetch these from the *connector* referenced in the action.
134+
134135

135136
[float]
136137
[[alerting-concepts-differences]]

docs/user/alerting/images/alert-concepts-summary.svg

Lines changed: 1 addition & 1 deletion
Loading

packages/kbn-apm-config-loader/src/config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,8 @@ export class ApmConfiguration {
153153

154154
return {
155155
globalLabels: {
156-
branch: process.env.ghprbSourceBranch || '',
157-
targetBranch: process.env.ghprbTargetBranch || '',
156+
branch: process.env.GIT_BRANCH || '',
157+
targetBranch: process.env.PR_TARGET_BRANCH || '',
158158
ciBuildNumber: process.env.BUILD_NUMBER || '',
159159
isPr: process.env.GITHUB_PR_NUMBER ? true : false,
160160
prId: process.env.GITHUB_PR_NUMBER || '',

src/plugins/dashboard/public/application/hooks/use_saved_dashboard.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export const useSavedDashboard = (savedDashboardId: string | undefined, history:
3636
// abstraction of service dependencies easier.
3737
const { indexPatterns } = data;
3838
const { recentlyAccessed: recentlyAccessedPaths, docTitle } = chrome;
39-
const { addDanger: showDangerToast, addWarning: showWarningToast } = core.notifications.toasts;
39+
const { toasts } = core.notifications;
4040

4141
useEffect(() => {
4242
(async function loadSavedDashboard() {
@@ -46,7 +46,7 @@ export const useSavedDashboard = (savedDashboardId: string | undefined, history:
4646
pathname: DashboardConstants.CREATE_NEW_DASHBOARD_URL,
4747
});
4848

49-
showWarningToast(getDashboard60Warning());
49+
toasts.addWarning(getDashboard60Warning());
5050
return;
5151
}
5252

@@ -63,7 +63,7 @@ export const useSavedDashboard = (savedDashboardId: string | undefined, history:
6363
setSavedDashboard(dashboard);
6464
} catch (error) {
6565
// E.g. a corrupt or deleted dashboard
66-
showDangerToast(error.message);
66+
toasts.addDanger(error.message);
6767
history.push(DashboardConstants.LANDING_PAGE_PATH);
6868
}
6969
})();
@@ -75,8 +75,7 @@ export const useSavedDashboard = (savedDashboardId: string | undefined, history:
7575
recentlyAccessedPaths,
7676
savedDashboardId,
7777
savedDashboards,
78-
showDangerToast,
79-
showWarningToast,
78+
toasts,
8079
]);
8180

8281
return savedDashboard;

src/plugins/dashboard/public/application/top_nav/dashboard_top_nav.tsx

Lines changed: 31 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,12 @@ import { showOptionsPopover } from './show_options_popover';
5757
import { TopNavIds } from './top_nav_ids';
5858
import { ShowShareModal } from './show_share_modal';
5959
import { PanelToolbar } from './panel_toolbar';
60+
import { OverlayRef } from '../../../../../core/public';
6061
import { DashboardContainer } from '..';
6162

6263
export interface DashboardTopNavState {
6364
chromeIsVisible: boolean;
65+
addPanelOverlay?: OverlayRef;
6466
savedQuery?: SavedQuery;
6567
}
6668

@@ -111,14 +113,17 @@ export function DashboardTopNav({
111113

112114
const addFromLibrary = useCallback(() => {
113115
if (!isErrorEmbeddable(dashboardContainer)) {
114-
openAddPanelFlyout({
115-
embeddable: dashboardContainer,
116-
getAllFactories: embeddable.getEmbeddableFactories,
117-
getFactory: embeddable.getEmbeddableFactory,
118-
notifications: core.notifications,
119-
overlays: core.overlays,
120-
SavedObjectFinder: getSavedObjectFinder(core.savedObjects, uiSettings),
121-
});
116+
setState((s) => ({
117+
...s,
118+
addPanelOverlay: openAddPanelFlyout({
119+
embeddable: dashboardContainer,
120+
getAllFactories: embeddable.getEmbeddableFactories,
121+
getFactory: embeddable.getEmbeddableFactory,
122+
notifications: core.notifications,
123+
overlays: core.overlays,
124+
SavedObjectFinder: getSavedObjectFinder(core.savedObjects, uiSettings),
125+
}),
126+
}));
122127
}
123128
}, [
124129
embeddable.getEmbeddableFactories,
@@ -139,8 +144,16 @@ export function DashboardTopNav({
139144
await factory.create({} as EmbeddableInput, dashboardContainer);
140145
}, [dashboardContainer, embeddable]);
141146

147+
const clearAddPanel = useCallback(() => {
148+
if (state.addPanelOverlay) {
149+
state.addPanelOverlay.close();
150+
setState((s) => ({ ...s, addPanelOverlay: undefined }));
151+
}
152+
}, [state.addPanelOverlay]);
153+
142154
const onChangeViewMode = useCallback(
143155
(newMode: ViewMode) => {
156+
clearAddPanel();
144157
const isPageRefresh = newMode === dashboardStateManager.getViewMode();
145158
const isLeavingEditMode = !isPageRefresh && newMode === ViewMode.VIEW;
146159
const willLoseChanges = isLeavingEditMode && dashboardStateManager.getIsDirty(timefilter);
@@ -178,7 +191,7 @@ export function DashboardTopNav({
178191
}
179192
});
180193
},
181-
[redirectTo, timefilter, core.overlays, savedDashboard.id, dashboardStateManager]
194+
[redirectTo, timefilter, core.overlays, savedDashboard.id, dashboardStateManager, clearAddPanel]
182195
);
183196

184197
/**
@@ -301,8 +314,16 @@ export function DashboardTopNav({
301314
showCopyOnSave={lastDashboardId ? true : false}
302315
/>
303316
);
317+
clearAddPanel();
304318
showSaveModal(dashboardSaveModal, core.i18n.Context);
305-
}, [save, core.i18n.Context, savedObjectsTagging, dashboardStateManager, lastDashboardId]);
319+
}, [
320+
save,
321+
clearAddPanel,
322+
lastDashboardId,
323+
core.i18n.Context,
324+
savedObjectsTagging,
325+
dashboardStateManager,
326+
]);
306327

307328
const runClone = useCallback(() => {
308329
const currentTitle = dashboardStateManager.getTitle();

src/plugins/embeddable/public/lib/panel/panel_header/panel_actions/add_panel/open_add_panel_flyout.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,20 @@
1717
* under the License.
1818
*/
1919
import React from 'react';
20-
import { NotificationsStart, OverlayStart } from 'src/core/public';
20+
import { NotificationsStart, OverlayRef, OverlayStart } from 'src/core/public';
2121
import { EmbeddableStart } from '../../../../../plugin';
2222
import { toMountPoint } from '../../../../../../../kibana_react/public';
2323
import { IContainer } from '../../../../containers';
2424
import { AddPanelFlyout } from './add_panel_flyout';
2525

26-
export async function openAddPanelFlyout(options: {
26+
export function openAddPanelFlyout(options: {
2727
embeddable: IContainer;
2828
getFactory: EmbeddableStart['getEmbeddableFactory'];
2929
getAllFactories: EmbeddableStart['getEmbeddableFactories'];
3030
overlays: OverlayStart;
3131
notifications: NotificationsStart;
3232
SavedObjectFinder: React.ComponentType<any>;
33-
}) {
33+
}): OverlayRef {
3434
const {
3535
embeddable,
3636
getFactory,
@@ -59,4 +59,5 @@ export async function openAddPanelFlyout(options: {
5959
ownFocus: true,
6060
}
6161
);
62+
return flyoutSession;
6263
}

src/plugins/embeddable/public/public.api.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ import { NameList } from 'elasticsearch';
5353
import { NotificationsStart as NotificationsStart_2 } from 'src/core/public';
5454
import { Observable } from 'rxjs';
5555
import { Optional } from '@kbn/utility-types';
56+
import { OverlayRef as OverlayRef_2 } from 'src/core/public';
5657
import { OverlayStart as OverlayStart_2 } from 'src/core/public';
5758
import { PackageInfo } from '@kbn/config';
5859
import { Path } from 'history';
@@ -764,7 +765,7 @@ export function openAddPanelFlyout(options: {
764765
overlays: OverlayStart_2;
765766
notifications: NotificationsStart_2;
766767
SavedObjectFinder: React.ComponentType<any>;
767-
}): Promise<void>;
768+
}): OverlayRef_2;
768769

769770
// Warning: (ae-missing-release-tag) "OutputSpec" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
770771
//

src/plugins/vis_type_vislib/public/vis_wrapper.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ const VislibWrapper = ({ core, charts, visData, visConfig, handlers }: VislibWra
5959
visController.current?.destroy();
6060
visController.current = null;
6161
};
62-
}, [core, charts, handlers]);
62+
}, [core, charts]);
6363

6464
useEffect(updateChart, [updateChart]);
6565

0 commit comments

Comments
 (0)