Skip to content

Commit 73d2e7b

Browse files
committed
change StringDetailsTable to StringDetailsValue
1 parent 688c146 commit 73d2e7b

File tree

6 files changed

+19
-19
lines changed

6 files changed

+19
-19
lines changed

redisinsight/ui/src/pages/browser/modules/key-details/components/string-details/StringDetails.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import { RedisResponseBuffer } from 'uiSrc/slices/interfaces'
2121
import { IFetchKeyArgs } from 'uiSrc/constants/prop-types/keys'
2222
import { resetStringValue, stringDataSelector, stringSelector } from 'uiSrc/slices/browser/string'
2323
import { isFormatEditable, isFullStringLoaded } from 'uiSrc/utils'
24-
import { StringDetailsTable } from './string-details-table'
24+
import { StringDetailsValue } from './string-details-value'
2525
import { EditItemAction } from '../key-details-actions'
2626

2727
export interface Props extends KeyDetailsHeaderProps {}
@@ -77,7 +77,7 @@ const StringDetails = (props: Props) => {
7777
<div className="key-details-body" key="key-details-body">
7878
{!loading && (
7979
<div className="flex-column" style={{ flex: '1', height: '100%' }}>
80-
<StringDetailsTable
80+
<StringDetailsValue
8181
isEditItem={editItem}
8282
setIsEdit={(isEdit: boolean) => {
8383
setEditItem(isEdit)

redisinsight/ui/src/pages/browser/modules/key-details/components/string-details/string-details-table/index.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import {
1616
} from 'uiSrc/utils/tests/decompressors'
1717
import { sendEventTelemetry, TelemetryEvent } from 'uiSrc/telemetry'
1818
import { downloadFile } from 'uiSrc/utils/dom/downloadFile'
19-
import { StringDetailsTable, Props } from './StringDetailsTable'
19+
import { StringDetailsValue, Props } from './StringDetailsValue'
2020

2121
const STRING_VALUE = 'string-value'
2222
const STRING_VALUE_SPACE = 'string value'
@@ -70,11 +70,11 @@ jest.mock('react-redux', () => ({
7070
useDispatch: () => jest.fn().mockReturnValue(() => jest.fn()),
7171
}))
7272

73-
describe('StringDetailsTable', () => {
73+
describe('StringDetailsValue', () => {
7474
it('should render', () => {
7575
expect(
7676
render(
77-
<StringDetailsTable
77+
<StringDetailsValue
7878
{...instance(mockedProps)}
7979
/>
8080
)
@@ -83,7 +83,7 @@ describe('StringDetailsTable', () => {
8383

8484
it('should render textarea if edit mode', () => {
8585
render(
86-
<StringDetailsTable
86+
<StringDetailsValue
8787
{...instance(mockedProps)}
8888
isEditItem
8989
setIsEdit={jest.fn()}
@@ -95,7 +95,7 @@ describe('StringDetailsTable', () => {
9595

9696
it('should update string value', () => {
9797
render(
98-
<StringDetailsTable
98+
<StringDetailsValue
9999
{...instance(mockedProps)}
100100
isEditItem
101101
setIsEdit={jest.fn()}
@@ -111,7 +111,7 @@ describe('StringDetailsTable', () => {
111111

112112
it('should stay empty string after cancel', async () => {
113113
render(
114-
<StringDetailsTable
114+
<StringDetailsValue
115115
{...instance(mockedProps)}
116116
isEditItem
117117
setIsEdit={jest.fn()}
@@ -132,7 +132,7 @@ describe('StringDetailsTable', () => {
132132

133133
it('should update value after apply', () => {
134134
render(
135-
<StringDetailsTable
135+
<StringDetailsValue
136136
{...instance(mockedProps)}
137137
isEditItem
138138
setIsEdit={jest.fn()}
@@ -155,7 +155,7 @@ describe('StringDetailsTable', () => {
155155
stringDataSelector.mockImplementation(stringDataSelectorMock)
156156

157157
render(
158-
<StringDetailsTable
158+
<StringDetailsValue
159159
{...instance(mockedProps)}
160160
/>
161161
)
@@ -173,7 +173,7 @@ describe('StringDetailsTable', () => {
173173
stringDataSelector.mockImplementation(stringDataSelectorMock)
174174

175175
render(
176-
<StringDetailsTable
176+
<StringDetailsValue
177177
{...instance(mockedProps)}
178178
onRefresh={onRefresh}
179179
/>
@@ -197,7 +197,7 @@ describe('StringDetailsTable', () => {
197197
stringDataSelector.mockImplementation(stringDataSelectorMock)
198198

199199
render(
200-
<StringDetailsTable
200+
<StringDetailsValue
201201
{...instance(mockedProps)}
202202
/>
203203
)
@@ -211,7 +211,7 @@ describe('StringDetailsTable', () => {
211211
stringDataSelector.mockImplementation(stringDataSelectorMock)
212212

213213
render(
214-
<StringDetailsTable
214+
<StringDetailsValue
215215
{...instance(mockedProps)}
216216
/>
217217
)
@@ -225,7 +225,7 @@ describe('StringDetailsTable', () => {
225225
stringDataSelector.mockImplementation(stringDataSelectorMock)
226226

227227
render(
228-
<StringDetailsTable
228+
<StringDetailsValue
229229
{...instance(mockedProps)}
230230
/>
231231
)
@@ -253,7 +253,7 @@ describe('StringDetailsTable', () => {
253253
}))
254254

255255
render(
256-
<StringDetailsTable
256+
<StringDetailsValue
257257
{...instance(mockedProps)}
258258
isEditItem
259259
setIsEdit={jest.fn()}
@@ -275,7 +275,7 @@ describe('StringDetailsTable', () => {
275275
}))
276276

277277
render(
278-
<StringDetailsTable
278+
<StringDetailsValue
279279
{...instance(mockedProps)}
280280
isEditItem
281281
setIsEdit={jest.fn()}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export interface Props {
6161
onRefresh: (key: RedisResponseBuffer, type: KeyTypes | ModulesKeyTypes, args: IFetchKeyArgs) => void;
6262
}
6363

64-
const StringDetailsTable = (props: Props) => {
64+
const StringDetailsValue = (props: Props) => {
6565
const { isEditItem, setIsEdit, onRefresh } = props
6666

6767
const { compressor = null } = useSelector(connectedInstanceSelector)
@@ -291,4 +291,4 @@ const StringDetailsTable = (props: Props) => {
291291
)
292292
}
293293

294-
export { StringDetailsTable }
294+
export { StringDetailsValue }
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { StringDetailsValue } from './StringDetailsValue'
File renamed without changes.

0 commit comments

Comments
 (0)