-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
gpalade
committed
Jan 12, 2024
1 parent
215c8db
commit 894dc5d
Showing
11 changed files
with
106 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
react-ui/src/features/workflow/history/components/ExecutionHistoryContainer.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import React from 'react' | ||
import { useQueryWithErrorHandling } from 'hooks/errorHandling' | ||
import { EXECUTION_HISTORY_QUERY } from '../queries/HistoryQuery' | ||
import { FakeText } from '@totalsoft/rocket-ui' | ||
import Table from '@mui/material/Table' | ||
import TableBody from '@mui/material/TableBody' | ||
import TableCell from '@mui/material/TableCell' | ||
import TableContainer from '@mui/material/TableContainer' | ||
import TableHead from '@mui/material/TableHead' | ||
import TableRow from '@mui/material/TableRow' | ||
import Paper from '@mui/material/Paper' | ||
import { useTranslation } from 'react-i18next' | ||
|
||
const ExecutionHistoryContainer = () => { | ||
const { t } = useTranslation() | ||
const { loading, data } = useQueryWithErrorHandling(EXECUTION_HISTORY_QUERY, { variables: {} }) | ||
|
||
const flows = data?.allExecutionHistory | ||
? Object.keys(data?.allExecutionHistory).map(a => ({ name: a, value: data?.allExecutionHistory[a] })) | ||
: [] | ||
|
||
if (loading) return <FakeText lines={8} /> | ||
|
||
return ( | ||
<TableContainer component={Paper}> | ||
<Table sx={{ minWidth: 650 }} size='small' aria-label='simple table'> | ||
<TableHead> | ||
<TableRow> | ||
<TableCell>{t("History.Flow")}</TableCell> | ||
<TableCell align='right'>{t("History.ExecutionCount")}</TableCell> | ||
</TableRow> | ||
</TableHead> | ||
<TableBody> | ||
{flows.map((flow, index) => ( | ||
<TableRow key={index} sx={{ '&:last-child td, &:last-child th': { border: 0 } }}> | ||
<TableCell component='th' scope='row'> | ||
{flow.name} | ||
</TableCell> | ||
<TableCell align='right'>{flow.value}</TableCell> | ||
</TableRow> | ||
))} | ||
</TableBody> | ||
</Table> | ||
</TableContainer> | ||
) | ||
} | ||
|
||
export default ExecutionHistoryContainer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters