Skip to content

Commit be4a887

Browse files
author
ALENA NABOKA
committed
Merge branch 'main' into bugfix/RI-3481-hide-terminal-while-running-deb-riv2
2 parents ecb0630 + 9e0dfb5 commit be4a887

File tree

16 files changed

+117
-29
lines changed

16 files changed

+117
-29
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,7 @@
226226
"html-entities": "^2.3.2",
227227
"html-react-parser": "^1.2.4",
228228
"java-object-serialization": "^0.1.1",
229+
"jpickle": "^0.4.1",
229230
"jsonpath": "^1.1.1",
230231
"lodash": "^4.17.21",
231232
"php-serialize": "^4.0.2",

redisinsight/ui/src/constants/keys.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,5 +172,6 @@ export enum KeyValueFormat {
172172
Msgpack = 'Msgpack',
173173
PHP = 'PHP serialized',
174174
JAVA = 'Java serialized',
175-
Protobuf = 'Protobuf'
175+
Protobuf = 'Protobuf',
176+
Pickle = 'Pickle',
176177
}

redisinsight/ui/src/constants/storage.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ enum BrowserStorageItem {
1717
dbConfig = 'dbConfig_',
1818
RunQueryMode = 'RunQueryMode',
1919
wbCleanUp = 'wbCleanUp',
20+
viewFormat = 'viewFormat',
2021
}
2122

2223
export default BrowserStorageItem

redisinsight/ui/src/pages/browser/components/hash-details/HashDetails.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ const HashDetails = (props: Props) => {
284284
position="bottom"
285285
content={tooltipContent}
286286
>
287-
<>{value.substring?.(0, 200) ?? value}</>
287+
<>{value?.substring?.(0, 200) ?? value}</>
288288
</EuiToolTip>
289289
)}
290290
{expanded && value}
@@ -377,7 +377,7 @@ const HashDetails = (props: Props) => {
377377
content={tooltipContent}
378378
anchorClassName="truncateText"
379379
>
380-
<>{formattedValue.substring?.(0, 200) ?? formattedValue}</>
380+
<>{formattedValue?.substring?.(0, 200) ?? formattedValue}</>
381381
</EuiToolTip>
382382
)}
383383
{expanded && formattedValue}

redisinsight/ui/src/pages/browser/components/key-details-header/components/Formatter/constants.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ export const KEY_VALUE_FORMATTER_OPTIONS = [
2525
text: 'Msgpack',
2626
value: KeyValueFormat.Msgpack,
2727
},
28+
{
29+
text: 'Pickle',
30+
value: KeyValueFormat.Pickle,
31+
},
2832
{
2933
text: 'Protobuf',
3034
value: KeyValueFormat.Protobuf,

redisinsight/ui/src/pages/browser/components/key-list/KeyList.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {
99
} from '@elastic/eui'
1010
import {
1111
formatBytes,
12-
truncateTTLToDuration,
12+
truncateNumberToDuration,
1313
truncateNumberToFirstUnit,
1414
truncateTTLToSeconds,
1515
replaceSpaces,
@@ -213,7 +213,7 @@ const KeyList = forwardRef((props: Props, ref) => {
213213
<>
214214
{`${truncateTTLToSeconds(cellData)} s`}
215215
<br />
216-
{`(${truncateTTLToDuration(cellData)})`}
216+
{`(${truncateNumberToDuration(cellData)})`}
217217
</>
218218
)}
219219
>

redisinsight/ui/src/pages/browser/components/list-details/ListDetails.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ const ListDetails = (props: Props) => {
325325
content={tooltipContent}
326326
anchorClassName="truncateText"
327327
>
328-
<>{value.substring?.(0, 200) ?? value}</>
328+
<>{value?.substring?.(0, 200) ?? value}</>
329329
</EuiToolTip>
330330
)}
331331
{expanded && value}

redisinsight/ui/src/pages/browser/components/set-details/SetDetails.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ const SetDetails = (props: Props) => {
192192
const member = bufferToString(memberItem)
193193
const tooltipContent = formatLongName(member)
194194
const { value, isValid } = formattingBuffer(memberItem, viewFormatProp, { expanded })
195-
const cellContent = value.substring?.(0, 200) ?? value
195+
const cellContent = value?.substring?.(0, 200) ?? value
196196

197197
return (
198198
<EuiText color="subdued" size="s" style={{ maxWidth: '100%', whiteSpace: 'break-spaces' }}>

redisinsight/ui/src/pages/browser/components/stream-details/stream-data-view/StreamDataViewWrapper.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ const StreamDataViewWrapper = (props: Props) => {
210210

211211
const bufferValue = values[index]?.value || stringToBuffer('')
212212
const { value: formattedValue, isValid } = formattingBuffer(bufferValue, viewFormatProp, { expanded })
213-
const cellContent = formattedValue.substring?.(0, 650) ?? formattedValue
213+
const cellContent = formattedValue?.substring?.(0, 650) ?? formattedValue
214214
const tooltipContent = formatLongName(value)
215215

216216
return (

redisinsight/ui/src/pages/browser/components/zset-details/ZSetDetails.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ const ZSetDetails = (props: Props) => {
246246
const name = bufferToString(nameItem)
247247
const tooltipContent = formatLongName(name)
248248
const { value, isValid } = formattingBuffer(nameItem, viewFormat, { expanded })
249-
const cellContent = value.substring?.(0, 200) ?? value
249+
const cellContent = value?.substring?.(0, 200) ?? value
250250

251251
return (
252252
<EuiText color="subdued" size="s" style={{ maxWidth: '100%', whiteSpace: 'break-spaces' }}>

0 commit comments

Comments
 (0)