Improve command error and output style
parent
5aa31270de
commit
d3424662fd
|
@ -0,0 +1,7 @@
|
|||
.cmd {
|
||||
word-wrap: break-word;
|
||||
}
|
||||
pre {
|
||||
background-color: #eee;
|
||||
min-height: 1.5em;
|
||||
}
|
2
index.js
2
index.js
|
@ -473,7 +473,7 @@ if (shellable) {
|
|||
timeout: 60 * 1000,
|
||||
}, (err, stdout, stderr) => {
|
||||
if (err) {
|
||||
req.flash("error", "Unable to execute command: " + err);
|
||||
req.flash("error", "Command failed due to non-zero exit code");
|
||||
}
|
||||
res.render("cmd", flashify(req, {
|
||||
path: res.filename,
|
||||
|
|
|
@ -12,10 +12,11 @@
|
|||
{{success}}
|
||||
</div>
|
||||
{{/each}}
|
||||
<h4><code>{{cmd}}</code></h4>
|
||||
<h5>stdout</h5>
|
||||
<h4>command</h4>
|
||||
<h4 class="cmd"><code>{{cmd}}</code></h4>
|
||||
<h4>stdout</h4>
|
||||
<pre><code>{{stdout}}</code></pre>
|
||||
<h5>stderr</h5>
|
||||
<h4>stderr</h4>
|
||||
<pre><code>{{stderr}}</code></pre>
|
||||
</main>
|
||||
</div>
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
<script src="/assets/upload.js"></script>
|
||||
<link rel="stylesheet" href="/assets/login.css" />
|
||||
<script src="/assets/login.js"></script>
|
||||
<link rel="stylesheet" href="/assets/cmd.css" />
|
||||
</head>
|
||||
<body>
|
||||
{{{body}}}
|
||||
|
|
Loading…
Reference in New Issue