@@ -109,6 +109,14 @@ const ProfileSelect = styled(RiSelect)`
109
109
width: 46px;
110
110
padding: inherit !important;
111
111
112
+ &.profiler {
113
+ width: 50px;
114
+ }
115
+
116
+ &.toggle-view {
117
+ width: 40px;
118
+ }
119
+
112
120
& ~ div {
113
121
right: 0;
114
122
@@ -385,7 +393,7 @@ const QueryCardHeader = (props: Props) => {
385
393
</ div >
386
394
</ FlexItem >
387
395
< FlexItem className = { styles . controls } >
388
- < Row align = "center" justify = "end" gap = "l " >
396
+ < Row align = "center" justify = "end" gap = "s " >
389
397
< FlexItem
390
398
className = { styles . time }
391
399
data-testid = "command-execution-date-time"
@@ -440,24 +448,21 @@ const QueryCardHeader = (props: Props) => {
440
448
onClick = { onDropDownViewClick }
441
449
>
442
450
{ isOpen && canCommandProfile && ! summaryText && (
443
- < div className = { styles . dropdownWrapper } >
444
- < div className = { styles . dropdown } >
445
- < ProfileSelect
446
- placeholder = { profileOptions [ 0 ] . inputDisplay }
447
- onChange = { ( value : ProfileQueryType | string ) =>
448
- onQueryProfile ( value as ProfileQueryType )
449
- }
450
- options = { profileOptions }
451
- data-testid = "run-profile-type"
452
- valueRender = { ( { option, isOptionValue } ) => {
453
- if ( isOptionValue ) {
454
- return option . dropdownDisplay as JSX . Element
455
- }
456
- return option . inputDisplay as JSX . Element
457
- } }
458
- />
459
- </ div >
460
- </ div >
451
+ < ProfileSelect
452
+ placeholder = { profileOptions [ 0 ] . inputDisplay }
453
+ onChange = { ( value : ProfileQueryType | string ) =>
454
+ onQueryProfile ( value as ProfileQueryType )
455
+ }
456
+ className = "profiler"
457
+ options = { profileOptions }
458
+ data-testid = "run-profile-type"
459
+ valueRender = { ( { option, isOptionValue } ) => {
460
+ if ( isOptionValue ) {
461
+ return option . dropdownDisplay as JSX . Element
462
+ }
463
+ return option . inputDisplay as JSX . Element
464
+ } }
465
+ />
461
466
) }
462
467
</ FlexItem >
463
468
) }
@@ -467,22 +472,19 @@ const QueryCardHeader = (props: Props) => {
467
472
onClick = { onDropDownViewClick }
468
473
>
469
474
{ isOpen && options . length > 1 && ! summaryText && (
470
- < div className = { styles . dropdownWrapper } >
471
- < div className = { styles . dropdown } >
472
- < ProfileSelect
473
- options = { modifiedOptions }
474
- valueRender = { ( { option, isOptionValue } ) => {
475
- if ( isOptionValue ) {
476
- return option . dropdownDisplay as JSX . Element
477
- }
478
- return option . inputDisplay as JSX . Element
479
- } }
480
- value = { selectedValue }
481
- onChange = { ( value : string ) => onChangeView ( value ) }
482
- data-testid = "select-view-type"
483
- />
484
- </ div >
485
- </ div >
475
+ < ProfileSelect
476
+ options = { modifiedOptions }
477
+ valueRender = { ( { option, isOptionValue } ) => {
478
+ if ( isOptionValue ) {
479
+ return option . dropdownDisplay as JSX . Element
480
+ }
481
+ return option . inputDisplay as JSX . Element
482
+ } }
483
+ value = { selectedValue }
484
+ onChange = { ( value : string ) => onChangeView ( value ) }
485
+ className = "toggle-view"
486
+ data-testid = "select-view-type"
487
+ />
486
488
) }
487
489
</ FlexItem >
488
490
) }
@@ -498,13 +500,15 @@ const QueryCardHeader = (props: Props) => {
498
500
) }
499
501
</ FlexItem >
500
502
< FlexItem className = { styles . buttonIcon } >
501
- < IconButton
502
- disabled = { loading || clearing }
503
- icon = { DeleteIcon }
504
- aria-label = "Delete command"
505
- data-testid = "delete-command"
506
- onClick = { handleQueryDelete }
507
- />
503
+ < RiTooltip content = "Clear result" position = "left" >
504
+ < IconButton
505
+ disabled = { loading || clearing }
506
+ icon = { DeleteIcon }
507
+ aria-label = "Delete command"
508
+ data-testid = "delete-command"
509
+ onClick = { handleQueryDelete }
510
+ />
511
+ </ RiTooltip >
508
512
</ FlexItem >
509
513
{ ! isFullScreen && (
510
514
< FlexItem className = { cx ( styles . buttonIcon , styles . playIcon ) } >
0 commit comments