diff --git a/ui/webui/src/components/AnacondaHeader.jsx b/ui/webui/src/components/AnacondaHeader.jsx
index e4c22f1ae25..efb7443f7ea 100644
--- a/ui/webui/src/components/AnacondaHeader.jsx
+++ b/ui/webui/src/components/AnacondaHeader.jsx
@@ -16,7 +16,7 @@
*/
import cockpit from "cockpit";
-import React from "react";
+import React, { useState, useEffect } from "react";
import {
Flex,
@@ -29,39 +29,22 @@ import { InfoCircleIcon } from "@patternfly/react-icons";
import { HeaderKebab } from "./HeaderKebab.jsx";
+import { getIsFinal } from "../apis/runtime";
+
import "./AnacondaHeader.scss";
const _ = cockpit.gettext;
+const N_ = cockpit.noop;
-export const AnacondaHeader = ({ beta, title, reportLinkURL, isConnected }) => {
- const prerelease = _("Pre-release");
- const betanag = beta
- ? (
-
-
- {_("Notice: This is pre-released software that is intended for development and testing purposes only. Do NOT use this software for any critical work or for production environments.")}
-
-
- {_("By continuing to use this software, you understand and accept the risks associated with pre-released software, that you intend to use this for testing and development purposes only and are willing to report any bugs or issues in order to enhance this work.")}
-
-
- {_("If you do not understand or accept the risks, then please exit this program.")}
-
-
- }
- >
- {/* HACK Patternfly currently doesn't implement clickable labels so the styling had to be done manually. */}
-
- } id="betanag-icon"> {prerelease}
-
-
- )
- : null;
+export const AnacondaHeader = ({ title, reportLinkURL, isConnected, onCritFail }) => {
+ const [beta, setBeta] = useState();
+
+ useEffect(() => {
+ getIsFinal().then(
+ isFinal => setBeta(!isFinal),
+ onCritFail({ context: N_("Reading installer version information failed.") })
+ );
+ }, [onCritFail]);
return (
@@ -70,9 +53,39 @@ export const AnacondaHeader = ({ beta, title, reportLinkURL, isConnected }) => {
{title}
- {betanag}
+ {beta && }
);
};
+
+const Beta = () => {
+ const prerelease = _("Pre-release");
+
+ return (
+
+
+ {_("Notice: This is pre-released software that is intended for development and testing purposes only. Do NOT use this software for any critical work or for production environments.")}
+
+
+ {_("By continuing to use this software, you understand and accept the risks associated with pre-released software, that you intend to use this for testing and development purposes only and are willing to report any bugs or issues in order to enhance this work.")}
+
+
+ {_("If you do not understand or accept the risks, then please exit this program.")}
+
+
+ }
+ >
+ {/* HACK Patternfly currently doesn't implement clickable labels so the styling had to be done manually. */}
+