Skip to content

Commit 8d55a2c

Browse files
#RI-3432-fix commands pipeline (#1142)
1 parent 9f2036b commit 8d55a2c

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ $marginIcon: 12px;
4040
}
4141

4242
.titleWrapper {
43-
width: calc(100% - 350px);
43+
width: calc(100% - 380px);
4444

4545
@media (min-width: $breakpoint-m) {
4646
width: calc(100% - 420px);

redisinsight/ui/src/pages/workbench/components/wb-view/WBViewWrapper.tsx

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -145,21 +145,18 @@ const WBViewWrapper = () => {
145145
) => {
146146
const { loading, batchSize } = state
147147
const isNewCommand = () => !commandId
148-
const [commands, ...rest] = chunk(splitMonacoValuePerLines(commandInit), batchSize > 1 ? batchSize : 1)
148+
const commandsForExecuting = splitMonacoValuePerLines(removeMonacoComments(commandInit))
149+
.map((command) => removeMonacoComments(decode(command).trim()))
150+
const [commands, ...rest] = chunk(commandsForExecuting, batchSize > 1 ? batchSize : 1)
149151
const multiCommands = rest.map((command) => getMultiCommands(command))
150-
const commandLine = without(
151-
commands.map((command) => removeMonacoComments(decode(command).trim())),
152-
''
153-
)
154-
155-
if (!commandLine.length || loading) {
152+
if (!commands.length || loading) {
156153
setMultiCommands(multiCommands)
157154
return
158155
}
159156

160157
isNewCommand() && scrollResults('start')
161158

162-
sendCommand(commandLine, multiCommands)
159+
sendCommand(commands, multiCommands)
163160
}
164161

165162
const sendCommand = (

0 commit comments

Comments
 (0)