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

gluon-status-page: modernize html #2960

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@

<title><%:Error%></title>

<link rel="stylesheet" href="/static/status-page.css" type="text/css">
<link rel="stylesheet" href="/static/status-page.css">
</head>
<body>
<header>
<h1><%:Error%></h1>
</header>
<div class="container">
<div class="frame">
<main class="container">
<section class="frame">
<% renderer.render(content, scope, pkg) %>
</div>
</div>
</section>
</main>
</body>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,8 @@

<title><%| nodeinfo.hostname %> - <%:Status%></title>

<link rel="stylesheet" href="/static/status-page.css" type="text/css">
<link rel="stylesheet" href="/static/status-page.css">
<script defer src="/static/status-page.js"></script>
</head>
<body data-node-address="<%| http:getenv('SERVER_ADDR') %>"<%=
attr('data-translations', translations) ..
Expand All @@ -138,8 +139,8 @@
<header>
<h1><%| nodeinfo.hostname %></h1>
</header>
<div class="container">
<div class="frame">
<main class="container">
<section class="frame">
<h2><%:Overview%></h2>
<dl>
<dt><%:Node name%></dt><dd><%| nodeinfo.hostname %></dd>
Expand Down Expand Up @@ -205,8 +206,11 @@ <h2><%:Overview%></h2>
<%- end %>
<%- end %>
</dl>
</div>
<div class="frame">
</section>
<section class="frame">
<noscript>
<section role="alert">Warning: Javascript required!</section>
</noscript>
<h2><%:Monitoring%></h2>
<table>
<tbody>
Expand Down Expand Up @@ -255,8 +259,8 @@ <h3><%:Mesh VPN%></h3>
<tbody id="mesh-vpn-peers"></tbody>
</table>
</div>
</div>
<div class="frame frame-wide">
</section>
<section class="frame frame-wide">
<h2><%:Neighbors%></h2>

<%
Expand Down Expand Up @@ -287,8 +291,7 @@ <h3><%| iface %></h3>
end
end
%>
</div>
</div>
<script src="/static/status-page.js"></script>
</section>
</main>
</body>
</html>
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<!DOCTYPE html>
<html lang="">
<html lang="en">
<head>
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="0">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the replacement for these tags, if we want to prevent caching of the redirect?

<meta charset="utf-8">
<meta http-equiv="refresh" content="0; URL=/cgi-bin/status">
<title>Redirect</title>
</head>
<body>
Redirect to <a href="/cgi-bin/status">/cgi-bin/status</a>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think showing such a link for a moment is very ugly, I'd rather leave the body empty.

</body>
</html>

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions package/gluon-status-page/sass/status-page.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
ATTENTION: This file is not compiled when building gluon.
The compiled version is at ../files/lib/gluon/status-page/www/static/status-page.css

Use sass like this to update it:
Use dart-sass to update it:

sass --sourcemap=none -C -t compressed sass/status-page.scss files/lib/gluon/status-page/www/static/status-page.css
sass --style=compressed --no-source-map sass/status-page.scss files/lib/gluon/status-page/www/static/status-page.css

When committing changes to this file make sure to commit the respective
changes to the compiled version within the same commit!
Expand Down Expand Up @@ -242,3 +242,7 @@ canvas.signalgraph {
}
}
}

[role=alert] {
font-weight: bold;
}