Skip to content

Commit

Permalink
Merge branch 'master' into feat/remove-disableable-plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
kibanamachine authored Oct 16, 2021
2 parents e857477 + 16320cc commit 1cc6a0b
Show file tree
Hide file tree
Showing 31 changed files with 1,419 additions and 69 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ COPY --chown=1000:0 config/kibana.yml /usr/share/kibana/config/kibana.yml

# Add the launcher/wrapper script. It knows how to interpret environment
# variables and translate them to Kibana CLI options.
COPY --chown=1000:0 bin/kibana-docker /usr/local/bin/
COPY bin/kibana-docker /usr/local/bin/

# Ensure gid 0 write permissions for OpenShift.
RUN chmod g+ws /usr/share/kibana && \
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/security_solution/cypress/screens/alerts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export const TAKE_ACTION_POPOVER_BTN = '[data-test-subj="selectedShowBulkActions

export const TIMELINE_CONTEXT_MENU_BTN = '[data-test-subj="timeline-context-menu-button"]';

export const ATTACH_ALERT_TO_CASE_BUTTON = '[data-test-subj="attach-alert-to-case-button"]';
export const ATTACH_ALERT_TO_CASE_BUTTON = '[data-test-subj="add-existing-case-menu-item"]';

export const ALERT_COUNT_TABLE_FIRST_ROW_COUNT =
'[data-test-subj="alertsCountTable"] tr:nth-child(1) td:nth-child(2) .euiTableCellContent__text';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ export const alertsStackByOptions: AlertsStackByOption[] = [
{ text: 'signal.rule.name', value: 'signal.rule.name' },
{ text: 'source.ip', value: 'source.ip' },
{ text: 'user.name', value: 'user.name' },
{ text: 'process.name', value: 'process.name' },
{ text: 'file.name', value: 'file.name' },
{ text: 'hash.sha256', value: 'hash.sha256' },
];

export const DEFAULT_STACK_BY_FIELD = 'signal.rule.name';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,7 @@ export type AlertsStackByField =
| 'signal.rule.type'
| 'signal.rule.name'
| 'source.ip'
| 'user.name';
| 'user.name'
| 'process.name'
| 'file.name'
| 'hash.sha256';
Original file line number Diff line number Diff line change
Expand Up @@ -300,10 +300,8 @@ const RuleDetailsPageComponent: React.FC<DetectionEngineComponentProps> = ({
}, [rule, spacesApi]);

const getLegacyUrlConflictCallout = useMemo(() => {
const outcome = rule?.outcome;
if (rule != null && spacesApi && outcome === 'conflict') {
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
const aliasTargetId = rule?.alias_target_id!; // This is always defined if outcome === 'conflict'
if (rule?.alias_target_id != null && spacesApi && rule.outcome === 'conflict') {
const aliasTargetId = rule.alias_target_id;
// We have resolved to one rule, but there is another one with a legacy URL associated with this page. Display a
// callout with a warning for the user, and provide a way for them to navigate to the other rule.
const otherRulePath = `rules/id/${aliasTargetId}${window.location.search}${window.location.hash}`;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ export const {
setSelected,
setTGridSelectAll,
toggleDetailPanel,
updateColumnOrder,
updateColumns,
updateColumnWidth,
updateIsLoading,
updateItemsPerPage,
updateItemsPerPageOptions,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ import {
removeColumn,
upsertColumn,
applyDeltaToColumnWidth,
updateColumnOrder,
updateColumns,
updateColumnWidth,
updateItemsPerPage,
updateSort,
} from './actions';
Expand Down Expand Up @@ -168,4 +170,35 @@ describe('epicLocalStorage', () => {
);
await waitFor(() => expect(addTimelineInStorageMock).toHaveBeenCalled());
});

it('persists updates to the column order to local storage', async () => {
shallow(
<TestProviders store={store}>
<QueryTabContentComponent {...props} />
</TestProviders>
);
store.dispatch(
updateColumnOrder({
columnIds: ['event.severity', '@timestamp', 'event.category'],
id: 'test',
})
);
await waitFor(() => expect(addTimelineInStorageMock).toHaveBeenCalled());
});

it('persists updates to the column width to local storage', async () => {
shallow(
<TestProviders store={store}>
<QueryTabContentComponent {...props} />
</TestProviders>
);
store.dispatch(
updateColumnWidth({
columnId: 'event.severity',
id: 'test',
width: 123,
})
);
await waitFor(() => expect(addTimelineInStorageMock).toHaveBeenCalled());
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ import {
applyDeltaToColumnWidth,
setExcludedRowRendererIds,
updateColumns,
updateColumnOrder,
updateColumnWidth,
updateItemsPerPage,
updateSort,
} from './actions';
Expand All @@ -30,6 +32,8 @@ const timelineActionTypes = [
upsertColumn.type,
applyDeltaToColumnWidth.type,
updateColumns.type,
updateColumnOrder.type,
updateColumnWidth.type,
updateItemsPerPage.type,
updateSort.type,
setExcludedRowRendererIds.type,
Expand Down
Loading

0 comments on commit 1cc6a0b

Please sign in to comment.