diff --git a/frontend/unified/src/App.tsx b/frontend/unified/src/App.tsx index d10578ac..48a0ad6d 100644 --- a/frontend/unified/src/App.tsx +++ b/frontend/unified/src/App.tsx @@ -1,4 +1,19 @@ -import { Box, Chip, Divider, Grid, Stack, Typography } from "@mui/material"; +import { useState } from "react"; +import { gql, type TypedDocumentNode } from "@apollo/client"; +import { ApolloProvider, useQuery } from "@apollo/client/react"; + +import { + Accordion, + AccordionDetails, + AccordionSummary, + Box, + Chip, + Grid, + Stack, + Typography, +} from "@mui/material"; +import { ChevronDown } from "lucide-react"; + import { InstrumentSession, SessionSelectionMode, @@ -7,17 +22,13 @@ import { import { ScanSelector } from "./components/ScanSelector"; import JobsViewer from "./components/JobsViewer/JobsViewer"; -import { useState } from "react"; - import { templateOptions } from "./data/templates"; import { WorkflowForm } from "./components/WorkflowForm"; import { DisplayLogMeta } from "./components/InspectLogMeta"; import { Beamline, Technique } from "./types"; import { ParameterConfiguration } from "./components/ParameterConfiguration/ParameterConfiguration"; import { Plot } from "./components/Plot/Plot"; -import { ApolloProvider, useQuery } from "@apollo/client/react"; import { apolloClientWorkflows } from "../../src/ApolloClient"; -import { gql, type TypedDocumentNode } from "@apollo/client"; import { useAuth } from "@diamondlightsource/sci-react-ui"; import { SessionQueryQuery, @@ -281,77 +292,113 @@ export const App: React.FC = () => { - Scan - - - Technique - - ) => { - setShowAllTechniques(e.target.checked); - const isSelectedTechniqueInSubset = - BEAMLINE_TECHNIQUES_SUBSET[beamline].includes( - currentTechnique - ); - if (!e.target.checked && !isSelectedTechniqueInSubset) { - updateTechniqueAndTemplate(beamline); - } - }} - filteredTechniques={filterTechniques(beamline)} - templateOptions={filterTemplates(currentTechnique)} - technique={currentTechnique} - template={currentTemplate} - setTemplate={setTemplate} - /> + + }> + Scan + + + + + - - Parameter Configuration + + }> + Technique + + + + ) => { + setShowAllTechniques(e.target.checked); + const isSelectedTechniqueInSubset = + BEAMLINE_TECHNIQUES_SUBSET[beamline].includes( + currentTechnique + ); + if (!e.target.checked && !isSelectedTechniqueInSubset) { + updateTechniqueAndTemplate(beamline); + } + }} + filteredTechniques={filterTechniques(beamline)} + templateOptions={filterTemplates(currentTechnique)} + technique={currentTechnique} + template={currentTemplate} + setTemplate={setTemplate} + /> + + - + + } + > + Parameter Configuration + + + + + + - Jobs - - + + }> + Jobs + + + + + - Log - {selectedWorkflow !== null ? ( - - ) : ( -

No workflow selected

- )} - + + }> + Log + + + {selectedWorkflow !== null ? ( + + ) : ( +

No workflow selected

+ )} +
+
- Plot - + + }> + Plot + + + + +
diff --git a/frontend/unified/src/components/Plot/ArtifactSelector.tsx b/frontend/unified/src/components/Plot/ArtifactSelector.tsx index e74cff56..6b2ca80b 100644 --- a/frontend/unified/src/components/Plot/ArtifactSelector.tsx +++ b/frontend/unified/src/components/Plot/ArtifactSelector.tsx @@ -151,10 +151,11 @@ export const ArtifactSelector: React.FC = ({ }; return ( - + Artifact {data.workflow?.status?.__typename !== "WorkflowPendingStatus" ? (