wise-json-db
Version:
Blazing fast, crash-proof embedded JSON database for Node.js with batch operations, TTL, indexes, and segmented checkpointing.
96 lines (86 loc) • 3.64 kB
HTML
<html lang="en">
<head>
<meta charset="UTF-8">
<title>WiseJSON Data Explorer</title>
<!-- +++ НОВОЕ: Указываем иконку для вкладки браузера +++ -->
<link rel="icon" type="image/png" href="/favicon.ico">
<link rel="stylesheet" href="/static/styles.css">
</head>
<body>
<header>
<h1>WiseJSON Data Explorer</h1>
<p id="server-mode" class="server-mode-read-only">Server Mode: Read-Only</p>
</header>
<main>
<section id="db-map-container">
<h2>Database Map</h2>
<db-map id="dbMap"></db-map>
</section>
<hr>
<section class="controls-grid">
<div class="control-group">
<label for="collectionSelect">Select Collection:</label>
<select id="collectionSelect"></select>
<button id="refreshBtn">Refresh</button>
</div>
<div class="control-group" id="query-builder-container">
<label>Filter:</label>
<query-builder id="queryBuilder"></query-builder>
</div>
<div class="control-group">
<label for="sortInput">Sort by Field:</label>
<input type="text" id="sortInput" placeholder="age">
<select id="orderSelect">
<option value="asc">ASC</option>
<option value="desc">DESC</option>
</select>
</div>
<div class="control-group">
<label for="pageSizeInput">Rows per page:</label>
<input type="number" id="pageSizeInput" min="1" value="10">
</div>
<button id="applyBtn" class="apply-button">Apply Filters & Load</button>
</section>
<section id="tableContainer">
<table id="dataTable">
<thead></thead>
<tbody></tbody>
</table>
</section>
<section id="pagination">
<button id="prevBtn" disabled>Previous</button>
<span id="pageInfo">Page 1</span>
<button id="nextBtn" disabled>Next</button>
</section>
<hr>
<section id="index-manager">
<h2>Index Management</h2>
<div id="index-list">
<!-- Список индексов будет здесь -->
</div>
<div id="create-index-form" class="controls-grid write-op" style="display: none;">
<div class="control-group">
<label for="indexFieldInput">Field Name:</label>
<input type="text" id="indexFieldInput" placeholder="e.g., email">
</div>
<div class="control-group">
<label for="uniqueCheckbox">Unique:</label>
<input type="checkbox" id="uniqueCheckbox">
</div>
<button id="createIndexBtn">Create Index</button>
</div>
</section>
<hr>
<section id="viewer">
<h3>Document Viewer</h3>
<json-viewer id="documentViewer"></json-viewer>
</section>
</main>
<!-- Подключаем скрипты компонентов -->
<script src="/static/components/db-map.js"></script>
<script src="/static/components/query-builder.js"></script>
<script src="/static/components/json-viewer.js"></script>
<script src="/static/script.js"></script>
</body>
</html>