index.html 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <title>VirtManager</title>
  7. <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
  8. </head>
  9. <body>
  10. <div class="container mt-5">
  11. <h1 class="mb-4">VirtManager</h1>
  12. <div class="row">
  13. <div class="col-md-8">
  14. <h2>Virtual Machines</h2>
  15. <button class="btn btn-primary mb-3" onclick="loadVMs()">Refresh</button>
  16. <table class="table table-striped" id="vmTable">
  17. <thead>
  18. <tr>
  19. <th>ID</th>
  20. <th>Name</th>
  21. <th>State</th>
  22. <th>Actions</th>
  23. </tr>
  24. </thead>
  25. <tbody id="vmTableBody">
  26. </tbody>
  27. </table>
  28. </div>
  29. <div class="col-md-4">
  30. <h2>Create VM</h2>
  31. <form id="createVMForm">
  32. <div class="mb-3">
  33. <label for="name" class="form-label">Name</label>
  34. <input type="text" class="form-control" id="name" required>
  35. </div>
  36. <div class="mb-3">
  37. <label for="memory" class="form-label">Memory (MiB)</label>
  38. <input type="number" class="form-control" id="memory" required>
  39. </div>
  40. <div class="mb-3">
  41. <label for="disk_size" class="form-label">Disk Size (GB)</label>
  42. <input type="number" class="form-control" id="disk_size" required>
  43. </div>
  44. <div class="mb-3">
  45. <label for="iso" class="form-label">ISO File</label>
  46. <input type="text" class="form-control" id="iso" required>
  47. </div>
  48. <button type="submit" class="btn btn-success">Create VM</button>
  49. </form>
  50. </div>
  51. </div>
  52. </div>
  53. <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
  54. <script src="/static/app.js"></script>
  55. </body>
  56. </html>