From 80a0782dde8441bd9b620d29f1d26afb453f96be Mon Sep 17 00:00:00 2001 From: Nathan Freeman Date: Mon, 12 Aug 2024 10:05:12 -0500 Subject: [PATCH] prettier --- .../TaskEditor/Tabs/CodeTab/CodeTab.tsx | 7 +- .../TaskEditor/Tabs/IOTab/IOTab.tsx | 114 +++++++++--------- .../_components/TaskEditor/TaskEditor.tsx | 3 +- 3 files changed, 61 insertions(+), 63 deletions(-) diff --git a/src/app/Workflows/Pipelines/_components/TaskEditor/Tabs/CodeTab/CodeTab.tsx b/src/app/Workflows/Pipelines/_components/TaskEditor/Tabs/CodeTab/CodeTab.tsx index 6b1971b5..3b09b23c 100644 --- a/src/app/Workflows/Pipelines/_components/TaskEditor/Tabs/CodeTab/CodeTab.tsx +++ b/src/app/Workflows/Pipelines/_components/TaskEditor/Tabs/CodeTab/CodeTab.tsx @@ -41,10 +41,9 @@ const CodeTab: React.FC = ({ featured }) => { return ( { setTaskPatch(task, { git_repositories: [ diff --git a/src/app/Workflows/Pipelines/_components/TaskEditor/Tabs/IOTab/IOTab.tsx b/src/app/Workflows/Pipelines/_components/TaskEditor/Tabs/IOTab/IOTab.tsx index 232058f2..eba142de 100644 --- a/src/app/Workflows/Pipelines/_components/TaskEditor/Tabs/IOTab/IOTab.tsx +++ b/src/app/Workflows/Pipelines/_components/TaskEditor/Tabs/IOTab/IOTab.tsx @@ -1,78 +1,83 @@ import React from 'react'; import { Workflows } from '@tapis/tapis-typescript'; import { Sidebar } from '../../../Sidebar'; -import styles from "./IOTab.module.scss" +import styles from './IOTab.module.scss'; import { usePatchTask } from 'app/Workflows/_hooks'; -import { Button, List, Box, ListItem, ListItemButton, ListSubheader, ListItemText } from '@mui/material'; +import { + Button, + List, + Box, + ListItem, + ListItemButton, + ListSubheader, + ListItemText, +} from '@mui/material'; import { Add } from '@mui/icons-material'; const IOTab: React.FC<{ toggle: () => void }> = ({ toggle }) => { const { taskPatch } = usePatchTask(); const getValueSource = (value: Workflows.SpecWithValue) => { if (value.value) { - return `from literal: ${value.value}` + return `from literal: ${value.value}`; } - const sourceKey = Object.keys(value.value_from!)[0] - let source: string | undefined = undefined - console.log({sourceKey}) + const sourceKey = Object.keys(value.value_from!)[0]; + let source: string | undefined = undefined; + console.log({ sourceKey }); switch (sourceKey) { - case "args": + case 'args': source = value.value_from?.args; break; - case "env": - source = value.value_from?.env - break + case 'env': + source = value.value_from?.env; + break; default: - source = "unknown" + source = 'unknown'; } - return `from '${source}' in '${sourceKey}'` - } + return `from '${source}' in '${sourceKey}'`; + }; - const input = Object.entries(taskPatch.input || {}) - const output = Object.entries(taskPatch.output || {}) + const input = Object.entries(taskPatch.input || {}); + const output = Object.entries(taskPatch.output || {}); return ( + Inputs } > - {input.length < 1 && ( - - - - - - )} - { - input.map(([key, value]) => { + {input.length < 1 && ( + + + + + + )} + {input.map(([key, value]) => { return ( - ) - }) - } + ); + })} -
+
@@ -80,10 +85,7 @@ const IOTab: React.FC<{ toggle: () => void }> = ({ toggle }) => { + Outputs } @@ -92,29 +94,27 @@ const IOTab: React.FC<{ toggle: () => void }> = ({ toggle }) => { )} - { - output.map(([key, value]) => { - return ( - - - - - - ) - }) - } + {output.map(([key, value]) => { + return ( + + + + + + ); + })} -
+
diff --git a/src/app/Workflows/Pipelines/_components/TaskEditor/TaskEditor.tsx b/src/app/Workflows/Pipelines/_components/TaskEditor/TaskEditor.tsx index eb1e09b3..31e19782 100644 --- a/src/app/Workflows/Pipelines/_components/TaskEditor/TaskEditor.tsx +++ b/src/app/Workflows/Pipelines/_components/TaskEditor/TaskEditor.tsx @@ -244,8 +244,7 @@ const TaskEditor: React.FC = ({ {(tab === 'code' || featuredTab === 'code') && tabs.includes('code') && ( - ) - } + )} {(tab === 'jobdef' || featuredTab === 'jobdef') && tabs.includes('jobdef') && (