Skip to content

Commit

Permalink
Merge branch 'main' into fix-controls-form-props_2023-07-14
Browse files Browse the repository at this point in the history
  • Loading branch information
logeekal authored Aug 1, 2023
2 parents f49e55e + 9eec3ae commit 039c98f
Show file tree
Hide file tree
Showing 190 changed files with 2,412 additions and 1,048 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,11 @@ export const TagFilterPanel: FC<Props> = ({
</EuiFlexItem>

<EuiFlexItem css={saveBtnWrapperCSS}>
<EuiButton onClick={closePopover}>Save</EuiButton>
<EuiButton onClick={closePopover}>
{i18n.translate('contentManagement.tableList.tagFilterPanel.applyButtonLabel', {
defaultMessage: 'Apply',
})}
</EuiButton>
</EuiFlexItem>

<EuiFlexItem>
Expand Down
3 changes: 3 additions & 0 deletions packages/kbn-check-mappings-update-cli/current_mappings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2249,6 +2249,9 @@
},
"observability-onboarding-state": {
"properties": {
"type": {
"type": "keyword"
},
"state": {
"type": "object",
"dynamic": false
Expand Down
3 changes: 2 additions & 1 deletion packages/kbn-dom-drag-drop/src/sass/drag_drop.scss
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,8 @@ $reorderItemMargin: $euiSizeS;
right: calc(100% + #{$euiSizeS});
top: 0;
transition: opacity $euiAnimSpeedFast ease-in-out;
width:100%;
width: 100%;
max-width: $euiFormMaxWidth;
}

.domDragDrop__extraDrops-visible {
Expand Down
2 changes: 1 addition & 1 deletion packages/kbn-io-ts-utils/src/to_number_rt/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import * as t from 'io-ts';

export const toNumberRt = new t.Type<number, unknown, unknown>(
export const toNumberRt = new t.Type<number, number, unknown>(
'ToNumber',
t.number.is,
(input, context) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,13 @@ const getEnabledAppsByCategory = (sections: AppRegistrySections[], hideLinksTo:
}),
apps: getAppsForCategory(appCategories.DATA, filteredApps),
},
{
id: appCategories.ALERTS,
title: i18n.translate('management.landing.withCardNavigation.alertsTitle', {
defaultMessage: 'Alerts and insights',
}),
apps: getAppsForCategory(appCategories.ALERTS, filteredApps),
},
{
id: appCategories.CONTENT,
title: i18n.translate('management.landing.withCardNavigation.contentTitle', {
Expand Down
125 changes: 60 additions & 65 deletions packages/kbn-management/cards_navigation/src/consts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ export enum appIds {
INDEX_MANAGEMENT = 'index_management',
TRANSFORM = 'transform',
ML = 'jobsListLink',
DATA_VIEW = 'data_view',
SAVED_OBJECTS = 'objects',
TAGS = 'tags',
FILES_MANAGEMENT = 'filesManagement',
Expand All @@ -35,29 +34,12 @@ export type AppId = `${appIds}`;

export const appCategories = {
DATA: 'data',
ALERTS: 'alerts',
CONTENT: 'content',
OTHER: 'other',
};

export const appDefinitions: Record<AppId, AppDefinition> = {
[appIds.INGEST_PIPELINES]: {
category: appCategories.DATA,
description: i18n.translate(
'management.landing.withCardNavigation.ingestPipelinesDescription',
{
defaultMessage:
'Use pipelines to remove or transform fields, extract values from text, and enrich your data before indexing.',
}
),
icon: <EuiIcon size="l" type="logstashInput" />,
},
[appIds.PIPELINES]: {
category: appCategories.DATA,
description: i18n.translate('management.landing.withCardNavigation.ingestDescription', {
defaultMessage: 'Manage Logstash event processing and see the result visually.',
}),
icon: <EuiIcon size="l" type="logstashQueue" />,
},
[appIds.INDEX_MANAGEMENT]: {
category: appCategories.DATA,
description: i18n.translate(
Expand All @@ -76,75 +58,57 @@ export const appDefinitions: Record<AppId, AppDefinition> = {
}),
icon: <EuiIcon size="l" type="indexFlush" />,
},
[appIds.ML]: {
[appIds.INGEST_PIPELINES]: {
category: appCategories.DATA,
description: i18n.translate('management.landing.withCardNavigation.mlDescription', {
defaultMessage:
'View, export, and import machine learning analytics and anomaly detection items.',
}),
icon: <EuiIcon size="l" type="indexMapping" />,
description: i18n.translate(
'management.landing.withCardNavigation.ingestPipelinesDescription',
{
defaultMessage:
'Use pipelines to remove or transform fields, extract values from text, and enrich your data before indexing.',
}
),
icon: <EuiIcon size="l" type="logstashInput" />,
},
[appIds.DATA_VIEW]: {
[appIds.DATA_VIEWS]: {
category: appCategories.DATA,
description: i18n.translate('management.landing.withCardNavigation.dataViewsDescription', {
defaultMessage:
'Create and manage the data views that help you retrieve your data from Elasticsearch.',
}),
icon: <EuiIcon size="l" type="indexEdit" />,
},
[appIds.SAVED_OBJECTS]: {
category: appCategories.CONTENT,
description: i18n.translate('management.landing.withCardNavigation.objectsDescription', {
[appIds.ML]: {
category: appCategories.DATA,
description: i18n.translate('management.landing.withCardNavigation.mlDescription', {
defaultMessage:
'Manage and share your saved objects. To edit the underlying data of an object, go to its associated application.',
}),
icon: <EuiIcon size="l" type="save" />,
},
[appIds.TAGS]: {
category: appCategories.CONTENT,
description: i18n.translate('management.landing.withCardNavigation.tagsDescription', {
defaultMessage: 'Use tags to categorize and easily find your objects.',
}),
icon: <EuiIcon size="l" type="tag" />,
},
[appIds.FILES_MANAGEMENT]: {
category: appCategories.CONTENT,
description: i18n.translate('management.landing.withCardNavigation.fileManagementDescription', {
defaultMessage: 'Any files created will be listed here.',
'View, export, and import machine learning analytics and anomaly detection items.',
}),
icon: <EuiIcon size="l" type="documents" />,
icon: <EuiIcon size="l" type="indexMapping" />,
},
[appIds.API_KEYS]: {
category: appCategories.OTHER,
description: i18n.translate('management.landing.withCardNavigation.apiKeysDescription', {
defaultMessage: 'Allow applications to access Elastic on your behalf.',
[appIds.PIPELINES]: {
category: appCategories.DATA,
description: i18n.translate('management.landing.withCardNavigation.ingestDescription', {
defaultMessage: 'Manage Logstash event processing and see the result visually.',
}),
icon: <EuiIcon size="l" type="lockOpen" />,
icon: <EuiIcon size="l" type="logstashQueue" />,
},
[appIds.DATA_VIEWS]: {
category: appCategories.DATA,
description: i18n.translate('management.landing.withCardNavigation.dataViewsDescription', {
defaultMessage:
'Create and manage the data views that help you retrieve your data from Elasticsearch.',

[appIds.RULES]: {
category: appCategories.ALERTS,
description: i18n.translate('management.landing.withCardNavigation.rulesDescription', {
defaultMessage: 'Detect conditions using rules.',
}),
icon: <EuiIcon size="l" type="indexEdit" />,
icon: <EuiIcon size="l" type="editorChecklist" />,
},
[appIds.CONNECTORS]: {
category: appCategories.OTHER,
category: appCategories.ALERTS,
description: i18n.translate('management.landing.withCardNavigation.connectorsDescription', {
defaultMessage: 'Connect third-party software with your alerting data.',
}),
icon: <EuiIcon size="l" type="desktop" />,
},
[appIds.RULES]: {
category: appCategories.OTHER,
description: i18n.translate('management.landing.withCardNavigation.rulesDescription', {
defaultMessage: 'Detect conditions using rules.',
}),
icon: <EuiIcon size="l" type="editorChecklist" />,
},
[appIds.MAINTENANCE_WINDOWS]: {
category: appCategories.OTHER,
category: appCategories.ALERTS,
description: i18n.translate(
'management.landing.withCardNavigation.maintenanceWindowsDescription',
{
Expand All @@ -153,13 +117,44 @@ export const appDefinitions: Record<AppId, AppDefinition> = {
),
icon: <EuiIcon size="l" type="wrench" />,
},

[appIds.SAVED_OBJECTS]: {
category: appCategories.CONTENT,
description: i18n.translate('management.landing.withCardNavigation.objectsDescription', {
defaultMessage:
'Manage and share your saved objects. To edit the underlying data of an object, go to its associated application.',
}),
icon: <EuiIcon size="l" type="save" />,
},
[appIds.FILES_MANAGEMENT]: {
category: appCategories.CONTENT,
description: i18n.translate('management.landing.withCardNavigation.fileManagementDescription', {
defaultMessage: 'Any files created will be listed here.',
}),
icon: <EuiIcon size="l" type="documents" />,
},
[appIds.REPORTING]: {
category: appCategories.CONTENT,
description: i18n.translate('management.landing.withCardNavigation.reportingDescription', {
defaultMessage: 'Get reports generated in applications.',
}),
icon: <EuiIcon size="l" type="visPie" />,
},
[appIds.TAGS]: {
category: appCategories.CONTENT,
description: i18n.translate('management.landing.withCardNavigation.tagsDescription', {
defaultMessage: 'Use tags to categorize and easily find your objects.',
}),
icon: <EuiIcon size="l" type="tag" />,
},

[appIds.API_KEYS]: {
category: appCategories.OTHER,
description: i18n.translate('management.landing.withCardNavigation.apiKeysDescription', {
defaultMessage: 'Allow applications to access Elastic on your behalf.',
}),
icon: <EuiIcon size="l" type="lockOpen" />,
},
};

// Compose a list of app ids that belong to a given category
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ describe('checking migration metadata changes on all registered SO types', () =>
"ml-module": "2225cbb4bd508ea5f69db4b848be9d8a74b60198",
"ml-trained-model": "482195cefd6b04920e539d34d7356d22cb68e4f3",
"monitoring-telemetry": "5d91bf75787d9d4dd2fae954d0b3f76d33d2e559",
"observability-onboarding-state": "55b112d6a33fedb7c1e4fec4da768d2bcc5fadc2",
"observability-onboarding-state": "c18631f47a0da568f12f859c9ab9d4ca73bdff7c",
"osquery-manager-usage-metric": "983bcbc3b7dda0aad29b20907db233abba709bcc",
"osquery-pack": "6ab4358ca4304a12dcfc1777c8135b75cffb4397",
"osquery-pack-asset": "b14101d3172c4b60eb5404696881ce5275c84152",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export enum SecurityPageName {
* Warning: Computed values are not permitted in an enum with string valued members
* All threat intelligence page names must match `TIPageId` in x-pack/plugins/threat_intelligence/public/common/navigation/types.ts
*/
threatIntelligenceIndicators = 'threat_intelligence-indicators',
threatIntelligence = 'threat_intelligence',
timelines = 'timelines',
timelinesTemplates = 'timelines-templates',
trustedApps = 'trusted_apps',
Expand Down
5 changes: 2 additions & 3 deletions x-pack/performance/journeys/apm_service_inventory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ export const journey = new Journey({
// Setup Synthtrace Client
await synthClient.initialiseEsClient();
// Generate data using Synthtrace
const start = Date.now() - 1000;
const end = Date.now();
const start = Date.now() - 1000 * 60 * 15;
const end = Date.now() + 1000 * 60 * 15;
await synthClient.index(
generateData({
from: new Date(start).getTime(),
Expand All @@ -35,7 +35,6 @@ export const journey = new Journey({
);
},
ftrConfigPath: 'x-pack/performance/configs/apm_config.ts',
skipped: true,
})
.step('Navigate to Service Inventory Page', async ({ page, kbnUrl }) => {
await page.goto(kbnUrl.get(`app/apm/services`));
Expand Down
4 changes: 2 additions & 2 deletions x-pack/plugins/cases/common/api/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import {
CASE_DETAILS_URL,
CASE_METRICS_DETAILS_URL,
INTERNAL_CASE_METRICS_DETAILS_URL,
CASE_COMMENTS_URL,
CASE_USER_ACTIONS_URL,
CASE_PUSH_URL,
Expand All @@ -28,7 +28,7 @@ export const getCaseDetailsUrl = (id: string): string => {
};

export const getCaseDetailsMetricsUrl = (id: string): string => {
return CASE_METRICS_DETAILS_URL.replace('{case_id}', id);
return INTERNAL_CASE_METRICS_DETAILS_URL.replace('{case_id}', id);
};

export const getCaseCommentsUrl = (id: string): string => {
Expand Down
42 changes: 38 additions & 4 deletions x-pack/plugins/cases/common/api/metrics/case.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,19 @@
* 2.0.
*/

import { PathReporter } from 'io-ts/lib/PathReporter';
import {
SingleCaseMetricsRequestRt,
CasesMetricsRequestRt,
SingleCaseMetricsResponseRt,
CasesMetricsResponseRt,
CaseMetricsFeature,
} from './case';

describe('Metrics case', () => {
describe('SingleCaseMetricsRequestRt', () => {
const defaultRequest = {
features: ['alerts.count', 'lifespan'],
features: [CaseMetricsFeature.ALERTS_COUNT, CaseMetricsFeature.LIFESPAN],
};

it('has expected attributes in request', () => {
Expand All @@ -38,10 +40,27 @@ describe('Metrics case', () => {
right: defaultRequest,
});
});

describe('errors', () => {
it('has invalid feature in request', () => {
expect(
PathReporter.report(
SingleCaseMetricsRequestRt.decode({
features: [CaseMetricsFeature.MTTR],
})
)[0]
).toContain('Invalid value "mttr" supplied');
});
});
});

describe('CasesMetricsRequestRt', () => {
const defaultRequest = { features: ['mttr'], to: 'now-1d', from: 'now-1d', owner: ['cases'] };
const defaultRequest = {
features: [CaseMetricsFeature.MTTR],
to: 'now-1d',
from: 'now-1d',
owner: ['cases'],
};

it('has expected attributes in request', () => {
const query = CasesMetricsRequestRt.decode(defaultRequest);
Expand All @@ -65,16 +84,31 @@ describe('Metrics case', () => {
});

it('removes foo:bar attributes from when partial fields', () => {
const query = CasesMetricsRequestRt.decode({ features: ['mttr'], to: 'now-1d', foo: 'bar' });
const query = CasesMetricsRequestRt.decode({
features: [CaseMetricsFeature.MTTR],
to: 'now-1d',
foo: 'bar',
});

expect(query).toStrictEqual({
_tag: 'Right',
right: {
features: ['mttr'],
features: [CaseMetricsFeature.MTTR],
to: 'now-1d',
},
});
});
describe('errors', () => {
it('has invalid feature in request', () => {
expect(
PathReporter.report(
CasesMetricsRequestRt.decode({
features: ['foobar'],
})
)[0]
).toContain('Invalid value "foobar" supplied');
});
});
});

describe('SingleCaseMetricsResponseRt', () => {
Expand Down
Loading

0 comments on commit 039c98f

Please sign in to comment.