Skip to content

Commit 1fb1a3c

Browse files
#RI-2849-commands per second update (#774)
* #RI-2849-commands per second update
1 parent 645da8f commit 1fb1a3c

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
lines changed

redisinsight/ui/src/components/database-overview/components/OverviewMetrics/OverviewMetrics.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React, { ReactNode } from 'react'
22
import { EuiLoadingSpinner } from '@elastic/eui'
3-
import { isArray } from 'lodash'
3+
import { isArray, isUndefined } from 'lodash'
44

55
import { formatBytes, Nullable, truncateNumberToRange, truncatePercentage } from 'uiSrc/utils'
66
import { Theme } from 'uiSrc/constants'
@@ -164,7 +164,7 @@ export const getOverviewMetrics = ({ theme, items }: Props): Array<IMetric> => {
164164
},
165165
}
166166

167-
if (opsPerSecond !== undefined && (networkInKbps !== undefined || networkOutKbps !== undefined)) {
167+
if (!isUndefined(opsPerSecond)) {
168168
opsPerSecItem.children = [
169169
{
170170
id: 'commands-per-sec-tip',

redisinsight/ui/src/components/database-overview/styles.module.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,10 @@
7373

7474
.commandsPerSecTip {
7575
margin-bottom: 8px;
76+
77+
&:last-child {
78+
margin-bottom: 0;
79+
}
7680
.moreInfoOverviewIcon {
7781
margin-right: 8px;
7882
width: auto !important;

redisinsight/ui/src/styles/components/_buttons.scss

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
color: var(--euiColorPrimaryText) !important;
1919
}
2020
}
21-
&:focus,
22-
&:focus-within {
21+
&:focus:not(:hover),
22+
&:focus-within:not(:hover) {
2323
border: 2px solid var(--euiColorPrimary);
2424
}
2525
.euiTextColor--default {
@@ -36,8 +36,8 @@
3636
&:hover {
3737
color: var(--euiColorPrimaryText) !important;
3838
}
39-
&:focus,
40-
&:focus-within {
39+
&:focus:not(:hover),
40+
&:focus-within:not(:hover) {
4141
border: 2px solid var(--euiColorPrimary);
4242
}
4343
}
@@ -52,8 +52,8 @@
5252
background-color: var(--buttonSecondaryHoverColor);
5353
border-color: var(--buttonSecondaryHoverColor);
5454
}
55-
&:focus,
56-
&:focus-within {
55+
&:focus:not(:hover),
56+
&:focus-within:not(:hover) {
5757
border: 2px solid var(--euiColorPrimary);
5858
}
5959
}

0 commit comments

Comments
 (0)