diff --git a/public/app/pages/TagExplorerView.module.scss b/public/app/pages/TagExplorerView.module.scss index ca6aff90a7..dd8700ed91 100644 --- a/public/app/pages/TagExplorerView.module.scss +++ b/public/app/pages/TagExplorerView.module.scss @@ -120,11 +120,6 @@ $pieChartWidth: 300px; margin-right: 10px; } - .bold { - font-weight: bold; - white-space: nowrap; - } - .label { text-align: left; } @@ -136,6 +131,12 @@ $pieChartWidth: 300px; border: 1px solid var(--ps-ui-border); padding: 4px 10px; width: 10%; + overflow: auto; + + .bold { + font-weight: bold; + white-space: nowrap; + } } } } diff --git a/public/app/pages/TagExplorerView.tsx b/public/app/pages/TagExplorerView.tsx index 48a0224539..bdb28428f9 100644 --- a/public/app/pages/TagExplorerView.tsx +++ b/public/app/pages/TagExplorerView.tsx @@ -591,18 +591,22 @@ function Table({ className={styles.tagColor} style={{ backgroundColor: color?.toString() }} /> - - {tagName} - -  {`(${percentage.toFixed(2)}%)`} - - + {tagName} ), }, { value: meanLabel }, { value: stdDeviationLabel }, - { value: totalLabel }, + { + value: ( +
+ {totalLabel} + +  {`(${percentage.toFixed(2)}%)`} + +
+ ), + }, ], }; acc.push(row); @@ -651,6 +655,7 @@ function Table({ sortByDirection={sortByDirection} table={table} className={styles.tagExplorerTable} + tableStyle={{ tableLayout: 'auto' }} /> ); diff --git a/public/app/ui/Table.tsx b/public/app/ui/Table.tsx index 86eb003c46..4ec1d87a20 100644 --- a/public/app/ui/Table.tsx +++ b/public/app/ui/Table.tsx @@ -87,6 +87,7 @@ interface TableProps { isLoading?: boolean; /* enables pagination */ itemsPerPage?: number; + tableStyle?: React.CSSProperties; } function TableComponent({ @@ -98,6 +99,7 @@ function TableComponent({ className, isLoading, itemsPerPage, + tableStyle, }: TableProps) { const hasSort = sortByDirection && sortBy && updateSortParams; const [currPage, setCurrPage] = useState(0); @@ -113,6 +115,7 @@ function TableComponent({ [className || '']: className, })} data-testid="table-ui" + style={tableStyle} >