| … | … | @@ -4,153 +4,65 @@ |
| 4 | 4 | <meta charset="UTF-8"> |
| 5 | 5 | <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| 6 | 6 | <title>AtomSpace Visualizer</title> |
| 7 | | <link rel="stylesheet" href="styles.css"> |
| 8 | | <script src="theme.js"></script> |
| 9 | | <script src="landing.js"></script> |
| 7 | <style> |
| 8 | body { |
| 9 | font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; |
| 10 | background: #1a1a2e; |
| 11 | color: #eee; |
| 12 | display: flex; |
| 13 | justify-content: center; |
| 14 | align-items: center; |
| 15 | min-height: 100vh; |
| 16 | margin: 0; |
| 17 | padding: 20px; |
| 18 | box-sizing: border-box; |
| 19 | } |
| 20 | .container { |
| 21 | text-align: center; |
| 22 | max-width: 600px; |
| 23 | padding: 40px; |
| 24 | background: #16213e; |
| 25 | border-radius: 12px; |
| 26 | box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3); |
| 27 | } |
| 28 | h1 { |
| 29 | color: #4fc3f7; |
| 30 | margin-bottom: 20px; |
| 31 | } |
| 32 | p { |
| 33 | line-height: 1.6; |
| 34 | margin-bottom: 20px; |
| 35 | } |
| 36 | a { |
| 37 | color: #4fc3f7; |
| 38 | text-decoration: none; |
| 39 | } |
| 40 | a:hover { |
| 41 | text-decoration: underline; |
| 42 | } |
| 43 | .install-link { |
| 44 | display: inline-block; |
| 45 | background: #4fc3f7; |
| 46 | color: #1a1a2e; |
| 47 | padding: 12px 24px; |
| 48 | border-radius: 6px; |
| 49 | font-weight: bold; |
| 50 | margin-top: 10px; |
| 51 | } |
| 52 | .install-link:hover { |
| 53 | background: #81d4fa; |
| 54 | text-decoration: none; |
| 55 | } |
| 56 | </style> |
| 10 | 57 | </head> |
| 11 | | <body data-theme="dark"> |
| 12 | | <!-- Theme Toggle Button --> |
| 13 | | <button class="theme-toggle" id="theme-toggle" aria-label="Toggle dark/light mode"> |
| 14 | | <span id="theme-icon">☀️</span> |
| 15 | | </button> |
| 16 | | |
| 58 | <body> |
| 17 | 59 | <div class="container"> |
| 18 | | <header> |
| 19 | | <h1>AtomSpace Visualizer</h1> |
| 20 | | <p class="subtitle">Real-time visualization of the AtomSpace in-RAM database</p> |
| 21 | | </header> |
| 22 | | |
| 23 | | <main> |
| 24 | | <section class="connection-panel"> |
| 25 | | <h2>Connection Settings</h2> |
| 26 | | <noscript> |
| 27 | | <div style="color: red; font-weight: bold; padding: 10px; background: #ffe6e6; border: 2px solid red; border-radius: 4px; margin-bottom: 15px;"> |
| 28 | | Please enable javascript in your browser to run this demo! |
| 29 | | </div> |
| 30 | | </noscript> |
| 31 | | <div class="connection-form"> |
| 32 | | <div class="form-group"> |
| 33 | | <label for="server-url">CogServer URL:</label> |
| 34 | | <input type="text" |
| 35 | | id="server-url" |
| 36 | | placeholder="ws://172.17.0.2:18080/" |
| 37 | | value=""> |
| 38 | | <span class="hint">Enter the WebSocket URL of your CogServer (JSON endpoint will be used)</span> |
| 39 | | </div> |
| 40 | | |
| 41 | | <div class="button-group"> |
| 42 | | <button id="connect-btn" class="btn-primary"> |
| 43 | | <span class="btn-icon">⚡</span> |
| 44 | | <span class="btn-text">Connect</span> |
| 45 | | </button> |
| 46 | | <button id="stats-btn" class="btn-secondary" onclick="openStatsPage()"> |
| 47 | | <span class="btn-icon">📊</span> |
| 48 | | <span class="btn-text">View Stats</span> |
| 49 | | </button> |
| 50 | | </div> |
| 51 | | </div> |
| 52 | | </section> |
| 53 | | |
| 54 | | <section class="status-panel"> |
| 55 | | <h2>Connection Status</h2> |
| 56 | | <div class="status-grid"> |
| 57 | | <div class="status-item"> |
| 58 | | <span class="status-label">Status:</span> |
| 59 | | <span id="connection-status" class="status-value disconnected">Disconnected</span> |
| 60 | | </div> |
| 61 | | <div class="status-item"> |
| 62 | | <span class="status-label">Server:</span> |
| 63 | | <span id="server-display" class="status-value">Not connected</span> |
| 64 | | </div> |
| 65 | | </div> |
| 66 | | </section> |
| 67 | | |
| 68 | | <section id="atomspace-stats" class="stats-panel hidden"> |
| 69 | | <h2>AtomSpace Statistics</h2> |
| 70 | | <div class="stats-grid"> |
| 71 | | <div class="stat-card"> |
| 72 | | <div class="stat-value" id="atom-count">-</div> |
| 73 | | <div class="stat-label">Total Atoms</div> |
| 74 | | </div> |
| 75 | | <div class="stat-card"> |
| 76 | | <div class="stat-value" id="node-count">-</div> |
| 77 | | <div class="stat-label">Nodes</div> |
| 78 | | </div> |
| 79 | | <div class="stat-card"> |
| 80 | | <div class="stat-value" id="link-count">-</div> |
| 81 | | <div class="stat-label">Links</div> |
| 82 | | </div> |
| 83 | | <div class="stat-card clickable" onclick="window.open('type-view.html', '_blank')"> |
| 84 | | <div class="stat-value" id="type-count">-</div> |
| 85 | | <div class="stat-label">Atom Types</div> |
| 86 | | </div> |
| 87 | | </div> |
| 88 | | |
| 89 | | <div class="refresh-panel"> |
| 90 | | <button id="refresh-stats" class="btn-secondary" disabled> |
| 91 | | <span class="btn-icon">🔄</span> |
| 92 | | <span class="btn-text">Refresh Statistics</span> |
| 93 | | </button> |
| 94 | | <span id="last-update" class="last-update"></span> |
| 95 | | </div> |
| 96 | | </section> |
| 97 | | |
| 98 | | <section id="atom-types-breakdown" class="types-breakdown-panel hidden"> |
| 99 | | <h2>Atoms by Type</h2> |
| 100 | | <div id="types-list" class="types-list"> |
| 101 | | <!-- Atom types will be dynamically inserted here --> |
| 102 | | </div> |
| 103 | | </section> |
| 104 | | |
| 105 | | <section id="atom-listing-panel" class="atom-listing-panel hidden"> |
| 106 | | <div class="atom-listing-header"> |
| 107 | | <h2 id="atom-listing-title">Atoms of Type</h2> |
| 108 | | <div class="header-buttons"> |
| 109 | | <button id="visualize-checked" class="btn-primary"> |
| 110 | | <span class="btn-icon">🔗</span> |
| 111 | | <span class="btn-text">Visualize Checked</span> |
| 112 | | </button> |
| 113 | | <button id="close-atom-listing" class="btn-secondary"> |
| 114 | | <span class="btn-icon">✕</span> |
| 115 | | <span class="btn-text">Close</span> |
| 116 | | </button> |
| 117 | | </div> |
| 118 | | </div> |
| 119 | | <div id="atom-listing-content" class="atom-listing-content"> |
| 120 | | <!-- Atom listings will be displayed here --> |
| 121 | | </div> |
| 122 | | </section> |
| 123 | | |
| 124 | | <section id="error-panel" class="error-panel hidden"> |
| 125 | | <div class="error-content"> |
| 126 | | <span class="error-icon">⚠️</span> |
| 127 | | <span id="error-message"></span> |
| 128 | | </div> |
| 129 | | </section> |
| 130 | | |
| 131 | | <section id="debug-panel" class="debug-panel"> |
| 132 | | <details> |
| 133 | | <summary>Debug Console</summary> |
| 134 | | <div class="debug-content"> |
| 135 | | <div class="debug-input"> |
| 136 | | <input type="text" |
| 137 | | id="debug-command" |
| 138 | | placeholder="Enter command (e.g., AtomSpace.version())" |
| 139 | | disabled> |
| 140 | | <button id="send-command" class="btn-secondary" disabled>Send</button> |
| 141 | | </div> |
| 142 | | <div class="debug-output"> |
| 143 | | <label>Response:</label> |
| 144 | | <pre id="debug-response"></pre> |
| 145 | | </div> |
| 146 | | </div> |
| 147 | | </details> |
| 148 | | </section> |
| 149 | | </main> |
| 150 | | |
| 151 | | <footer> |
| 152 | | <p>AtomSpace Visualizer • <a href="https://wiki.opencog.org/w/AtomSpace" target="_blank">Documentation</a></p> |
| 153 | | </footer> |
| 60 | <h1>AtomSpace Visualizer</h1> |
| 61 | <p>The AtomSpace Visualizer has moved to a separate repository.</p> |
| 62 | <p>To use the visualizer, please install it from:</p> |
| 63 | <a href="https://github.com/opencog/atomspace-viz" class="install-link"> |
| 64 | github.com/opencog/atomspace-viz |
| 65 | </a> |
| 154 | 66 | </div> |
| 155 | 67 | </body> |
| 156 | 68 | </html> |