Skip to content

Commit

Permalink
Merge branch 'main' into endpoint-isolate-e2e-coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
szwarckonrad authored Apr 17, 2023
2 parents fcc702f + 6259bb9 commit 25674ff
Show file tree
Hide file tree
Showing 65 changed files with 1,159 additions and 432 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -529,6 +529,7 @@ test/plugin_functional/plugins/saved_objects_hidden_from_http_apis_type @elastic
test/plugin_functional/plugins/saved_objects_hidden_type @elastic/kibana-core
src/plugins/saved_objects_management @elastic/kibana-core
src/plugins/saved_objects @elastic/kibana-core
packages/kbn-saved-objects-settings @elastic/appex-sharedux
src/plugins/saved_objects_tagging_oss @elastic/appex-sharedux
x-pack/plugins/saved_objects_tagging @elastic/appex-sharedux
src/plugins/saved_search @elastic/kibana-data-discovery
Expand Down
150 changes: 81 additions & 69 deletions docs/index-custom-title-page.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,13 @@
-moz-columns: 2;
}
}
#guide h3.gtk {
margin-top: 0;
}

.mb-4, .my-4 {
margin-bottom: 0!important;
}
</style>

<div class="legalnotice"></div>
Expand All @@ -63,53 +70,17 @@ <h2>Bring your data to life</h2>
</a>
</p>
<p>
<a class="inline-block mr-3" href="https://www.elastic.co/videos/training-how-to-series-stack">How-to videos</a>
</p>
<a class="inline-block mr-3" href="https://www.elastic.co/guide/en/kibana/8.7/whats-new.html">What's new</a>
<a class="inline-block mr-3" href="https://www.elastic.co/guide/en/kibana/8.7/release-notes.html">Release notes</a>
<a class="inline-block mr-3" href="install.html">Install</a>
</p>
</div>
<div class="col-md-6 col-12">
<img class="w-100" src="https://images.contentstack.io/v3/assets/bltefdd0b53724fa2ce/blt9068c0f145771649/633b72121434a77dfebf7301/kibana.png" />
</div>
</div>

<h3>Explore by Elastic solution</h3>

<div class="row my-4">
<div class="col-md-4 col-12 mb-2">
<a class="no-text-decoration" href="https://www.elastic.co/guide/en/enterprise-search/current/start.html">
<div class="card h-100">
<h4 class="mt-3">
<span class="inline-block float-left icon mr-2" style="background-image: url('https://images.contentstack.io/v3/assets/bltefdd0b53724fa2ce/blt11200907c1c033aa/634d9da119d8652169cf9b2b/enterprise-search-logo-color-32px.png');"></span>
Enterprise Search
</h4>
<p>Create search experiences for your content, wherever it lives.</p>
</div>
</a>
</div>
<div class="col-md-4 col-12 mb-2">
<a class="no-text-decoration" href="https://www.elastic.co/guide/en/welcome-to-elastic/current/getting-started-observability.html">
<div class="card h-100">
<h4 class="mt-3">
<span class="inline-block float-left icon mr-2" style="background-image: url('https://images.contentstack.io/v3/assets/bltefdd0b53724fa2ce/bltaa08b370a00bbecc/634d9da14e565f1cdce27f7c/observability-logo-color-32px.png');"></span>
Observability
</h4>
<p>Learn how to monitor logs, metrics, and traces.</p>
</div>
</a>
</div>
<div class="col-md-4 col-12 mb-2">
<a class="no-text-decoration" href="https://www.elastic.co/guide/en/security/current/es-overview.html">
<div class="card h-100">
<h4 class="mt-3">
<span class="inline-block float-left icon mr-2" style="background-image: url('https://images.contentstack.io/v3/assets/bltefdd0b53724fa2ce/blt5e0e0ad9a13e6b8c/634d9da18473831f96bbdf1e/security-logo-color-32px.png');"></span>
Security
</h4>
<p>Learn how to defend against threats across your environment.</p>
</div>
</a>
</div>
</div>

<h3>Get to know Kibana</h3>
<h3 class="gtk">Get to know Kibana</h3>

<div class="my-5">
<div class="d-flex align-items-center mb-3">
Expand All @@ -134,6 +105,28 @@ <h4 class="mt-3">
</ul>
</div>

<div class="my-5">
<div class="d-flex align-items-center mb-3">
<h4 class="mt-3">
<span class="inline-block float-left icon mr-2" style="background-image: url('https://images.contentstack.io/v3/assets/bltefdd0b53724fa2ce/bltaab09880054ab560/634d9d7ac96b72418f47af78/icon-upgrade-assistant-32-color.png');"></span>
Install and upgrade
</h4>
</div>
<ul class="ul-col-md-2 ul-col-1">
<li>
<a href="install.html">Install</a>
</li>
<li>
<a href="settings.html">Configure settings</a>
</li>
<li>
<a href="upgrade.html">Prepare for an upgrade</a>
</li>
<li>
<a href="managing-licenses.html">Update your license</a>
</ul>
</div>

<div class="my-5">
<div class="d-flex align-items-center mb-3">
<h4 class="mt-3">
Expand All @@ -158,7 +151,7 @@ <h4 class="mt-3">
<a href="xpack-graph.html">Graph patterns and relationships</a>
</li>
<li>
<a href="xpack-ml.html">Model, predict, & detect behavior</a>
<a href="xpack-ml.html">Model, predict, and detect behavior</a>
</li>
<li>
<a href="reporting-getting-started.html">Generate and share reports</a>
Expand All @@ -177,25 +170,6 @@ <h4 class="mt-3">
</ul>
</div>

<div class="my-5">
<div class="d-flex align-items-center mb-3">
<h4 class="mt-3">
<span class="inline-block float-left icon mr-2" style="background-image: url('https://images.contentstack.io/v3/assets/bltefdd0b53724fa2ce/bltf6be06b964edf05e/634d9d7ab3f39b38fccfd0b4/icon-spaces-32-color.png');"></span>
Get organized
</h4>
</div>
<ul class="ul-col-md-2 ul-col-1">
<li>
<a href="xpack-spaces.html">Collect related data in spaces</a>
</li>
<li>
<a href="managing-tags.html">Quickly find apps and objects</a>
</li>
<li>
<a href="managing-saved-objects.html">Manage the objects you saved</a>
</li>
</ul>
</div>

<div class="my-5">
<div class="d-flex align-items-center mb-3">
Expand All @@ -209,14 +183,17 @@ <h4 class="mt-3">
<a href="management.html">Manage data and indices</a>
</li>
<li>
<a href="tutorial-secure-access-to-kibana.html">Configure access & security</a>
<a href="tutorial-secure-access-to-kibana.html">Configure access and security</a>
</li>
<li>
<a href="xpack-monitoring.html">Monitor the Elastic Stack</a>
</li>
<li>
<a href="advanced-options.html">Customize Kibana</a>
</li>
<li>
<a href="cases.html">Investigate cases</a>
</li>
<li>
<a href="kibana-troubleshooting.html">Troubleshoot</a>
</li>
Expand All @@ -226,22 +203,20 @@ <h4 class="mt-3">
<div class="my-5">
<div class="d-flex align-items-center mb-3">
<h4 class="mt-3">
<span class="inline-block float-left icon mr-2" style="background-image: url('https://images.contentstack.io/v3/assets/bltefdd0b53724fa2ce/bltaab09880054ab560/634d9d7ac96b72418f47af78/icon-upgrade-assistant-32-color.png');"></span>
Install and upgrade
<span class="inline-block float-left icon mr-2" style="background-image: url('https://images.contentstack.io/v3/assets/bltefdd0b53724fa2ce/bltf6be06b964edf05e/634d9d7ab3f39b38fccfd0b4/icon-spaces-32-color.png');"></span>
Get organized
</h4>
</div>
<ul class="ul-col-md-2 ul-col-1">
<li>
<a href="install.html">Install</a>
<a href="xpack-spaces.html">Collect related data in spaces</a>
</li>
<li>
<a href="settings.html">Configure settings</a>
<a href="managing-tags.html">Quickly find apps and objects</a>
</li>
<li>
<a href="upgrade.html">Prepare for an upgrade</a>
<a href="managing-saved-objects.html">Manage the objects you saved</a>
</li>
<li>
<a href="managing-licenses.html">Update your license</a>
</ul>
</div>

Expand All @@ -268,5 +243,42 @@ <h4 class="mt-3">
</ul>
</div>

<h3>Explore by Elastic solution</h3>

<div class="row my-4">
<div class="col-md-4 col-12 mb-2">
<a class="no-text-decoration" href="https://www.elastic.co/guide/en/enterprise-search/current/start.html">
<div class="card h-100">
<h4 class="mt-3">
<span class="inline-block float-left icon mr-2" style="background-image: url('https://images.contentstack.io/v3/assets/bltefdd0b53724fa2ce/blt11200907c1c033aa/634d9da119d8652169cf9b2b/enterprise-search-logo-color-32px.png');"></span>
Enterprise Search
</h4>
<p>Create search experiences for your content, wherever it lives.</p>
</div>
</a>
</div>
<div class="col-md-4 col-12 mb-2">
<a class="no-text-decoration" href="https://www.elastic.co/guide/en/welcome-to-elastic/current/getting-started-observability.html">
<div class="card h-100">
<h4 class="mt-3">
<span class="inline-block float-left icon mr-2" style="background-image: url('https://images.contentstack.io/v3/assets/bltefdd0b53724fa2ce/bltaa08b370a00bbecc/634d9da14e565f1cdce27f7c/observability-logo-color-32px.png');"></span>
Observability
</h4>
<p>Learn how to monitor logs, metrics, and traces.</p>
</div>
</a>
</div>
<div class="col-md-4 col-12 mb-2">
<a class="no-text-decoration" href="https://www.elastic.co/guide/en/security/current/es-overview.html">
<div class="card h-100">
<h4 class="mt-3">
<span class="inline-block float-left icon mr-2" style="background-image: url('https://images.contentstack.io/v3/assets/bltefdd0b53724fa2ce/blt5e0e0ad9a13e6b8c/634d9da18473831f96bbdf1e/security-logo-color-32px.png');"></span>
Security
</h4>
<p>Learn how to defend against threats across your environment.</p>
</div>
</a>
</div>
</div>

<p class="my-4"><a href="https://www.elastic.co/guide/index.html">View all Elastic docs</a></p>
3 changes: 3 additions & 0 deletions docs/settings/alert-action-settings.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,9 @@ A list of allowed email domains which can be used with the email connector. When

WARNING: This feature is available in {kib} 7.17.4 and 8.3.0 onwards but is not supported in {kib} 8.0, 8.1 or 8.2. As such, this setting should be removed before upgrading from 7.17 to 8.0, 8.1 or 8.2. It is possible to configure the settings in 7.17.4 and then upgrade to 8.3.0 directly.

`xpack.actions.enableFooterInEmail` {ess-icon}::
A boolean value indicating that a footer with a relevant link should be added to emails sent as alerting actions. Default: true.

`xpack.actions.enabledActionTypes` {ess-icon}::
A list of action types that are enabled. It defaults to `[*]`, enabling all types. The names for built-in {kib} action types are prefixed with a `.` and include: `.email`, `.index`, `.jira`, `.opsgenie`, `.pagerduty`, `.resilient`, `.server-log`, `.servicenow`, .`servicenow-itom`, `.servicenow-sir`, `.slack`, `.swimlane`, `.teams`, `.tines`, `.torq`, `.xmatters`, and `.webhook`. An empty list `[]` will disable all action types.
+
Expand Down
2 changes: 1 addition & 1 deletion fleet_packages.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,6 @@
},
{
"name": "security_detection_engine",
"version": "8.7.1"
"version": "8.7.2"
}
]
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -531,6 +531,7 @@
"@kbn/saved-objects-hidden-type-plugin": "link:test/plugin_functional/plugins/saved_objects_hidden_type",
"@kbn/saved-objects-management-plugin": "link:src/plugins/saved_objects_management",
"@kbn/saved-objects-plugin": "link:src/plugins/saved_objects",
"@kbn/saved-objects-settings": "link:packages/kbn-saved-objects-settings",
"@kbn/saved-objects-tagging-oss-plugin": "link:src/plugins/saved_objects_tagging_oss",
"@kbn/saved-objects-tagging-plugin": "link:x-pack/plugins/saved_objects_tagging",
"@kbn/saved-search-plugin": "link:src/plugins/saved_search",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,12 @@ const twoDaysAgoToString = new Date(twoDaysAgo.getTime()).toDateString();
const yesterday = new Date(new Date().setDate(new Date().getDate() - 1));
const yesterdayToString = new Date(yesterday.getTime()).toDateString();

const getActions = (testBed: TestBed) => ({
openSortSelect() {
testBed.find('tableSortSelectBtn').at(0).simulate('click');
},
});

describe('TableListView', () => {
beforeAll(() => {
jest.useFakeTimers({ legacyFakeTimers: true });
Expand Down Expand Up @@ -306,6 +312,36 @@ describe('TableListView', () => {
expect(lastRowTitle).toBe('Item 19');
});

test('should allow changing the number of rows in the table', async () => {
let testBed: TestBed;

await act(async () => {
testBed = await setup({
initialPageSize,
findItems: jest.fn().mockResolvedValue({ total: hits.length, hits: [...hits] }),
});
});

const { component, table, find } = testBed!;
component.update();

let { tableCellsValues } = table.getMetaData('itemsInMemTable');
expect(tableCellsValues.length).toBe(requiredProps.initialPageSize);

// Changing the "Rows per page" also sends the "sort" column information and thus updates the sorting.
// We test that the "sort by" column has not changed before and after changing the number of rows
expect(find('tableSortSelectBtn').at(0).text()).toBe('Recently updated');

// Open the "Rows per page" drop down
find('tablePaginationPopoverButton').simulate('click');
find('tablePagination-10-rows').simulate('click');

({ tableCellsValues } = table.getMetaData('itemsInMemTable'));
expect(tableCellsValues.length).toBe(10);

expect(find('tableSortSelectBtn').at(0).text()).toBe('Recently updated'); // Still the same
});

test('should navigate to page 2', async () => {
let testBed: TestBed;

Expand Down Expand Up @@ -350,12 +386,6 @@ describe('TableListView', () => {
}
);

const getActions = (testBed: TestBed) => ({
openSortSelect() {
testBed.find('tableSortSelectBtn').at(0).simulate('click');
},
});

const hits: UserContentCommonSchema[] = [
{
id: '123',
Expand Down
26 changes: 23 additions & 3 deletions packages/content-management/table_list/src/table_list_view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,17 @@ const urlStateSerializer = (updated: {
return updatedQueryParams;
};

const tableColumnMetadata = {
title: {
field: 'attributes.title',
name: 'Name, description, tags',
},
updatedAt: {
field: 'updatedAt',
name: 'Last updated',
},
} as const;

function TableListViewComp<T extends UserContentCommonSchema>({
tableListTitle,
tableListDescription,
Expand Down Expand Up @@ -437,7 +448,7 @@ function TableListViewComp<T extends UserContentCommonSchema>({
const tableColumns = useMemo(() => {
const columns: Array<EuiBasicTableColumn<T>> = [
{
field: 'attributes.title',
field: tableColumnMetadata.title.field,
name:
titleColumnName ??
i18n.translate('contentManagement.tableList.mainColumnName', {
Expand Down Expand Up @@ -471,7 +482,7 @@ function TableListViewComp<T extends UserContentCommonSchema>({

if (hasUpdatedAtMetadata) {
columns.push({
field: 'updatedAt',
field: tableColumnMetadata.updatedAt.field,
name: i18n.translate('contentManagement.tableList.lastUpdatedColumnTitle', {
defaultMessage: 'Last updated',
}),
Expand Down Expand Up @@ -630,8 +641,17 @@ function TableListViewComp<T extends UserContentCommonSchema>({
} = {};

if (criteria.sort) {
// We need to serialise the field as the <EuiInMemoryTable /> return either (1) the field _name_ (e.g. "Last updated")
// when changing the "Rows per page" select value or (2) the field _value_ (e.g. "updatedAt") when clicking the column title
let fieldSerialized: unknown = criteria.sort.field;
if (fieldSerialized === tableColumnMetadata.title.name) {
fieldSerialized = tableColumnMetadata.title.field;
} else if (fieldSerialized === tableColumnMetadata.updatedAt.name) {
fieldSerialized = tableColumnMetadata.updatedAt.field;
}

data.sort = {
field: criteria.sort.field as SortColumnField,
field: fieldSerialized as SortColumnField,
direction: criteria.sort.direction,
};
}
Expand Down
3 changes: 3 additions & 0 deletions packages/kbn-saved-objects-settings/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# @kbn/saved-objects-settings

Contains constants for some of saved objects related ui settings that had to be re-used between plugins without causing circular dependencies.
10 changes: 10 additions & 0 deletions packages/kbn-saved-objects-settings/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/*
* 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 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/

export const PER_PAGE_SETTING = 'savedObjects:perPage';
export const LISTING_LIMIT_SETTING = 'savedObjects:listingLimit';
Loading

0 comments on commit 25674ff

Please sign in to comment.