Skip to content

Commit 6bf46d8

Browse files
[frontend] Take care of PR review comments (#8237)
1 parent b0b859c commit 6bf46d8

File tree

4 files changed

+6
-8
lines changed

4 files changed

+6
-8
lines changed

opencti-platform/opencti-front/src/private/components/common/drawer/HistoryDrawer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ const HistoryDrawerContent: FunctionComponent<HistoryDrawerContentProps> = ({ lo
7878
<TableBody>
7979
{changes && changes.length > 0 ? (changes.map((row) => {
8080
return (
81-
<TableRow key={row?.field} hover={true}>
81+
<TableRow key={row?.field} hover={false}>
8282
<TableCell component="th" scope="row" style={{ fontWeight: 'bold', padding: 14, verticalAlign: 'top' }}>
8383
{row?.field}
8484
</TableCell>

opencti-platform/opencti-front/src/private/components/settings/activity/audit/AuditDrawer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ const AuditDrawerContent: FunctionComponent<{ logId: string }> = ({ logId }) =>
9999
<TableBody>
100100
{changes && changes.length > 0 ? (changes.map((row) => {
101101
return (
102-
<TableRow key={row?.field} hover={true}>
102+
<TableRow key={row?.field} hover={false}>
103103
<TableCell component="th" scope="row" style={{ fontWeight: 'bold', verticalAlign: 'top' }}>
104104
{row?.field}
105105
</TableCell>

opencti-platform/opencti-graphql/src/database/data-changes.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -249,13 +249,13 @@ const convertAttribute = async (context: AuthContext, user: AuthUser,
249249
return { raw: item };
250250
}
251251
if (attribute.type === 'date') {
252-
return { raw: item };
252+
return { raw: String(item) };
253253
}
254254
if (attribute.type === 'boolean') {
255-
return { raw: item };
255+
return { raw: String(item) };
256256
}
257257
if (attribute.type === 'numeric') {
258-
return { raw: item };
258+
return { raw: String(item) };
259259
}
260260
throw UnsupportedError('Change build error, unknown attribute', { attribute });
261261
};
@@ -374,7 +374,6 @@ const legacyHistoryChanges = (log: any) => {
374374

375375
export const changeIdsExtractor = async (context: AuthContext, user: AuthUser, changes: Change[]) => {
376376
const ids = [];
377-
// const { context_data } = log;
378377
const getEntitiesMapFromCache = buildMapFromCacheContext(context, user);
379378
for (let index = 0; index < changes.length; index++) {
380379
const change = changes[index];
@@ -424,7 +423,6 @@ export const attributesChangesResolver = async (context: AuthContext, user: Auth
424423
const lookingIds = [];
425424
for (let index = 0; index < attributesChanges.length; index++) {
426425
const attributeChanges = attributesChanges[index];
427-
// const changes: Change[] = log.context_data.history_changes ?? [];
428426
const idsFromData = await changeIdsExtractor(context, user, attributeChanges);
429427
for (let i = 0; i < idsFromData.length; i++) {
430428
const idFromData = idsFromData[i];

opencti-platform/opencti-graphql/src/modules/workflow/workflow-types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ import type { BasicStoreIdentifier, BasicWorkflowStatus, BasicWorkflowTemplateEn
44
export const isEntityStatus
55
= (entity: BasicStoreIdentifier): entity is BasicWorkflowStatus => entity.entity_type === ENTITY_TYPE_STATUS;
66

7-
export const isEntityTemplate
7+
export const isEntityStatusTemplate
88
= (entity: BasicStoreIdentifier): entity is BasicWorkflowTemplateEntity => entity.entity_type === ENTITY_TYPE_STATUS_TEMPLATE;

0 commit comments

Comments
 (0)