Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into kbn-76003-kbn-con…
Browse files Browse the repository at this point in the history
…fig-package
  • Loading branch information
pgayvallet committed Sep 15, 2020
2 parents c80dd02 + 1e00ae7 commit c0abb98
Show file tree
Hide file tree
Showing 10 changed files with 59 additions and 286 deletions.
1 change: 1 addition & 0 deletions x-pack/plugins/enterprise_search/public/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ export class EnterpriseSearchPlugin implements Plugin {
core.application.register({
id: ENTERPRISE_SEARCH_PLUGIN.ID,
title: ENTERPRISE_SEARCH_PLUGIN.NAV_TITLE,
euiIconType: ENTERPRISE_SEARCH_PLUGIN.LOGO,
appRoute: ENTERPRISE_SEARCH_PLUGIN.URL,
category: DEFAULT_APP_CATEGORIES.enterpriseSearch,
mount: async (params: AppMountParameters) => {
Expand Down
132 changes: 2 additions & 130 deletions x-pack/plugins/infra/common/saved_objects/inventory_view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,135 +17,7 @@ export const inventoryViewSavedObjectType: SavedObjectsType = {
importableAndExportable: true,
},
mappings: {
properties: {
name: {
type: 'keyword',
},
sort: {
properties: {
by: {
type: 'keyword',
},
direction: {
type: 'keyword',
},
},
},
metric: {
properties: {
type: {
type: 'keyword',
},
field: {
type: 'keyword',
},
aggregation: {
type: 'keyword',
},
id: {
type: 'keyword',
},
label: {
type: 'keyword',
},
},
},
legend: {
properties: {
palette: {
type: 'keyword',
},
steps: {
type: 'long',
},
reverseColors: {
type: 'boolean',
},
},
},
groupBy: {
type: 'nested',
properties: {
label: {
type: 'keyword',
},
field: {
type: 'keyword',
},
},
},
nodeType: {
type: 'keyword',
},
view: {
type: 'keyword',
},
customOptions: {
type: 'nested',
properties: {
text: {
type: 'keyword',
},
field: {
type: 'keyword',
},
},
},
customMetrics: {
type: 'nested',
properties: {
type: {
type: 'keyword',
},
field: {
type: 'keyword',
},
aggregation: {
type: 'keyword',
},
id: {
type: 'keyword',
},
label: {
type: 'keyword',
},
},
},
boundsOverride: {
properties: {
max: {
type: 'integer',
},
min: {
type: 'integer',
},
},
},
autoBounds: {
type: 'boolean',
},
time: {
type: 'long',
},
autoReload: {
type: 'boolean',
},
filterQuery: {
properties: {
kind: {
type: 'keyword',
},
expression: {
type: 'keyword',
},
},
},
accountId: {
type: 'keyword',
},
region: {
type: 'keyword',
},
},
dynamic: false,
properties: {},
},
};
72 changes: 2 additions & 70 deletions x-pack/plugins/infra/common/saved_objects/metrics_explorer_view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,75 +17,7 @@ export const metricsExplorerViewSavedObjectType: SavedObjectsType = {
importableAndExportable: true,
},
mappings: {
properties: {
name: {
type: 'keyword',
},
options: {
properties: {
forceInterval: {
type: 'boolean',
},
metrics: {
type: 'nested',
properties: {
aggregation: {
type: 'keyword',
},
field: {
type: 'keyword',
},
color: {
type: 'keyword',
},
label: {
type: 'keyword',
},
},
},
limit: {
type: 'integer',
},
groupBy: {
type: 'keyword',
},
filterQuery: {
type: 'keyword',
},
aggregation: {
type: 'keyword',
},
source: {
type: 'keyword',
},
},
},
chartOptions: {
properties: {
type: {
type: 'keyword',
},
yAxisMode: {
type: 'keyword',
},
stack: {
type: 'boolean',
},
},
},
currentTimerange: {
properties: {
from: {
type: 'keyword',
},
to: {
type: 'keyword',
},
interval: {
type: 'keyword',
},
},
},
},
dynamic: false,
properties: {},
},
};
70 changes: 2 additions & 68 deletions x-pack/plugins/infra/server/lib/sources/saved_object_type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,74 +17,8 @@ export const infraSourceConfigurationSavedObjectType: SavedObjectsType = {
importableAndExportable: true,
},
mappings: {
properties: {
name: {
type: 'text',
},
description: {
type: 'text',
},
metricAlias: {
type: 'keyword',
},
logAlias: {
type: 'keyword',
},
inventoryDefaultView: {
type: 'keyword',
},
metricsExplorerDefaultView: {
type: 'keyword',
},
fields: {
properties: {
container: {
type: 'keyword',
},
host: {
type: 'keyword',
},
pod: {
type: 'keyword',
},
tiebreaker: {
type: 'keyword',
},
timestamp: {
type: 'keyword',
},
},
},
logColumns: {
type: 'nested',
properties: {
timestampColumn: {
properties: {
id: {
type: 'keyword',
},
},
},
messageColumn: {
properties: {
id: {
type: 'keyword',
},
},
},
fieldColumn: {
properties: {
id: {
type: 'keyword',
},
field: {
type: 'keyword',
},
},
},
},
},
},
dynamic: false,
properties: {},
},
migrations: {
'7.9.0': addNewIndexingStrategyIndexNames,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -308,10 +308,11 @@ export const AddExceptionModal = memo(function AddExceptionModal({
const alertIdToClose = shouldCloseAlert && alertData ? alertData.ecsData._id : undefined;
const bulkCloseIndex =
shouldBulkCloseAlert && signalIndexName !== null ? [signalIndexName] : undefined;
addOrUpdateExceptionItems(enrichExceptionItems(), alertIdToClose, bulkCloseIndex);
addOrUpdateExceptionItems(ruleId, enrichExceptionItems(), alertIdToClose, bulkCloseIndex);
}
}, [
addOrUpdateExceptionItems,
ruleId,
enrichExceptionItems,
shouldCloseAlert,
shouldBulkCloseAlert,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,16 +63,15 @@ export const ENDPOINT_QUARANTINE_TEXT = i18n.translate(
export const BULK_CLOSE_LABEL = i18n.translate(
'xpack.securitySolution.exceptions.addException.bulkCloseLabel',
{
defaultMessage:
'Close all alerts that match this exception, including alerts generated by other rules',
defaultMessage: 'Close all alerts that match this exception and were generated by this rule',
}
);

export const BULK_CLOSE_LABEL_DISABLED = i18n.translate(
'xpack.securitySolution.exceptions.addException.bulkCloseLabel.disabled',
{
defaultMessage:
'Close all alerts that match attributes in this exception (Lists and non-ECS fields are not supported)',
'Close all alerts that match this exception and were generated by this rule (Lists and non-ECS fields are not supported)',
}
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -240,9 +240,15 @@ export const EditExceptionModal = memo(function EditExceptionModal({
if (addOrUpdateExceptionItems !== null) {
const bulkCloseIndex =
shouldBulkCloseAlert && signalIndexName !== null ? [signalIndexName] : undefined;
addOrUpdateExceptionItems(enrichExceptionItems(), undefined, bulkCloseIndex);
addOrUpdateExceptionItems(ruleId, enrichExceptionItems(), undefined, bulkCloseIndex);
}
}, [addOrUpdateExceptionItems, enrichExceptionItems, shouldBulkCloseAlert, signalIndexName]);
}, [
addOrUpdateExceptionItems,
ruleId,
enrichExceptionItems,
shouldBulkCloseAlert,
signalIndexName,
]);

return (
<EuiOverlayMask onClick={onCancel}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,15 @@ export const EDIT_EXCEPTION_SUCCESS = i18n.translate(
export const BULK_CLOSE_LABEL = i18n.translate(
'xpack.securitySolution.exceptions.editException.bulkCloseLabel',
{
defaultMessage:
'Close all alerts that match this exception, including alerts generated by other rules',
defaultMessage: 'Close all alerts that match this exception and were generated by this rule',
}
);

export const BULK_CLOSE_LABEL_DISABLED = i18n.translate(
'xpack.securitySolution.exceptions.editException.bulkCloseLabel.disabled',
{
defaultMessage:
'Close all alerts that match attributes in this exception (Lists and non-ECS fields are not supported)',
'Close all alerts that match this exception and were generated by this rule (Lists and non-ECS fields are not supported)',
}
);

Expand Down
Loading

0 comments on commit c0abb98

Please sign in to comment.