Skip to content

Commit 75c1c9b

Browse files
authored
chore(data-modeling): update node name to be collection name (#7102)
1 parent 99fa62f commit 75c1c9b

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

packages/compass-data-modeling/src/components/diagram-card.spec.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ describe('DiagramCard', () => {
1010
id: 'test-diagram',
1111
connectionId: 'test-connection',
1212
name: 'Test Diagram',
13-
createdAt: '2023-10-01T00:00:00.000Z',
14-
updatedAt: '2023-10-03T00:00:00.000Z',
13+
createdAt: '2021-10-01T00:00:00.000Z',
14+
updatedAt: '2023-10-03T00:00:00.000',
1515
edits: [
1616
{
1717
id: 'edit-id',
18-
timestamp: '2023-10-01T00:00:00.000Z',
18+
timestamp: '2022-10-01T00:00:00.000Z',
1919
type: 'SetModel',
2020
model: {
2121
collections: [

packages/compass-data-modeling/src/components/diagram-editor.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import React, {
66
useState,
77
} from 'react';
88
import { connect } from 'react-redux';
9+
import toNS from 'mongodb-ns';
910
import type { MongoDBJSONSchema } from 'mongodb-schema';
1011
import type { DataModelingState } from '../store/reducer';
1112
import {
@@ -235,7 +236,7 @@ const DiagramEditor: React.FunctionComponent<{
235236
x: coll.displayPosition[0],
236237
y: coll.displayPosition[1],
237238
},
238-
title: coll.ns,
239+
title: toNS(coll.ns).collection,
239240
fields: getFieldsFromSchema(coll.jsonSchema),
240241
})
241242
);

0 commit comments

Comments
 (0)