Skip to content

Commit a0a1d81

Browse files
#RI-3021-update filter styles, add fetch consumers after ack (#741)
1 parent f2b72a0 commit a0a1d81

File tree

4 files changed

+28
-17
lines changed

4 files changed

+28
-17
lines changed

redisinsight/ui/src/components/range-filter/RangeFilter.tsx

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,11 +174,21 @@ const RangeFilter = (props: Props) => {
174174
/>
175175
<div className={styles.slider}>
176176
<div className={styles.sliderTrack} />
177-
<div ref={range} className={styles.sliderRange}>
177+
<div
178+
ref={range}
179+
className={
180+
cx(styles.sliderRange,
181+
{
182+
[styles.leftPosition]: max - startVal < (max - min) / 2,
183+
[styles.disabled]: disabled
184+
})
185+
}
186+
>
178187
<div className={
179188
cx(styles.sliderLeftValue,
180189
{
181-
[styles.leftPosition]: max - startVal < (max - min) / 2
190+
[styles.leftPosition]: max - startVal < (max - min) / 2,
191+
[styles.disabled]: disabled
182192
})
183193
}
184194
>
@@ -187,7 +197,8 @@ const RangeFilter = (props: Props) => {
187197
<div className={
188198
cx(styles.sliderRightValue,
189199
{
190-
[styles.rightPosition]: max - endVal > (max - min) / 2
200+
[styles.rightPosition]: max - endVal > (max - min) / 2,
201+
[styles.disabled]: disabled
191202
})
192203
}
193204
>

redisinsight/ui/src/components/range-filter/styles.module.scss

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,11 @@
6363
}
6464
}
6565

66-
.rangeWrapper:hover .sliderRange {
66+
.rangeWrapper:hover .sliderRange:not(.disabled) {
6767
height: 5px;
6868
transform: translateY(0px);
6969

7070
&:before {
71-
7271
width: 2px;
7372
height: 12px;
7473
top: -7px;
@@ -93,11 +92,11 @@
9392
margin-top: -25px;
9493
}
9594

96-
.rangeWrapper:hover .sliderLeftValue {
95+
.rangeWrapper:hover .sliderLeftValue:not(.disabled) {
9796
margin-top: -23px;
9897
}
9998

100-
.rangeWrapper:hover .sliderRightValue {
99+
.rangeWrapper:hover .sliderRightValue:not(.disabled) {
101100
margin-top: 10px;
102101
}
103102

@@ -132,12 +131,6 @@
132131
outline: none;
133132
}
134133

135-
@-moz-document url-prefix() {
136-
.thumb {
137-
margin-top: 0.33px;
138-
}
139-
}
140-
141134
.thumbZindex3 {
142135
z-index: 3;
143136
}
@@ -158,12 +151,16 @@
158151
background: transparent;
159152
}
160153

154+
.thumb::-moz-range-thumb:disabled {
155+
cursor: auto;
156+
}
157+
161158
.thumbZindex3::-moz-range-thumb {
162-
transform: translateY(-4px);
159+
transform: translate(-18px, -4px);
163160
}
164161

165162
.thumbZindex4::-moz-range-thumb {
166-
transform: translateY(8px) rotate(180deg);
163+
transform: translate(-20px, 8px) rotate(180deg);
167164
}
168165

169166
input[type='range']::-webkit-slider-thumb {
@@ -183,9 +180,9 @@ input[type='range'][disabled]::-webkit-slider-thumb {
183180
}
184181

185182
input[type='range']:first-child::-webkit-slider-thumb {
186-
transform: translateY(-4px);
183+
transform: translate(-18px, -4px);
187184
}
188185

189186
input[type='range']:last-of-type::-webkit-slider-thumb {
190-
transform: translateY(8px) rotate(180deg);
187+
transform: translate(-20px, 8px) rotate(180deg);
191188
}

redisinsight/ui/src/slices/browser/stream.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1014,6 +1014,7 @@ export function ackPendingEntriesAction(
10141014
onSuccessAction?.()
10151015
dispatch(ackPendingEntriesSuccess())
10161016
dispatch(deleteMessageFromList(entries[0]))
1017+
dispatch<any>(fetchConsumers())
10171018
dispatch(addMessageNotification(
10181019
successMessages.MESSAGE_ACTION(entries[0], 'acknowledged')
10191020
))

redisinsight/ui/src/slices/tests/browser/stream.spec.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1404,6 +1404,7 @@ describe('stream slice', () => {
14041404
const entries = ['0-1']
14051405
const responsePayload = { status: 200 }
14061406

1407+
apiService.post = jest.fn().mockResolvedValue(responsePayload)
14071408
apiService.post = jest.fn().mockResolvedValue(responsePayload)
14081409

14091410
// Act
@@ -1414,6 +1415,7 @@ describe('stream slice', () => {
14141415
ackPendingEntries(),
14151416
ackPendingEntriesSuccess(),
14161417
deleteMessageFromList('0-1'),
1418+
loadConsumerGroups(),
14171419
addMessageNotification(
14181420
successMessages.MESSAGE_ACTION(
14191421
entries.join(''),

0 commit comments

Comments
 (0)