From c4773449bd862e3dabb6df77ca850827e766c998 Mon Sep 17 00:00:00 2001 From: Eunice Chan Date: Tue, 23 May 2023 17:58:46 -0700 Subject: [PATCH 1/7] Fix no run workflows row --- .../src/components/pages/workflows/index.tsx | 55 +++++++++++++++++-- 1 file changed, 51 insertions(+), 4 deletions(-) diff --git a/src/ui/common/src/components/pages/workflows/index.tsx b/src/ui/common/src/components/pages/workflows/index.tsx index 8fcee5dc2..6072ba34f 100644 --- a/src/ui/common/src/components/pages/workflows/index.tsx +++ b/src/ui/common/src/components/pages/workflows/index.tsx @@ -6,6 +6,7 @@ import { useDispatch } from 'react-redux'; import { useDagGetQuery, useDagResultsGetQuery, + useDagsGetQuery, useWorkflowsGetQuery, } from '../../../handlers/AqueductApi'; import { AppDispatch } from '../../../stores/store'; @@ -148,6 +149,17 @@ const WorkflowsPage: React.FC = ({ user, Layout = DefaultLayout }) => { apiKey: user.apiKey, workflowId: workflowId, }); + + + const { + data: dags, + error: dagsError, + isLoading: dagsLoading, + } = useDagsGetQuery({ + apiKey: user.apiKey, + workflowId: workflowId, + }); + let status = ExecutionStatus.Unknown; if (!dagResultsLoading && !dagResultsError && dagResults.length > 0) { @@ -155,6 +167,8 @@ const WorkflowsPage: React.FC = ({ user, Layout = DefaultLayout }) => { if (latestDagResult) { status = latestDagResult.exec_state.status; } + } else if (!dagsLoading && !dagsError && dags.length > 0) { + status = ExecutionStatus.Registered; } return ; @@ -172,12 +186,23 @@ const WorkflowsPage: React.FC = ({ user, Layout = DefaultLayout }) => { workflowId: workflowId, }); + const { + data: dags, + error: dagsError, + isLoading: dagsLoading, + } = useDagsGetQuery({ + apiKey: user.apiKey, + workflowId: workflowId, + }); + let latestDagId; if (!dagResultsLoading && !dagResultsError && dagResults.length > 0) { const latestDagResult = getLatestDagResult(dagResults); latestDagId = latestDagResult.dag_id; + } else if (!dagsLoading && !dagsError && dags.length > 0) { + latestDagId = dags[0].id; } - const { + let { data: dag, error: dagError, isLoading: dagLoading, @@ -191,8 +216,8 @@ const WorkflowsPage: React.FC = ({ user, Layout = DefaultLayout }) => { skip: dagResultsLoading && latestDagId, } ); + let nodes = useWorkflowNodes(user.apiKey, workflowId, latestDagId); - const nodes = useWorkflowNodes(user.apiKey, workflowId, latestDagId); let engines = ['Unknown']; if (!dagLoading && !dagError && dag) { @@ -227,12 +252,23 @@ const WorkflowsPage: React.FC = ({ user, Layout = DefaultLayout }) => { workflowId: workflowId, }); + const { + data: dags, + error: dagsError, + isLoading: dagsLoading, + } = useDagsGetQuery({ + apiKey: user.apiKey, + workflowId: workflowId, + }); + let latestDagResultId; let latestDagId; if (!dagResultsLoading && !dagResultsError && dagResults.length > 0) { const latestDagResult = getLatestDagResult(dagResults); latestDagResultId = latestDagResult.id; latestDagId = latestDagResult.dag_id; + } else if (!dagsLoading && !dagsError && dags.length > 0) { + latestDagId = dags[0].id; } const nodes = useWorkflowNodes(user.apiKey, workflowId, latestDagId); @@ -250,7 +286,7 @@ const WorkflowsPage: React.FC = ({ user, Layout = DefaultLayout }) => { metricId: op.id, name: op.name, value: nodesResults.artifacts[artifactId]?.content_serialized, - status: nodesResults.artifacts[artifactId]?.exec_state?.status, + status: nodesResults.artifacts[artifactId]?.exec_state?.status ?? ExecutionStatus.Registered, }; }); return ; @@ -267,12 +303,23 @@ const WorkflowsPage: React.FC = ({ user, Layout = DefaultLayout }) => { workflowId: workflowId, }); + const { + data: dags, + error: dagsError, + isLoading: dagsLoading, + } = useDagsGetQuery({ + apiKey: user.apiKey, + workflowId: workflowId, + }); + let latestDagResultId; let latestDagId; if (!dagResultsLoading && !dagResultsError && dagResults.length > 0) { const latestDagResult = getLatestDagResult(dagResults); latestDagResultId = latestDagResult.id; latestDagId = latestDagResult.dag_id; + } else if (!dagsLoading && !dagsError && dags.length > 0) { + latestDagId = dags[0].id; } const nodes = useWorkflowNodes(user.apiKey, workflowId, latestDagId); @@ -289,7 +336,7 @@ const WorkflowsPage: React.FC = ({ user, Layout = DefaultLayout }) => { return { checkId: op.id, name: op.name, - status: nodesResults.artifacts[artifactId]?.exec_state?.status, + status: nodesResults.artifacts[artifactId]?.exec_state?.status ?? ExecutionStatus.Registered, level: op.spec.check.level, value: nodesResults.artifacts[artifactId]?.content_serialized, timestamp: From bd788daa16006ba603c267e1ddd922469ca7b9df Mon Sep 17 00:00:00 2001 From: Eunice Chan Date: Thu, 25 May 2023 09:50:32 -0700 Subject: [PATCH 2/7] lint --- .../src/components/pages/workflows/index.tsx | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/ui/common/src/components/pages/workflows/index.tsx b/src/ui/common/src/components/pages/workflows/index.tsx index 6072ba34f..ed18f5cb4 100644 --- a/src/ui/common/src/components/pages/workflows/index.tsx +++ b/src/ui/common/src/components/pages/workflows/index.tsx @@ -150,7 +150,6 @@ const WorkflowsPage: React.FC = ({ user, Layout = DefaultLayout }) => { workflowId: workflowId, }); - const { data: dags, error: dagsError, @@ -202,7 +201,7 @@ const WorkflowsPage: React.FC = ({ user, Layout = DefaultLayout }) => { } else if (!dagsLoading && !dagsError && dags.length > 0) { latestDagId = dags[0].id; } - let { + const { data: dag, error: dagError, isLoading: dagLoading, @@ -216,8 +215,7 @@ const WorkflowsPage: React.FC = ({ user, Layout = DefaultLayout }) => { skip: dagResultsLoading && latestDagId, } ); - let nodes = useWorkflowNodes(user.apiKey, workflowId, latestDagId); - + const nodes = useWorkflowNodes(user.apiKey, workflowId, latestDagId); let engines = ['Unknown']; if (!dagLoading && !dagError && dag) { @@ -286,7 +284,9 @@ const WorkflowsPage: React.FC = ({ user, Layout = DefaultLayout }) => { metricId: op.id, name: op.name, value: nodesResults.artifacts[artifactId]?.content_serialized, - status: nodesResults.artifacts[artifactId]?.exec_state?.status ?? ExecutionStatus.Registered, + status: + nodesResults.artifacts[artifactId]?.exec_state?.status ?? + ExecutionStatus.Registered, }; }); return ; @@ -336,7 +336,9 @@ const WorkflowsPage: React.FC = ({ user, Layout = DefaultLayout }) => { return { checkId: op.id, name: op.name, - status: nodesResults.artifacts[artifactId]?.exec_state?.status ?? ExecutionStatus.Registered, + status: + nodesResults.artifacts[artifactId]?.exec_state?.status ?? + ExecutionStatus.Registered, level: op.spec.check.level, value: nodesResults.artifacts[artifactId]?.content_serialized, timestamp: From ff054c91ab910803c87b9c2175fbda6f06b63b57 Mon Sep 17 00:00:00 2001 From: Eunice Chan Date: Fri, 26 May 2023 11:35:23 -0700 Subject: [PATCH 3/7] Default sort col fix too --- .../src/components/pages/workflow/id/hook.ts | 65 ++++++++ .../src/components/pages/workflows/index.tsx | 140 ++++-------------- .../tables/PaginatedSearchTable.tsx | 44 +++++- 3 files changed, 128 insertions(+), 121 deletions(-) diff --git a/src/ui/common/src/components/pages/workflow/id/hook.ts b/src/ui/common/src/components/pages/workflow/id/hook.ts index 3ed572287..d5c220a62 100644 --- a/src/ui/common/src/components/pages/workflow/id/hook.ts +++ b/src/ui/common/src/components/pages/workflow/id/hook.ts @@ -12,6 +12,7 @@ import { import { NodeResultsMap, NodesMap } from '../../../../handlers/responses/node'; import { DagResultResponse } from '../../../../handlers/responses/workflow'; import { getPathPrefix } from '../../../../utils/getPathPrefix'; +import ExecutionStatus from '../../../../utils/shared'; export type useWorkflowIdsOutputs = { workflowId: string; @@ -187,3 +188,67 @@ export function useWorkflowNodesResults( ), }; } + +export function useLatestDagResult( + dagResults: DagResultResponse[] +): DagResultResponse { + const emptyDagResult: DagResultResponse = { + id: null, + dag_id: null, + exec_state: { + status: ExecutionStatus.Registered, + timestamps: { pending_at: new Date(0).toLocaleString() }, + }, + }; + return dagResults.reduce( + (prev, curr) => + curr.exec_state?.timestamps?.pending_at + ? new Date(prev.exec_state?.timestamps?.pending_at) < + new Date(curr.exec_state?.timestamps?.pending_at) + ? curr + : prev + : curr, + emptyDagResult + ); +} + +export function useLatestDagResultOrDag( + apiKey: string, + workflowId: string +) { + const { + data: dagResults, + error: dagResultsError, + isLoading: dagResultsLoading, + } = useDagResultsGetQuery({ + apiKey: apiKey, + workflowId: workflowId, + }); + + const hasRuns = (!dagResultsLoading && !dagResultsError && dagResults.length > 0); + + const { + data: dags, + error: dagsError, + isLoading: dagsLoading, + } = useDagsGetQuery({ + apiKey: apiKey, + workflowId: workflowId, + }, + { + skip: hasRuns, + }); + + let latestDagResult; + let dag; + if (hasRuns) { + latestDagResult = useLatestDagResult(dagResults); + } else if (!dagsLoading && !dagsError && dags.length > 0) { + dag = dags[0]; + } + + return { + latestDagResult, + dag + }; +}; \ No newline at end of file diff --git a/src/ui/common/src/components/pages/workflows/index.tsx b/src/ui/common/src/components/pages/workflows/index.tsx index ed18f5cb4..bf35b2942 100644 --- a/src/ui/common/src/components/pages/workflows/index.tsx +++ b/src/ui/common/src/components/pages/workflows/index.tsx @@ -21,7 +21,7 @@ import { SortType, } from '../../tables/PaginatedSearchTable'; import { LayoutProps } from '../types'; -import { useWorkflowNodes, useWorkflowNodesResults } from '../workflow/id/hook'; +import { useLatestDagResult, useLatestDagResultOrDag, useWorkflowNodes, useWorkflowNodesResults } from '../workflow/id/hook'; import CheckItem from './components/CheckItem'; import ExecutionStatusLink from './components/ExecutionStatusLink'; import MetricItem from './components/MetricItem'; @@ -91,23 +91,6 @@ const WorkflowsPage: React.FC = ({ user, Layout = DefaultLayout }) => { sortAccessPath: ['Name', 'props', 'status'], }, ]; - - const getLatestDagResult = (dagResults) => - dagResults.reduce( - (prev, curr) => - curr.exec_state?.timestamps?.pending_at - ? new Date(prev.exec_state?.timestamps?.pending_at) < - new Date(curr.exec_state?.timestamps?.pending_at) - ? curr - : prev - : curr, - { - exec_state: { - status: ExecutionStatus.Registered, - timestamps: { pending_at: 0 }, - }, - } - ); const LastRunComponent = (row) => { const workflowId = row.id; @@ -124,7 +107,7 @@ const WorkflowsPage: React.FC = ({ user, Layout = DefaultLayout }) => { let time = 0; if (!dagResultsLoading && !dagResultsError && dagResults.length > 0) { - const latestDagResult = getLatestDagResult(dagResults); + const latestDagResult = useLatestDagResult(dagResults); time = new Date( latestDagResult.exec_state?.timestamps?.pending_at ).getTime(); @@ -141,66 +124,29 @@ const WorkflowsPage: React.FC = ({ user, Layout = DefaultLayout }) => { const workflowId = row.id; const url = `${getPathPrefix()}/workflow/${workflowId}`; - const { - data: dagResults, - error: dagResultsError, - isLoading: dagResultsLoading, - } = useDagResultsGetQuery({ - apiKey: user.apiKey, - workflowId: workflowId, - }); - - const { - data: dags, - error: dagsError, - isLoading: dagsLoading, - } = useDagsGetQuery({ - apiKey: user.apiKey, - workflowId: workflowId, - }); - + const {latestDagResult, dag} = useLatestDagResultOrDag(user.apiKey, workflowId); let status = ExecutionStatus.Unknown; - - if (!dagResultsLoading && !dagResultsError && dagResults.length > 0) { - const latestDagResult = getLatestDagResult(dagResults); - if (latestDagResult) { - status = latestDagResult.exec_state.status; - } - } else if (!dagsLoading && !dagsError && dags.length > 0) { + + if (latestDagResult) { + status = latestDagResult.exec_state.status; + } else if (dag) { status = ExecutionStatus.Registered; } - return ; }, 'Last Run': LastRunComponent, Engines: (row) => { const workflowId = row.id; - const { - data: dagResults, - error: dagResultsError, - isLoading: dagResultsLoading, - } = useDagResultsGetQuery({ - apiKey: user.apiKey, - workflowId: workflowId, - }); - - const { - data: dags, - error: dagsError, - isLoading: dagsLoading, - } = useDagsGetQuery({ - apiKey: user.apiKey, - workflowId: workflowId, - }); - + const {latestDagResult, dag: noRunDag} = useLatestDagResultOrDag(user.apiKey, workflowId); let latestDagId; - if (!dagResultsLoading && !dagResultsError && dagResults.length > 0) { - const latestDagResult = getLatestDagResult(dagResults); + + if (latestDagResult) { latestDagId = latestDagResult.dag_id; - } else if (!dagsLoading && !dagsError && dags.length > 0) { - latestDagId = dags[0].id; + } else if (noRunDag) { + latestDagId = noRunDag.id; } + const { data: dag, error: dagError, @@ -212,7 +158,7 @@ const WorkflowsPage: React.FC = ({ user, Layout = DefaultLayout }) => { dagId: latestDagId, }, { - skip: dagResultsLoading && latestDagId, + skip: !latestDagId, } ); const nodes = useWorkflowNodes(user.apiKey, workflowId, latestDagId); @@ -241,32 +187,15 @@ const WorkflowsPage: React.FC = ({ user, Layout = DefaultLayout }) => { Metrics: (row) => { const workflowId = row.id; - const { - data: dagResults, - error: dagResultsError, - isLoading: dagResultsLoading, - } = useDagResultsGetQuery({ - apiKey: user.apiKey, - workflowId: workflowId, - }); - - const { - data: dags, - error: dagsError, - isLoading: dagsLoading, - } = useDagsGetQuery({ - apiKey: user.apiKey, - workflowId: workflowId, - }); - - let latestDagResultId; + const {latestDagResult, dag: noRunDag} = useLatestDagResultOrDag(user.apiKey, workflowId); let latestDagId; - if (!dagResultsLoading && !dagResultsError && dagResults.length > 0) { - const latestDagResult = getLatestDagResult(dagResults); + let latestDagResultId; + + if (latestDagResult) { latestDagResultId = latestDagResult.id; latestDagId = latestDagResult.dag_id; - } else if (!dagsLoading && !dagsError && dags.length > 0) { - latestDagId = dags[0].id; + } else if (noRunDag) { + latestDagId = noRunDag.id; } const nodes = useWorkflowNodes(user.apiKey, workflowId, latestDagId); @@ -294,32 +223,15 @@ const WorkflowsPage: React.FC = ({ user, Layout = DefaultLayout }) => { Checks: (row) => { const workflowId = row.id; - const { - data: dagResults, - error: dagResultsError, - isLoading: dagResultsLoading, - } = useDagResultsGetQuery({ - apiKey: user.apiKey, - workflowId: workflowId, - }); - - const { - data: dags, - error: dagsError, - isLoading: dagsLoading, - } = useDagsGetQuery({ - apiKey: user.apiKey, - workflowId: workflowId, - }); - - let latestDagResultId; + const {latestDagResult, dag: noRunDag} = useLatestDagResultOrDag(user.apiKey, workflowId); let latestDagId; - if (!dagResultsLoading && !dagResultsError && dagResults.length > 0) { - const latestDagResult = getLatestDagResult(dagResults); + let latestDagResultId; + + if (latestDagResult) { latestDagResultId = latestDagResult.id; latestDagId = latestDagResult.dag_id; - } else if (!dagsLoading && !dagsError && dags.length > 0) { - latestDagId = dags[0].id; + } else if (noRunDag) { + latestDagId = noRunDag.id; } const nodes = useWorkflowNodes(user.apiKey, workflowId, latestDagId); diff --git a/src/ui/common/src/components/tables/PaginatedSearchTable.tsx b/src/ui/common/src/components/tables/PaginatedSearchTable.tsx index 2eb695477..a97409b24 100644 --- a/src/ui/common/src/components/tables/PaginatedSearchTable.tsx +++ b/src/ui/common/src/components/tables/PaginatedSearchTable.tsx @@ -40,7 +40,7 @@ export type SortColumn = { // The sequence of keys in the row object to access in order to get the // value which should be compared for sort purposes. - sortAccessPath: string[]; + sortAccessPath: (string|number)[]; }; export enum SortType { @@ -50,7 +50,7 @@ export enum SortType { } type SortConfig = { - name: SortColumn; + sortColumn: SortColumn; sortType: SortType; }; @@ -75,6 +75,7 @@ export const PaginatedSearchTable: React.FC = ({ onChangeRowsPerPage, savedRowsPerPage, sortColumns = [], + defaultSortConfig, }) => { const [page, setPage] = useState(0); const [rowsPerPage, setRowsPerPage] = useState( @@ -88,10 +89,7 @@ export const PaginatedSearchTable: React.FC = ({ const [sortMenuAnchor, setSortMenuAnchor] = useState(null); const [sortTypeMenuAnchor, setSortTypeMenuAnchor] = useState(null); - const [sortConfig, setSortConfig] = useState({ - sortColumn: { name: null, sortAccessPath: [] as string[] }, - sortType: SortType.None, - }); + const [sortConfig, setSortConfig] = useState({sortColumn:null, sortType:SortType.None}); /* Returns the value to be inserted at row, column. @@ -105,7 +103,7 @@ export const PaginatedSearchTable: React.FC = ({ return value; }; - const rowData = [...data].map((row) => { + let rowData = [...data].map((row) => { const rowData = {}; columns.forEach((column) => { rowData[column] = getColumnValue(row, column); @@ -113,6 +111,38 @@ export const PaginatedSearchTable: React.FC = ({ return rowData; }); + // Default ordering + if (defaultSortConfig) { + rowData = rowData.sort((r1, r2) => { + const col = defaultSortConfig.sortColumn; + let v1: PaginatedSearchTableRow | PaginatedSearchTableElement = r1; + let v2: PaginatedSearchTableRow | PaginatedSearchTableElement = r2; + for (const path of col.sortAccessPath) { + v1 = v1[path]; + v2 = v2[path]; + } + + if (defaultSortConfig.sortType === SortType.Ascending) { + if (v1 > v2) { + return 1; + } else if (v1 < v2) { + return -1; + } else { + return 0; + } + } else { + // sortType === SortType.Descending + if (v1 > v2) { + return -1; + } else if (v1 < v2) { + return 1; + } else { + return 0; + } + } + }); + } + const [rows, setRows] = useState(rowData); const [orderedRows, setOrderedRows] = useState(rowData); From a49b491b52fd9bb51a2e9565609b6ff2f460ed1e Mon Sep 17 00:00:00 2001 From: Eunice Chan Date: Fri, 26 May 2023 12:08:40 -0700 Subject: [PATCH 4/7] Lint --- .../src/components/pages/workflow/id/hook.ts | 57 ++++++------------- .../src/components/pages/workflows/index.tsx | 44 ++++++++------ .../tables/PaginatedSearchTable.tsx | 9 ++- src/ui/common/src/utils/shared.ts | 24 ++++++++ 4 files changed, 75 insertions(+), 59 deletions(-) diff --git a/src/ui/common/src/components/pages/workflow/id/hook.ts b/src/ui/common/src/components/pages/workflow/id/hook.ts index d5c220a62..8e5cc29f4 100644 --- a/src/ui/common/src/components/pages/workflow/id/hook.ts +++ b/src/ui/common/src/components/pages/workflow/id/hook.ts @@ -12,7 +12,7 @@ import { import { NodeResultsMap, NodesMap } from '../../../../handlers/responses/node'; import { DagResultResponse } from '../../../../handlers/responses/workflow'; import { getPathPrefix } from '../../../../utils/getPathPrefix'; -import ExecutionStatus from '../../../../utils/shared'; +import { getLatestDagResult } from '../../../../utils/shared'; export type useWorkflowIdsOutputs = { workflowId: string; @@ -189,33 +189,7 @@ export function useWorkflowNodesResults( }; } -export function useLatestDagResult( - dagResults: DagResultResponse[] -): DagResultResponse { - const emptyDagResult: DagResultResponse = { - id: null, - dag_id: null, - exec_state: { - status: ExecutionStatus.Registered, - timestamps: { pending_at: new Date(0).toLocaleString() }, - }, - }; - return dagResults.reduce( - (prev, curr) => - curr.exec_state?.timestamps?.pending_at - ? new Date(prev.exec_state?.timestamps?.pending_at) < - new Date(curr.exec_state?.timestamps?.pending_at) - ? curr - : prev - : curr, - emptyDagResult - ); -} - -export function useLatestDagResultOrDag( - apiKey: string, - workflowId: string -) { +export function useLatestDagResultOrDag(apiKey: string, workflowId: string) { const { data: dagResults, error: dagResultsError, @@ -225,30 +199,33 @@ export function useLatestDagResultOrDag( workflowId: workflowId, }); - const hasRuns = (!dagResultsLoading && !dagResultsError && dagResults.length > 0); + const hasRuns = + !dagResultsLoading && !dagResultsError && dagResults.length > 0; const { data: dags, error: dagsError, isLoading: dagsLoading, - } = useDagsGetQuery({ - apiKey: apiKey, - workflowId: workflowId, - }, - { - skip: hasRuns, - }); + } = useDagsGetQuery( + { + apiKey: apiKey, + workflowId: workflowId, + }, + { + skip: hasRuns, + } + ); let latestDagResult; let dag; if (hasRuns) { - latestDagResult = useLatestDagResult(dagResults); + latestDagResult = getLatestDagResult(dagResults); } else if (!dagsLoading && !dagsError && dags.length > 0) { dag = dags[0]; } return { latestDagResult, - dag - }; -}; \ No newline at end of file + dag, + }; +} diff --git a/src/ui/common/src/components/pages/workflows/index.tsx b/src/ui/common/src/components/pages/workflows/index.tsx index bf35b2942..d80ef6cef 100644 --- a/src/ui/common/src/components/pages/workflows/index.tsx +++ b/src/ui/common/src/components/pages/workflows/index.tsx @@ -1,18 +1,15 @@ import { Link, Typography } from '@mui/material'; import Box from '@mui/material/Box'; import React, { useEffect } from 'react'; -import { useDispatch } from 'react-redux'; import { useDagGetQuery, useDagResultsGetQuery, - useDagsGetQuery, useWorkflowsGetQuery, } from '../../../handlers/AqueductApi'; -import { AppDispatch } from '../../../stores/store'; import UserProfile from '../../../utils/auth'; import getPathPrefix from '../../../utils/getPathPrefix'; -import ExecutionStatus from '../../../utils/shared'; +import ExecutionStatus, { getLatestDagResult } from '../../../utils/shared'; import { getWorkflowEngineTypes } from '../../../utils/workflows'; import DefaultLayout from '../../layouts/default'; import { BreadcrumbLink } from '../../layouts/NavBar'; @@ -21,7 +18,11 @@ import { SortType, } from '../../tables/PaginatedSearchTable'; import { LayoutProps } from '../types'; -import { useLatestDagResult, useLatestDagResultOrDag, useWorkflowNodes, useWorkflowNodesResults } from '../workflow/id/hook'; +import { + useLatestDagResultOrDag, + useWorkflowNodes, + useWorkflowNodesResults, +} from '../workflow/id/hook'; import CheckItem from './components/CheckItem'; import ExecutionStatusLink from './components/ExecutionStatusLink'; import MetricItem from './components/MetricItem'; @@ -33,8 +34,6 @@ type Props = { }; const WorkflowsPage: React.FC = ({ user, Layout = DefaultLayout }) => { - const dispatch: AppDispatch = useDispatch(); - useEffect(() => { document.title = 'Workflows | Aqueduct'; }, []); @@ -91,6 +90,7 @@ const WorkflowsPage: React.FC = ({ user, Layout = DefaultLayout }) => { sortAccessPath: ['Name', 'props', 'status'], }, ]; + const LastRunComponent = (row) => { const workflowId = row.id; @@ -107,7 +107,7 @@ const WorkflowsPage: React.FC = ({ user, Layout = DefaultLayout }) => { let time = 0; if (!dagResultsLoading && !dagResultsError && dagResults.length > 0) { - const latestDagResult = useLatestDagResult(dagResults); + const latestDagResult = getLatestDagResult(dagResults); time = new Date( latestDagResult.exec_state?.timestamps?.pending_at ).getTime(); @@ -124,9 +124,12 @@ const WorkflowsPage: React.FC = ({ user, Layout = DefaultLayout }) => { const workflowId = row.id; const url = `${getPathPrefix()}/workflow/${workflowId}`; - const {latestDagResult, dag} = useLatestDagResultOrDag(user.apiKey, workflowId); + const { latestDagResult, dag } = useLatestDagResultOrDag( + user.apiKey, + workflowId + ); let status = ExecutionStatus.Unknown; - + if (latestDagResult) { status = latestDagResult.exec_state.status; } else if (dag) { @@ -138,9 +141,12 @@ const WorkflowsPage: React.FC = ({ user, Layout = DefaultLayout }) => { Engines: (row) => { const workflowId = row.id; - const {latestDagResult, dag: noRunDag} = useLatestDagResultOrDag(user.apiKey, workflowId); + const { latestDagResult, dag: noRunDag } = useLatestDagResultOrDag( + user.apiKey, + workflowId + ); let latestDagId; - + if (latestDagResult) { latestDagId = latestDagResult.dag_id; } else if (noRunDag) { @@ -187,10 +193,13 @@ const WorkflowsPage: React.FC = ({ user, Layout = DefaultLayout }) => { Metrics: (row) => { const workflowId = row.id; - const {latestDagResult, dag: noRunDag} = useLatestDagResultOrDag(user.apiKey, workflowId); + const { latestDagResult, dag: noRunDag } = useLatestDagResultOrDag( + user.apiKey, + workflowId + ); let latestDagId; let latestDagResultId; - + if (latestDagResult) { latestDagResultId = latestDagResult.id; latestDagId = latestDagResult.dag_id; @@ -223,10 +232,13 @@ const WorkflowsPage: React.FC = ({ user, Layout = DefaultLayout }) => { Checks: (row) => { const workflowId = row.id; - const {latestDagResult, dag: noRunDag} = useLatestDagResultOrDag(user.apiKey, workflowId); + const { latestDagResult, dag: noRunDag } = useLatestDagResultOrDag( + user.apiKey, + workflowId + ); let latestDagId; let latestDagResultId; - + if (latestDagResult) { latestDagResultId = latestDagResult.id; latestDagId = latestDagResult.dag_id; diff --git a/src/ui/common/src/components/tables/PaginatedSearchTable.tsx b/src/ui/common/src/components/tables/PaginatedSearchTable.tsx index a97409b24..176038cfa 100644 --- a/src/ui/common/src/components/tables/PaginatedSearchTable.tsx +++ b/src/ui/common/src/components/tables/PaginatedSearchTable.tsx @@ -40,7 +40,7 @@ export type SortColumn = { // The sequence of keys in the row object to access in order to get the // value which should be compared for sort purposes. - sortAccessPath: (string|number)[]; + sortAccessPath: (string | number)[]; }; export enum SortType { @@ -89,7 +89,10 @@ export const PaginatedSearchTable: React.FC = ({ const [sortMenuAnchor, setSortMenuAnchor] = useState(null); const [sortTypeMenuAnchor, setSortTypeMenuAnchor] = useState(null); - const [sortConfig, setSortConfig] = useState({sortColumn:null, sortType:SortType.None}); + const [sortConfig, setSortConfig] = useState({ + sortColumn: null, + sortType: SortType.None, + }); /* Returns the value to be inserted at row, column. @@ -121,7 +124,7 @@ export const PaginatedSearchTable: React.FC = ({ v1 = v1[path]; v2 = v2[path]; } - + if (defaultSortConfig.sortType === SortType.Ascending) { if (v1 > v2) { return 1; diff --git a/src/ui/common/src/utils/shared.ts b/src/ui/common/src/utils/shared.ts index 8c9c94ea1..8329d9278 100644 --- a/src/ui/common/src/utils/shared.ts +++ b/src/ui/common/src/utils/shared.ts @@ -1,4 +1,5 @@ import { ArtifactResultResponse } from '../handlers/responses/node'; +import { DagResultResponse } from '../handlers/responses/workflow'; import { TableRow } from './data'; export enum AWSCredentialType { @@ -74,6 +75,29 @@ export const getArtifactResultTableRow = ( }; }; +export function getLatestDagResult( + dagResults: DagResultResponse[] +): DagResultResponse { + const emptyDagResult: DagResultResponse = { + id: null, + dag_id: null, + exec_state: { + status: ExecutionStatus.Registered, + timestamps: { pending_at: new Date(0).toLocaleString() }, + }, + }; + return dagResults.reduce( + (prev, curr) => + curr.exec_state?.timestamps?.pending_at + ? new Date(prev.exec_state?.timestamps?.pending_at) < + new Date(curr.exec_state?.timestamps?.pending_at) + ? curr + : prev + : curr, + emptyDagResult + ); +} + export const stringToExecutionStatus = (status: string): ExecutionStatus => { let executionStatus = ExecutionStatus.Unknown; switch (status) { From 847c39b6469bc86fb75bd12095e6f64c6a97f345 Mon Sep 17 00:00:00 2001 From: Eunice Chan Date: Tue, 30 May 2023 14:58:53 -0700 Subject: [PATCH 5/7] PR comments --- .../src/components/pages/workflow/id/hook.ts | 24 ++++-------- .../src/components/pages/workflows/index.tsx | 39 ++++++------------- src/ui/common/src/utils/shared.ts | 29 ++++++-------- 3 files changed, 30 insertions(+), 62 deletions(-) diff --git a/src/ui/common/src/components/pages/workflow/id/hook.ts b/src/ui/common/src/components/pages/workflow/id/hook.ts index 8e5cc29f4..eca1a1c04 100644 --- a/src/ui/common/src/components/pages/workflow/id/hook.ts +++ b/src/ui/common/src/components/pages/workflow/id/hook.ts @@ -198,10 +198,11 @@ export function useLatestDagResultOrDag(apiKey: string, workflowId: string) { apiKey: apiKey, workflowId: workflowId, }); - - const hasRuns = - !dagResultsLoading && !dagResultsError && dagResults.length > 0; - + + const latestDagResult = getLatestDagResult(dagResults ?? []) // undefined if not available + + const dagIdFromLatestDagResult = latestDagResult?.dag_id; + const { data: dags, error: dagsError, @@ -212,20 +213,9 @@ export function useLatestDagResultOrDag(apiKey: string, workflowId: string) { workflowId: workflowId, }, { - skip: hasRuns, + skip: dagIdFromLatestDagResult, } ); - let latestDagResult; - let dag; - if (hasRuns) { - latestDagResult = getLatestDagResult(dagResults); - } else if (!dagsLoading && !dagsError && dags.length > 0) { - dag = dags[0]; - } - - return { - latestDagResult, - dag, - }; + return { latestDagResult, dag: (dags ?? [])[0] }; } diff --git a/src/ui/common/src/components/pages/workflows/index.tsx b/src/ui/common/src/components/pages/workflows/index.tsx index d80ef6cef..a28581496 100644 --- a/src/ui/common/src/components/pages/workflows/index.tsx +++ b/src/ui/common/src/components/pages/workflows/index.tsx @@ -145,13 +145,9 @@ const WorkflowsPage: React.FC = ({ user, Layout = DefaultLayout }) => { user.apiKey, workflowId ); - let latestDagId; - if (latestDagResult) { - latestDagId = latestDagResult.dag_id; - } else if (noRunDag) { - latestDagId = noRunDag.id; - } + const latestDagId = latestDagResult?.dag_id ?? noRunDag?.id + const { data: dag, @@ -164,14 +160,15 @@ const WorkflowsPage: React.FC = ({ user, Layout = DefaultLayout }) => { dagId: latestDagId, }, { - skip: !latestDagId, + skip: !latestDagId || noRunDag, } ); + const nodes = useWorkflowNodes(user.apiKey, workflowId, latestDagId); let engines = ['Unknown']; - if (!dagLoading && !dagError && dag) { - const workflowDag = structuredClone(dag); + if (dag || noRunDag) { + const workflowDag = noRunDag? structuredClone(noRunDag) : structuredClone(dag); workflowDag.operators = nodes.operators; engines = getWorkflowEngineTypes(workflowDag); } @@ -193,19 +190,13 @@ const WorkflowsPage: React.FC = ({ user, Layout = DefaultLayout }) => { Metrics: (row) => { const workflowId = row.id; - const { latestDagResult, dag: noRunDag } = useLatestDagResultOrDag( + const { latestDagResult, dag } = useLatestDagResultOrDag( user.apiKey, workflowId ); - let latestDagId; - let latestDagResultId; - if (latestDagResult) { - latestDagResultId = latestDagResult.id; - latestDagId = latestDagResult.dag_id; - } else if (noRunDag) { - latestDagId = noRunDag.id; - } + const latestDagResultId = latestDagResult?.id + const latestDagId = latestDagResult?.dag_id ?? dag?.id const nodes = useWorkflowNodes(user.apiKey, workflowId, latestDagId); const nodesResults = useWorkflowNodesResults( @@ -232,19 +223,13 @@ const WorkflowsPage: React.FC = ({ user, Layout = DefaultLayout }) => { Checks: (row) => { const workflowId = row.id; - const { latestDagResult, dag: noRunDag } = useLatestDagResultOrDag( + const { latestDagResult, dag } = useLatestDagResultOrDag( user.apiKey, workflowId ); - let latestDagId; - let latestDagResultId; - if (latestDagResult) { - latestDagResultId = latestDagResult.id; - latestDagId = latestDagResult.dag_id; - } else if (noRunDag) { - latestDagId = noRunDag.id; - } + const latestDagResultId = latestDagResult?.id + const latestDagId = latestDagResult?.dag_id ?? dag?.id const nodes = useWorkflowNodes(user.apiKey, workflowId, latestDagId); const nodesResults = useWorkflowNodesResults( diff --git a/src/ui/common/src/utils/shared.ts b/src/ui/common/src/utils/shared.ts index 8329d9278..4e34ef44c 100644 --- a/src/ui/common/src/utils/shared.ts +++ b/src/ui/common/src/utils/shared.ts @@ -78,24 +78,17 @@ export const getArtifactResultTableRow = ( export function getLatestDagResult( dagResults: DagResultResponse[] ): DagResultResponse { - const emptyDagResult: DagResultResponse = { - id: null, - dag_id: null, - exec_state: { - status: ExecutionStatus.Registered, - timestamps: { pending_at: new Date(0).toLocaleString() }, - }, - }; - return dagResults.reduce( - (prev, curr) => - curr.exec_state?.timestamps?.pending_at - ? new Date(prev.exec_state?.timestamps?.pending_at) < - new Date(curr.exec_state?.timestamps?.pending_at) - ? curr - : prev - : curr, - emptyDagResult - ); + if (dagResults && dagResults.length > 0) { + return dagResults.reduce( + (prev, curr) => + curr.exec_state?.timestamps?.pending_at + ? new Date(prev.exec_state?.timestamps?.pending_at) < + new Date(curr.exec_state?.timestamps?.pending_at) + ? curr + : prev + : curr + ); + } } export const stringToExecutionStatus = (status: string): ExecutionStatus => { From e21fcfbd05f9d0070196e9ffa7e979bbdf19a319 Mon Sep 17 00:00:00 2001 From: Eunice Chan Date: Tue, 30 May 2023 15:18:58 -0700 Subject: [PATCH 6/7] lint --- src/ui/app/package.json | 124 +++++++++--------- .../src/components/pages/workflow/id/hook.ts | 8 +- .../src/components/pages/workflows/index.tsx | 15 ++- src/ui/common/src/utils/shared.ts | 15 +-- 4 files changed, 81 insertions(+), 81 deletions(-) diff --git a/src/ui/app/package.json b/src/ui/app/package.json index ed7600fb0..b75490032 100644 --- a/src/ui/app/package.json +++ b/src/ui/app/package.json @@ -1,63 +1,63 @@ { - "name": "@aqueducthq/ui", - "author": "Aqueduct, Inc. ", - "version": "0.3.4", - "scripts": { - "start": "parcel --no-cache index.html", - "build": "parcel build --public-url /dist --dist-dir dist/default index.html", - "lint": "eslint '*/**/*.{js,ts,tsx}' --format table", - "lint:fix": "eslint '*/**/*.{js,ts,tsx}' --format table --fix" - }, - "dependencies": { - "@aqueducthq/common": "0.3.4", - "@emotion/react": "11.10.5", - "@emotion/styled": "11.10.5", - "@fortawesome/fontawesome-svg-core": "6.2.1", - "@mui/base": "5.0.0-alpha.115", - "@mui/material": "5.11.6", - "@reduxjs/toolkit": "1.9.3", - "dotenv": "16.0.3", - "react": "^18.2.0", - "react-app-polyfill": "3.0.0", - "react-cookie": "4.1.1", - "react-redux": "8.0.5", - "react-router-dom": "6.7.0" - }, - "alias": { - "react": "./node_modules/react", - "react-dom": "./node_modules/react-dom/profiling", - "react-dom/client": "./node_modules/react-dom/client", - "scheduler/tracing": "./node_modules/scheduler/tracing-profiling", - "react-redux": "./node_modules/react-redux", - "react-router-dom": "./node_modules/react-router-dom", - "@mui/material/styles": "./node_modules/@mui/material/styles", - "@mui/base": "./node_modules/@mui/base", - "@mui/utils": "./node_modules/@mui/utils", - "@babel/runtime": "./node_modules/@babel/runtime", - "@emotion/react": "./node_modules/@emotion/react", - "@emotion/styled": "./node_modules/@emotion/styled", - "process": false - }, - "devDependencies": { - "@babel/core": "7.20.12", - "@parcel/css": "1.14.0", - "@types/react": "18.0.27", - "@types/react-dom": "18.0.10", - "@typescript-eslint/eslint-plugin": "5.59.5", - "@typescript-eslint/parser": "5.59.5", - "buffer": "6.0.3", - "eslint": "8.40.0", - "eslint-config-prettier": "8.8.0", - "eslint-formatter-table": "7.32.1", - "eslint-plugin-prettier": "4.2.1", - "eslint-plugin-react": "7.32.2", - "eslint-plugin-simple-import-sort": "10.0.0", - "eslint-plugin-unused-imports": "2.0.0", - "os-browserify": "0.3.0", - "parcel": "2.8.3", - "parcel-resolver-ignore": "2.1.3", - "path-browserify": "1.0.1", - "process": "0.11.10", - "typescript": "4.9.4" - } -} \ No newline at end of file + "name": "@aqueducthq/ui", + "author": "Aqueduct, Inc. ", + "version": "0.3.4", + "scripts": { + "start": "parcel --no-cache index.html", + "build": "parcel build --public-url /dist --dist-dir dist/default index.html", + "lint": "eslint '*/**/*.{js,ts,tsx}' --format table", + "lint:fix": "eslint '*/**/*.{js,ts,tsx}' --format table --fix" + }, + "dependencies": { + "@aqueducthq/common": "0.3.4", + "@emotion/react": "11.10.5", + "@emotion/styled": "11.10.5", + "@fortawesome/fontawesome-svg-core": "6.2.1", + "@mui/base": "5.0.0-alpha.115", + "@mui/material": "5.11.6", + "@reduxjs/toolkit": "1.9.3", + "dotenv": "16.0.3", + "react": "^18.2.0", + "react-app-polyfill": "3.0.0", + "react-cookie": "4.1.1", + "react-redux": "8.0.5", + "react-router-dom": "6.7.0" + }, + "alias": { + "react": "./node_modules/react", + "react-dom": "./node_modules/react-dom/profiling", + "react-dom/client": "./node_modules/react-dom/client", + "scheduler/tracing": "./node_modules/scheduler/tracing-profiling", + "react-redux": "./node_modules/react-redux", + "react-router-dom": "./node_modules/react-router-dom", + "@mui/material/styles": "./node_modules/@mui/material/styles", + "@mui/base": "./node_modules/@mui/base", + "@mui/utils": "./node_modules/@mui/utils", + "@babel/runtime": "./node_modules/@babel/runtime", + "@emotion/react": "./node_modules/@emotion/react", + "@emotion/styled": "./node_modules/@emotion/styled", + "process": false + }, + "devDependencies": { + "@babel/core": "7.20.12", + "@parcel/css": "1.14.0", + "@types/react": "18.0.27", + "@types/react-dom": "18.0.10", + "@typescript-eslint/eslint-plugin": "5.59.5", + "@typescript-eslint/parser": "5.59.5", + "buffer": "6.0.3", + "eslint": "8.40.0", + "eslint-config-prettier": "8.8.0", + "eslint-formatter-table": "7.32.1", + "eslint-plugin-prettier": "4.2.1", + "eslint-plugin-react": "7.32.2", + "eslint-plugin-simple-import-sort": "10.0.0", + "eslint-plugin-unused-imports": "2.0.0", + "os-browserify": "0.3.0", + "parcel": "2.8.3", + "parcel-resolver-ignore": "2.1.3", + "path-browserify": "1.0.1", + "process": "0.11.10", + "typescript": "4.9.4" + } + } \ No newline at end of file diff --git a/src/ui/common/src/components/pages/workflow/id/hook.ts b/src/ui/common/src/components/pages/workflow/id/hook.ts index eca1a1c04..145941fde 100644 --- a/src/ui/common/src/components/pages/workflow/id/hook.ts +++ b/src/ui/common/src/components/pages/workflow/id/hook.ts @@ -198,11 +198,11 @@ export function useLatestDagResultOrDag(apiKey: string, workflowId: string) { apiKey: apiKey, workflowId: workflowId, }); - - const latestDagResult = getLatestDagResult(dagResults ?? []) // undefined if not available - + + const latestDagResult = getLatestDagResult(dagResults ?? []); // undefined if not available + const dagIdFromLatestDagResult = latestDagResult?.dag_id; - + const { data: dags, error: dagsError, diff --git a/src/ui/common/src/components/pages/workflows/index.tsx b/src/ui/common/src/components/pages/workflows/index.tsx index 5591039a4..e9fecceaf 100644 --- a/src/ui/common/src/components/pages/workflows/index.tsx +++ b/src/ui/common/src/components/pages/workflows/index.tsx @@ -143,8 +143,7 @@ const WorkflowsPage: React.FC = ({ user, Layout = DefaultLayout }) => { workflowId ); - const latestDagId = latestDagResult?.dag_id ?? noRunDag?.id - + const latestDagId = latestDagResult?.dag_id ?? noRunDag?.id; const { data: dag, @@ -165,7 +164,9 @@ const WorkflowsPage: React.FC = ({ user, Layout = DefaultLayout }) => { let engines = ['Unknown']; if (dag || noRunDag) { - const workflowDag = noRunDag? structuredClone(noRunDag) : structuredClone(dag); + const workflowDag = noRunDag + ? structuredClone(noRunDag) + : structuredClone(dag); workflowDag.operators = nodes.operators; engines = getWorkflowEngineTypes(workflowDag); } @@ -192,8 +193,8 @@ const WorkflowsPage: React.FC = ({ user, Layout = DefaultLayout }) => { workflowId ); - const latestDagResultId = latestDagResult?.id - const latestDagId = latestDagResult?.dag_id ?? dag?.id + const latestDagResultId = latestDagResult?.id; + const latestDagId = latestDagResult?.dag_id ?? dag?.id; const nodes = useWorkflowNodes(user.apiKey, workflowId, latestDagId); const nodesResults = useWorkflowNodesResults( @@ -225,8 +226,8 @@ const WorkflowsPage: React.FC = ({ user, Layout = DefaultLayout }) => { workflowId ); - const latestDagResultId = latestDagResult?.id - const latestDagId = latestDagResult?.dag_id ?? dag?.id + const latestDagResultId = latestDagResult?.id; + const latestDagId = latestDagResult?.dag_id ?? dag?.id; const nodes = useWorkflowNodes(user.apiKey, workflowId, latestDagId); const nodesResults = useWorkflowNodesResults( diff --git a/src/ui/common/src/utils/shared.ts b/src/ui/common/src/utils/shared.ts index 4e34ef44c..e690c159b 100644 --- a/src/ui/common/src/utils/shared.ts +++ b/src/ui/common/src/utils/shared.ts @@ -79,14 +79,13 @@ export function getLatestDagResult( dagResults: DagResultResponse[] ): DagResultResponse { if (dagResults && dagResults.length > 0) { - return dagResults.reduce( - (prev, curr) => - curr.exec_state?.timestamps?.pending_at - ? new Date(prev.exec_state?.timestamps?.pending_at) < - new Date(curr.exec_state?.timestamps?.pending_at) - ? curr - : prev - : curr + return dagResults.reduce((prev, curr) => + curr.exec_state?.timestamps?.pending_at + ? new Date(prev.exec_state?.timestamps?.pending_at) < + new Date(curr.exec_state?.timestamps?.pending_at) + ? curr + : prev + : curr ); } } From 7c982a306922411063ef32bbc32e888a3eca3979 Mon Sep 17 00:00:00 2001 From: Eunice Chan Date: Tue, 30 May 2023 15:21:57 -0700 Subject: [PATCH 7/7] Reset package.json --- src/ui/app/package.json | 124 ++++++++++++++++++++-------------------- 1 file changed, 62 insertions(+), 62 deletions(-) diff --git a/src/ui/app/package.json b/src/ui/app/package.json index b75490032..ed7600fb0 100644 --- a/src/ui/app/package.json +++ b/src/ui/app/package.json @@ -1,63 +1,63 @@ { - "name": "@aqueducthq/ui", - "author": "Aqueduct, Inc. ", - "version": "0.3.4", - "scripts": { - "start": "parcel --no-cache index.html", - "build": "parcel build --public-url /dist --dist-dir dist/default index.html", - "lint": "eslint '*/**/*.{js,ts,tsx}' --format table", - "lint:fix": "eslint '*/**/*.{js,ts,tsx}' --format table --fix" - }, - "dependencies": { - "@aqueducthq/common": "0.3.4", - "@emotion/react": "11.10.5", - "@emotion/styled": "11.10.5", - "@fortawesome/fontawesome-svg-core": "6.2.1", - "@mui/base": "5.0.0-alpha.115", - "@mui/material": "5.11.6", - "@reduxjs/toolkit": "1.9.3", - "dotenv": "16.0.3", - "react": "^18.2.0", - "react-app-polyfill": "3.0.0", - "react-cookie": "4.1.1", - "react-redux": "8.0.5", - "react-router-dom": "6.7.0" - }, - "alias": { - "react": "./node_modules/react", - "react-dom": "./node_modules/react-dom/profiling", - "react-dom/client": "./node_modules/react-dom/client", - "scheduler/tracing": "./node_modules/scheduler/tracing-profiling", - "react-redux": "./node_modules/react-redux", - "react-router-dom": "./node_modules/react-router-dom", - "@mui/material/styles": "./node_modules/@mui/material/styles", - "@mui/base": "./node_modules/@mui/base", - "@mui/utils": "./node_modules/@mui/utils", - "@babel/runtime": "./node_modules/@babel/runtime", - "@emotion/react": "./node_modules/@emotion/react", - "@emotion/styled": "./node_modules/@emotion/styled", - "process": false - }, - "devDependencies": { - "@babel/core": "7.20.12", - "@parcel/css": "1.14.0", - "@types/react": "18.0.27", - "@types/react-dom": "18.0.10", - "@typescript-eslint/eslint-plugin": "5.59.5", - "@typescript-eslint/parser": "5.59.5", - "buffer": "6.0.3", - "eslint": "8.40.0", - "eslint-config-prettier": "8.8.0", - "eslint-formatter-table": "7.32.1", - "eslint-plugin-prettier": "4.2.1", - "eslint-plugin-react": "7.32.2", - "eslint-plugin-simple-import-sort": "10.0.0", - "eslint-plugin-unused-imports": "2.0.0", - "os-browserify": "0.3.0", - "parcel": "2.8.3", - "parcel-resolver-ignore": "2.1.3", - "path-browserify": "1.0.1", - "process": "0.11.10", - "typescript": "4.9.4" - } - } \ No newline at end of file + "name": "@aqueducthq/ui", + "author": "Aqueduct, Inc. ", + "version": "0.3.4", + "scripts": { + "start": "parcel --no-cache index.html", + "build": "parcel build --public-url /dist --dist-dir dist/default index.html", + "lint": "eslint '*/**/*.{js,ts,tsx}' --format table", + "lint:fix": "eslint '*/**/*.{js,ts,tsx}' --format table --fix" + }, + "dependencies": { + "@aqueducthq/common": "0.3.4", + "@emotion/react": "11.10.5", + "@emotion/styled": "11.10.5", + "@fortawesome/fontawesome-svg-core": "6.2.1", + "@mui/base": "5.0.0-alpha.115", + "@mui/material": "5.11.6", + "@reduxjs/toolkit": "1.9.3", + "dotenv": "16.0.3", + "react": "^18.2.0", + "react-app-polyfill": "3.0.0", + "react-cookie": "4.1.1", + "react-redux": "8.0.5", + "react-router-dom": "6.7.0" + }, + "alias": { + "react": "./node_modules/react", + "react-dom": "./node_modules/react-dom/profiling", + "react-dom/client": "./node_modules/react-dom/client", + "scheduler/tracing": "./node_modules/scheduler/tracing-profiling", + "react-redux": "./node_modules/react-redux", + "react-router-dom": "./node_modules/react-router-dom", + "@mui/material/styles": "./node_modules/@mui/material/styles", + "@mui/base": "./node_modules/@mui/base", + "@mui/utils": "./node_modules/@mui/utils", + "@babel/runtime": "./node_modules/@babel/runtime", + "@emotion/react": "./node_modules/@emotion/react", + "@emotion/styled": "./node_modules/@emotion/styled", + "process": false + }, + "devDependencies": { + "@babel/core": "7.20.12", + "@parcel/css": "1.14.0", + "@types/react": "18.0.27", + "@types/react-dom": "18.0.10", + "@typescript-eslint/eslint-plugin": "5.59.5", + "@typescript-eslint/parser": "5.59.5", + "buffer": "6.0.3", + "eslint": "8.40.0", + "eslint-config-prettier": "8.8.0", + "eslint-formatter-table": "7.32.1", + "eslint-plugin-prettier": "4.2.1", + "eslint-plugin-react": "7.32.2", + "eslint-plugin-simple-import-sort": "10.0.0", + "eslint-plugin-unused-imports": "2.0.0", + "os-browserify": "0.3.0", + "parcel": "2.8.3", + "parcel-resolver-ignore": "2.1.3", + "path-browserify": "1.0.1", + "process": "0.11.10", + "typescript": "4.9.4" + } +} \ No newline at end of file