diff --git a/packages/libs/multi-blast/src/lib/components/BlastJobError.tsx b/packages/libs/multi-blast/src/lib/components/BlastJobError.tsx new file mode 100644 index 0000000000..198ff2239f --- /dev/null +++ b/packages/libs/multi-blast/src/lib/components/BlastJobError.tsx @@ -0,0 +1,57 @@ +import React from 'react'; + +import { + Error as ErrorPage, + Link, + Loading, +} from '@veupathdb/wdk-client/lib/Components'; +import { LongJobResponse } from '../utils/ServiceTypes'; +import { useBlastApi } from '../hooks/api'; +import { usePromise } from '@veupathdb/wdk-client/lib/Hooks/PromiseHook'; +import Banner from '@veupathdb/coreui/lib/components/banners/Banner'; + +interface Props { + job: LongJobResponse; +} + +export function BlastJobError(props: Props) { + const { job } = props; + const blastApi = useBlastApi(); + const jobErrorResult = usePromise(() => { + return blastApi.fetchJobError(job.id); + }, [blastApi, job]); + + if (jobErrorResult.loading) { + return ; + } + + return ( + +
+ {jobErrorResult.value && ( + + )} +

+ Your job did not run successfully. Please{' '} + + contact us + {' '} + for support. +

+
+
+ ); +} diff --git a/packages/libs/multi-blast/src/lib/components/BlastWorkspaceResult.tsx b/packages/libs/multi-blast/src/lib/components/BlastWorkspaceResult.tsx index 05f28e52ac..2667cf8bd9 100644 --- a/packages/libs/multi-blast/src/lib/components/BlastWorkspaceResult.tsx +++ b/packages/libs/multi-blast/src/lib/components/BlastWorkspaceResult.tsx @@ -42,6 +42,7 @@ import { ResultContainer } from './ResultContainer'; import './BlastWorkspaceResult.scss'; import { DiamondResultContainer } from './DiamondResultContainer'; +import { BlastJobError } from './BlastJobError'; interface Props { jobId: string; @@ -82,23 +83,7 @@ export function BlastWorkspaceResult(props: Props) { ) : jobResult.value?.status === 'error' ? ( ) : jobResult.value?.status === 'queueing-error' ? ( - -
- Your job did not run successfully. Please{' '} - - contact us - {' '} - for support. -
-
+ ) : queryResult.value?.status === 'error' ? ( ) : jobResult.value.job.config.tool.startsWith('diamond-') ? ( diff --git a/packages/libs/multi-blast/src/lib/utils/api.ts b/packages/libs/multi-blast/src/lib/utils/api.ts index 6ef4b10362..845fec62ac 100644 --- a/packages/libs/multi-blast/src/lib/utils/api.ts +++ b/packages/libs/multi-blast/src/lib/utils/api.ts @@ -175,6 +175,14 @@ export class BlastApi extends FetchClientWithCredentials { }); } + fetchJobError(jobId: string) { + return this.fetch({ + path: `${JOBS_PATH}/${jobId}/error`, + method: 'GET', + transformResponse: ioTransformer(string), + }); + } + rerunJob(jobId: string) { return this.taggedFetch({ path: `${JOBS_PATH}/${jobId}`, diff --git a/packages/libs/web-common/src/App/UserMenu/UserMenu.scss b/packages/libs/web-common/src/App/UserMenu/UserMenu.scss index 7328a08ded..e10a949729 100644 --- a/packages/libs/web-common/src/App/UserMenu/UserMenu.scss +++ b/packages/libs/web-common/src/App/UserMenu/UserMenu.scss @@ -27,16 +27,17 @@ $white: #e0e0e0; .UserMenu-Pane { opacity: 1; transition: none; + top: 100%; } } } .UserMenu-Pane { - transition: opacity 500ms 1s; + transition: opacity 500ms 1s, top 0s 1s; opacity: 0; right: 0; - top: 100%; + top: -100000px; color: black; display: flex; flex-direction: column; diff --git a/packages/sites/genomics-site/webapp/wdkCustomization/js/client/components/homepage/VEuPathDBHomePage.tsx b/packages/sites/genomics-site/webapp/wdkCustomization/js/client/components/homepage/VEuPathDBHomePage.tsx index bce5ab227b..4348e26e5b 100644 --- a/packages/sites/genomics-site/webapp/wdkCustomization/js/client/components/homepage/VEuPathDBHomePage.tsx +++ b/packages/sites/genomics-site/webapp/wdkCustomization/js/client/components/homepage/VEuPathDBHomePage.tsx @@ -951,18 +951,6 @@ const useHeaderMenuItems = ( type: 'reactRoute', url: makeStaticPageRoute('/infrastructure.html'), }, - { - key: 'usage-metrics', - display: 'Monthly Usage Metrics', - type: 'externalLink', - url: '/reports/VEuPathDB_BRC4_usage_metrics_report.pdf', - }, - { - key: 'perf-metrics', - display: 'Monthly Performance Metrics', - type: 'externalLink', - url: '/reports/VEuPathDB_BRC4_performance_metrics_report.pdf', - }, { key: 'usage-statistics', display: 'Website usage statistics', @@ -1054,12 +1042,6 @@ const useHeaderMenuItems = ( type: 'reactRoute', url: '/reset-session', }, - { - key: 'user-doc', - display: 'Downloadable User documentation', - type: 'externalLink', - url: '/reports/VEuPathDB_User_Documentation.pdf', - }, ], }, {