Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[frontend] mutation icon appears in activity (#6261) #6301

Merged
merged 6 commits into from
Mar 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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" />;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rollback this icon to the previous one, we need to keep the "?" icon for the ones unknown.

}
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
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 @@
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 }

Check warning on line 84 in opencti-platform/opencti-graphql/src/modules/notifier/notifier-domain.ts

View check run for this annotation

Codecov / codecov/patch

opencti-platform/opencti-graphql/src/modules/notifier/notifier-domain.ts#L83-L84

Added lines #L83 - L84 were not covered by tests
});
return notify(BUS_TOPICS[ENTITY_TYPE_NOTIFIER].EDIT_TOPIC, updatedElem, user);
};
Expand Down
Loading