Include ability to remotely execute commands
This commit is contained in:
parent
1f95d44e3e
commit
f0c31dcd95
|
@ -6,7 +6,7 @@
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<link href="/style.css" rel="stylesheet">
|
<link href="/style.css" rel="stylesheet">
|
||||||
<script href="htmx.js" integrity="sha384-qbtR4rS9RrUMECUWDWM2+YGgN3U4V4ZncZ0BvUcg9FGct0jqXz3PUdVpU1p0yrXS"
|
<script src="/htmx.js" integrity="sha384-qbtR4rS9RrUMECUWDWM2+YGgN3U4V4ZncZ0BvUcg9FGct0jqXz3PUdVpU1p0yrXS"
|
||||||
crossorigin="anonymous"></script>
|
crossorigin="anonymous"></script>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
@ -15,10 +15,14 @@
|
||||||
<div id="main">
|
<div id="main">
|
||||||
<p>Hello {{ .UserAgent }}</p>
|
<p>Hello {{ .UserAgent }}</p>
|
||||||
<hr>
|
<hr>
|
||||||
|
<h2>Executing commands for {{ .Client.ClientBasicInfo.Hostname }}</h2>
|
||||||
|
<hr>
|
||||||
<div id=command>
|
<div id=command>
|
||||||
</div>
|
</div>
|
||||||
<input type="text" name="command" value="" hx-post="command/{{ .Client.ClientID }}" hx-target="command"
|
<form hx-post="/command/{{ .Client.ClientID }}" hx-target="#command" hx-on--after-request="this.reset()">
|
||||||
hx-trigger="keyup[keyCode==13]">
|
<label><input type="text" name="cmd" value=""></label>
|
||||||
|
<button type="submit" id="but">Submit</button>
|
||||||
|
</form>
|
||||||
<hr>
|
<hr>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<link href="/style.css" rel="stylesheet">
|
<link href="/style.css" rel="stylesheet">
|
||||||
<script href="htmx.js" integrity="sha384-qbtR4rS9RrUMECUWDWM2+YGgN3U4V4ZncZ0BvUcg9FGct0jqXz3PUdVpU1p0yrXS"
|
<script src="/htmx.js" integrity="sha384-qbtR4rS9RrUMECUWDWM2+YGgN3U4V4ZncZ0BvUcg9FGct0jqXz3PUdVpU1p0yrXS"
|
||||||
crossorigin="anonymous"></script>
|
crossorigin="anonymous"></script>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
|
|
@ -142,6 +142,8 @@ div#command {
|
||||||
width: 50%;
|
width: 50%;
|
||||||
height: 40%;
|
height: 40%;
|
||||||
border: 2px solid black;
|
border: 2px solid black;
|
||||||
|
overflow: scroll;
|
||||||
|
text-wrap: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 600px) {
|
@media (max-width: 600px) {
|
||||||
|
|
Loading…
Reference in New Issue