UX improvements
This commit is contained in:
parent
5bde25c65f
commit
6a21d5bd0b
|
@ -75,5 +75,5 @@ func execCMD(c *gin.Context) {
|
|||
return
|
||||
}
|
||||
prettyOut := strings.Replace(out, "\n", "<br>", -1)
|
||||
c.String(http.StatusOK, "$ "+prettyOut)
|
||||
c.String(http.StatusOK, "$ "+command+"<br>"+prettyOut)
|
||||
}
|
||||
|
|
|
@ -13,17 +13,26 @@
|
|||
<body>
|
||||
<div class="container">
|
||||
<div id="main">
|
||||
<p>Hello {{ .UserAgent }}</p>
|
||||
<b>
|
||||
<ul>
|
||||
<li class="hor">
|
||||
<p><a href="/">Home</a></p>
|
||||
</li>
|
||||
<li class="hor">
|
||||
<p><a href="https://git.bulgariu.xyz/raul/aemet" target="_blank">Source code</a></p>
|
||||
</li>
|
||||
</ul>
|
||||
</b>
|
||||
<hr>
|
||||
<h2>Executing commands for {{ .Client.ClientBasicInfo.Hostname }}</h2>
|
||||
<h2 align=center>Executing commands for {{ .Client.ClientBasicInfo.Hostname }}</h2>
|
||||
<hr>
|
||||
<div id=command>
|
||||
</div>
|
||||
<br>
|
||||
<form hx-post="/command/{{ .Client.ClientID }}" hx-target="#command" hx-on--after-request="this.reset()">
|
||||
<label><input type="text" name="cmd" value=""></label>
|
||||
<label><input id="commandinput" type="text" name="cmd" value="" required autofocus></label>
|
||||
<button type="submit" id="but">Submit</button>
|
||||
</form>
|
||||
<hr>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
|
|
@ -13,7 +13,16 @@
|
|||
<body>
|
||||
<div class="container">
|
||||
<div id="main">
|
||||
<p>Hello {{ .UserAgent }}</p>
|
||||
<b>
|
||||
<ul>
|
||||
<li class="hor">
|
||||
<p><a href="/">Home</a></p>
|
||||
</li>
|
||||
<li class="hor">
|
||||
<p><a href="https://git.bulgariu.xyz/raul/aemet" target="_blank">Source code</a></p>
|
||||
</li>
|
||||
</ul>
|
||||
</b>
|
||||
<hr>
|
||||
<h2 align=center>Current clients</h2>
|
||||
|
||||
|
@ -26,9 +35,8 @@
|
|||
<td>Username</td>
|
||||
<td>Hostname</td>
|
||||
<td>Operating System</td>
|
||||
<td rowspan=2>Actions</td>
|
||||
<td rowspan=2>
|
||||
<a target="_blank" href="command/{{ .ClientID }}">Execute commands</a>
|
||||
<a target="_blank" href="command/{{ .ClientID }}"><b>CMD</b></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
|
|
@ -31,10 +31,9 @@ td.left {
|
|||
padding-left: 5px;
|
||||
}
|
||||
|
||||
td.date {
|
||||
td {
|
||||
text-align: center;
|
||||
padding-left: 5px;
|
||||
padding-right: 5px;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
on {
|
||||
|
@ -99,9 +98,10 @@ form {
|
|||
text-align: center;
|
||||
}
|
||||
|
||||
td a {
|
||||
td a.clickable {
|
||||
display: block;
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
a {
|
||||
|
@ -139,13 +139,25 @@ footer {
|
|||
}
|
||||
|
||||
div#command {
|
||||
width: 50%;
|
||||
height: 40%;
|
||||
width: 100%;
|
||||
height: 50%;
|
||||
border: 2px solid black;
|
||||
overflow: scroll;
|
||||
padding-bottom: 30px;
|
||||
text-wrap: nowrap;
|
||||
}
|
||||
|
||||
input#commandinput {
|
||||
width: 60%;
|
||||
height: 20px;
|
||||
}
|
||||
|
||||
input#commandinput:focus {
|
||||
outline: 2px solid #ff6e00;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@media (max-width: 600px) {
|
||||
#main {
|
||||
width: 60vw;
|
||||
|
@ -160,7 +172,7 @@ div#command {
|
|||
top: 1px;
|
||||
left: 1px;
|
||||
|
||||
outline: solid 1px black;
|
||||
/* outline: solid 1px black; */
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 99vh;
|
||||
|
|
Loading…
Reference in New Issue