Skip to content

Commit

Permalink
Merge branch 'main' into strengthen-definition-types
Browse files Browse the repository at this point in the history
  • Loading branch information
kibanamachine committed May 9, 2024
2 parents 75d2db5 + 8dcd5fd commit c945a40
Show file tree
Hide file tree
Showing 69 changed files with 1,977 additions and 516 deletions.
1 change: 0 additions & 1 deletion src/plugins/data/common/search/search_source/mocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import { ISearchStartSearchSource, ISearchSource, SearchSourceFields } from './t

export const searchSourceInstanceMock: MockedKeys<ISearchSource> = {
setOverwriteDataViewType: jest.fn(),
setFields: jest.fn().mockReturnThis(),
setField: jest.fn().mockReturnThis(),
removeField: jest.fn().mockReturnThis(),
getId: jest.fn(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ export class SearchSource {
* @private
* @param newFields New field array.
*/
setFields(newFields: SearchSourceFields) {
private setFields(newFields: SearchSourceFields) {
this.fields = newFields;
return this;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ export const IndexPatternTable = ({
fill={true}
iconType="plusInCircle"
onClick={() => setShowCreateDialog(true)}
data-test-subj="createIndexPatternButton"
data-test-subj="createDataViewButton"
>
<FormattedMessage
id="indexPatternManagement.dataViewTable.createBtn"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ describe('Saved Object', () => {
},
});

savedObject.searchSource!.setFields({ index: indexPattern });
savedObject.searchSource!.setField('index', indexPattern);
return savedObject.save(saveOptionsMock).then(() => {
const args = (savedObjectsClientStub.create as jest.Mock).mock.calls[0];
expect(args[1]).toEqual({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@ describe('getSavedSearch', () => {
"removeField": [MockFunction],
"serialize": [MockFunction],
"setField": [MockFunction],
"setFields": [MockFunction],
"setOverwriteDataViewType": [MockFunction],
"setParent": [MockFunction],
"toExpressionAst": [MockFunction],
Expand Down Expand Up @@ -237,7 +236,6 @@ describe('getSavedSearch', () => {
"removeField": [MockFunction],
"serialize": [MockFunction],
"setField": [MockFunction],
"setFields": [MockFunction],
"setOverwriteDataViewType": [MockFunction],
"setParent": [MockFunction],
"toExpressionAst": [MockFunction],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,6 @@ describe('getSavedSearchAttributeService', () => {
"removeField": [MockFunction],
"serialize": [MockFunction],
"setField": [MockFunction],
"setFields": [MockFunction],
"setOverwriteDataViewType": [MockFunction],
"setParent": [MockFunction],
"toExpressionAst": [MockFunction],
Expand Down
13 changes: 1 addition & 12 deletions test/functional/page_objects/settings_page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -621,18 +621,7 @@ export class SettingsPageObject extends FtrService {

async clickAddNewIndexPatternButton() {
await this.common.scrollKibanaBodyTop();

// if showing no data view prompt
const noDataView = await this.testSubjects.exists('createDataViewButton');
if (noDataView) {
await this.testSubjects.click('createDataViewButton');
return;
}

const tableView = await this.testSubjects.exists('createIndexPatternButton');
if (tableView) {
await this.testSubjects.click('createIndexPatternButton');
}
await this.testSubjects.click('createDataViewButton');
}

async selectRollupIndexPatternType() {
Expand Down
34 changes: 3 additions & 31 deletions x-pack/plugins/actions/docs/openapi/bundled.json
Original file line number Diff line number Diff line change
Expand Up @@ -2340,11 +2340,7 @@
"type": "string",
"description": "A JSON payload sent to the create comment URL to create a case comment. You can use variables to add Kibana Cases data to the payload. The required variable is `case.comment`. Due to Mustache template variables (the text enclosed in triple braces, for example, `{{{case.title}}}`), the JSON is not validated when you create the connector. The JSON is validated once the Mustache variables have been placed when the REST method runs. Manually ensure that the JSON is valid, disregarding the Mustache variables, so the later validation will pass.\n",
"examples": [
{
"body": {
"[object Object]": null
}
}
"{\"body\": {{{case.comment}}}}"
]
},
"createCommentMethod": {
Expand All @@ -2368,19 +2364,7 @@
"type": "string",
"description": "A JSON payload sent to the create case URL to create a case. You can use variables to add case data to the payload. Required variables are `case.title` and `case.description`. Due to Mustache template variables (which is the text enclosed in triple braces, for example, `{{{case.title}}}`), the JSON is not validated when you create the connector. The JSON is validated after the Mustache variables have been placed when REST method runs. Manually ensure that the JSON is valid to avoid future validation errors; disregard Mustache variables during your review.\n",
"examples": [
{
"fields": {
"summary": {
"[object Object]": null
},
"description": {
"[object Object]": null
},
"labels": {
"[object Object]": null
}
}
}
"{\"fields\": {\"summary\": {{{case.title}}},\"description\": {{{case.description}}},\"labels\": {{{case.tags}}}}}"
]
},
"createIncidentMethod": {
Expand Down Expand Up @@ -2425,19 +2409,7 @@
"type": "string",
"description": "The JSON payload sent to the update case URL to update the case. You can use variables to add Kibana Cases data to the payload. Required variables are `case.title` and `case.description`. Due to Mustache template variables (which is the text enclosed in triple braces, for example, `{{{case.title}}}`), the JSON is not validated when you create the connector. The JSON is validated after the Mustache variables have been placed when REST method runs. Manually ensure that the JSON is valid to avoid future validation errors; disregard Mustache variables during your review.\n",
"examples": [
{
"fields": {
"summary": {
"[object Object]": null
},
"description": {
"[object Object]": null
},
"labels": {
"[object Object]": null
}
}
}
"{\"fields\": {\"summary\": {{{case.title}}},\"description\": {{{case.description}}},\"labels\": {{{case.tags}}}}}"
]
},
"updateIncidentMethod": {
Expand Down
19 changes: 3 additions & 16 deletions x-pack/plugins/actions/docs/openapi/bundled.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1574,8 +1574,7 @@ components:
description: |
A JSON payload sent to the create comment URL to create a case comment. You can use variables to add Kibana Cases data to the payload. The required variable is `case.comment`. Due to Mustache template variables (the text enclosed in triple braces, for example, `{{{case.title}}}`), the JSON is not validated when you create the connector. The JSON is validated once the Mustache variables have been placed when the REST method runs. Manually ensure that the JSON is valid, disregarding the Mustache variables, so the later validation will pass.
examples:
- body:
'[object Object]': null
- '{"body": {{{case.comment}}}}'
createCommentMethod:
type: string
description: |
Expand All @@ -1596,13 +1595,7 @@ components:
description: |
A JSON payload sent to the create case URL to create a case. You can use variables to add case data to the payload. Required variables are `case.title` and `case.description`. Due to Mustache template variables (which is the text enclosed in triple braces, for example, `{{{case.title}}}`), the JSON is not validated when you create the connector. The JSON is validated after the Mustache variables have been placed when REST method runs. Manually ensure that the JSON is valid to avoid future validation errors; disregard Mustache variables during your review.
examples:
- fields:
summary:
'[object Object]': null
description:
'[object Object]': null
labels:
'[object Object]': null
- '{"fields": {"summary": {{{case.title}}},"description": {{{case.description}}},"labels": {{{case.tags}}}}}'
createIncidentMethod:
type: string
description: |
Expand Down Expand Up @@ -1641,13 +1634,7 @@ components:
description: |
The JSON payload sent to the update case URL to update the case. You can use variables to add Kibana Cases data to the payload. Required variables are `case.title` and `case.description`. Due to Mustache template variables (which is the text enclosed in triple braces, for example, `{{{case.title}}}`), the JSON is not validated when you create the connector. The JSON is validated after the Mustache variables have been placed when REST method runs. Manually ensure that the JSON is valid to avoid future validation errors; disregard Mustache variables during your review.
examples:
- fields:
summary:
'[object Object]': null
description:
'[object Object]': null
labels:
'[object Object]': null
- '{"fields": {"summary": {{{case.title}}},"description": {{{case.description}}},"labels": {{{case.tags}}}}}'
updateIncidentMethod:
type: string
description: |
Expand Down
34 changes: 3 additions & 31 deletions x-pack/plugins/actions/docs/openapi/bundled_serverless.json
Original file line number Diff line number Diff line change
Expand Up @@ -1308,11 +1308,7 @@
"type": "string",
"description": "A JSON payload sent to the create comment URL to create a case comment. You can use variables to add Kibana Cases data to the payload. The required variable is `case.comment`. Due to Mustache template variables (the text enclosed in triple braces, for example, `{{{case.title}}}`), the JSON is not validated when you create the connector. The JSON is validated once the Mustache variables have been placed when the REST method runs. Manually ensure that the JSON is valid, disregarding the Mustache variables, so the later validation will pass.\n",
"examples": [
{
"body": {
"[object Object]": null
}
}
"{\"body\": {{{case.comment}}}}"
]
},
"createCommentMethod": {
Expand All @@ -1336,19 +1332,7 @@
"type": "string",
"description": "A JSON payload sent to the create case URL to create a case. You can use variables to add case data to the payload. Required variables are `case.title` and `case.description`. Due to Mustache template variables (which is the text enclosed in triple braces, for example, `{{{case.title}}}`), the JSON is not validated when you create the connector. The JSON is validated after the Mustache variables have been placed when REST method runs. Manually ensure that the JSON is valid to avoid future validation errors; disregard Mustache variables during your review.\n",
"examples": [
{
"fields": {
"summary": {
"[object Object]": null
},
"description": {
"[object Object]": null
},
"labels": {
"[object Object]": null
}
}
}
"{\"fields\": {\"summary\": {{{case.title}}},\"description\": {{{case.description}}},\"labels\": {{{case.tags}}}}}"
]
},
"createIncidentMethod": {
Expand Down Expand Up @@ -1393,19 +1377,7 @@
"type": "string",
"description": "The JSON payload sent to the update case URL to update the case. You can use variables to add Kibana Cases data to the payload. Required variables are `case.title` and `case.description`. Due to Mustache template variables (which is the text enclosed in triple braces, for example, `{{{case.title}}}`), the JSON is not validated when you create the connector. The JSON is validated after the Mustache variables have been placed when REST method runs. Manually ensure that the JSON is valid to avoid future validation errors; disregard Mustache variables during your review.\n",
"examples": [
{
"fields": {
"summary": {
"[object Object]": null
},
"description": {
"[object Object]": null
},
"labels": {
"[object Object]": null
}
}
}
"{\"fields\": {\"summary\": {{{case.title}}},\"description\": {{{case.description}}},\"labels\": {{{case.tags}}}}}"
]
},
"updateIncidentMethod": {
Expand Down
19 changes: 3 additions & 16 deletions x-pack/plugins/actions/docs/openapi/bundled_serverless.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -921,8 +921,7 @@ components:
description: |
A JSON payload sent to the create comment URL to create a case comment. You can use variables to add Kibana Cases data to the payload. The required variable is `case.comment`. Due to Mustache template variables (the text enclosed in triple braces, for example, `{{{case.title}}}`), the JSON is not validated when you create the connector. The JSON is validated once the Mustache variables have been placed when the REST method runs. Manually ensure that the JSON is valid, disregarding the Mustache variables, so the later validation will pass.
examples:
- body:
'[object Object]': null
- '{"body": {{{case.comment}}}}'
createCommentMethod:
type: string
description: |
Expand All @@ -943,13 +942,7 @@ components:
description: |
A JSON payload sent to the create case URL to create a case. You can use variables to add case data to the payload. Required variables are `case.title` and `case.description`. Due to Mustache template variables (which is the text enclosed in triple braces, for example, `{{{case.title}}}`), the JSON is not validated when you create the connector. The JSON is validated after the Mustache variables have been placed when REST method runs. Manually ensure that the JSON is valid to avoid future validation errors; disregard Mustache variables during your review.
examples:
- fields:
summary:
'[object Object]': null
description:
'[object Object]': null
labels:
'[object Object]': null
- '{"fields": {"summary": {{{case.title}}},"description": {{{case.description}}},"labels": {{{case.tags}}}}}'
createIncidentMethod:
type: string
description: |
Expand Down Expand Up @@ -988,13 +981,7 @@ components:
description: |
The JSON payload sent to the update case URL to update the case. You can use variables to add Kibana Cases data to the payload. Required variables are `case.title` and `case.description`. Due to Mustache template variables (which is the text enclosed in triple braces, for example, `{{{case.title}}}`), the JSON is not validated when you create the connector. The JSON is validated after the Mustache variables have been placed when REST method runs. Manually ensure that the JSON is valid to avoid future validation errors; disregard Mustache variables during your review.
examples:
- fields:
summary:
'[object Object]': null
description:
'[object Object]': null
labels:
'[object Object]': null
- '{"fields": {"summary": {{{case.title}}},"description": {{{case.description}}},"labels": {{{case.tags}}}}}'
updateIncidentMethod:
type: string
description: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ properties:
placed when the REST method runs. Manually ensure that the JSON is valid,
disregarding the Mustache variables, so the later validation will pass.
examples:
- {"body": {{{case.comment}}}}
- '{"body": {{{case.comment}}}}'
createCommentMethod:
type: string
description: >
Expand Down Expand Up @@ -55,7 +55,7 @@ properties:
placed when REST method runs. Manually ensure that the JSON is valid to
avoid future validation errors; disregard Mustache variables during your review.
examples:
- {"fields": {"summary": {{{case.title}}},"description": {{{case.description}}},"labels": {{{case.tags}}}}}
- '{"fields": {"summary": {{{case.title}}},"description": {{{case.description}}},"labels": {{{case.tags}}}}}'
createIncidentMethod:
type: string
description: >
Expand Down Expand Up @@ -112,7 +112,7 @@ properties:
placed when REST method runs. Manually ensure that the JSON is valid to
avoid future validation errors; disregard Mustache variables during your review.
examples:
- {"fields": {"summary": {{{case.title}}},"description": {{{case.description}}},"labels": {{{case.tags}}}}}
- '{"fields": {"summary": {{{case.title}}},"description": {{{case.description}}},"labels": {{{case.tags}}}}}'
updateIncidentMethod:
type: string
description: >
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,7 @@ import { useRouteMatch } from 'react-router-dom';

import { useValues } from 'kea';

import {
EuiPageSidebar,
EuiPageBody,
EuiPageSection,
EuiCallOut,
EuiSpacer,
EuiPageTemplate,
} from '@elastic/eui';
import { EuiCallOut, EuiSpacer, EuiPageTemplate } from '@elastic/eui';

import { AccountHeader, AccountSettingsSidebar, PrivateSourcesSidebar } from '..';
import { FlashMessages } from '../../../../shared/flash_messages';
Expand Down Expand Up @@ -47,37 +40,35 @@ export const PersonalDashboardLayout: FC<PropsWithChildren<LayoutProps>> = ({
<>
{pageChrome && <SetWorkplaceSearchChrome trail={pageChrome} />}
<AccountHeader />
<EuiPageTemplate className="personalDashboardLayout" paddingSize="none">
<EuiPageSidebar
<EuiPageTemplate className="personalDashboardLayout" paddingSize="none" panelled>
<EuiPageTemplate.Sidebar
role="navigation"
className="personalDashboardLayout__sideBar"
sticky
minWidth="480px"
>
{useRouteMatch(PRIVATE_SOURCES_PATH) && <PrivateSourcesSidebar />}
{useRouteMatch(PERSONAL_SETTINGS_PATH) && <AccountSettingsSidebar />}
</EuiPageSidebar>
<EuiPageBody component="main" panelled role="main">
<EuiPageSection
className="personalDashboardLayout__body"
paddingSize="none"
restrictWidth
>
{readOnlyMode && (
<>
<EuiCallOut
color="warning"
iconType="lock"
title={PERSONAL_DASHBOARD_READ_ONLY_MODE_WARNING}
/>
<EuiSpacer />
</>
)}
<FlashMessages />
</EuiPageTemplate.Sidebar>
<EuiPageTemplate.Section
className="personalDashboardLayout__body"
paddingSize="none"
restrictWidth
>
{readOnlyMode && (
<>
<EuiCallOut
color="warning"
iconType="lock"
title={PERSONAL_DASHBOARD_READ_ONLY_MODE_WARNING}
/>
<EuiSpacer />
</>
)}
<FlashMessages />

{isLoading ? <Loading /> : children}
</EuiPageSection>
</EuiPageBody>
{isLoading ? <Loading /> : children}
</EuiPageTemplate.Section>
</EuiPageTemplate>
</>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ export function registerLoadRoute({ router, lib: { handleEsError } }: RouteDepen
const params = {
expand_wildcards: 'none' as const,
flat_settings: false,
local: false,
include_defaults: true,
index: indexName,
};
Expand Down

0 comments on commit c945a40

Please sign in to comment.