Skip to content

Commit 54a73e4

Browse files
Merge pull request #680 from contentstack/bugfix/cmg-616
refactor:removed index from logscreen and copilot suggestions
2 parents b91adfd + fc488c5 commit 54a73e4

File tree

7 files changed

+13
-12
lines changed

7 files changed

+13
-12
lines changed

api/src/utils/content-type-creator.utils.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -685,9 +685,9 @@ const mergeFields = async (schema1: any[], schema2: any[]): Promise<any[]> => {
685685

686686
for (const field2 of schema2) {
687687
if (field2?.data_type === 'group') {
688-
const machingGroup = findGroupByUid(schema1, field2?.uid);
689-
if(machingGroup){
690-
const schema = await mergeArrays(machingGroup?.schema ?? [],field2?.schema ?? [] );
688+
const matchingGroup = findGroupByUid(schema1, field2?.uid);
689+
if(matchingGroup){
690+
const schema = mergeArrays(matchingGroup?.schema ?? [],field2?.schema ?? [] );
691691
result?.push({
692692
...field2,
693693
schema: schema

ui/src/components/AdvancePropertise/advanceProperties.interface.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ export interface SchemaProps {
2424
* @param rowId - The ID of the row.
2525
* @param value - The advanced settings.
2626
* @param checkBoxChanged - Indicates whether the checkbox has changed.
27+
* @param rowContentstackFieldUid - Uid to get correct row from tableData
2728
*/
2829
updateFieldSettings: (rowId: string, value: Advanced, checkBoxChanged: boolean, rowContentstackFieldUid: string) => void;
2930

ui/src/components/AuditFilterModal/index.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,10 @@ const AuditFilterModal = ({
7777

7878
<div className="tableFilterModalStories__list">
7979
{filterOptions?.length > 0 ? (
80-
filterOptions.map((item, index) => (
81-
<div key={''} >
80+
filterOptions.map((item) => {
81+
const uid = item?.value
82+
return (
83+
<div key={uid} >
8284
<div className="tableFilterModalStories__suggestion-item">
8385
<Checkbox
8486
checked={selectedLevels?.some((v) => v?.value === item?.value)}
@@ -91,7 +93,7 @@ const AuditFilterModal = ({
9193
/>
9294
</div>
9395
</div>
94-
))
96+
)})
9597
) : (
9698
<div className="tableFilterModalStories__no-data">
9799
{auditLogsConstants?.filterModal?.noFilterAvailabe}

ui/src/components/Common/Settings/Settings.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
.PageLayout__head,
1818
.PageLayout__leftSidebar {
19-
border-top: 1;
19+
border-top: 1px solid $color-base-gray-40;
2020
}
2121

2222
.PageLayout--primary {

ui/src/components/LogScreen/MigrationLogViewer.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,9 +283,8 @@ const MigrationLogViewer = ({ serverPath }: LogsType) => {
283283
) : (
284284
<div
285285
style={logStyles[level || ''] || logStyles.info}
286-
className="log-entry logs-bg"
286+
className="log-entry"
287287
>
288-
<div className="log-number">{index}</div>
289288
<div className="log-time">
290289
{timestamp
291290
? new Date(timestamp)?.toTimeString()?.split(' ')[0]

ui/src/components/LogScreen/index.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
font-family: 'IBM Plex Mono', monospace;
4646
font-size: $size-font-large;
4747
font-weight: $font-weight-medium;
48-
padding: 30px 20px;
48+
padding: 5px 0;
4949
position: relative;
5050

5151
&.logs-bg {

ui/src/components/LogScreen/index.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -277,9 +277,8 @@ const TestMigrationLogViewer = ({ serverPath, sendDataToParent, projectId }: Log
277277
) : (
278278
<div
279279
style={logStyles[level || ''] || logStyles.info}
280-
className="log-entry logs-bg"
280+
className="log-entry"
281281
>
282-
<div className="log-number">{index}</div>
283282
<div className="log-time">
284283
{timestamp
285284
? new Date(timestamp)?.toTimeString()?.split(' ')[0]

0 commit comments

Comments
 (0)