mirror of
				https://github.com/house-of-vanity/khm.git
				synced 2025-10-24 23:09:08 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			181 lines
		
	
	
		
			7.5 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			181 lines
		
	
	
		
			7.5 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
| <!DOCTYPE html>
 | |
| <html lang="en">
 | |
| <head>
 | |
|     <meta charset="UTF-8">
 | |
|     <meta name="viewport" content="width=device-width, initial-scale=1.0">
 | |
|     <title>SSH Key Manager</title>
 | |
|     <link rel="stylesheet" href="/static/style.css">
 | |
|     <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&display=swap" rel="stylesheet">
 | |
| </head>
 | |
| <body>
 | |
|     <div class="container">
 | |
|         <header>
 | |
|             <div class="header-title">
 | |
|                 <h1>SSH Key Manager</h1>
 | |
|                 <span class="version" id="appVersion">Loading...</span>
 | |
|             </div>
 | |
|             <div class="flow-selector">
 | |
|                 <label for="flowSelect">Flow:</label>
 | |
|                 <select id="flowSelect">
 | |
|                     <option value="">Select a flow...</option>
 | |
|                 </select>
 | |
|                 <button id="refreshBtn" class="btn btn-secondary">Refresh</button>
 | |
|             </div>
 | |
|         </header>
 | |
| 
 | |
|         <main>
 | |
|             <div class="stats-panel">
 | |
|                 <div class="stat-item">
 | |
|                     <span class="stat-value" id="totalKeys">0</span>
 | |
|                     <span class="stat-label">Total Keys</span>
 | |
|                 </div>
 | |
|                 <div class="stat-item">
 | |
|                     <span class="stat-value" id="activeKeys">0</span>
 | |
|                     <span class="stat-label">Active Keys</span>
 | |
|                 </div>
 | |
|                 <div class="stat-item">
 | |
|                     <span class="stat-value deprecated" id="deprecatedKeys">0</span>
 | |
|                     <span class="stat-label">Deprecated Keys</span>
 | |
|                 </div>
 | |
|                 <div class="stat-item">
 | |
|                     <span class="stat-value" id="uniqueServers">0</span>
 | |
|                     <span class="stat-label">Unique Servers</span>
 | |
|                 </div>
 | |
|             </div>
 | |
| 
 | |
|             <div class="actions-panel">
 | |
|                 <button id="addKeyBtn" class="btn btn-primary">Add SSH Key</button>
 | |
|                 <button id="scanDnsBtn" class="btn btn-secondary">Scan DNS Resolution</button>
 | |
|                 <button id="bulkDeleteBtn" class="btn btn-danger" disabled>Deprecate Selected</button>
 | |
|                 <button id="bulkRestoreBtn" class="btn btn-success" disabled style="display: none;">Restore Selected</button>
 | |
|                 <button id="bulkPermanentDeleteBtn" class="btn btn-danger" disabled style="display: none;">Delete Selected</button>
 | |
|                 
 | |
|                 <div class="filter-controls">
 | |
|                     <label class="filter-label">
 | |
|                         <input type="checkbox" id="showDeprecatedOnly"> 
 | |
|                         <span>Show only deprecated keys</span>
 | |
|                     </label>
 | |
|                 </div>
 | |
|                 
 | |
|                 <div class="search-box">
 | |
|                     <input type="text" id="searchInput" placeholder="Search servers or keys...">
 | |
|                 </div>
 | |
|             </div>
 | |
| 
 | |
|             <div class="keys-table-container">
 | |
|                 <table class="keys-table">
 | |
|                     <thead>
 | |
|                         <tr>
 | |
|                             <th>
 | |
|                                 <input type="checkbox" id="selectAll">
 | |
|                             </th>
 | |
|                             <th>Server/Type</th>
 | |
|                             <th>Key Preview</th>
 | |
|                             <th></th>
 | |
|                             <th>Actions</th>
 | |
|                         </tr>
 | |
|                     </thead>
 | |
|                     <tbody id="keysTableBody">
 | |
|                         <!-- Keys will be populated here -->
 | |
|                     </tbody>
 | |
|                 </table>
 | |
|                 <div id="noKeysMessage" class="no-keys-message" style="display: none;">
 | |
|                     No SSH keys found for this flow.
 | |
|                 </div>
 | |
|             </div>
 | |
| 
 | |
|             <div class="pagination">
 | |
|                 <button id="prevPage" class="btn btn-secondary" disabled>Previous</button>
 | |
|                 <span id="pageInfo">Page 1 of 1</span>
 | |
|                 <button id="nextPage" class="btn btn-secondary" disabled>Next</button>
 | |
|             </div>
 | |
|         </main>
 | |
|     </div>
 | |
| 
 | |
|     <!-- Add Key Modal -->
 | |
|     <div id="addKeyModal" class="modal">
 | |
|         <div class="modal-content">
 | |
|             <div class="modal-header">
 | |
|                 <h2>Add SSH Key</h2>
 | |
|                 <span class="close">×</span>
 | |
|             </div>
 | |
|             <div class="modal-body">
 | |
|                 <form id="addKeyForm">
 | |
|                     <div class="form-group">
 | |
|                         <label for="serverInput">Server/Hostname:</label>
 | |
|                         <input type="text" id="serverInput" required placeholder="example.com">
 | |
|                     </div>
 | |
|                     <div class="form-group">
 | |
|                         <label for="keyInput">SSH Public Key:</label>
 | |
|                         <textarea id="keyInput" required placeholder="ssh-rsa AAAAB3..."></textarea>
 | |
|                     </div>
 | |
|                     <div class="form-actions">
 | |
|                         <button type="button" class="btn btn-secondary" id="cancelAdd">Cancel</button>
 | |
|                         <button type="submit" class="btn btn-primary">Add Key</button>
 | |
|                     </div>
 | |
|                 </form>
 | |
|             </div>
 | |
|         </div>
 | |
|     </div>
 | |
| 
 | |
|     <!-- View Key Modal -->
 | |
|     <div id="viewKeyModal" class="modal">
 | |
|         <div class="modal-content">
 | |
|             <div class="modal-header">
 | |
|                 <h2>SSH Key Details</h2>
 | |
|                 <span class="close">×</span>
 | |
|             </div>
 | |
|             <div class="modal-body">
 | |
|                 <div class="form-group">
 | |
|                     <label>Server:</label>
 | |
|                     <div id="viewServer" class="read-only-field"></div>
 | |
|                 </div>
 | |
|                 <div class="form-group">
 | |
|                     <label>SSH Public Key:</label>
 | |
|                     <textarea id="viewKey" class="read-only-field" readonly></textarea>
 | |
|                 </div>
 | |
|                 <div class="form-actions">
 | |
|                     <button type="button" class="btn btn-secondary" id="closeView">Close</button>
 | |
|                     <button type="button" class="btn btn-primary" id="copyKey">Copy Key</button>
 | |
|                 </div>
 | |
|             </div>
 | |
|         </div>
 | |
|     </div>
 | |
| 
 | |
|     <!-- DNS Scan Results Modal -->
 | |
|     <div id="dnsScanModal" class="modal">
 | |
|         <div class="modal-content modal-large">
 | |
|             <div class="modal-header">
 | |
|                 <h2>DNS Resolution Scan Results</h2>
 | |
|                 <span class="close">×</span>
 | |
|             </div>
 | |
|             <div class="modal-body">
 | |
|                 <div id="dnsScanStats" class="scan-stats"></div>
 | |
|                 <div id="unresolvedHosts" class="unresolved-hosts">
 | |
|                     <div class="section-header">
 | |
|                         <h3>Unresolved Hosts</h3>
 | |
|                         <button id="selectAllUnresolved" class="btn btn-sm btn-secondary">Select All</button>
 | |
|                     </div>
 | |
|                     <div id="unresolvedList" class="host-list"></div>
 | |
|                 </div>
 | |
|                 <div class="form-actions">
 | |
|                     <button type="button" class="btn btn-secondary" id="closeDnsScan">Close</button>
 | |
|                     <button type="button" class="btn btn-danger" id="deprecateUnresolved" disabled>Deprecate Selected</button>
 | |
|                 </div>
 | |
|             </div>
 | |
|         </div>
 | |
|     </div>
 | |
| 
 | |
|     <!-- Loading Overlay -->
 | |
|     <div id="loadingOverlay" class="loading-overlay">
 | |
|         <div class="loading-spinner"></div>
 | |
|         <div class="loading-text">Loading...</div>
 | |
|     </div>
 | |
| 
 | |
|     <!-- Toast Notifications -->
 | |
|     <div id="toastContainer" class="toast-container"></div>
 | |
| 
 | |
|     <script src="/static/script.js"></script>
 | |
| </body>
 | |
| </html>
 |