Skip to content

Commit

Permalink
change job history to submission history
Browse files Browse the repository at this point in the history
  • Loading branch information
calypsomatic committed Feb 14, 2025
1 parent 0f75d5d commit a9e644e
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 30 deletions.
10 changes: 5 additions & 5 deletions src/components/job-common.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,29 +127,29 @@ export const makeSection = (label, children, { style = {} } = {}) =>

export const breadcrumbHistoryCaret = icon('angle-right', { size: 10, style: { margin: '0 0.25rem' } });

export const jobHistoryBreadcrumbPrefix = (namespace, workspaceName) => {
export const submissionHistoryBreadcrumbPrefix = (namespace, workspaceName) => {
return h(Fragment, [
h(
Link,
{
href: Nav.getLink('workspace-job-history', { namespace, name: workspaceName }),
href: Nav.getLink('workspace-submission-history', { namespace, name: workspaceName }),
},
[icon('arrowLeft', { style: { marginRight: '0.5rem' } }), 'Job History']
[icon('arrowLeft', { style: { marginRight: '0.5rem' } }), 'Submission History']
),
breadcrumbHistoryCaret,
]);
};

export const submissionDetailsBreadcrumbSubtitle = (namespace, workspaceName, submissionId) => {
return div({ style: { marginBottom: '1rem', display: 'flex', alignItems: 'center' } }, [
jobHistoryBreadcrumbPrefix(namespace, workspaceName),
submissionHistoryBreadcrumbPrefix(namespace, workspaceName),
h3({ style: Style.elements.sectionHeader }, [`Submission ${submissionId}`]),
]);
};

export const workflowDetailsBreadcrumbSubtitle = (namespace, workspaceName, submissionId, workflowId) => {
return div({ style: { marginBottom: '1rem', display: 'flex', alignItems: 'center' } }, [
jobHistoryBreadcrumbPrefix(namespace, workspaceName),
submissionHistoryBreadcrumbPrefix(namespace, workspaceName),
h(
Link,
{
Expand Down
30 changes: 15 additions & 15 deletions src/pages/workspaces/workspace/JobHistory.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ const statusCell = (workflowStatuses, status) => {

const noJobsMessage = div({ style: { fontSize: 20, margin: '1rem' } }, [
div([
'You have not run any jobs yet. To get started, go to the ',
'You have not run any submissions yet. To get started, go to the ',
span({ style: { fontWeight: 600 } }, ['Workflows']),
' tab and select a workflow to run.',
]),
Expand All @@ -119,17 +119,17 @@ const noJobsMessage = div({ style: { fontSize: 20, margin: '1rem' } }, [
...Utils.newTabLinkProps,
href: 'https://support.terra.bio/hc/en-us/articles/360027920592',
},
['What is a job?']
['What is a submission?']
),
]),
]);

const JobHistory = _.flow(
forwardRefWithName('JobHistory'),
const SubmissionHistory = _.flow(
forwardRefWithName('SubmissionHistory'),
wrapWorkspace({
breadcrumbs: (props) => breadcrumbs.commonPaths.workspaceDashboard(props),
title: 'Job History',
activeTab: 'job history',
title: 'Submission History',
activeTab: 'submission history',
})
)(({ namespace, name, workspace }, ref) => {
// State
Expand Down Expand Up @@ -253,12 +253,12 @@ const JobHistory = _.flow(
h(AutoSizer, [
({ width, height }) =>
h(FlexTable, {
'aria-label': 'job history',
'aria-label': 'submission history',
width,
height,
rowCount: sortedSubmissions.length,
hoverHighlight: true,
noContentMessage: 'No matching jobs',
noContentMessage: 'No matching submissions',
sort,
columns: [
{
Expand Down Expand Up @@ -297,9 +297,9 @@ const JobHistory = _.flow(
),
},
tooltip: Utils.cond(
[!!failed, () => 'This job failed'],
[!!running || !!submitted, () => 'This job is running...'],
() => 'This job succeeded'
[!!failed, () => 'This submission failed'],
[!!running || !!submitted, () => 'This submission is running...'],
() => 'This submission succeeded'
),
href: Nav.getLink('workspace-submission-details', { namespace, name, submissionId }),
},
Expand Down Expand Up @@ -482,9 +482,9 @@ const JobHistory = _.flow(

export const navPaths = [
{
name: 'workspace-job-history',
path: '/workspaces/:namespace/:name/job_history',
component: JobHistory,
title: ({ name }) => `${name} - Job History`,
name: 'workspace-submission-history',
path: '/workspaces/:namespace/:name/submission_history',
component: SubmissionHistory,
title: ({ name }) => `${name} - Submission History`,
},
];
Original file line number Diff line number Diff line change
Expand Up @@ -336,8 +336,8 @@ const SubmissionDetails = _.flow(
forwardRefWithName('SubmissionDetails'),
wrapWorkspace({
breadcrumbs: (props) => breadcrumbs.commonPaths.workspaceDashboard(props),
title: 'Job History',
activeTab: 'job history',
title: 'Submission History',
activeTab: 'submission history',
})
)((props, _ref) => {
const { namespace, name, submissionId, workspace } = props;
Expand Down Expand Up @@ -574,7 +574,7 @@ const SubmissionDetails = _.flow(
export const navPaths = [
{
name: 'workspace-submission-details',
path: '/workspaces/:namespace/:name/job_history/:submissionId',
path: '/workspaces/:namespace/:name/submission_history/:submissionId',
component: SubmissionDetails,
title: ({ name }) => `${name} - Submission Details`,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ const WorkflowDashboard = _.flow(
forwardRefWithName('WorkflowDashboard'),
wrapWorkspace({
breadcrumbs: (props) => breadcrumbs.commonPaths.workspaceDashboard(props),
title: 'Job History',
activeTab: 'job history',
title: 'Submission History',
activeTab: 'submission history',
})
)(({ namespace, name, submissionId, workflowId, workspace }, _ref) => {
/*
Expand Down Expand Up @@ -325,7 +325,7 @@ const WorkflowDashboard = _.flow(
export const navPaths = [
{
name: 'workspace-workflow-dashboard',
path: '/workspaces/:namespace/:name/job_history/:submissionId/:workflowId',
path: '/workspaces/:namespace/:name/submission_history/:submissionId/:workflowId',
component: WorkflowDashboard,
title: ({ name }) => `${name} - Workflow Dashboard`,
},
Expand Down
4 changes: 2 additions & 2 deletions src/workspace-data/import-jobs.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ describe('useImportJobs', () => {
const listImportJobs: MockedFn<WorkspaceContract['listImportJobs']> = jest.fn();
listImportJobs.mockResolvedValue([{ jobId: 'job-1' }, { jobId: 'job-3' }]);
const getImportJobStatus: MockedFn<WorkspaceContract['getImportJobStatus']> = jest.fn();
getImportJobStatus.mockResolvedValue({ jobId: 'job-2', status: 'Error', message: 'This job failed.' });
getImportJobStatus.mockResolvedValue({ jobId: 'job-2', status: 'Error', message: 'This submission failed.' });

asMockedFn(Workspaces).mockReturnValue(
partial<WorkspacesAjaxContract>({
Expand All @@ -103,7 +103,7 @@ describe('useImportJobs', () => {
expect(getImportJobStatus).toHaveBeenCalledWith('job-2');
expect(getImportJobStatus).not.toHaveBeenCalledWith('job-4');
expect(notify).toHaveBeenCalledWith('error', 'Error importing data.', {
message: 'This job failed.',
message: 'This submission failed.',
});
});
});
Expand Down
2 changes: 1 addition & 1 deletion src/workspaces/container/WorkspaceTabs.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ describe('WorkspaceTabs', () => {
expect(within(tabs[1]).getByText('data')).not.toBeNull();
expect(within(tabs[2]).getByText('analyses')).not.toBeNull();
expect(within(tabs[3]).getByText('workflows')).not.toBeNull();
expect(within(tabs[4]).getByText('job history')).not.toBeNull();
expect(within(tabs[4]).getByText('submission history')).not.toBeNull();
expect(await axe(container)).toHaveNoViolations();
});

Expand Down
2 changes: 1 addition & 1 deletion src/workspaces/container/WorkspaceTabs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ const getTabs = (workspace?: Workspace): { name: string; link: string }[] => {
return [
...commonTabs,
{ name: 'workflows', link: 'workspace-workflows' },
{ name: 'job history', link: 'workspace-job-history' },
{ name: 'submission history', link: 'workspace-submission-history' },
];
}
if (!!workspace && isAzureWorkspace(workspace)) {
Expand Down

0 comments on commit a9e644e

Please sign in to comment.