diff options
| author | diogo464 <[email protected]> | 2025-05-28 20:46:55 +0100 |
|---|---|---|
| committer | diogo464 <[email protected]> | 2025-05-28 20:46:55 +0100 |
| commit | 05f7444ecd2e3405b0e595042166ec5f8a3395ab (patch) | |
| tree | 2b28bca5dab0f2ec79c41893732b5d6866725f56 /index.html | |
init
Diffstat (limited to 'index.html')
| -rw-r--r-- | index.html | 116 |
1 files changed, 116 insertions, 0 deletions
diff --git a/index.html b/index.html new file mode 100644 index 0000000..fff715a --- /dev/null +++ b/index.html | |||
| @@ -0,0 +1,116 @@ | |||
| 1 | <!DOCTYPE html> | ||
| 2 | <html lang="en"> | ||
| 3 | |||
| 4 | <head> | ||
| 5 | <meta charset="UTF-8"> | ||
| 6 | <meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
| 7 | <title>Bonsai - Network Latency Graph Generator</title> | ||
| 8 | <link rel="stylesheet" href="https://unpkg.com/@picocss/[email protected]/css/pico.min.css"> | ||
| 9 | <style> | ||
| 10 | .logo-container { | ||
| 11 | display: flex; | ||
| 12 | align-items: center; | ||
| 13 | gap: 1rem; | ||
| 14 | margin-bottom: 2rem; | ||
| 15 | } | ||
| 16 | |||
| 17 | .logo { | ||
| 18 | height: 60px; | ||
| 19 | width: auto; | ||
| 20 | } | ||
| 21 | |||
| 22 | .file-item { | ||
| 23 | margin-bottom: 1rem; | ||
| 24 | padding: 1rem; | ||
| 25 | border: 1px solid var(--border-color); | ||
| 26 | border-radius: var(--border-radius); | ||
| 27 | } | ||
| 28 | |||
| 29 | .file-buttons { | ||
| 30 | display: flex; | ||
| 31 | gap: 0.5rem; | ||
| 32 | margin-top: 0.5rem; | ||
| 33 | } | ||
| 34 | |||
| 35 | .file-content { | ||
| 36 | margin-top: 1rem; | ||
| 37 | padding: 1rem; | ||
| 38 | background-color: var(--code-background-color); | ||
| 39 | border-radius: var(--border-radius); | ||
| 40 | white-space: pre; | ||
| 41 | font-family: monospace; | ||
| 42 | font-size: 0.9rem; | ||
| 43 | max-height: 300px; | ||
| 44 | overflow-y: auto; | ||
| 45 | display: none; | ||
| 46 | } | ||
| 47 | |||
| 48 | .error { | ||
| 49 | color: var(--color-red); | ||
| 50 | background-color: var(--color-red-background); | ||
| 51 | padding: 1rem; | ||
| 52 | border-radius: var(--border-radius); | ||
| 53 | margin-top: 1rem; | ||
| 54 | } | ||
| 55 | |||
| 56 | .loading { | ||
| 57 | text-align: center; | ||
| 58 | margin-top: 1rem; | ||
| 59 | } | ||
| 60 | </style> | ||
| 61 | </head> | ||
| 62 | |||
| 63 | <body> | ||
| 64 | <main class="container"> | ||
| 65 | <header> | ||
| 66 | <div class="logo-container"> | ||
| 67 | <img src="logo.png" alt="Bonsai Logo" class="logo"> | ||
| 68 | <h1>Bonsai</h1> | ||
| 69 | </div> | ||
| 70 | </header> | ||
| 71 | |||
| 72 | <section> | ||
| 73 | <p> | ||
| 74 | Bonsai is a powerful tool for generating realistic network latency graphs. | ||
| 75 | This web interface provides an easy way to use the | ||
| 76 | <a href="https://codelab.fct.unl.pt/di/computer-systems/bonsai" target="_blank">Bonsai project</a> | ||
| 77 | without needing to install its dependencies locally. | ||
| 78 | Simply provide your network configuration in YAML format below, and click | ||
| 79 | "Generate" to create your network topology files. | ||
| 80 | </p> | ||
| 81 | |||
| 82 | <p> | ||
| 83 | The tool will generate two CSV files: <code>edges.csv</code> containing | ||
| 84 | the network connections and weights, and <code>nodes.csv</code> containing | ||
| 85 | the node information and positions. | ||
| 86 | </p> | ||
| 87 | </section> | ||
| 88 | |||
| 89 | <section> | ||
| 90 | <label for="config">Network Configuration (YAML):</label> | ||
| 91 | <textarea id="config" name="config" rows="10">nodes: 15 | ||
| 92 | continents: | ||
| 93 | EU: 5 | ||
| 94 | AS: 5 | ||
| 95 | countries: | ||
| 96 | DE: 2 | ||
| 97 | FR: 2 | ||
| 98 | CN: 2 | ||
| 99 | JP: 2</textarea> | ||
| 100 | |||
| 101 | <button id="generateBtn" onclick="generateFiles()">Generate Network Files</button> | ||
| 102 | |||
| 103 | <div id="loading" class="loading" style="display: none;"> | ||
| 104 | <p aria-busy="true">Generating network files...</p> | ||
| 105 | </div> | ||
| 106 | |||
| 107 | <div id="error" class="error" style="display: none;"></div> | ||
| 108 | |||
| 109 | <div id="results" style="margin-top: 2rem;"></div> | ||
| 110 | </section> | ||
| 111 | </main> | ||
| 112 | |||
| 113 | <script src="script.js"></script> | ||
| 114 | </body> | ||
| 115 | |||
| 116 | </html> \ No newline at end of file | ||
