Skip to content

Commit

Permalink
feat(TopTables): add links to tables
Browse files Browse the repository at this point in the history
  • Loading branch information
krosy1337 committed Oct 19, 2023
1 parent 75e6716 commit c44850a
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {useDispatch} from 'react-redux';
import {useLocation} from 'react-router';
import cn from 'bem-cn-lite';

import DataTable, {Column} from '@gravity-ui/react-data-table';
Expand All @@ -17,6 +18,7 @@ import type {KeyValueRow} from '../../../../../types/api/query';
import {formatBytes, getSizeWithSignificantDigits} from '../../../../../utils/bytesParsers';
import {TableSkeleton} from '../../../../../components/TableSkeleton/TableSkeleton';
import {ResponseError} from '../../../../../components/Errors/ResponseError';
import {LinkToSchemaObject} from '../../../../../components/LinkToSchemaObject/LinkToSchemaObject';

import './TenantStorage.scss';

Expand All @@ -28,6 +30,7 @@ interface TopTablesProps {

export function TopTables({path}: TopTablesProps) {
const dispatch = useDispatch();
const location = useLocation();

const {autorefresh} = useTypedSelector((state) => state.schema);

Expand Down Expand Up @@ -70,7 +73,9 @@ export function TopTables({path}: TopTablesProps) {
render: ({row}) => (
<div className={b('cell-with-popover-wrapper')}>
<Popover className={b('cell-with-popover')} content={row.Path}>
{row.Path}
<LinkToSchemaObject path={row.Path as string} location={location}>
{row.Path}
</LinkToSchemaObject>
</Popover>
</div>
),
Expand Down

0 comments on commit c44850a

Please sign in to comment.