Skip to content

Commit e6c75c2

Browse files
committed
Merge branch 'main' into feature/RI-3470_Formatters_improvements
# Conflicts: # redisinsight/ui/src/constants/keys.ts # redisinsight/ui/src/pages/browser/components/key-details-header/components/Formatter/constants.ts
2 parents 472d2eb + 0b1ef1b commit e6c75c2

File tree

4 files changed

+26
-13
lines changed

4 files changed

+26
-13
lines changed

redisinsight/ui/src/constants/keys.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,8 @@ export enum KeyValueFormat {
170170
HEX = 'HEX',
171171
Binary = 'Binary',
172172
Msgpack = 'Msgpack',
173-
PHP = 'PHP Unserialize',
174-
JAVA = 'Java Object',
173+
PHP = 'PHP serialized',
174+
JAVA = 'Java serialized',
175175
Protobuf = 'Protobuf',
176176
Pickle = 'Pickle',
177177
}

redisinsight/ui/src/pages/browser/components/key-details-header/components/Formatter/KeyValueFormatter.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ const KeyValueFormatter = (props: Props) => {
5757
</>
5858
</EuiToolTip>
5959
),
60-
dropdownDisplay: <EuiText className={styles.dropdownDisplay}>{text}</EuiText>,
60+
dropdownDisplay: <EuiText size="s" className={styles.dropdownDisplay}>{text}</EuiText>,
6161
'data-test-subj': `format-option-${value}`,
6262
})
6363
)

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

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ export const KEY_VALUE_FORMATTER_OPTIONS = [
99
text: 'ASCII',
1010
value: KeyValueFormat.ASCII,
1111
},
12-
{
13-
text: 'HEX',
14-
value: KeyValueFormat.HEX,
15-
},
1612
{
1713
text: 'Binary',
1814
value: KeyValueFormat.Binary,
1915
},
16+
{
17+
text: 'HEX',
18+
value: KeyValueFormat.HEX,
19+
},
2020
{
2121
text: 'JSON',
2222
value: KeyValueFormat.JSON,
@@ -29,16 +29,16 @@ export const KEY_VALUE_FORMATTER_OPTIONS = [
2929
text: 'Pickle',
3030
value: KeyValueFormat.Pickle,
3131
},
32-
{
33-
text: 'PHP Unserialize',
34-
value: KeyValueFormat.PHP,
35-
},
3632
{
3733
text: 'Protobuf',
3834
value: KeyValueFormat.Protobuf,
3935
},
4036
{
41-
text: 'Java Object',
37+
text: 'PHP serialized',
38+
value: KeyValueFormat.PHP,
39+
},
40+
{
41+
text: 'Java serialized',
4242
value: KeyValueFormat.JAVA,
4343
},
4444
]
@@ -49,5 +49,5 @@ export const getKeyValueFormatterOptions = (viewFormat?: KeyTypes | ModulesKeyTy
4949
viewFormat !== KeyTypes.ReJSON
5050
? [...KEY_VALUE_FORMATTER_OPTIONS]
5151
: [...KEY_VALUE_FORMATTER_OPTIONS].filter((option) =>
52-
KEY_VALUE_JSON_FORMATTER_OPTIONS.indexOf(option.value) !== -1)
52+
(KEY_VALUE_JSON_FORMATTER_OPTIONS as Array<any>).indexOf(option.value) !== -1)
5353
)

redisinsight/ui/src/pages/browser/components/key-details-header/components/Formatter/styles.module.scss

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,19 @@
6060
}
6161
}
6262

63+
.formatType {
64+
margin-top: 3px;
65+
margin-bottom: 3px;
66+
padding: 6px !important;
67+
min-height: 36px !important;
68+
69+
:global(.euiContextMenu__icon) {
70+
height: 14px;
71+
width: 14px;
72+
margin-right: 6px;
73+
}
74+
}
75+
6376
.optionText {
6477
padding-left: 6px;
6578
padding-right: 4px;

0 commit comments

Comments
 (0)