Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add server status page and appbar indicator #182

Merged
merged 17 commits into from
Dec 3, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
use returned HTML
  • Loading branch information
aine-etke committed Dec 3, 2024
commit 5ccc74b27d7e9e0a1fcca02a3e947a6ebfddfc69
3 changes: 1 addition & 2 deletions src/components/etke.cc/ServerStatusBadge.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@ const ServerStatusBadge = () => {
let tooltipText = "Click to view Server Status";
let badgeBackgroundColor = isOkay ? theme.palette.success.main : theme.palette.error.main;
let badgeColor = isOkay ? theme.palette.success.main : theme.palette.error.main;
console.log(command, locked_at);

if (command && locked_at) {
badgeBackgroundColor = theme.palette.warning.main;
Expand All @@ -163,4 +162,4 @@ const ServerStatusBadge = () => {
</Button>
};

export default ServerStatusBadge;
export default ServerStatusBadge;
4 changes: 2 additions & 2 deletions src/components/etke.cc/ServerStatusPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const StatusChip = ({ isOkay, size = "medium" }: { isOkay: boolean, size?: "smal
};

const ServerComponentText = ({ text }: { text: string }) => {
return <Typography variant="body1" dangerouslySetInnerHTML={{ __html: text.replace(/\*\*/g, "") }} />;
return <Typography variant="body1" dangerouslySetInnerHTML={{ __html: text }} />;
};

const ServerStatusPage = () => {
Expand Down Expand Up @@ -109,7 +109,7 @@ const ServerStatusPage = () => {
<ServerComponentText text={result.label.text} />
)}
</Box>
{result.reason && <Typography color="text.secondary">{result.reason}</Typography>}
{result.reason && <Typography color="text.secondary" dangerouslySetInnerHTML={{ __html: result.reason }}/>}
{(!result.ok && result.help) && (
<Link href={result.help} target="_blank" rel="noopener noreferrer" sx={{ mt: 1 }}>
Learn more
Expand Down
Loading