Skip to content

Commit

Permalink
[frontend/backend] mutation icon appears in activity (#6261)
Browse files Browse the repository at this point in the history
  • Loading branch information
CelineSebe authored Mar 13, 2024
1 parent a131011 commit 14836ee
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
12 changes: 10 additions & 2 deletions opencti-platform/opencti-front/src/components/ItemIcon.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import {
ExtensionOutlined,
FactCheckOutlined,
FlagOutlined,
HelpOutlined,
LayersClearOutlined,
LocalOfferOutlined,
LoginOutlined,
Expand Down Expand Up @@ -62,6 +61,9 @@ import {
TroubleshootOutlined,
DiamondOutlined,
CircleOutlined,
TaskAlt,
AutoAwesomeMotion,
ViewStreamTwoTone,
} from '@mui/icons-material';
import {
ArchiveOutline,
Expand Down Expand Up @@ -311,6 +313,10 @@ const iconSelector = (type, variant, fontSize, color, isReversed) => {
);
case 'task':
return <TaskAltOutlined style={style} fontSize={fontSize} role="img" />;
case 'task-template':
return (
<TaskAlt style={style} fontSize={fontSize} role="img" />
);
case 'history':
return (
<ClipboardTextClockOutline
Expand Down Expand Up @@ -516,10 +522,12 @@ const iconSelector = (type, variant, fontSize, color, isReversed) => {
return <VectorRadius style={style} fontSize={fontSize} role="img" />;
case 'notifier':
return <UpcomingOutlined style={style} fontSize={fontSize} role="img" />;
case 'synchronizer':
return <ViewStreamTwoTone style={style} fontSize={fontSize} role="img" />;
case 'default':
return <CircleOutlined style={style} fontSize={fontSize} role="img" />;
default:
return <HelpOutlined style={style} fontSize={fontSize} role="img" />;
return <AutoAwesomeMotion style={style} fontSize={fontSize} role="img" />;
}
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { isEmptyField } from '../../database/utils';
import type { EditInput, NotifierAddInput, NotifierConnector, NotifierTestInput, QueryNotifiersArgs } from '../../generated/graphql';
import { publishUserAction } from '../../listener/UserActionListener';
import { internalProcessNotification } from '../../manager/publisherManager';
import { ENTITY_TYPE_CONNECTOR, ENTITY_TYPE_SETTINGS, ENTITY_TYPE_SYNC } from '../../schema/internalObject';
import { ENTITY_TYPE_CONNECTOR, ENTITY_TYPE_SETTINGS } from '../../schema/internalObject';
import type { BasicStoreSettings } from '../../types/settings';
import type { AuthContext, AuthUser } from '../../types/user';
import { MEMBER_ACCESS_RIGHT_VIEW, SYSTEM_USER } from '../../utils/access';
Expand Down Expand Up @@ -80,8 +80,8 @@ export const notifierEdit = async (context: AuthContext, user: AuthUser, notifie
event_type: 'mutation',
event_scope: 'update',
event_access: 'administration',
message: `updates \`${input.map((i) => i.key).join(', ')}\` for synchronizer \`${updatedElem.name}\``,
context_data: { id: notifierId, entity_type: ENTITY_TYPE_SYNC, input }
message: `updates \`${input.map((i) => i.key).join(', ')}\` for notifier \`${updatedElem.name}\``,
context_data: { id: notifierId, entity_type: ENTITY_TYPE_NOTIFIER, input }
});
return notify(BUS_TOPICS[ENTITY_TYPE_NOTIFIER].EDIT_TOPIC, updatedElem, user);
};
Expand Down

0 comments on commit 14836ee

Please sign in to comment.