Skip to content

Commit

Permalink
improve end reason in list ui
Browse files Browse the repository at this point in the history
* in backend, save the full reason, not just the most direct error,
  which is often the useless `UNKNOWN`

* in UI, instead of wrapping in `<Typography>` which just resorts in
  a weird ransom-note mixed size look, reserve space for or actually
  use an icon.
  • Loading branch information
scottlamb committed Sep 2, 2024
1 parent 1473e79 commit 3efff2c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion server/src/streamer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ where
let frame = match frame {
Ok(f) => f,
Err(e) => {
let _ = w.close(None, Some(e.to_string()));
let _ = w.close(None, Some(e.chain().to_string()));
return Err(e);
}
};
Expand Down
10 changes: 7 additions & 3 deletions ui/src/List/VideoList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ import TableRow, { TableRowProps } from "@mui/material/TableRow";
import Skeleton from "@mui/material/Skeleton";
import Alert from "@mui/material/Alert";
import Tooltip from "@mui/material/Tooltip";
import Typography from "@mui/material/Typography";
import ErrorIcon from "@mui/icons-material/Error";
import Icon from "@mui/material/Icon";

interface Props {
stream: Stream;
Expand Down Expand Up @@ -153,12 +154,15 @@ const Row = ({
<TableRow {...rest}>
<TableCell align="right">{start}</TableCell>
<TableCell align="right">
{end}
{endReason !== undefined ? (
<Tooltip title={endReason}>
<Typography>{end}</Typography>
<Icon sx={{ verticalAlign: "bottom", marginLeft: ".5em" }}>
<ErrorIcon />
</Icon>
</Tooltip>
) : (
end
<Icon sx={{ verticalAlign: "bottom", marginLeft: ".5em" }} />
)}
</TableCell>
<TableCell align="right" className="opt">
Expand Down

0 comments on commit 3efff2c

Please sign in to comment.