Skip to content

Commit 8ee2fec

Browse files
committed
ARTEMIS-6000 - move additional options in the same row
1 parent e0e5169 commit 8ee2fec

1 file changed

Lines changed: 65 additions & 41 deletions

File tree

  • artemis-console-extension/artemis-extension/packages/artemis-console-plugin/src/messages

artemis-console-extension/artemis-extension/packages/artemis-console-plugin/src/messages/SendMessage.tsx

Lines changed: 65 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -278,61 +278,85 @@ export const SendMessage: React.FunctionComponent<SendMessageProps> = (props: Se
278278
return (
279279
<PageSection variant='light'>
280280
<Title headingLevel='h2'>Send Message to {props.isAddress ? 'Address' : 'Queue'} {props.address}{' '}
281-
<Popover bodyContent={Hint}><OutlinedQuestionCircleIcon /></Popover></Title>
282-
<Text component='p'> <br /></Text>
281+
<Popover bodyContent={Hint}>
282+
<OutlinedQuestionCircleIcon />
283+
</Popover>
284+
</Title>
285+
286+
<Text component='p'><br /></Text>
287+
283288
<Form onSubmit={handleSubmit}>
284-
<FormGroup
285-
label="Durable"
286-
labelIcon={<Tooltip content='Mark the message as persistent and write it to the broker journal if the destination queue is durable.'><InfoCircleIcon /></Tooltip>}
287-
>
288-
<Checkbox
289-
isChecked={isDurableChecked}
290-
onChange={() => setIsDurableChecked(!isDurableChecked)}
291-
id="durable" />
292289

293-
</FormGroup>
294-
<FormGroup label="Create Message ID"
295-
labelIcon={
296-
<Tooltip content='Select to request that the broker generates a universally unique identifier (UUID) on the message before it is routed. For a JMS client, the UUID is the JMS Message ID of the message. Normally, not required if you are using a non-JMS client.'><InfoCircleIcon />
297-
</Tooltip>}>
298-
<Checkbox
299-
isChecked={isCreateIDChecked}
300-
onChange={() => setIsCreateIDChecked(!isCreateIDChecked)}
301-
id="createid" />
302-
</FormGroup>
303-
<FormGroup label="Use Current Logged in User"
304-
labelIcon={<Tooltip content='Use the credentials of the user that is currently logged in to the console to send a message. If you want to use a different user, clear the checkbox and specify a username and password.'><InfoCircleIcon /></Tooltip>}
290+
<Flex
291+
direction={{ default: 'column', md: 'row' }}
292+
gap={{ default: 'gapMd' }}
293+
alignItems={{ default: 'alignItemsFlexEnd' }}
305294
>
306-
<Checkbox
307-
isChecked={isUseLogonChecked}
308-
onChange={() => setIsUselogonChecked(!isUseLogonChecked)}
309-
id="uselogon" />
310-
</FormGroup>
311-
{!isUseLogonChecked &&
312-
<><FormGroup label="Username">
313-
<TextInput
314-
value={username}
315-
type='text'
316-
onChange={handleUsernameChange}
317-
id="username"
318-
name="username" />
319-
</FormGroup><FormGroup label="Password">
295+
<FlexItem>
296+
<FormGroup
297+
label="Durable"
298+
labelIcon={<Tooltip content='Mark the message as persistent and write it to the broker journal if the destination queue is durable.'><InfoCircleIcon /></Tooltip>}>
299+
<Checkbox
300+
isChecked={isDurableChecked}
301+
onChange={() => setIsDurableChecked(!isDurableChecked)}
302+
id="durable"/>
303+
</FormGroup>
304+
</FlexItem>
305+
306+
<FlexItem>
307+
<FormGroup
308+
label="Create Message ID"
309+
labelIcon={<Tooltip content='Select to request that the broker generates a universally unique identifier (UUID) on the message before it is routed.'><InfoCircleIcon /></Tooltip>}>
310+
<Checkbox
311+
isChecked={isCreateIDChecked}
312+
onChange={() => setIsCreateIDChecked(!isCreateIDChecked)}
313+
id="createid"/>
314+
</FormGroup>
315+
</FlexItem>
316+
317+
<FlexItem>
318+
<FormGroup
319+
label="Use Current Logged in User"
320+
labelIcon={<Tooltip content='Use the credentials of the user that is currently logged in to the console.'><InfoCircleIcon /></Tooltip>}>
321+
<Checkbox
322+
isChecked={isUseLogonChecked}
323+
onChange={() => setIsUselogonChecked(!isUseLogonChecked)}
324+
id="uselogon"/>
325+
</FormGroup>
326+
</FlexItem>
327+
</Flex>
328+
329+
{!isUseLogonChecked && (
330+
<>
331+
<FormGroup label="Username">
332+
<TextInput
333+
value={username}
334+
type='text'
335+
onChange={handleUsernameChange}
336+
id="username"
337+
name="username"/>
338+
</FormGroup>
339+
340+
<FormGroup label="Password">
320341
<TextInput
321342
value={password}
322343
type='password'
323344
onChange={handlePasswordChange}
324345
id="password"
325-
name="password" />
326-
</FormGroup></>
327-
}
346+
name="password"/>
347+
</FormGroup>
348+
</>
349+
)}
350+
328351
<MessageHeaders onHeadersChange={updateHeaders} headers={props.message?.StringProperties}/>
329-
<MessageBody onBodyChange={updateTheMessageBody} body={props.message?.text} />
330-
<FormGroup>
352+
<MessageBody onBodyChange={updateTheMessageBody} body={props.message?.text}/>
331353

354+
<FormGroup>
332355
<Button type='submit' className='pf-m-1-col'>
333356
Send
334357
</Button>
335358
</FormGroup>
359+
336360
</Form>
337361
</PageSection>
338362
)

0 commit comments

Comments
 (0)