CEC-3150 - Track Deployment User (#268)

This commit is contained in:
Paul Adamsen
2023-01-18 15:21:08 -05:00
committed by GitHub
parent 1bc6419c69
commit eee36cc858
3 changed files with 48 additions and 15 deletions

View File

@@ -80,6 +80,29 @@ exports[`CarUpdatesTab Render 1`] = `
</svg>
</span>
</th>
<th
class="MuiTableCell-root MuiTableCell-head MuiTableCell-alignCenter"
scope="col"
>
<span
aria-disabled="false"
class="MuiButtonBase-root MuiTableSortLabel-root"
role="button"
tabindex="0"
>
Username
<svg
aria-hidden="true"
class="MuiSvgIcon-root MuiTableSortLabel-icon MuiTableSortLabel-iconDirectionAsc"
focusable="false"
viewBox="0 0 24 24"
>
<path
d="M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"
/>
</svg>
</span>
</th>
<th
class="MuiTableCell-root MuiTableCell-head MuiTableCell-alignCenter"
scope="col"

View File

@@ -30,6 +30,7 @@ let carUpdateLog = {
{
id: 90,
carupdate_id: 283,
username: "test username 1",
status: "package_install_complete",
error_code: 0,
created: "2021-08-23T17:06:38.410115Z",
@@ -38,6 +39,7 @@ let carUpdateLog = {
{
id: 89,
carupdate_id: 283,
username: "test username 2",
status: "package_install_start",
error_code: 0,
info: "TEST",
@@ -47,6 +49,7 @@ let carUpdateLog = {
{
id: 88,
carupdate_id: 284,
username: "test username 3",
status: "install_approval_await",
error_code: 0,
info: "TEST",

View File

@@ -35,6 +35,10 @@ const tableColumns = [
id: "update_package_id",
label: "Name",
},
{
id: "username",
label: "Username",
},
{
id: "status",
label: "Status",
@@ -168,6 +172,9 @@ const MainForm = ({ vin, token }) => {
{updateName(row)}
</Link>
</TableCell>
<TableCell align="center">
{row.username}
</TableCell>
<TableCell align="center">
{row.status}
{row.progress > -1 && (
@@ -198,22 +205,22 @@ const MainForm = ({ vin, token }) => {
</TableBody>
<TableFooter>
<TableRow>
{totalCarUpdates === 0 ? (
<td>No Car Updates found</td>
{totalCarUpdates === 0 ? (
<td>No Car Updates found</td>
) : (
<TablePagination
rowsPerPageOptions={[5, 10, 25, 100]}
colSpan={6}
count={totalCarUpdates}
rowsPerPage={pageSize}
page={pageIndex}
SelectProps={{
inputProps: { "aria-label": "rows per page" },
native: true,
}}
onPageChange={handleChangePageIndex}
onRowsPerPageChange={handleChangePageSize}
/>)}
<TablePagination
rowsPerPageOptions={[5, 10, 25, 100]}
colSpan={6}
count={totalCarUpdates}
rowsPerPage={pageSize}
page={pageIndex}
SelectProps={{
inputProps: { "aria-label": "rows per page" },
native: true,
}}
onPageChange={handleChangePageIndex}
onRowsPerPageChange={handleChangePageSize}
/>)}
</TableRow>
</TableFooter>
</Table>