feat : made input for new key textarea, split keys on their comment to display in table. Made js code use async/await instead of then.
Works fine with mockoon but might need more testing with actual LDAP server.
This commit is contained in:
parent
7f40a4b259
commit
128794648c
4 changed files with 153 additions and 138 deletions
78
src/ssh.html
78
src/ssh.html
|
@ -1,78 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en-ie">
|
||||
<head>
|
||||
<meta charset="UTF-8"/>
|
||||
<title>SSH</title>
|
||||
<link href="./images/favicon/favicon-16x16.png" rel="icon" type="image/png"/>
|
||||
<link href="./stylesheets/index.css" rel="stylesheet" type="text/css"/>
|
||||
<script src="scripts/ssh.js"></script>
|
||||
</head>
|
||||
|
||||
<style>
|
||||
.center {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
#key_table {
|
||||
display: none;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<body>
|
||||
<div class="wrapper">
|
||||
<header class="page-header">
|
||||
<img alt="Sharky, our mascot" height="81.56" src="./images/sharky.svg" width="145"/>
|
||||
<h1>Skynet Self Service</h1>
|
||||
</header>
|
||||
<main class="page-body">
|
||||
<h2>SSH</h2>
|
||||
<p>
|
||||
Add / Remove SSH Keys from your account.
|
||||
</p>
|
||||
<form id="reset">
|
||||
<table id="table">
|
||||
<tr>
|
||||
<td><label for="user">Username</label></td>
|
||||
<td><input id="user" name="user" type="text"/> <br/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for="pass">Password</label></td>
|
||||
<td><input id="pass" name="pass" type="password"/> <br/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<button type="button" id="get_keys"> Show current keys</button>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<p id="formStatus"></p>
|
||||
|
||||
<div> SSH Keys</div>
|
||||
<form id="add_key_form">
|
||||
<label for="key_input"></label>
|
||||
<input type="text" id="key_input" placeholder="Add key">
|
||||
<button type="button" id="add_key_button"> Add key</button>
|
||||
</form>
|
||||
|
||||
<table id="key_table" class="center">
|
||||
<tr>
|
||||
<!-- <th> Name </th> split on spaces for this later? -->
|
||||
<th>Key</th>
|
||||
<th>Remove</th>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
</main>
|
||||
<footer class="page-footer">
|
||||
UL Computer Society 2023-<span id="year">2023</span>
|
||||
<script>
|
||||
document.getElementById('year').textContent = new Date().getFullYear().toString()
|
||||
</script>
|
||||
</footer>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue