Skip to content

Commit

Permalink
webui: add button for reporting to bugzilla to CriticalError dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
rvykydal committed Jul 28, 2023
1 parent 19f19d3 commit 494047a
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions ui/webui/src/components/Error.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import {
TextVariants,
Text,
} from "@patternfly/react-core";
import { ExternalLinkAltIcon } from "@patternfly/react-icons";

import { exitGui } from "../helpers/exit.js";

Expand Down Expand Up @@ -70,6 +71,14 @@ export const CriticalError = ({ exception, isBootIso, reportLinkURL }) => {
variant="small"
footer={
<>
{reportLinkURL &&
<Button
variant="primary"
icon={<ExternalLinkAltIcon />}
href={reportURL}
component="a">
{_("Send issue to Bugzilla")}
</Button>}
<Button variant="secondary" onClick={exitGui}>
{isBootIso ? _("Reboot") : _("Quit")}
</Button>
Expand All @@ -92,12 +101,6 @@ export const CriticalError = ({ exception, isBootIso, reportLinkURL }) => {
{cockpit.format(_("Hint: $0"), exception.contextData.hint)}
</Text>
</TextContent>}
{reportLinkURL &&
<TextContent>
<Text component={TextVariants.p}>
{cockpit.format("Report: $0", reportURL)}
</Text>
</TextContent>}
</Modal>
);
};
Expand Down

0 comments on commit 494047a

Please sign in to comment.