Skip to content

Commit d9e65af

Browse files
authored
RI-7549 Fix the layout of the FT.INFO command output in the Workbench results (#4988)
1 parent c41c10c commit d9e65af

File tree

2 files changed

+13
-6
lines changed

2 files changed

+13
-6
lines changed

redisinsight/ui/src/packages/redisearch/src/components/TableInfoResult/TableInfoResult.tsx

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@ import { Table, ColumnDefinition } from 'uiSrc/components/base/layout/table'
66

77
import { RiIcon } from 'uiSrc/components/base/icons/RiIcon'
88
import { ColorText, Text } from '../../../../../components/base/text'
9-
import { LoadingContent } from '../../../../../components/base/layout'
9+
import { LoadingContent, Spacer } from '../../../../../components/base/layout'
1010
import GroupBadge from '../GroupBadge'
1111
import { InfoAttributesBoolean } from '../../constants'
12+
import { FlexGroup } from 'uiSrc/components/base/layout/flex'
1213

1314
export interface Props {
1415
query: string
@@ -68,7 +69,7 @@ const TableInfoResult = React.memo((props: Props) => {
6869
<div>
6970
{result ? (
7071
<>
71-
<Text className="row" size="s" color="subdued">
72+
<Text className="row" size="s">
7273
Indexing
7374
<GroupBadge
7475
type={result?.index_definition?.key_type?.toLowerCase()}
@@ -79,7 +80,7 @@ const TableInfoResult = React.memo((props: Props) => {
7980
?.map((prefix: any) => `"${prefix}"`)
8081
.join(',')}
8182
</Text>
82-
<Text className="row" size="s" color="subdued">
83+
<Text className="row" size="s">
8384
Options:{' '}
8485
{result?.index_options?.length ? (
8586
<ColorText style={{ color: 'var(--euiColorFullShade)' }}>
@@ -98,7 +99,7 @@ const TableInfoResult = React.memo((props: Props) => {
9899
const Footer = () => (
99100
<div>
100101
{result ? (
101-
<Text className="row" size="s" color="subdued">
102+
<Text className="row" size="s">
102103
{`Number of docs: ${result?.num_docs || '0'} (max ${result?.max_doc_id || '0'}) | `}
103104
{`Number of records: ${result?.num_records || '0'} | `}
104105
{`Number of terms: ${result?.num_terms || '0'}`}
@@ -116,11 +117,16 @@ const TableInfoResult = React.memo((props: Props) => {
116117
return (
117118
<div className="container">
118119
{isDataArr && (
119-
<div className="content" data-testid={`query-table-result-${query}`}>
120+
<FlexGroup
121+
direction="column"
122+
gap="m"
123+
className="content"
124+
data-testid={`query-table-result-${query}`}
125+
>
120126
{Header()}
121127
<Table columns={columns} data={items ?? []} />
122128
{Footer()}
123-
</div>
129+
</FlexGroup>
124130
)}
125131
{isDataEl && <div className={cx('resultEl')}>{result}</div>}
126132
{!isDataArr && !isDataEl && (

redisinsight/ui/src/packages/redisearch/src/styles/styles.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ html {
106106
}
107107

108108
.badge {
109+
display: inline-flex !important;
109110
position: relative;
110111
font: normal normal normal 12px/15px;
111112
margin: 0 5px;

0 commit comments

Comments
 (0)