-
Notifications
You must be signed in to change notification settings - Fork 3
/
login
39 lines (33 loc) · 1.29 KB
/
login
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<html>
<head>
<script type="module" crossorigin="anonymous">
function load() {
const urlParams = new URLSearchParams(window.location.search);
const token = urlParams.get('token');
const name = urlParams.get('name');
const namespace = urlParams.get('namespace');
document.getElementById("token").value = token
document.getElementById("name").value = name
document.getElementById("namespace").value = namespace
if (token && name && namespace) {
document.getElementById("login").submit();
}
}
window.addEventListener("load", load, false);
</script>
</head>
<body id="body">
<p>Login</p>
<div>
<form id="login" name="login" action="/auth/jwt/set" method="POST">
<label for="token">Token</label><br/>
<textarea name="token" id="token" rows="10" cols="40"></textarea><br/>
<label for="name">Virtual machine name</label><br/>
<input id="name" name="name" size="35"/><br/>
<label for="namespace">Virtual machine namespace</label><br/>
<input id="namespace" name="namespace" size="35"/><br/>
<input type="submit" value="Submit">
</form>
</div>
</body>
</html>