Skip to content

Commit 6deeb04

Browse files
authored
Merge pull request #2507 from RedisInsight/fe/bugfix/RI-4885_RI-4887
fix RI-4885, RI-4887
2 parents 1155f84 + d9c98ea commit 6deeb04

File tree

5 files changed

+86
-62
lines changed

5 files changed

+86
-62
lines changed

redisinsight/ui/src/components/oauth/oauth-select-plan/OAuthSelectPlan.tsx

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {
99
EuiText,
1010
EuiTextColor,
1111
EuiTitle,
12+
EuiToolTip,
1213
} from '@elastic/eui'
1314
import { toNumber, filter, get, find, first } from 'lodash'
1415
import { useDispatch, useSelector } from 'react-redux'
@@ -101,11 +102,16 @@ const OAuthSelectPlan = () => {
101102
{`${countryName} (${cityName})`}
102103
<EuiTextColor className={styles.regionName}>{region}</EuiTextColor>
103104
{ tfProviderRegions?.includes(region) && (
104-
<EuiIcon
105-
type={theme === Theme.Dark ? TriggeredFunctionsDarkSVG : TriggeredFunctionsLightSVG}
106-
className={styles.tfOptionIcon}
107-
data-testid={`tf-icon-${region}`}
108-
/>
105+
<EuiToolTip
106+
content="Triggers and functions are available in this region"
107+
anchorClassName={styles.tfOptionIconTooltip}
108+
>
109+
<EuiIcon
110+
type={theme === Theme.Dark ? TriggeredFunctionsDarkSVG : TriggeredFunctionsLightSVG}
111+
className={styles.tfOptionIcon}
112+
data-testid={`tf-icon-${region}`}
113+
/>
114+
</EuiToolTip>
109115
)}
110116
</EuiText>
111117
)

redisinsight/ui/src/components/oauth/oauth-select-plan/styles.module.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,13 @@
135135
margin-left: 8px;
136136
}
137137

138+
.tfOptionIconTooltip {
139+
display: inline;
140+
}
141+
138142
.tfOptionIcon {
139143
display: inline-block !important;
140144
width: 16px !important;
141145
margin-left: 11px;
146+
margin-bottom: 0 !important;
142147
}

redisinsight/ui/src/pages/workbench/components/wb-results/WBResults/WBResults.tsx

Lines changed: 53 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ const WBResults = (props: Props) => {
8181
}
8282

8383
return (
84-
<div className={cx(styles.container)}>
84+
<div className={styles.wrapper}>
8585
{!!items.length && (
8686
<div className={styles.header}>
8787
<EuiButtonEmpty
@@ -97,56 +97,58 @@ const WBResults = (props: Props) => {
9797
</EuiButtonEmpty>
9898
</div>
9999
)}
100-
<div ref={scrollDivRef} />
101-
{items.map((
102-
{
103-
command = '',
104-
isOpen = false,
105-
result = undefined,
106-
summary = undefined,
107-
id = '',
108-
loading,
109-
createdAt,
110-
mode,
111-
resultsMode,
112-
emptyCommand,
113-
isNotStored,
114-
executionTime,
115-
db,
116-
}
117-
) => (
118-
<QueryCard
119-
id={id}
120-
key={id}
121-
isOpen={isOpen}
122-
result={result}
123-
summary={summary}
124-
clearing={clearing}
125-
loading={loading}
126-
command={command}
127-
createdAt={createdAt}
128-
activeMode={activeMode}
129-
emptyCommand={emptyCommand}
130-
isNotStored={isNotStored}
131-
executionTime={executionTime}
132-
mode={mode}
133-
activeResultsMode={activeResultsMode}
134-
resultsMode={resultsMode}
135-
db={db}
136-
onQueryOpen={() => onQueryOpen(id)}
137-
onQueryProfile={(profileType) => handleQueryProfile(
138-
profileType,
139-
{ command, mode, resultsMode },
140-
)}
141-
onQueryReRun={() => onQueryReRun(
142-
command,
143-
null,
144-
{ mode, results: resultsMode, clearEditor: false, },
145-
)}
146-
onQueryDelete={() => onQueryDelete(id)}
147-
/>
148-
))}
149-
{!items.length && NoResults}
100+
<div className={cx(styles.container)}>
101+
<div ref={scrollDivRef} />
102+
{items.map((
103+
{
104+
command = '',
105+
isOpen = false,
106+
result = undefined,
107+
summary = undefined,
108+
id = '',
109+
loading,
110+
createdAt,
111+
mode,
112+
resultsMode,
113+
emptyCommand,
114+
isNotStored,
115+
executionTime,
116+
db,
117+
}
118+
) => (
119+
<QueryCard
120+
id={id}
121+
key={id}
122+
isOpen={isOpen}
123+
result={result}
124+
summary={summary}
125+
clearing={clearing}
126+
loading={loading}
127+
command={command}
128+
createdAt={createdAt}
129+
activeMode={activeMode}
130+
emptyCommand={emptyCommand}
131+
isNotStored={isNotStored}
132+
executionTime={executionTime}
133+
mode={mode}
134+
activeResultsMode={activeResultsMode}
135+
resultsMode={resultsMode}
136+
db={db}
137+
onQueryOpen={() => onQueryOpen(id)}
138+
onQueryProfile={(profileType) => handleQueryProfile(
139+
profileType,
140+
{ command, mode, resultsMode },
141+
)}
142+
onQueryReRun={() => onQueryReRun(
143+
command,
144+
null,
145+
{ mode, results: resultsMode, clearEditor: false, },
146+
)}
147+
onQueryDelete={() => onQueryDelete(id)}
148+
/>
149+
))}
150+
{!items.length && NoResults}
151+
</div>
150152
</div>
151153
)
152154
}

redisinsight/ui/src/pages/workbench/components/wb-results/WBResults/styles.module.scss

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,23 @@
22
@import '@elastic/eui/src/components/table/mixins';
33
@import '@elastic/eui/src/global_styling/index';
44

5-
.container {
6-
@include euiScrollBar;
7-
5+
.wrapper {
86
flex: 1;
97
height: 100%;
108
width: 100%;
119
background-color: var(--euiColorEmptyShade);
12-
color: var(--euiTextSubduedColor) !important;
1310
border: 1px solid var(--euiColorLightShade);
11+
12+
display: flex;
13+
flex-direction: column;
14+
}
15+
16+
.container {
17+
@include euiScrollBar;
18+
color: var(--euiTextSubduedColor) !important;
19+
20+
flex: 1;
21+
width: 100%;
1422
overflow: auto;
1523
}
1624

@@ -20,6 +28,9 @@
2028
align-items: center;
2129
justify-content: flex-end;
2230
padding: 0 12px;
31+
32+
flex-shrink: 0;
33+
border-bottom: 1px solid var(--tableDarkestBorderColor);
2334
}
2435

2536
.noResults {

tests/e2e/tests/regression/insights/feature-flag.e2e.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ test('Verify that default config applied when remote config version is lower', a
4444

4545
const featureVersion = await JSON.parse(await getColumnValueFromTableInDB(featuresConfigTable, 'data')).version;
4646

47-
await t.expect(featureVersion).eql(2, 'Config with lowest version applied');
47+
await t.expect(featureVersion).eql(2.32, 'Config with lowest version applied');
4848
await t.expect(browserPage.InsightsPanel.insightsBtn.exists).notOk('Insights panel displayed when disabled in default config');
4949
});
5050
test('Verify that invaid remote config not applied even if its version is higher than in the default config', async t => {
@@ -54,7 +54,7 @@ test('Verify that invaid remote config not applied even if its version is higher
5454

5555
const featureVersion = await JSON.parse(await getColumnValueFromTableInDB(featuresConfigTable, 'data')).version;
5656

57-
await t.expect(featureVersion).eql(2, 'Config highest version not applied');
57+
await t.expect(featureVersion).eql(2.32, 'Config highest version not applied');
5858
await t.expect(browserPage.InsightsPanel.insightsBtn.exists).notOk('Insights panel displayed when disabled in default config');
5959
});
6060
test

0 commit comments

Comments
 (0)