fullwidth
This commit is contained in:
parent
e45d4c38a0
commit
8e9b7682b6
3 changed files with 29 additions and 8 deletions
|
@ -68,6 +68,7 @@ async fn get_log_string(container_name: String, state: AppState) -> impl IntoRes
|
||||||
follow: false,
|
follow: false,
|
||||||
stdout: true,
|
stdout: true,
|
||||||
stderr: true,
|
stderr: true,
|
||||||
|
timestamps: true,
|
||||||
..Default::default()
|
..Default::default()
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
|
@ -89,6 +90,7 @@ async fn get_log_stream(container_name: String, state: AppState) -> impl IntoRes
|
||||||
follow: true,
|
follow: true,
|
||||||
stdout: true,
|
stdout: true,
|
||||||
stderr: true,
|
stderr: true,
|
||||||
|
timestamps: true,
|
||||||
..Default::default()
|
..Default::default()
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
<title>{% block title %}{{ title }} - staxman{% endblock %}</title>
|
<title>{% block title %}{{ title }} - staxman{% endblock %}</title>
|
||||||
<link rel="preconnect" href="https://rsms.me/">
|
<link rel="preconnect" href="https://rsms.me/">
|
||||||
<link rel="stylesheet" href="https://rsms.me/inter/inter.css">
|
<link rel="stylesheet" href="https://rsms.me/inter/inter.css">
|
||||||
|
<link rel="stylesheet" href="https://iosevka-webfonts.github.io/iosevka/iosevka.css">
|
||||||
<style>
|
<style>
|
||||||
:root {
|
:root {
|
||||||
background-color: #13131E;
|
background-color: #13131E;
|
||||||
|
@ -14,6 +15,11 @@
|
||||||
font-family: Inter, sans-serif;
|
font-family: Inter, sans-serif;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
code {
|
||||||
|
font-family: "Iosevka Web", monospace;
|
||||||
|
font-size: 11pt;
|
||||||
|
}
|
||||||
|
|
||||||
a[href],
|
a[href],
|
||||||
a[href]:visited {
|
a[href]:visited {
|
||||||
color: #FFC53D;
|
color: #FFC53D;
|
||||||
|
@ -25,7 +31,6 @@
|
||||||
|
|
||||||
body {
|
body {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -57,9 +62,15 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
body>* {
|
|
||||||
width: 100%;
|
main {
|
||||||
max-width: 1000px;
|
padding: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
body,
|
||||||
|
html {
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
|
|
|
@ -39,8 +39,8 @@
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
||||||
display: block;
|
display: block;
|
||||||
height: 500px;
|
height: 800px;
|
||||||
max-height: 50vh;
|
max-height: 80vh;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
|
|
||||||
& .error {
|
& .error {
|
||||||
|
@ -52,9 +52,10 @@
|
||||||
& p {
|
& p {
|
||||||
padding: 4px 8px;
|
padding: 4px 8px;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
background-color: #1a1c38;
|
||||||
|
|
||||||
&:nth-child(odd) {
|
&:nth-child(odd) {
|
||||||
background-color: #202248;
|
background-color: #212345;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -99,12 +100,19 @@
|
||||||
if ("lines" in data) {
|
if ("lines" in data) {
|
||||||
data.lines.split("\n").map(line => convert.toHtml(line)).filter(line => line).forEach(line => {
|
data.lines.split("\n").map(line => convert.toHtml(line)).filter(line => line).forEach(line => {
|
||||||
const lineEl = document.createElement("p");
|
const lineEl = document.createElement("p");
|
||||||
lineEl.innerHTML = line;
|
lineEl.innerHTML = line.trim();
|
||||||
logEl.appendChild(lineEl);
|
logEl.appendChild(lineEl);
|
||||||
lineEl.scrollIntoView();
|
lineEl.scrollIntoView();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Fix copying from log (remove double newlines)
|
||||||
|
logEl.addEventListener("copy", (event) => {
|
||||||
|
const selection = document.getSelection();
|
||||||
|
event.clipboardData.setData("text/plain", selection.toString().replace(/\n\n/g, '\n'));
|
||||||
|
event.preventDefault();
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
Reference in a new issue