@cccsaurora/howler-ui 2.19.0-cases.1064 → 2.19.0-cases.1095
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api/v2/search/index.d.ts +2 -1
- package/api/v2/search/index.js +2 -2
- package/components/app/providers/ParameterProvider.d.ts +1 -1
- package/components/app/providers/ParameterProvider.test.js +25 -25
- package/components/app/providers/RecordProvider.d.ts +6 -6
- package/components/app/providers/RecordProvider.js +5 -1
- package/components/app/providers/RecordSearchProvider.d.ts +2 -2
- package/components/elements/ObjectDetails.d.ts +2 -2
- package/components/elements/PluginTypography.d.ts +2 -2
- package/components/elements/event/EventCard.d.ts +6 -0
- package/components/elements/{observable/ObservableCard.js → event/EventCard.js} +7 -7
- package/components/elements/{observable/ObservablePreview.d.ts → event/EventPreview.d.ts} +2 -2
- package/components/elements/event/EventPreview.js +12 -0
- package/components/elements/hit/HitCard.d.ts +2 -0
- package/components/elements/hit/HitCard.js +2 -2
- package/components/elements/hit/HitSummary.d.ts +2 -2
- package/components/elements/hit/related/RelatedRecords.js +4 -4
- package/components/elements/record/RecordComments.d.ts +2 -2
- package/components/elements/record/RecordRelated.d.ts +2 -2
- package/components/elements/record/RecordRelated.js +4 -4
- package/components/elements/record/RecordWorklog.d.ts +2 -2
- package/components/hooks/useRelatedRecords.d.ts +3 -3
- package/components/hooks/useRelatedRecords.js +2 -2
- package/components/routes/cases/detail/CaseAssets.d.ts +2 -2
- package/components/routes/cases/detail/CaseAssets.js +2 -2
- package/components/routes/cases/detail/CaseAssets.test.js +4 -4
- package/components/routes/cases/detail/CaseDashboard.js +2 -2
- package/components/routes/cases/detail/CaseRules.test.js +2 -2
- package/components/routes/cases/detail/CaseSidebar.js +3 -3
- package/components/routes/cases/detail/CaseTimeline.js +5 -5
- package/components/routes/cases/detail/CaseTimeline.test.js +7 -7
- package/components/routes/cases/detail/CreateRuleDialog.js +4 -4
- package/components/routes/cases/detail/CreateRuleDialog.test.js +5 -5
- package/components/routes/cases/detail/ItemPage.js +1 -1
- package/components/routes/cases/detail/aggregates/CaseAggregate.d.ts +2 -2
- package/components/routes/cases/detail/assets/Asset.d.ts +1 -1
- package/components/routes/cases/detail/assets/Asset.test.js +2 -2
- package/components/routes/cases/detail/sidebar/CaseFolderContextMenu.d.ts +1 -1
- package/components/routes/cases/detail/sidebar/CaseFolderContextMenu.js +3 -3
- package/components/routes/cases/detail/sidebar/CaseFolderContextMenu.test.js +8 -8
- package/components/routes/cases/detail/sidebar/FolderEntry.js +1 -1
- package/components/routes/cases/modals/AddToCaseModal.d.ts +2 -2
- package/components/routes/cases/modals/AddToCaseModal.test.js +11 -11
- package/components/routes/cases/modals/CaseRecordRow.js +1 -1
- package/components/routes/cases/modals/CreateCaseModal.d.ts +2 -2
- package/components/routes/cases/modals/CreateCaseModal.test.js +14 -14
- package/components/routes/cases/modals/hooks.d.ts +3 -3
- package/components/routes/cases/modals/hooks.js +1 -1
- package/components/routes/cases/modals/types.d.ts +4 -1
- package/components/routes/events/EventViewer.d.ts +7 -0
- package/components/routes/events/EventViewer.js +27 -0
- package/components/routes/hits/search/SearchPane.js +3 -3
- package/components/routes/hits/search/grid/EnhancedCell.d.ts +2 -2
- package/components/routes/hits/search/grid/RecordRow.d.ts +3 -3
- package/components/routes/hits/search/grid/RecordRow.js +2 -2
- package/components/routes/hits/search/shared/IndexPicker.js +1 -1
- package/components/routes/home/ViewCard.js +4 -4
- package/components/routes/views/ViewComposer.js +2 -2
- package/locales/en/translation.json +4 -4
- package/locales/fr/translation.json +4 -4
- package/models/entities/generated/ECSEvent.d.ts +31 -0
- package/models/entities/generated/Event.d.ts +80 -26
- package/models/entities/generated/{ObservableCloud.d.ts → EventCloud.d.ts} +1 -1
- package/models/entities/generated/{ObservableDestination.d.ts → EventDestination.d.ts} +1 -1
- package/models/entities/generated/{ObservableEmail.d.ts → EventEmail.d.ts} +1 -1
- package/models/entities/generated/{ObservableFile.d.ts → EventFile.d.ts} +1 -1
- package/models/entities/generated/{ObservableHowler.d.ts → EventHowler.d.ts} +1 -1
- package/models/entities/generated/{ObservableHttp.d.ts → EventHttp.d.ts} +1 -1
- package/models/entities/generated/{ObservableObserver.d.ts → EventObserver.d.ts} +1 -1
- package/models/entities/generated/{ObservableOrganization.d.ts → EventOrganization.d.ts} +1 -1
- package/models/entities/generated/{ObservableProcess.d.ts → EventProcess.d.ts} +1 -1
- package/models/entities/generated/{ObservableSource.d.ts → EventSource.d.ts} +1 -1
- package/models/entities/generated/{ObservableThreat.d.ts → EventThreat.d.ts} +1 -1
- package/models/entities/generated/{ObservableTls.d.ts → EventTls.d.ts} +1 -1
- package/models/entities/generated/Hit.d.ts +2 -2
- package/models/entities/generated/Rule.d.ts +1 -1
- package/package.json +3 -3
- package/plugins/clue/utils.d.ts +2 -2
- package/tests/server-handlers.js +1 -1
- package/tests/utils.d.ts +2 -2
- package/tests/utils.js +3 -3
- package/utils/hitFunctions.d.ts +2 -2
- package/utils/typeUtils.d.ts +2 -2
- package/utils/typeUtils.js +2 -2
- package/components/elements/observable/ObservableCard.d.ts +0 -6
- package/components/elements/observable/ObservablePreview.js +0 -12
- package/components/routes/observables/ObservableViewer.d.ts +0 -7
- package/components/routes/observables/ObservableViewer.js +0 -27
- package/models/entities/generated/Observable.d.ts +0 -85
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Box, Skeleton } from '@mui/material';
|
|
3
|
+
import api from '@cccsaurora/howler-ui/api';
|
|
4
|
+
import ObjectDetails from '@cccsaurora/howler-ui/components/elements/ObjectDetails';
|
|
5
|
+
import useMyApi from '@cccsaurora/howler-ui/components/hooks/useMyApi';
|
|
6
|
+
import { useEffect, useState } from 'react';
|
|
7
|
+
const EventViewer = ({ event: provided, eventId }) => {
|
|
8
|
+
const { dispatchApi } = useMyApi();
|
|
9
|
+
const [event, setEvent] = useState(null);
|
|
10
|
+
useEffect(() => {
|
|
11
|
+
if (provided) {
|
|
12
|
+
setEvent(provided);
|
|
13
|
+
}
|
|
14
|
+
}, [provided]);
|
|
15
|
+
useEffect(() => {
|
|
16
|
+
if (eventId) {
|
|
17
|
+
dispatchApi(api.v2.search.post('event', { query: `howler.id:${eventId}`, rows: 1 }), {
|
|
18
|
+
throwError: false
|
|
19
|
+
}).then(res => setEvent(res.items[0]));
|
|
20
|
+
}
|
|
21
|
+
}, [dispatchApi, eventId]);
|
|
22
|
+
if (!event) {
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
return _jsx(Box, { p: 1, children: event ? _jsx(ObjectDetails, { obj: event }) : _jsx(Skeleton, { height: 120 }) });
|
|
26
|
+
};
|
|
27
|
+
export default EventViewer;
|
|
@@ -14,9 +14,9 @@ import VSBoxContent from '@cccsaurora/howler-ui/components/elements/addons/layou
|
|
|
14
14
|
import VSBoxHeader from '@cccsaurora/howler-ui/components/elements/addons/layout/vsbox/VSBoxHeader';
|
|
15
15
|
import SearchPagination from '@cccsaurora/howler-ui/components/elements/addons/search/SearchPagination';
|
|
16
16
|
import SearchTotal from '@cccsaurora/howler-ui/components/elements/addons/search/SearchTotal';
|
|
17
|
+
import EventCard from '@cccsaurora/howler-ui/components/elements/event/EventCard';
|
|
17
18
|
import HitCard from '@cccsaurora/howler-ui/components/elements/hit/HitCard';
|
|
18
19
|
import { HitLayout } from '@cccsaurora/howler-ui/components/elements/hit/HitLayout';
|
|
19
|
-
import ObservableCard from '@cccsaurora/howler-ui/components/elements/observable/ObservableCard';
|
|
20
20
|
import RecordContextMenu from '@cccsaurora/howler-ui/components/elements/record/RecordContextMenu';
|
|
21
21
|
import { useMyLocalStorageItem } from '@cccsaurora/howler-ui/components/hooks/useMyLocalStorage';
|
|
22
22
|
import useRecordSelection from '@cccsaurora/howler-ui/components/hooks/useRecordSelection';
|
|
@@ -26,7 +26,7 @@ import { useTranslation } from 'react-i18next';
|
|
|
26
26
|
import { Link } from 'react-router-dom';
|
|
27
27
|
import { useContextSelector } from 'use-context-selector';
|
|
28
28
|
import { StorageKey } from '@cccsaurora/howler-ui/utils/constants';
|
|
29
|
-
import {
|
|
29
|
+
import { isEvent, isHit } from '@cccsaurora/howler-ui/utils/typeUtils';
|
|
30
30
|
import LayoutSettings from './LayoutSettings';
|
|
31
31
|
import QuerySettings from './QuerySettings';
|
|
32
32
|
import RecordQuery from './RecordQuery';
|
|
@@ -73,7 +73,7 @@ const Item = memo(({ record, onClick }) => {
|
|
|
73
73
|
boxShadow: `0px 0px 5px 2px ${theme.palette.primary.main}`
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
|
-
], children: [isHit(record) && _jsx(HitCard, { id: record.howler.id, layout: layout }),
|
|
76
|
+
], children: [isHit(record) && _jsx(HitCard, { id: record.howler.id, layout: layout }), isEvent(record) && _jsx(EventCard, { id: record.howler.id, event: record })] }));
|
|
77
77
|
});
|
|
78
78
|
const SearchPane = () => {
|
|
79
79
|
const { t } = useTranslation();
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { type SxProps } from '@mui/material';
|
|
2
|
+
import type { Event } from '@cccsaurora/howler-ui/models/entities/generated/Event';
|
|
2
3
|
import type { Hit } from '@cccsaurora/howler-ui/models/entities/generated/Hit';
|
|
3
|
-
import type { Observable } from '@cccsaurora/howler-ui/models/entities/generated/Observable';
|
|
4
4
|
declare const _default: import("react").NamedExoticComponent<{
|
|
5
|
-
record: Hit |
|
|
5
|
+
record: Hit | Event;
|
|
6
6
|
value: string;
|
|
7
7
|
sx?: SxProps;
|
|
8
8
|
className: string;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
+
import type { Event } from '@cccsaurora/howler-ui/models/entities/generated/Event';
|
|
1
2
|
import type { Hit } from '@cccsaurora/howler-ui/models/entities/generated/Hit';
|
|
2
|
-
import type { Observable } from '@cccsaurora/howler-ui/models/entities/generated/Observable';
|
|
3
3
|
declare const _default: import("react").NamedExoticComponent<{
|
|
4
|
-
record: Hit |
|
|
4
|
+
record: Hit | Event;
|
|
5
5
|
analyticIds: Record<string, string>;
|
|
6
6
|
columns: string[];
|
|
7
7
|
columnWidths: Record<string, string>;
|
|
8
8
|
collapseMainColumn: boolean;
|
|
9
|
-
onClick: (e: React.MouseEvent<HTMLDivElement>, record: Hit |
|
|
9
|
+
onClick: (e: React.MouseEvent<HTMLDivElement>, record: Hit | Event) => void;
|
|
10
10
|
}>;
|
|
11
11
|
export default _default;
|
|
@@ -3,11 +3,11 @@ import { KeyboardArrowUp } from '@mui/icons-material';
|
|
|
3
3
|
import { Box, Collapse, IconButton, lighten, Stack, TableCell, TableRow, Typography, useTheme } from '@mui/material';
|
|
4
4
|
import { ParameterContext } from '@cccsaurora/howler-ui/components/app/providers/ParameterProvider';
|
|
5
5
|
import { RecordContext } from '@cccsaurora/howler-ui/components/app/providers/RecordProvider';
|
|
6
|
+
import EventCard from '@cccsaurora/howler-ui/components/elements/event/EventCard';
|
|
6
7
|
import Assigned from '@cccsaurora/howler-ui/components/elements/hit/elements/Assigned';
|
|
7
8
|
import EscalationChip from '@cccsaurora/howler-ui/components/elements/hit/elements/EscalationChip';
|
|
8
9
|
import HitCard from '@cccsaurora/howler-ui/components/elements/hit/HitCard';
|
|
9
10
|
import { HitLayout } from '@cccsaurora/howler-ui/components/elements/hit/HitLayout';
|
|
10
|
-
import ObservableCard from '@cccsaurora/howler-ui/components/elements/observable/ObservableCard';
|
|
11
11
|
import { get } from 'lodash-es';
|
|
12
12
|
import { memo, useState } from 'react';
|
|
13
13
|
import { useTranslation } from 'react-i18next';
|
|
@@ -47,6 +47,6 @@ const RecordRow = ({ record, analyticIds, columns, columnWidths, collapseMainCol
|
|
|
47
47
|
e.preventDefault();
|
|
48
48
|
e.stopPropagation();
|
|
49
49
|
setExpandRow(_expanded => !_expanded);
|
|
50
|
-
}, children: _jsx(KeyboardArrowUp, {}) }), _jsx(Collapse, { in: !collapseMainColumn, orientation: "horizontal", unmountOnExit: true, children: _jsxs(Stack, { direction: "row", spacing: 1, flexWrap: "nowrap", children: [isHit(record) && _jsx(EscalationChip, { hit: record, layout: HitLayout.DENSE, hideLabel: true }), _jsxs(Typography, { sx: { textWrap: 'nowrap', whiteSpace: 'nowrap', fontSize: 'inherit' }, children: [analyticIds[record.howler.analytic] ? (_jsx(Link, { to: `/analytics/${analyticIds[record.howler.analytic]}`, onClick: e => e.stopPropagation(), children: record.howler.analytic })) : (record.howler.analytic), record.howler.detection && ': ', record.howler.detection] }), isHit(record) && record.howler.assignment !== 'unassigned' && (_jsx(Assigned, { hit: record, layout: HitLayout.DENSE, hideLabel: true }))] }) })] }) }), columns.map(col => (_jsx(EnhancedCell, { record: record, className: `col-${col.replaceAll('.', '-')}`, value: get(record, col) ?? t('none'), sx: columnWidths[col] ? { width: columnWidths[col] } : { width: '220px', maxWidth: '300px' }, field: col }, col)))] }, record.howler.id), _jsx(TableRow, { onClick: ev => onClick(ev, record), children: _jsx(TableCell, { colSpan: columns.length + 2, style: { paddingBottom: 0, paddingTop: 0 }, children: _jsx(Collapse, { in: expandRow, unmountOnExit: true, children: _jsx(Box, { width: "100%", maxWidth: "1200px", margin: 1, children: isHit(record) ? (_jsx(HitCard, { id: record.howler.id, layout: HitLayout.NORMAL })) : (_jsx(
|
|
50
|
+
}, children: _jsx(KeyboardArrowUp, {}) }), _jsx(Collapse, { in: !collapseMainColumn, orientation: "horizontal", unmountOnExit: true, children: _jsxs(Stack, { direction: "row", spacing: 1, flexWrap: "nowrap", children: [isHit(record) && _jsx(EscalationChip, { hit: record, layout: HitLayout.DENSE, hideLabel: true }), _jsxs(Typography, { sx: { textWrap: 'nowrap', whiteSpace: 'nowrap', fontSize: 'inherit' }, children: [analyticIds[record.howler.analytic] ? (_jsx(Link, { to: `/analytics/${analyticIds[record.howler.analytic]}`, onClick: e => e.stopPropagation(), children: record.howler.analytic })) : (record.howler.analytic), record.howler.detection && ': ', record.howler.detection] }), isHit(record) && record.howler.assignment !== 'unassigned' && (_jsx(Assigned, { hit: record, layout: HitLayout.DENSE, hideLabel: true }))] }) })] }) }), columns.map(col => (_jsx(EnhancedCell, { record: record, className: `col-${col.replaceAll('.', '-')}`, value: get(record, col) ?? t('none'), sx: columnWidths[col] ? { width: columnWidths[col] } : { width: '220px', maxWidth: '300px' }, field: col }, col)))] }, record.howler.id), _jsx(TableRow, { onClick: ev => onClick(ev, record), children: _jsx(TableCell, { colSpan: columns.length + 2, style: { paddingBottom: 0, paddingTop: 0 }, children: _jsx(Collapse, { in: expandRow, unmountOnExit: true, children: _jsx(Box, { width: "100%", maxWidth: "1200px", margin: 1, children: isHit(record) ? (_jsx(HitCard, { id: record.howler.id, layout: HitLayout.NORMAL })) : (_jsx(EventCard, { id: record.howler.id, event: record })) }) }) }) })] }));
|
|
51
51
|
};
|
|
52
52
|
export default memo(RecordRow);
|
|
@@ -8,7 +8,7 @@ import { useTranslation } from 'react-i18next';
|
|
|
8
8
|
import { useContextSelector } from 'use-context-selector';
|
|
9
9
|
const FILTER_OPTIONS = [
|
|
10
10
|
{ label: 'hit.search.index.hit', value: 'hit' },
|
|
11
|
-
{ label: 'hit.search.index.
|
|
11
|
+
{ label: 'hit.search.index.event', value: 'event' }
|
|
12
12
|
];
|
|
13
13
|
const IndexPicker = () => {
|
|
14
14
|
const { t } = useTranslation();
|
|
@@ -5,16 +5,16 @@ import api from '@cccsaurora/howler-ui/api';
|
|
|
5
5
|
import AppListEmpty from '@cccsaurora/howler-ui/commons/components/display/AppListEmpty';
|
|
6
6
|
import { useRecordContextSelector } from '@cccsaurora/howler-ui/components/app/providers/RecordProvider';
|
|
7
7
|
import { ViewContext } from '@cccsaurora/howler-ui/components/app/providers/ViewProvider';
|
|
8
|
+
import EventCard from '@cccsaurora/howler-ui/components/elements/event/EventCard';
|
|
8
9
|
import HitBanner from '@cccsaurora/howler-ui/components/elements/hit/HitBanner';
|
|
9
10
|
import { HitLayout } from '@cccsaurora/howler-ui/components/elements/hit/HitLayout';
|
|
10
|
-
import ObservableCard from '@cccsaurora/howler-ui/components/elements/observable/ObservableCard';
|
|
11
11
|
import RecordContextMenu from '@cccsaurora/howler-ui/components/elements/record/RecordContextMenu';
|
|
12
12
|
import useMyApi from '@cccsaurora/howler-ui/components/hooks/useMyApi';
|
|
13
13
|
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
14
14
|
import { useTranslation } from 'react-i18next';
|
|
15
15
|
import { Link, useNavigate } from 'react-router-dom';
|
|
16
16
|
import { useContextSelector } from 'use-context-selector';
|
|
17
|
-
import {
|
|
17
|
+
import { isEvent } from '@cccsaurora/howler-ui/utils/typeUtils';
|
|
18
18
|
import { buildViewUrl } from '@cccsaurora/howler-ui/utils/viewUtils';
|
|
19
19
|
// Custom hook to select records by IDs with proper memoization
|
|
20
20
|
const useSelectRecordsByIds = (recordIds) => {
|
|
@@ -49,7 +49,7 @@ const createRecordSignature = (record) => {
|
|
|
49
49
|
if (!record) {
|
|
50
50
|
return '';
|
|
51
51
|
}
|
|
52
|
-
if (
|
|
52
|
+
if (isEvent(record)) {
|
|
53
53
|
return record.howler?.id;
|
|
54
54
|
}
|
|
55
55
|
return `${record.howler?.id}:${normalize(record.howler?.status)}:${normalize(record.howler?.assignment)}:${normalize(record.howler?.assessment)}`;
|
|
@@ -157,6 +157,6 @@ const ViewCard = ({ viewId, limit, refreshTick, onRefreshComplete }) => {
|
|
|
157
157
|
}
|
|
158
158
|
return selectedElement.id;
|
|
159
159
|
}, []);
|
|
160
|
-
return (_jsx(Card, { variant: "outlined", sx: { height: '100%' }, children: _jsxs(Stack, { spacing: 1, sx: { p: 1, minHeight: 100 }, children: [_jsxs(Stack, { direction: "row", spacing: 1, alignItems: "center", children: [_jsx(Typography, { variant: "h6", children: t(view?.title) || _jsx(Skeleton, { variant: "text", height: "2em", width: "100px" }) }), _jsx(IconButton, { size: "small", component: Link, disabled: !view, to: view ? buildViewUrl(view) : '', onClick: () => onClick(view.query), children: _jsx(OpenInNew, { fontSize: "small" }) })] }), loading ? (_jsxs(_Fragment, { children: [_jsx(Skeleton, { height: 150, width: "100%", variant: "rounded" }), _jsx(Skeleton, { height: 160, width: "100%", variant: "rounded" }), _jsx(Skeleton, { height: 140, width: "100%", variant: "rounded" })] })) : records.length > 0 ? (_jsx(RecordContextMenu, { getSelectedId: getSelectedId, children: records.map((r) => (_jsx(Card, { id: r.howler.id, variant: "outlined", sx: { cursor: 'pointer' }, onClick: () => navigate(`/hits/${r.howler.id}`), children: _jsx(CardContent, { children: r.__index == 'hit' ? (_jsx(HitBanner, { layout: HitLayout.DENSE, hit: r })) : (_jsx(
|
|
160
|
+
return (_jsx(Card, { variant: "outlined", sx: { height: '100%' }, children: _jsxs(Stack, { spacing: 1, sx: { p: 1, minHeight: 100 }, children: [_jsxs(Stack, { direction: "row", spacing: 1, alignItems: "center", children: [_jsx(Typography, { variant: "h6", children: t(view?.title) || _jsx(Skeleton, { variant: "text", height: "2em", width: "100px" }) }), _jsx(IconButton, { size: "small", component: Link, disabled: !view, to: view ? buildViewUrl(view) : '', onClick: () => onClick(view.query), children: _jsx(OpenInNew, { fontSize: "small" }) })] }), loading ? (_jsxs(_Fragment, { children: [_jsx(Skeleton, { height: 150, width: "100%", variant: "rounded" }), _jsx(Skeleton, { height: 160, width: "100%", variant: "rounded" }), _jsx(Skeleton, { height: 140, width: "100%", variant: "rounded" })] })) : records.length > 0 ? (_jsx(RecordContextMenu, { getSelectedId: getSelectedId, children: records.map((r) => (_jsx(Card, { id: r.howler.id, variant: "outlined", sx: { cursor: 'pointer' }, onClick: () => navigate(`/hits/${r.howler.id}`), children: _jsx(CardContent, { children: r.__index == 'hit' ? (_jsx(HitBanner, { layout: HitLayout.DENSE, hit: r })) : (_jsx(EventCard, { event: r })) }) }, r.howler.id))) })) : (_jsx(AppListEmpty, {}))] }) }));
|
|
161
161
|
};
|
|
162
162
|
export default ViewCard;
|
|
@@ -16,9 +16,9 @@ import VSBox from '@cccsaurora/howler-ui/components/elements/addons/layout/vsbox
|
|
|
16
16
|
import VSBoxContent from '@cccsaurora/howler-ui/components/elements/addons/layout/vsbox/VSBoxContent';
|
|
17
17
|
import VSBoxHeader from '@cccsaurora/howler-ui/components/elements/addons/layout/vsbox/VSBoxHeader';
|
|
18
18
|
import SearchTotal from '@cccsaurora/howler-ui/components/elements/addons/search/SearchTotal';
|
|
19
|
+
import EventCard from '@cccsaurora/howler-ui/components/elements/event/EventCard';
|
|
19
20
|
import HitCard from '@cccsaurora/howler-ui/components/elements/hit/HitCard';
|
|
20
21
|
import { HitLayout } from '@cccsaurora/howler-ui/components/elements/hit/HitLayout';
|
|
21
|
-
import ObservableCard from '@cccsaurora/howler-ui/components/elements/observable/ObservableCard';
|
|
22
22
|
import useMyApi from '@cccsaurora/howler-ui/components/hooks/useMyApi';
|
|
23
23
|
import { useMyLocalStorageItem } from '@cccsaurora/howler-ui/components/hooks/useMyLocalStorage';
|
|
24
24
|
import useMySnackbar from '@cccsaurora/howler-ui/components/hooks/useMySnackbar';
|
|
@@ -199,6 +199,6 @@ const ViewComposer = () => {
|
|
|
199
199
|
fontSize: '0.9em',
|
|
200
200
|
fontStyle: 'italic',
|
|
201
201
|
mb: 0.5
|
|
202
|
-
}), variant: "body2", children: t('hit.search.prompt') }), _jsx(RecordQuery, { triggerSearch: search, searching: searching, onChange: (_query, isDirty) => setIsSearchDirty(isDirty) }), _jsxs(Stack, { direction: "row", spacing: 1, children: [_jsx(IndexPicker, {}), _jsx(HitSort, {}), _jsx(SearchSpan, { omitCustom: true }), _jsx("div", { style: { flex: 1 } }), _jsxs(Stack, { spacing: 1, direction: "row", alignItems: "center", sx: { flex: '0 !important', minWidth: '300px' }, children: [_jsx(Typography, { component: "span", children: t('view.settings.advance_on_triage') }), _jsx(Tooltip, { title: t('view.settings.advance_on_triage.description'), children: _jsx(HelpOutline, { sx: { fontSize: '16px' } }) }), _jsx(Checkbox, { size: "small", checked: advanceOnTriage, onChange: (_event, checked) => setAdvanceOnTriage(checked) })] })] }), response?.total ? (_jsx(SearchTotal, { total: response.total, pageLength: response.items.length, offset: response.offset, sx: theme => ({ color: theme.palette.text.secondary, fontSize: '0.9em', fontStyle: 'italic' }) })) : null, _jsx(LinearProgress, { sx: [!searching && { opacity: 0 }] })] }) }), _jsx(VSBoxContent, { children: _jsxs(Stack, { spacing: 1, children: [!response?.total && _jsx(AppListEmpty, {}), response?.items.map(record => record.__index === 'hit' ? (_jsx(HitCard, { id: record.howler.id, layout: HitLayout.DENSE }, record.howler.id)) : (_jsx(
|
|
202
|
+
}), variant: "body2", children: t('hit.search.prompt') }), _jsx(RecordQuery, { triggerSearch: search, searching: searching, onChange: (_query, isDirty) => setIsSearchDirty(isDirty) }), _jsxs(Stack, { direction: "row", spacing: 1, children: [_jsx(IndexPicker, {}), _jsx(HitSort, {}), _jsx(SearchSpan, { omitCustom: true }), _jsx("div", { style: { flex: 1 } }), _jsxs(Stack, { spacing: 1, direction: "row", alignItems: "center", sx: { flex: '0 !important', minWidth: '300px' }, children: [_jsx(Typography, { component: "span", children: t('view.settings.advance_on_triage') }), _jsx(Tooltip, { title: t('view.settings.advance_on_triage.description'), children: _jsx(HelpOutline, { sx: { fontSize: '16px' } }) }), _jsx(Checkbox, { size: "small", checked: advanceOnTriage, onChange: (_event, checked) => setAdvanceOnTriage(checked) })] })] }), response?.total ? (_jsx(SearchTotal, { total: response.total, pageLength: response.items.length, offset: response.offset, sx: theme => ({ color: theme.palette.text.secondary, fontSize: '0.9em', fontStyle: 'italic' }) })) : null, _jsx(LinearProgress, { sx: [!searching && { opacity: 0 }] })] }) }), _jsx(VSBoxContent, { children: _jsxs(Stack, { spacing: 1, children: [!response?.total && _jsx(AppListEmpty, {}), response?.items.map(record => record.__index === 'hit' ? (_jsx(HitCard, { id: record.howler.id, layout: HitLayout.DENSE }, record.howler.id)) : (_jsx(EventCard, { event: record }, record.howler.id)))] }) })] }) }) }) }));
|
|
203
203
|
};
|
|
204
204
|
export default ViewComposer;
|
|
@@ -188,7 +188,7 @@
|
|
|
188
188
|
"hit.header.threat": "Threat",
|
|
189
189
|
"hit.header.view.case": "View case {{id}}",
|
|
190
190
|
"hit.header.view.hit": "View hit {{id}}",
|
|
191
|
-
"hit.header.view.
|
|
191
|
+
"hit.header.view.event": "View event {{id}}",
|
|
192
192
|
"hit.header.votes": "Votes: ",
|
|
193
193
|
"hit.howler.related": "{{count}} related records",
|
|
194
194
|
"hit.label": "Labels",
|
|
@@ -233,7 +233,7 @@
|
|
|
233
233
|
"hit.related.tab.case": "Cases",
|
|
234
234
|
"hit.related.tab.hit": "Hits",
|
|
235
235
|
"hit.related.tab.links": "Links",
|
|
236
|
-
"hit.related.tab.
|
|
236
|
+
"hit.related.tab.event": "Events",
|
|
237
237
|
"hit.search.aggregate.button": "Create Summary",
|
|
238
238
|
"hit.search.button": "Perform search",
|
|
239
239
|
"hit.search.custom": "Custom Sort",
|
|
@@ -244,7 +244,7 @@
|
|
|
244
244
|
"hit.search.filter.values": "Values",
|
|
245
245
|
"hit.search.index": "Indexes",
|
|
246
246
|
"hit.search.index.hit": "Hits",
|
|
247
|
-
"hit.search.index.
|
|
247
|
+
"hit.search.index.event": "Events",
|
|
248
248
|
"hit.search.invalid": "Invalid Query",
|
|
249
249
|
"hit.search.keyboard": "Keyboard shortcuts",
|
|
250
250
|
"hit.search.keyboard.no_shortcuts": "No shortcuts",
|
|
@@ -368,7 +368,7 @@
|
|
|
368
368
|
"no.data": "No Data",
|
|
369
369
|
"none": "None",
|
|
370
370
|
"normal": "Normal Priority",
|
|
371
|
-
"
|
|
371
|
+
"event.open": "Open Event",
|
|
372
372
|
"on": "on",
|
|
373
373
|
"open": "Open",
|
|
374
374
|
"operations.add_label": "Add Label",
|
|
@@ -188,7 +188,7 @@
|
|
|
188
188
|
"hit.header.threat": "Menace",
|
|
189
189
|
"hit.header.view.case": "Voir le cas {{id}}",
|
|
190
190
|
"hit.header.view.hit": "Voir l'alerte {{id}}",
|
|
191
|
-
"hit.header.view.
|
|
191
|
+
"hit.header.view.event": "Voir l'événement {{id}}",
|
|
192
192
|
"hit.header.votes": "Votes: ",
|
|
193
193
|
"hit.howler.related": "{{count}} enregistrements associés",
|
|
194
194
|
"hit.label": "Étiquettes",
|
|
@@ -233,7 +233,7 @@
|
|
|
233
233
|
"hit.related.tab.case": "Cas",
|
|
234
234
|
"hit.related.tab.hit": "Alertes",
|
|
235
235
|
"hit.related.tab.links": "Liens",
|
|
236
|
-
"hit.related.tab.
|
|
236
|
+
"hit.related.tab.event": "Événements",
|
|
237
237
|
"hit.search.aggregate.button": "Créer un sommaire",
|
|
238
238
|
"hit.search.button": "Effectuer une recherche",
|
|
239
239
|
"hit.search.custom": "Triage personnalisé",
|
|
@@ -244,7 +244,7 @@
|
|
|
244
244
|
"hit.search.filter.values": "Valeurs",
|
|
245
245
|
"hit.search.index": "Indexes",
|
|
246
246
|
"hit.search.index.hit": "Hits",
|
|
247
|
-
"hit.search.index.
|
|
247
|
+
"hit.search.index.event": "Événements",
|
|
248
248
|
"hit.search.invalid": "Requête invalide",
|
|
249
249
|
"hit.search.keyboard": "Raccourcis clavier",
|
|
250
250
|
"hit.search.keyboard.no_shortcuts": "Pas de raccourcis",
|
|
@@ -368,7 +368,7 @@
|
|
|
368
368
|
"no.data": "Aucune donnée",
|
|
369
369
|
"none": "Rien",
|
|
370
370
|
"normal": "Priorité normale",
|
|
371
|
-
"
|
|
371
|
+
"event.open": "Ouvrir événement",
|
|
372
372
|
"on": "sur",
|
|
373
373
|
"open": "Ouvert",
|
|
374
374
|
"operations.add_label": "Ajouter un label",
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* NOTE: This is an auto-generated file. Don't edit this manually.
|
|
3
|
+
*/
|
|
4
|
+
export interface ECSEvent {
|
|
5
|
+
action?: string;
|
|
6
|
+
category?: string[];
|
|
7
|
+
code?: string;
|
|
8
|
+
count?: number;
|
|
9
|
+
created?: string;
|
|
10
|
+
dataset?: string;
|
|
11
|
+
duration?: number;
|
|
12
|
+
end?: string;
|
|
13
|
+
hash?: string;
|
|
14
|
+
id?: string;
|
|
15
|
+
ingested?: string;
|
|
16
|
+
kind?: string;
|
|
17
|
+
module?: string;
|
|
18
|
+
original?: string;
|
|
19
|
+
outcome?: string;
|
|
20
|
+
provider?: string;
|
|
21
|
+
reason?: string;
|
|
22
|
+
reference?: string;
|
|
23
|
+
risk_score?: number;
|
|
24
|
+
risk_score_norm?: number;
|
|
25
|
+
sequence?: number;
|
|
26
|
+
severity?: number;
|
|
27
|
+
start?: string;
|
|
28
|
+
timezone?: string;
|
|
29
|
+
type?: string[];
|
|
30
|
+
url?: string;
|
|
31
|
+
}
|
|
@@ -1,31 +1,85 @@
|
|
|
1
|
+
import type { Agent } from './Agent';
|
|
2
|
+
import type { Assemblyline } from './Assemblyline';
|
|
3
|
+
import type { Aws } from './Aws';
|
|
4
|
+
import type { Azure } from './Azure';
|
|
5
|
+
import type { Cbs } from './Cbs';
|
|
6
|
+
import type { Clue } from './Clue';
|
|
7
|
+
import type { Container } from './Container';
|
|
8
|
+
import type { Dns } from './Dns';
|
|
9
|
+
import type { Ecs } from './Ecs';
|
|
10
|
+
import type { ECSEvent } from './ECSEvent';
|
|
11
|
+
import type { Error } from './Error';
|
|
12
|
+
import type { EventCloud } from './EventCloud';
|
|
13
|
+
import type { EventDestination } from './EventDestination';
|
|
14
|
+
import type { EventEmail } from './EventEmail';
|
|
15
|
+
import type { EventFile } from './EventFile';
|
|
16
|
+
import type { EventHowler } from './EventHowler';
|
|
17
|
+
import type { EventHttp } from './EventHttp';
|
|
18
|
+
import type { EventObserver } from './EventObserver';
|
|
19
|
+
import type { EventOrganization } from './EventOrganization';
|
|
20
|
+
import type { EventProcess } from './EventProcess';
|
|
21
|
+
import type { EventSource } from './EventSource';
|
|
22
|
+
import type { EventThreat } from './EventThreat';
|
|
23
|
+
import type { EventTls } from './EventTls';
|
|
24
|
+
import type { Faas } from './Faas';
|
|
25
|
+
import type { Gcp } from './Gcp';
|
|
26
|
+
import type { Group } from './Group';
|
|
27
|
+
import type { Host } from './Host';
|
|
28
|
+
import type { Interface } from './Interface';
|
|
29
|
+
import type { Network } from './Network';
|
|
30
|
+
import type { Registry } from './Registry';
|
|
31
|
+
import type { Related } from './Related';
|
|
32
|
+
import type { Rule } from './Rule';
|
|
33
|
+
import type { Server } from './Server';
|
|
34
|
+
import type { Url } from './Url';
|
|
35
|
+
import type { User } from './User';
|
|
36
|
+
import type { UserAgent } from './UserAgent';
|
|
37
|
+
import type { Vulnerability } from './Vulnerability';
|
|
38
|
+
|
|
1
39
|
/**
|
|
2
40
|
* NOTE: This is an auto-generated file. Don't edit this manually.
|
|
3
41
|
*/
|
|
4
42
|
export interface Event {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
43
|
+
__index: 'event';
|
|
44
|
+
agent?: Agent;
|
|
45
|
+
assemblyline?: Assemblyline;
|
|
46
|
+
aws?: Aws;
|
|
47
|
+
azure?: Azure;
|
|
48
|
+
cbs?: Cbs;
|
|
49
|
+
cloud?: EventCloud;
|
|
50
|
+
clue?: Clue;
|
|
51
|
+
container?: Container;
|
|
52
|
+
destination?: EventDestination;
|
|
53
|
+
dns?: Dns;
|
|
54
|
+
ecs?: Ecs;
|
|
55
|
+
email?: EventEmail;
|
|
56
|
+
error?: Error;
|
|
57
|
+
event?: ECSEvent;
|
|
58
|
+
faas?: Faas;
|
|
59
|
+
file?: EventFile;
|
|
60
|
+
gcp?: Gcp;
|
|
61
|
+
group?: Group;
|
|
62
|
+
host?: Host;
|
|
63
|
+
howler: EventHowler;
|
|
64
|
+
http?: EventHttp;
|
|
65
|
+
interface?: Interface;
|
|
66
|
+
labels?: { [index: string]: string };
|
|
67
|
+
message?: string;
|
|
68
|
+
network?: Network;
|
|
69
|
+
observer?: EventObserver;
|
|
70
|
+
organization?: EventOrganization;
|
|
71
|
+
process?: EventProcess;
|
|
72
|
+
registry?: Registry;
|
|
73
|
+
related?: Related;
|
|
74
|
+
rule?: Rule;
|
|
75
|
+
server?: Server;
|
|
76
|
+
source?: EventSource;
|
|
77
|
+
tags?: string[];
|
|
78
|
+
threat?: EventThreat;
|
|
79
|
+
timestamp: string;
|
|
80
|
+
tls?: EventTls;
|
|
81
|
+
url?: Url;
|
|
82
|
+
user?: User;
|
|
83
|
+
user_agent?: UserAgent;
|
|
84
|
+
vulnerability?: Vulnerability;
|
|
31
85
|
}
|
|
@@ -7,7 +7,7 @@ import type { Service } from './Service';
|
|
|
7
7
|
/**
|
|
8
8
|
* NOTE: This is an auto-generated file. Don't edit this manually.
|
|
9
9
|
*/
|
|
10
|
-
export interface
|
|
10
|
+
export interface EventCloud {
|
|
11
11
|
account?: CloudAccount;
|
|
12
12
|
availability_zone?: string;
|
|
13
13
|
instance?: Instance;
|
|
@@ -7,7 +7,7 @@ import type { User } from './User';
|
|
|
7
7
|
/**
|
|
8
8
|
* NOTE: This is an auto-generated file. Don't edit this manually.
|
|
9
9
|
*/
|
|
10
|
-
export interface
|
|
10
|
+
export interface EventDestination {
|
|
11
11
|
address?: string;
|
|
12
12
|
autonomous_systems?: AutonomousSystems;
|
|
13
13
|
bytes?: number;
|
|
@@ -10,7 +10,7 @@ import type { Votes } from './Votes';
|
|
|
10
10
|
/**
|
|
11
11
|
* NOTE: This is an auto-generated file. Don't edit this manually.
|
|
12
12
|
*/
|
|
13
|
-
export interface
|
|
13
|
+
export interface EventHowler {
|
|
14
14
|
analytic: string;
|
|
15
15
|
assessment?: string;
|
|
16
16
|
comment?: HowlerComment[];
|
|
@@ -5,7 +5,7 @@ import type { ObserverIngress } from './ObserverIngress';
|
|
|
5
5
|
/**
|
|
6
6
|
* NOTE: This is an auto-generated file. Don't edit this manually.
|
|
7
7
|
*/
|
|
8
|
-
export interface
|
|
8
|
+
export interface EventObserver {
|
|
9
9
|
egress?: Egress;
|
|
10
10
|
hostname?: string;
|
|
11
11
|
ingress?: ObserverIngress;
|
|
@@ -8,7 +8,7 @@ import type { ProcessUser } from './ProcessUser';
|
|
|
8
8
|
/**
|
|
9
9
|
* NOTE: This is an auto-generated file. Don't edit this manually.
|
|
10
10
|
*/
|
|
11
|
-
export interface
|
|
11
|
+
export interface EventProcess {
|
|
12
12
|
args?: string[];
|
|
13
13
|
args_count?: number;
|
|
14
14
|
code_signature?: CodeSignature;
|
|
@@ -7,7 +7,7 @@ import type { User } from './User';
|
|
|
7
7
|
/**
|
|
8
8
|
* NOTE: This is an auto-generated file. Don't edit this manually.
|
|
9
9
|
*/
|
|
10
|
-
export interface
|
|
10
|
+
export interface EventSource {
|
|
11
11
|
address?: string;
|
|
12
12
|
autonomous_systems?: AutonomousSystems;
|
|
13
13
|
bytes?: number;
|
|
@@ -9,7 +9,7 @@ import type { ThreatTechnique } from './ThreatTechnique';
|
|
|
9
9
|
/**
|
|
10
10
|
* NOTE: This is an auto-generated file. Don't edit this manually.
|
|
11
11
|
*/
|
|
12
|
-
export interface
|
|
12
|
+
export interface EventThreat {
|
|
13
13
|
enrichments?: ThreatEnrichment[];
|
|
14
14
|
feed?: Feed;
|
|
15
15
|
framework?: string;
|
|
@@ -9,9 +9,9 @@ import type { Container } from './Container';
|
|
|
9
9
|
import type { Destination } from './Destination';
|
|
10
10
|
import type { Dns } from './Dns';
|
|
11
11
|
import type { Ecs } from './Ecs';
|
|
12
|
+
import type { ECSEvent } from './ECSEvent';
|
|
12
13
|
import type { Email } from './Email';
|
|
13
14
|
import type { Error } from './Error';
|
|
14
|
-
import type { Event } from './Event';
|
|
15
15
|
import type { Faas } from './Faas';
|
|
16
16
|
import type { Gcp } from './Gcp';
|
|
17
17
|
import type { Group } from './Group';
|
|
@@ -55,7 +55,7 @@ export interface Hit {
|
|
|
55
55
|
ecs?: Ecs;
|
|
56
56
|
email?: Email;
|
|
57
57
|
error?: Error;
|
|
58
|
-
event?:
|
|
58
|
+
event?: ECSEvent;
|
|
59
59
|
faas?: Faas;
|
|
60
60
|
file?: HitFile;
|
|
61
61
|
gcp?: Gcp;
|
package/package.json
CHANGED
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
"internal-slot": "1.0.7"
|
|
97
97
|
},
|
|
98
98
|
"type": "module",
|
|
99
|
-
"version": "2.19.0-cases.
|
|
99
|
+
"version": "2.19.0-cases.1095",
|
|
100
100
|
"exports": {
|
|
101
101
|
"./i18n": "./i18n.js",
|
|
102
102
|
"./index.css": "./index.css",
|
|
@@ -183,11 +183,11 @@
|
|
|
183
183
|
"./components/routes/action/*": "./components/routes/action/*.js",
|
|
184
184
|
"./components/routes/advanced/*": "./components/routes/advanced/*.js",
|
|
185
185
|
"./components/routes/analytics/*": "./components/routes/analytics/*.js",
|
|
186
|
-
"./components/routes/observables/*": "./components/routes/observables/*.js",
|
|
187
186
|
"./components/routes/admin/*": "./components/routes/admin/*.js",
|
|
188
187
|
"./components/routes/overviews/*": "./components/routes/overviews/*.js",
|
|
189
188
|
"./components/routes/templates/*": "./components/routes/templates/*.js",
|
|
190
189
|
"./components/routes/views/*": "./components/routes/views/*.js",
|
|
190
|
+
"./components/routes/events/*": "./components/routes/events/*.js",
|
|
191
191
|
"./components/routes/dossiers/*": "./components/routes/dossiers/*.js",
|
|
192
192
|
"./components/routes/hits/*": "./components/routes/hits/*.js",
|
|
193
193
|
"./components/routes/cases/*": "./components/routes/cases/*.js",
|
|
@@ -217,12 +217,12 @@
|
|
|
217
217
|
"./components/app/drawers/*": "./components/app/drawers/*.js",
|
|
218
218
|
"./components/app/hooks/*": "./components/app/hooks/*.js",
|
|
219
219
|
"./components/elements/view/*": "./components/elements/view/*.js",
|
|
220
|
+
"./components/elements/event/*": "./components/elements/event/*.js",
|
|
220
221
|
"./components/elements/case/*": "./components/elements/case/*.js",
|
|
221
222
|
"./components/elements/record/*": "./components/elements/record/*.js",
|
|
222
223
|
"./components/elements/display/*": "./components/elements/display/*.js",
|
|
223
224
|
"./components/elements/hit/*": "./components/elements/hit/*.js",
|
|
224
225
|
"./components/elements/addons/*": "./components/elements/addons/*.js",
|
|
225
|
-
"./components/elements/observable/*": "./components/elements/observable/*.js",
|
|
226
226
|
"./components/elements/display/markdownPlugins/*.md": "./components/elements/display/markdownPlugins/*.md.js",
|
|
227
227
|
"./components/elements/display/features/*": "./components/elements/display/features/*.js",
|
|
228
228
|
"./components/elements/display/icons/*": "./components/elements/display/icons/*.js",
|
package/plugins/clue/utils.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
+
import type { Event } from '@cccsaurora/howler-ui/models/entities/generated/Event';
|
|
1
2
|
import type { Hit } from '@cccsaurora/howler-ui/models/entities/generated/Hit';
|
|
2
|
-
|
|
3
|
-
export declare const useType: (hit?: Hit | Observable, field?: string, value?: string) => any;
|
|
3
|
+
export declare const useType: (hit?: Hit | Event, field?: string, value?: string) => any;
|