Skip to content

Commit fb12b08

Browse files
authored
Merge pull request #563 from RedisInsight/bugfix/RI-2745
#RI-2745 - fix showing log
2 parents b5d4069 + 073af38 commit fb12b08

File tree

4 files changed

+28
-26
lines changed

4 files changed

+28
-26
lines changed

redisinsight/ui/src/components/monitor/Monitor/Monitor.tsx

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,9 @@ const Monitor = (props: Props) => {
8383
</div>
8484
<div className={styles.saveLogContainer}>
8585
<EuiToolTip
86-
title="Allows you to download the generated log file after pausing the Profiler."
86+
title="Allows you to download the generated log file after pausing the Profiler"
8787
content="Profiler log is saved to a file on your local machine with no size limitation.
88-
The temporary log file will be automatically rewritten when the Profiler is reset"
88+
The temporary log file will be automatically rewritten when the Profiler is reset."
8989
>
9090
<EuiSwitch
9191
compressed
@@ -122,7 +122,7 @@ const Monitor = (props: Props) => {
122122

123123
return (
124124
<>
125-
<div className={styles.container} data-testid="monitor">
125+
<div className={cx(styles.container, { [styles.isRunning]: isRunning && !isPaused })} data-testid="monitor">
126126
{(error && !isRunning)
127127
? (<MonitorError />)
128128
: (
@@ -151,12 +151,7 @@ const Monitor = (props: Props) => {
151151
)}
152152
</div>
153153
)}
154-
{isRunning && isPaused && !isSaveToFile && (
155-
<div data-testid="monitor-stopped" className={styles.monitorStoppedText}>
156-
Profiler is paused.
157-
</div>
158-
)}
159-
{(isStarted && isPaused && isSaveToFile) && (
154+
{(isStarted && isPaused) && (
160155
<MonitorLog />
161156
)}
162157
</div>

redisinsight/ui/src/components/monitor/Monitor/styles.module.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@
2222

2323
z-index: 10;
2424
overflow: auto;
25+
26+
&.isRunning {
27+
outline: 1px solid var(--euiColorPrimary);
28+
border-top-color: transparent;
29+
}
2530
}
2631

2732
.listWrapper {

redisinsight/ui/src/components/monitor/MonitorLog/MonitorLog.tsx

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const MIDDLE_SCREEN_RESOLUTION = 460 - PADDINGS_OUTSIDE
1515
const SMALL_SCREEN_RESOLUTION = 360 - PADDINGS_OUTSIDE
1616

1717
const MonitorLog = () => {
18-
const { timestamp, logFileId } = useSelector(monitorSelector)
18+
const { timestamp, logFileId, isSaveToFile } = useSelector(monitorSelector)
1919
const dispatch = useDispatch()
2020

2121
const duration = cutDurationText(
@@ -74,22 +74,24 @@ const MonitorLog = () => {
7474
responsive={false}
7575
>
7676
<EuiFlexItem grow={false}>
77-
<EuiToolTip
78-
content="Download Profiler Log"
79-
>
80-
<EuiButton
81-
size="s"
82-
color="secondary"
83-
href={linkToDownload}
84-
iconType="download"
85-
className={styles.btn}
86-
data-testid="download-log-btn"
87-
{...downloadBtnProps}
77+
{isSaveToFile && (
78+
<EuiToolTip
79+
content="Download Profiler Log"
8880
>
89-
{width > SMALL_SCREEN_RESOLUTION && ' Download '}
90-
Log
91-
</EuiButton>
92-
</EuiToolTip>
81+
<EuiButton
82+
size="s"
83+
color="secondary"
84+
href={linkToDownload}
85+
iconType="download"
86+
className={styles.btn}
87+
data-testid="download-log-btn"
88+
{...downloadBtnProps}
89+
>
90+
{width > SMALL_SCREEN_RESOLUTION && ' Download '}
91+
Log
92+
</EuiButton>
93+
</EuiToolTip>
94+
)}
9395
</EuiFlexItem>
9496
<EuiFlexItem grow={false}>
9597
<EuiButton

redisinsight/ui/src/pages/home/components/AddInstanceForm/InstanceForm/InstanceForm.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -723,7 +723,7 @@ const AddStandaloneForm = (props: Props) => {
723723
<EuiCheckbox
724724
id={`${htmlIdGenerator()()} over db`}
725725
name="showDb"
726-
label="Select the Redis logical database"
726+
label="Select Logical Database"
727727
checked={!!formik.values.showDb}
728728
onChange={handleChangeDbIndexCheckbox}
729729
data-testid="showDb"

0 commit comments

Comments
 (0)