diff --git a/src/components/ErrorMessageDetails/index.jsx b/src/components/ErrorMessageDetails/index.jsx new file mode 100644 index 0000000000..c151245267 --- /dev/null +++ b/src/components/ErrorMessageDetails/index.jsx @@ -0,0 +1,30 @@ +export default function ErrorMessageDetails({ details }) { + console.log(details); + let children = []; + if (details.messages) { + if (details.kind) { + children.push( + {details.kind && details.kind || "error"} + {details.base_branch && ` @ ${details.base_branch}` || null} + {details.attempts && ` after ${details.attempts.toFixed(1)} attempts` || null} + ) + } + if (details.url) { + children.push( + + View CI job{" "} + + + + + ) + } + for (const message of details.messages) { + children.push(
{message})
+ }
+ /* Legacy: string only values */
+ } else {
+ children.push({details.toString()})
+ }
+ return <>{children}>
+}
diff --git a/src/components/StatusDashboard/version_updates.jsx b/src/components/StatusDashboard/version_updates.jsx
index 4a861bedb7..90bf455df5 100644
--- a/src/components/StatusDashboard/version_updates.jsx
+++ b/src/components/StatusDashboard/version_updates.jsx
@@ -2,6 +2,7 @@ import Link from "@docusaurus/Link";
import { urls } from "@site/src/constants";
import React, { useEffect, useState } from "react";
import styles from "./styles.module.css";
+import ErrorMessageDetails from "@site/src/components/ErrorMessageDetails";
export default function VersionUpdates({ onLoad }) {
const [{ collapsed, expanded, errors, queued }, setState] =
@@ -97,7 +98,7 @@ export default function VersionUpdates({ onLoad }) {
{ message }
+ { details }