mirror of
https://github.com/pomerium/pomerium.git
synced 2025-07-16 16:26:16 +02:00
adds success colors for statuses in the 200 range (#4314)
This commit is contained in:
parent
2f4005cc09
commit
f54b1a7d09
1 changed files with 5 additions and 4 deletions
|
@ -20,8 +20,7 @@ type PolicyEvaluationTraceDetailsProps = {
|
||||||
trace: PolicyEvaluationTrace;
|
trace: PolicyEvaluationTrace;
|
||||||
} & ListItemProps;
|
} & ListItemProps;
|
||||||
const PolicyEvaluationTraceDetails: FC<PolicyEvaluationTraceDetailsProps> = ({
|
const PolicyEvaluationTraceDetails: FC<PolicyEvaluationTraceDetailsProps> = ({
|
||||||
trace,
|
trace
|
||||||
...props
|
|
||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
<TableRow>
|
<TableRow>
|
||||||
|
@ -52,14 +51,16 @@ export type ErrorPageProps = {
|
||||||
export const ErrorPage: FC<ErrorPageProps> = ({ data }) => {
|
export const ErrorPage: FC<ErrorPageProps> = ({ data }) => {
|
||||||
const traces =
|
const traces =
|
||||||
data?.policyEvaluationTraces?.filter((trace) => !!trace.id) || [];
|
data?.policyEvaluationTraces?.filter((trace) => !!trace.id) || [];
|
||||||
|
const status = data?.status || 500;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Container maxWidth={false}>
|
<Container maxWidth={false}>
|
||||||
<Paper sx={{ overflow: "hidden" }}>
|
<Paper sx={{ overflow: "hidden" }}>
|
||||||
<Stack>
|
<Stack>
|
||||||
<Box sx={{ padding: "16px" }}>
|
<Box sx={{ padding: "16px" }}>
|
||||||
<Alert severity="error">
|
<Alert severity={status < 200 || status >= 300 ? "error" : "success"}>
|
||||||
<AlertTitle>
|
<AlertTitle>
|
||||||
{data?.status || 500}{" "}
|
{status}{" "}
|
||||||
{data?.statusText || "Internal Server Error"}
|
{data?.statusText || "Internal Server Error"}
|
||||||
</AlertTitle>
|
</AlertTitle>
|
||||||
{data?.description ? (
|
{data?.description ? (
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue