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

[SecuritySolution] Security Solution Dashboard edit mode #159486

Merged
merged 142 commits into from
Oct 2, 2023
Merged
Changes from 1 commit
Commits
Show all changes
142 commits
Select commit Hold shift + click to select a range
92bae1c
add to library
angorayc Jun 12, 2023
b3f7f76
Merge branch 'main' of github.com:elastic/kibana into edit-mode
angorayc Jun 19, 2023
13b9323
add edit mode
angorayc Jun 19, 2023
c3a1e5c
actions
angorayc Jun 20, 2023
49b90f1
Merge branch 'edit-mode' of github.com:angorayc/kibana into edit-mode
angorayc Jun 20, 2023
359158d
export top nav
angorayc Jun 20, 2023
02353fc
dashboard top nav styling
angorayc Jun 22, 2023
debeedd
styling
angorayc Jun 22, 2023
0c15e35
Merge branch 'main' of github.com:elastic/kibana into edit-mode
angorayc Jun 22, 2023
4a1ea0a
styling
angorayc Jun 22, 2023
28b1ff0
types
angorayc Jun 22, 2023
875b411
set view mode on container load
angorayc Jun 22, 2023
8beb62e
allow no sticky top nav
angorayc Jun 22, 2023
2444f9a
Merge branch 'main' into edit-mode
angorayc Jun 22, 2023
6ffcd0c
lint
angorayc Jun 22, 2023
3769910
Merge branch 'edit-mode' of github.com:angorayc/kibana into edit-mode
angorayc Jun 23, 2023
92ffcf4
Merge branch 'main' of github.com:elastic/kibana into edit-mode
angorayc Jun 28, 2023
854196f
add originatingApp and originatingPath
angorayc Jun 29, 2023
91f0f0a
Merge branch 'main' of github.com:elastic/kibana into edit-mode
angorayc Jun 30, 2023
b61e354
add getStateTransfer
angorayc Jun 30, 2023
27ce42e
Merge branch 'main' of github.com:elastic/kibana into edit-mode
angorayc Jul 18, 2023
af6c770
Merge branch 'main' of github.com:elastic/kibana into edit-mode
angorayc Jul 18, 2023
6b7bac5
fix missing tool bar
angorayc Jul 20, 2023
73359e2
add from lens editor
angorayc Jul 20, 2023
99ee686
Merge branch 'main' of github.com:elastic/kibana into edit-mode
angorayc Jul 26, 2023
d888c16
creation options
angorayc Aug 3, 2023
95310b6
Merge branch 'main' of github.com:elastic/kibana into edit-mode
angorayc Aug 7, 2023
f5d671c
check is managed dashboard
angorayc Aug 8, 2023
e68b150
Merge branch 'main' of github.com:elastic/kibana into edit-mode
angorayc Aug 9, 2023
363cbc3
Merge branch 'main' of github.com:elastic/kibana into edit-mode
angorayc Aug 9, 2023
59a727d
Merge branch 'main' of github.com:elastic/kibana into edit-mode
angorayc Aug 10, 2023
315de70
dashboard creation
angorayc Aug 10, 2023
a4d75d8
Merge branch 'main' of github.com:elastic/kibana into edit-mode
angorayc Aug 21, 2023
7947e20
useDashboardRenderer hook
angorayc Aug 21, 2023
a6311ef
Merge branch 'main' of github.com:elastic/kibana into edit-mode
angorayc Aug 23, 2023
d52c958
unit tests
angorayc Aug 24, 2023
64289cc
Merge branch 'main' of github.com:elastic/kibana into edit-mode
angorayc Aug 24, 2023
9e0a48b
[CI] Auto-commit changed files from 'node scripts/lint_ts_projects --…
kibanamachine Aug 24, 2023
ff3b6c9
unit tests
angorayc Aug 24, 2023
a99c548
Merge branch 'edit-mode' of github.com:angorayc/kibana into edit-mode
angorayc Aug 24, 2023
2513569
Merge branch 'main' into edit-mode
angorayc Aug 24, 2023
670a129
update limits
angorayc Aug 26, 2023
89bee44
Merge branch 'main' into edit-mode
angorayc Aug 29, 2023
e3c90d0
Merge branch 'main' of github.com:elastic/kibana into edit-mode
angorayc Sep 1, 2023
a6ec841
rm add to library actions
angorayc Sep 1, 2023
5f3fdde
[CI] Auto-commit changed files from 'node scripts/lint_ts_projects --…
kibanamachine Sep 1, 2023
7bd943e
dashboard updated title
angorayc Sep 1, 2023
77f3f3e
Merge branch 'edit-mode' of github.com:angorayc/kibana into edit-mode
angorayc Sep 1, 2023
d7a57aa
dashboard updated title
angorayc Sep 1, 2023
e51a31d
fix update from settings
angorayc Sep 1, 2023
cad4508
revert actions change
angorayc Sep 1, 2023
64baad8
unit tests
angorayc Sep 1, 2023
6889ed3
unit tests
angorayc Sep 4, 2023
b50cc51
Merge branch 'main' of github.com:elastic/kibana into edit-mode
angorayc Sep 4, 2023
2176061
fix breadcrumbs
angorayc Sep 4, 2023
b223193
[CI] Auto-commit changed files from 'node scripts/lint_ts_projects --…
kibanamachine Sep 4, 2023
72a222f
Merge branch 'main' into edit-mode
angorayc Sep 4, 2023
814d44e
unit tests
angorayc Sep 5, 2023
f75afdb
Merge branch 'edit-mode' of github.com:angorayc/kibana into edit-mode
angorayc Sep 5, 2023
af66475
Merge branch 'main' into edit-mode
angorayc Sep 6, 2023
b53836d
update bundle size
angorayc Sep 7, 2023
5b0d8ac
Merge branch 'main' into edit-mode
angorayc Sep 7, 2023
431aef1
Merge branch 'main' into edit-mode
angorayc Sep 7, 2023
166aa08
Merge branch 'main' into edit-mode
angorayc Sep 7, 2023
bfe13da
Merge branch 'main' into edit-mode
angorayc Sep 7, 2023
c2394c2
serverless breadcrumb
angorayc Sep 7, 2023
4142d0b
Merge branch 'edit-mode' of github.com:angorayc/kibana into edit-mode
angorayc Sep 7, 2023
39bc769
Merge branch 'main' into edit-mode
angorayc Sep 8, 2023
f3ad2df
fix flaky cypress tests
angorayc Sep 8, 2023
1fb58e5
Merge branch 'edit-mode' of github.com:angorayc/kibana into edit-mode
angorayc Sep 8, 2023
ea44fc5
Merge branch 'main' into edit-mode
angorayc Sep 8, 2023
4dda0c6
dashboard tags
angorayc Sep 13, 2023
b71ca7d
Merge branch 'main' of github.com:elastic/kibana into edit-mode
angorayc Sep 13, 2023
c380c3b
update css
angorayc Sep 13, 2023
61c8b57
fix return from map
angorayc Sep 13, 2023
33d31dd
[CI] Auto-commit changed files from 'node scripts/eslint --no-cache -…
kibanamachine Sep 13, 2023
b710595
rm originalApp and originalPath from DashboardTopNav
angorayc Sep 13, 2023
88eb719
Merge branch 'edit-mode' of github.com:angorayc/kibana into edit-mode
angorayc Sep 13, 2023
51218f5
Merge branch 'main' into edit-mode
angorayc Sep 14, 2023
7e9f488
Merge branch 'main' into edit-mode
angorayc Sep 18, 2023
417bc2f
Merge branch 'main' into edit-mode
angorayc Sep 18, 2023
1be6482
add badges and remove align right
angorayc Sep 19, 2023
2fa6ebb
Merge branch 'edit-mode' of github.com:angorayc/kibana into edit-mode
angorayc Sep 19, 2023
68ce921
Merge branch 'main' into edit-mode
angorayc Sep 21, 2023
fb81162
Merge branch 'edit-mode' of github.com:angorayc/kibana into edit-mode
angorayc Sep 21, 2023
cff552b
i18n
angorayc Sep 21, 2023
1ff57f4
i18n
angorayc Sep 21, 2023
fc62f31
fix tags
angorayc Sep 21, 2023
81991a1
Merge branch 'main' of github.com:elastic/kibana into edit-mode
angorayc Sep 21, 2023
b09ca64
Merge branch 'main' into edit-mode
angorayc Sep 22, 2023
cad9a11
Merge branch 'main' into edit-mode
angorayc Sep 22, 2023
9786e0c
Merge branch 'main' into edit-mode
angorayc Sep 22, 2023
61d31d3
Merge branch 'main' into edit-mode
angorayc Sep 25, 2023
c9d61f0
get managed info from dashboard state
angorayc Sep 25, 2023
0008540
align managed tag behaviour with kibana dashboard
angorayc Sep 25, 2023
86bc355
revert unnecessary changes
angorayc Sep 26, 2023
f5afe7c
align dashboard tool bar styles with kibana dashboard
angorayc Sep 26, 2023
82aa6f4
revert style changes
angorayc Sep 26, 2023
b1a6085
Merge branch 'main' of github.com:elastic/kibana into edit-mode
angorayc Sep 27, 2023
2d10a03
fix header actions
angorayc Sep 27, 2023
57d1743
fix create Lens from empty panel
angorayc Sep 27, 2023
17b5171
unit tests
angorayc Sep 27, 2023
f4e579c
Merge branch 'main' into edit-mode
angorayc Sep 27, 2023
54e9958
clean up DashboardEmbedSettings
angorayc Sep 29, 2023
e79290a
Merge branch 'edit-mode' of github.com:angorayc/kibana into edit-mode
angorayc Sep 29, 2023
8de11cd
fix tool bar
angorayc Sep 29, 2023
89b5987
[CI] Auto-commit changed files from 'node scripts/precommit_hook.js -…
kibanamachine Sep 29, 2023
e901852
[CI] Auto-commit changed files from 'node scripts/lint_ts_projects --…
kibanamachine Sep 29, 2023
dfd70c0
Merge branch 'main' of github.com:elastic/kibana into edit-mode
angorayc Sep 29, 2023
de3cbdb
remove unused import
angorayc Sep 29, 2023
5dd3ce1
Merge branch 'edit-mode' of github.com:angorayc/kibana into edit-mode
angorayc Sep 29, 2023
3a6cb1d
remove originateApp from top nav
angorayc Sep 29, 2023
2d461d8
Merge branch 'main' into edit-mode
angorayc Sep 29, 2023
eebbd69
hide reset change from actions
angorayc Sep 29, 2023
f8d9cfc
hide reset change from actions
angorayc Sep 29, 2023
9032024
types
angorayc Sep 29, 2023
3402568
Update x-pack/plugins/security_solution/public/dashboards/components/…
angorayc Sep 29, 2023
f4af650
review
angorayc Sep 29, 2023
61a2f32
Merge branch 'edit-mode' of github.com:angorayc/kibana into edit-mode
angorayc Sep 29, 2023
6b06b87
review
angorayc Sep 29, 2023
8c660ca
Merge branch 'main' of github.com:elastic/kibana into edit-mode
angorayc Sep 29, 2023
a779e84
review changes
angorayc Sep 29, 2023
9660eed
Update x-pack/plugins/security_solution/public/dashboards/components/…
angorayc Sep 29, 2023
78b2587
[CI] Auto-commit changed files from 'node scripts/precommit_hook.js -…
kibanamachine Sep 29, 2023
82b7438
remove unused import
angorayc Sep 29, 2023
4ca438d
review
angorayc Sep 29, 2023
05ec497
fix unit tests
angorayc Sep 29, 2023
237a1aa
fix types
angorayc Sep 29, 2023
738b4e9
rename embeddable container context to embeddable app context. Use it…
ThomThomson Sep 29, 2023
528600a
Merge remote-tracking branch 'angorayc/edit-mode' into edit-mode
ThomThomson Sep 29, 2023
3b863c1
Merge pull request #4 from ThomThomson/security/edit-mode/appContext
angorayc Sep 29, 2023
017927c
[CI] Auto-commit changed files from 'node scripts/precommit_hook.js -…
kibanamachine Sep 29, 2023
5fb8252
add forceHideUnifiedSearch
angorayc Sep 29, 2023
5ae45d6
fix tests
angorayc Sep 29, 2023
a368344
fix types
angorayc Sep 29, 2023
2da03b1
Merge branch 'main' into edit-mode
angorayc Oct 1, 2023
3348b38
unit tests
angorayc Oct 2, 2023
2c8113e
review
angorayc Oct 2, 2023
e9cc346
revert dashboard container renderer
angorayc Oct 2, 2023
0083b75
remove ref
angorayc Oct 2, 2023
61bf111
[CI] Auto-commit changed files from 'node scripts/precommit_hook.js -…
kibanamachine Oct 2, 2023
6716411
Merge branch 'main' into edit-mode
kibanamachine Oct 2, 2023
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
Prev Previous commit
Next Next commit
unit tests
angorayc committed Sep 27, 2023
commit 17b517152f9da516438fcf0fe0f98a5456379655
Original file line number Diff line number Diff line change
@@ -19,7 +19,7 @@ import { EditorMenu } from './editor_menu';
import { useDashboardAPI } from '../dashboard_app';
import { pluginServices } from '../../services/plugin_services';
import { ControlsToolbarButton } from './controls_toolbar_button';
import { DASHBOARD_APP_ID, DASHBOARD_UI_METRIC_ID } from '../../dashboard_constants';
import { DASHBOARD_UI_METRIC_ID } from '../../dashboard_constants';
import { dashboardReplacePanelActionStrings } from '../../dashboard_actions/_dashboard_actions_strings';

export function DashboardEditingToolbar({
Original file line number Diff line number Diff line change
@@ -24,7 +24,7 @@ import { ViewMode } from '@kbn/embeddable-plugin/public';
import { pluginServices } from '../../../services/plugin_services';
import { emptyScreenStrings } from '../../_dashboard_container_strings';
import { useDashboardContainer } from '../../embeddable/dashboard_container';
import { DASHBOARD_UI_METRIC_ID, DASHBOARD_APP_ID } from '../../../dashboard_constants';
import { DASHBOARD_UI_METRIC_ID } from '../../../dashboard_constants';

export function DashboardEmptyScreen() {
const {
Original file line number Diff line number Diff line change
@@ -26,6 +26,7 @@ import { TimelineId } from '../../../../common/types/timeline';
import { createStore } from '../../../common/store';
import { kibanaObservable } from '@kbn/timelines-plugin/public/mock';
import { sourcererPaths } from '../../../common/containers/sourcerer';
import { useKibana } from '../../../common/lib/kibana';

jest.mock('react-router-dom', () => {
const actual = jest.requireActual('react-router-dom');
@@ -67,6 +68,21 @@ describe('global header', () => {

beforeEach(() => {
useVariationMock.mockReset();
(useKibana as jest.Mock).mockImplementation(() => {
return {
services: {
data: {
dataViews: {},
},
http: { basePath: { prepend: jest.fn((url: string) => url) } },
cloudExperiments: {
getVariation: jest.fn(),
},
theme: { theme$: jest.fn() },
setHeaderActionMenu: mockSetHeaderActionMenu,
},
};
});
angorayc marked this conversation as resolved.
Show resolved Hide resolved
});

it('has add data link', () => {
@@ -75,7 +91,7 @@ describe('global header', () => {
]);
const { getByText } = render(
<TestProviders store={store}>
<GlobalHeader setHeaderActionMenu={mockSetHeaderActionMenu} />
<GlobalHeader />
</TestProviders>
);
expect(getByText('Add integrations')).toBeInTheDocument();
@@ -87,7 +103,7 @@ describe('global header', () => {
]);
const { queryByTestId } = render(
<TestProviders store={store}>
<GlobalHeader setHeaderActionMenu={mockSetHeaderActionMenu} />
<GlobalHeader />
</TestProviders>
);
const link = queryByTestId('add-data');
@@ -98,7 +114,7 @@ describe('global header', () => {
(useLocation as jest.Mock).mockReturnValue({ pathname: THREAT_INTELLIGENCE_PATH });
const { queryByTestId } = render(
<TestProviders store={store}>
<GlobalHeader setHeaderActionMenu={mockSetHeaderActionMenu} />
<GlobalHeader />
</TestProviders>
);
const link = queryByTestId('add-data');
@@ -118,7 +134,7 @@ describe('global header', () => {
);
const { queryByTestId } = render(
<TestProviders store={store}>
<GlobalHeader setHeaderActionMenu={mockSetHeaderActionMenu} />
<GlobalHeader />
</TestProviders>
);
const link = queryByTestId('add-data');
@@ -130,7 +146,7 @@ describe('global header', () => {

const { getByTestId } = render(
<TestProviders store={store}>
<GlobalHeader setHeaderActionMenu={mockSetHeaderActionMenu} />
<GlobalHeader />
</TestProviders>
);
expect(getByTestId('sourcerer-trigger')).toBeInTheDocument();
@@ -141,7 +157,7 @@ describe('global header', () => {

const { getByTestId } = render(
<TestProviders store={store}>
<GlobalHeader setHeaderActionMenu={mockSetHeaderActionMenu} />
<GlobalHeader />
</TestProviders>
);
expect(getByTestId('sourcerer-trigger')).toBeInTheDocument();
@@ -166,7 +182,7 @@ describe('global header', () => {

const { queryByTestId } = render(
<TestProviders store={mockStore}>
<GlobalHeader setHeaderActionMenu={mockSetHeaderActionMenu} />
<GlobalHeader />
</TestProviders>
);

@@ -180,7 +196,7 @@ describe('global header', () => {

const { findByTestId } = render(
<TestProviders store={store}>
<GlobalHeader setHeaderActionMenu={mockSetHeaderActionMenu} />
<GlobalHeader />
</TestProviders>
);

28 changes: 15 additions & 13 deletions x-pack/plugins/security_solution/public/app/home/index.test.tsx
Original file line number Diff line number Diff line change
@@ -106,6 +106,7 @@ jest.mock('../../timelines/store/timeline', () => ({

const mockedFilterManager = new FilterManager(coreMock.createStart().uiSettings);
const mockGetSavedQuery = jest.fn();
const mockSetHeaderActionMenu = jest.fn();

const dummyFilter: Filter = {
meta: {
@@ -198,6 +199,7 @@ jest.mock('../../common/lib/kibana', () => {
savedQueries: { getSavedQuery: mockGetSavedQuery },
},
},
setHeaderActionMenu: mockSetHeaderActionMenu,
},
}),
KibanaServices: {
@@ -226,7 +228,7 @@ describe('HomePage', () => {
it('calls useInitializeUrlParam for appQuery, filters and savedQuery', () => {
render(
<TestProviders>
<HomePage setHeaderActionMenu={jest.fn()}>
<HomePage>
<span />
</HomePage>
</TestProviders>
@@ -252,7 +254,7 @@ describe('HomePage', () => {

render(
<TestProviders>
<HomePage setHeaderActionMenu={jest.fn()}>
<HomePage>
<span />
</HomePage>
</TestProviders>
@@ -294,7 +296,7 @@ describe('HomePage', () => {

render(
<TestProviders>
<HomePage setHeaderActionMenu={jest.fn()}>
<HomePage>
<span />
</HomePage>
</TestProviders>
@@ -326,7 +328,7 @@ describe('HomePage', () => {

render(
<TestProviders>
<HomePage setHeaderActionMenu={jest.fn()}>
<HomePage>
<span />
</HomePage>
</TestProviders>
@@ -361,7 +363,7 @@ describe('HomePage', () => {

render(
<TestProviders store={mockStore}>
<HomePage setHeaderActionMenu={jest.fn()}>
<HomePage>
<span />
</HomePage>
</TestProviders>
@@ -378,7 +380,7 @@ describe('HomePage', () => {

render(
<TestProviders>
<HomePage setHeaderActionMenu={jest.fn()}>
<HomePage>
<span />
</HomePage>
</TestProviders>
@@ -420,7 +422,7 @@ describe('HomePage', () => {

render(
<TestProviders>
<HomePage setHeaderActionMenu={jest.fn()}>
<HomePage>
<span />
</HomePage>
</TestProviders>
@@ -465,7 +467,7 @@ describe('HomePage', () => {

render(
<TestProviders>
<HomePage setHeaderActionMenu={jest.fn()}>
<HomePage>
<span />
</HomePage>
</TestProviders>
@@ -515,7 +517,7 @@ describe('HomePage', () => {

const TestComponent = () => (
<TestProviders store={mockStore}>
<HomePage setHeaderActionMenu={jest.fn()}>
<HomePage>
<span />
</HomePage>
</TestProviders>
@@ -572,7 +574,7 @@ describe('HomePage', () => {

const TestComponent = () => (
<TestProviders store={mockStore}>
<HomePage setHeaderActionMenu={jest.fn()}>
<HomePage>
<span />
</HomePage>
</TestProviders>
@@ -612,7 +614,7 @@ describe('HomePage', () => {

render(
<TestProviders>
<HomePage setHeaderActionMenu={jest.fn()}>
<HomePage>
<span />
</HomePage>
</TestProviders>
@@ -637,7 +639,7 @@ describe('HomePage', () => {

const TestComponent = () => (
<TestProviders store={store}>
<HomePage setHeaderActionMenu={jest.fn()}>
<HomePage>
<span />
</HomePage>
</TestProviders>
@@ -669,7 +671,7 @@ describe('HomePage', () => {

const TestComponent = () => (
<TestProviders store={store}>
<HomePage setHeaderActionMenu={jest.fn()}>
<HomePage>
<span />
</HomePage>
</TestProviders>