Skip to content

Commit b4c081a

Browse files
committed
#RI-3400 - sort formatters, change styling
1 parent 1446990 commit b4c081a

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,7 +170,7 @@ 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
}

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,
@@ -25,16 +25,16 @@ export const KEY_VALUE_FORMATTER_OPTIONS = [
2525
text: 'Msgpack',
2626
value: KeyValueFormat.Msgpack,
2727
},
28-
{
29-
text: 'PHP Unserialize',
30-
value: KeyValueFormat.PHP,
31-
},
3228
{
3329
text: 'Protobuf',
3430
value: KeyValueFormat.Protobuf,
3531
},
3632
{
37-
text: 'Java Object',
33+
text: 'PHP serialized',
34+
value: KeyValueFormat.PHP,
35+
},
36+
{
37+
text: 'Java serialized',
3838
value: KeyValueFormat.JAVA,
3939
},
4040
]
@@ -45,5 +45,5 @@ export const getKeyValueFormatterOptions = (viewFormat?: KeyTypes | ModulesKeyTy
4545
viewFormat !== KeyTypes.ReJSON
4646
? [...KEY_VALUE_FORMATTER_OPTIONS]
4747
: [...KEY_VALUE_FORMATTER_OPTIONS].filter((option) =>
48-
KEY_VALUE_JSON_FORMATTER_OPTIONS.indexOf(option.value) !== -1)
48+
(KEY_VALUE_JSON_FORMATTER_OPTIONS as Array<any>).indexOf(option.value) !== -1)
4949
)

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)