Skip to content

Commit da4f2d5

Browse files
#RI-3583-update parse group response (#1189)
1 parent 94f4622 commit da4f2d5

File tree

4 files changed

+7
-19
lines changed

4 files changed

+7
-19
lines changed

redisinsight/ui/src/components/query-card/QueryCard.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export interface Props {
2929
isOpen: boolean
3030
result: Maybe<CommandExecutionResult[]>
3131
activeMode: RunQueryMode
32-
mode: RunQueryMode
32+
mode?: RunQueryMode
3333
activeResultsMode?: ResultsMode
3434
resultsMode?: ResultsMode
3535
emptyCommand: boolean

redisinsight/ui/src/components/query-card/QueryCardCliResultWrapper/styles.module.scss

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,11 @@
3434
}
3535

3636
.container .alert {
37-
font-size: 13px !important;
38-
line-height: 18px !important;
37+
font-size: 14px !important;
38+
line-height: 17px !important;
3939
letter-spacing: -0.13px !important;
4040
color: var(--euiColorWarningLight) !important;
41+
margin-bottom: 4px;
4142
}
4243

4344
.container .alertIcon {

redisinsight/ui/src/components/query-card/QueryCardHeader/QueryCardHeader.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export interface Props {
3939
createdAt?: Date
4040
summaryText?: string
4141
activeMode: RunQueryMode
42-
mode: RunQueryMode
42+
mode?: RunQueryMode
4343
activeResultsMode?: ResultsMode
4444
summary?: string
4545
queryType: WBQueryType

redisinsight/ui/src/utils/cliHelper.tsx

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -88,19 +88,6 @@ const wbSummaryCommand = (command: string) => (
8888
</span>
8989
)
9090

91-
const wbSummaryCommandResult = (result: string, status: CommandExecutionStatus) => (
92-
<span
93-
className={
94-
status === CommandExecutionStatus.Success
95-
? `${CliPrefix.Cli}-output-response-success`
96-
: `${CliPrefix.Cli}-output-response-fail`
97-
}
98-
data-testid="wb-command-result"
99-
>
100-
{`${result} \n`}
101-
</span>
102-
)
103-
10491
const clearOutput = (dispatch: any) => {
10592
dispatch(resetOutput())
10693
}
@@ -110,12 +97,12 @@ const cliParseCommandsGroupResult = (
11097
index: number
11198
) => {
11299
const executionCommand = wbSummaryCommand(result.command)
113-
const executionResult = wbSummaryCommandResult(result.response || '(nil)', result.status)
114-
100+
const executionResult = cliParseTextResponse(result.response || '(nil)', result.command, result.status)
115101
return (
116102
<Fragment key={`group-result-${index}`}>
117103
{executionCommand}
118104
{executionResult}
105+
{'\n'}
119106
</Fragment>
120107
)
121108
}

0 commit comments

Comments
 (0)