diff --git a/src/views/FileEntity/Title/index.tsx b/src/views/FileEntity/Title/index.tsx index 42b7839d..fa93b48b 100644 --- a/src/views/FileEntity/Title/index.tsx +++ b/src/views/FileEntity/Title/index.tsx @@ -1,12 +1,17 @@ import intl from 'react-intl-universal'; import { FileImageOutlined, LockOutlined, UnlockFilled } from '@ant-design/icons'; +import { ISyntheticSqon } from '@ferlab/ui/core/data/sqon/types'; +import { generateQuery, generateValueFilter } from '@ferlab/ui/core/data/sqon/utils'; import { EntityTitle } from '@ferlab/ui/core/pages/EntityPage'; import { Popover, Space } from 'antd'; +import { INDEXES } from 'graphql/constants'; import { IFileEntity } from 'graphql/files/models'; +import { DATA_FILES_SAVED_SETS_FIELD } from 'views/DataExploration/utils/constant'; import { FENCE_CONNECTION_STATUSES } from 'common/fenceTypes'; import CavaticaAnalyzeButton from 'components/Cavatica/AnalyzeButton'; import PopoverContentLink from 'components/uiKit/PopoverContentLink'; +import DownloadFileManifestModal from 'components/uiKit/reports/DownloadFileManifestModal'; import { useFenceConnection } from 'store/fenceConnection'; import { userHasAccessToFile } from 'utils/dataFiles'; @@ -29,6 +34,17 @@ const FileEntityTitle: React.FC = ({ file, loading }) => { ) : false; + const generateSqonForFile = (): ISyntheticSqon => + generateQuery({ + newFilters: [ + generateValueFilter({ + field: DATA_FILES_SAVED_SETS_FIELD, + index: INDEXES.FILE, + value: file ? [file?.file_id] : [], + }), + ], + }); + const title = { text: file?.file_id, icon: , @@ -60,7 +76,17 @@ const FileEntityTitle: React.FC = ({ file, loading }) => { ), - extra: {file && }, + extra: ( + + + {file && } + + ), }; return ;