Skip to content

Commit 4396608

Browse files
Merge pull request #2580 from RedisInsight/fe/bugfix/RI-4960_No_Slowlog_message_not_changed
#RI-4960 - ms not changed to msec in No Slow Logs message
2 parents 71f21d0 + 09f8610 commit 4396608

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

redisinsight/ui/src/pages/slowLog/components/EmptySlowLog/EmptySlowLog.spec.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,11 @@ describe('EmptySlowLog', () => {
1010
<EmptySlowLog durationUnit={DurationUnits.milliSeconds} slowlogLogSlowerThan={100} />
1111
)).toBeTruthy()
1212
})
13+
it('should contain msec instead of ms', () => {
14+
const { container } = render(
15+
<EmptySlowLog durationUnit={DurationUnits.milliSeconds} slowlogLogSlowerThan={10000000} />
16+
)
17+
18+
expect(container).toHaveTextContent('10 000 msec')
19+
})
1320
})

redisinsight/ui/src/pages/slowLog/components/EmptySlowLog/EmptySlowLog.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ const EmptySlowLog = (props: Props) => {
2222
</EuiTitle>
2323
<EuiText color="subdued">
2424
Either no commands exceeding&nbsp;
25-
{numberWithSpaces(convertNumberByUnits(slowlogLogSlowerThan, durationUnit))} {durationUnit}
25+
{numberWithSpaces(convertNumberByUnits(slowlogLogSlowerThan, durationUnit))}
26+
&nbsp;
27+
{durationUnit === DurationUnits.milliSeconds ? DurationUnits.mSeconds : DurationUnits.microSeconds}
2628
&nbsp;were found or Slow Log is disabled on the server.
2729
</EuiText>
2830
</div>

0 commit comments

Comments
 (0)