0.3.4
This commit is contained in:
157
kb_app/frontend/demo_ws.html
Normal file
157
kb_app/frontend/demo_ws.html
Normal file
@@ -0,0 +1,157 @@
|
||||
<!-- file: kb_app/frontend/demo_ws.html -->
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Demo Ws Subscribe</title>
|
||||
<link rel="stylesheet" href="sass/main.scss" />
|
||||
</head>
|
||||
<body class="bg-body-tertiary">
|
||||
<header class="app-header">
|
||||
<nav class="navbar navbar-expand-lg h-100 py-0 bg-light text-dark">
|
||||
<div class="container my-0">
|
||||
<a class="navbar-brand d-flex align-items-center" href="/">
|
||||
<img alt="Logo" src="imgs/logo.png" class="app-logo" />
|
||||
<span class="ps-2 fs-4 fw-bold text-primary font-logo">Khadhroony-BoBoBot</span>
|
||||
</a>
|
||||
<div class="ms-auto">
|
||||
<span id="demoWsStatusBadge" class="badge text-bg-secondary">Disconnected</span>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
</header>
|
||||
|
||||
<main class="app-main">
|
||||
<div class="osb-scrollable pt-1 pb-4" data-simplebar>
|
||||
<div class="container py-4">
|
||||
<div class="row g-4">
|
||||
<div class="col-12">
|
||||
<div class="card shadow-sm border-0">
|
||||
<div class="card-body">
|
||||
<h1 class="h4 mb-3">Demo Ws Subscribe</h1>
|
||||
<p class="text-body-secondary mb-0">
|
||||
Fenêtre de test complète pour les souscriptions WebSocket Solana en mode raw ou typed.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-xxl-4">
|
||||
<div class="card shadow-sm border-0 h-100">
|
||||
<div class="card-body">
|
||||
<h2 class="h5 mb-3">Connexion</h2>
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="demoWsEndpointSelect" class="form-label">Endpoint</label>
|
||||
<select id="demoWsEndpointSelect" class="form-select"></select>
|
||||
</div>
|
||||
|
||||
<div class="d-flex flex-wrap gap-2 mb-3">
|
||||
<button id="demoWsConnectButton" type="button" class="btn btn-success">Connect</button>
|
||||
<button id="demoWsDisconnectButton" type="button" class="btn btn-danger">Disconnect</button>
|
||||
</div>
|
||||
|
||||
<div class="small text-body-secondary">
|
||||
<div><strong>State:</strong> <span id="demoWsStateText">Disconnected</span></div>
|
||||
<div><strong>Endpoint:</strong> <span id="demoWsEndpointText">-</span></div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
|
||||
<h2 class="h5 mb-3">Souscription</h2>
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="demoWsMethodSelect" class="form-label">Méthode</label>
|
||||
<select id="demoWsMethodSelect" class="form-select">
|
||||
<option value="account">account</option>
|
||||
<option value="block">block</option>
|
||||
<option value="logs">logs</option>
|
||||
<option value="program">program</option>
|
||||
<option value="root">root</option>
|
||||
<option value="signature">signature</option>
|
||||
<option value="slot" selected>slot</option>
|
||||
<option value="slotsUpdates">slotsUpdates</option>
|
||||
<option value="vote">vote</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="demoWsModeSelect" class="form-label">Mode</label>
|
||||
<select id="demoWsModeSelect" class="form-select">
|
||||
<option value="typed" selected>typed</option>
|
||||
<option value="raw">raw</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div id="demoWsTargetGroup" class="mb-3">
|
||||
<label for="demoWsTargetInput" id="demoWsTargetLabel" class="form-label">Target</label>
|
||||
<input id="demoWsTargetInput" type="text" class="form-control" spellcheck="false" />
|
||||
</div>
|
||||
|
||||
<div id="demoWsFilterGroup" class="mb-3">
|
||||
<label for="demoWsFilterTextarea" class="form-label">Filter JSON</label>
|
||||
<textarea
|
||||
id="demoWsFilterTextarea"
|
||||
class="form-control font-monospace"
|
||||
rows="5"
|
||||
spellcheck="false"
|
||||
></textarea>
|
||||
</div>
|
||||
|
||||
<div id="demoWsConfigGroup" class="mb-3">
|
||||
<label for="demoWsConfigTextarea" class="form-label">Config JSON</label>
|
||||
<textarea
|
||||
id="demoWsConfigTextarea"
|
||||
class="form-control font-monospace"
|
||||
rows="6"
|
||||
spellcheck="false"
|
||||
></textarea>
|
||||
</div>
|
||||
|
||||
<div class="d-flex flex-wrap gap-2 mb-3">
|
||||
<button id="demoWsSubscribeButton" type="button" class="btn btn-primary">Subscribe</button>
|
||||
<button id="demoWsUnsubscribeButton" type="button" class="btn btn-warning">Unsubscribe current</button>
|
||||
<button id="demoWsClearLogButton" type="button" class="btn btn-outline-secondary">Clear log</button>
|
||||
</div>
|
||||
|
||||
<div class="small text-body-secondary">
|
||||
<div><strong>Current subscription:</strong> <span id="demoWsSubscriptionText">-</span></div>
|
||||
<div><strong>Request:</strong> <span id="demoWsRequestText">-</span></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-xxl-8">
|
||||
<div class="card shadow-sm border-0 h-100">
|
||||
<div class="card-body">
|
||||
<h2 class="h5 mb-3">Logs</h2>
|
||||
<textarea
|
||||
id="demoWsLogTextarea"
|
||||
class="form-control font-monospace"
|
||||
rows="28"
|
||||
readonly
|
||||
spellcheck="false"
|
||||
></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<footer class="app-footer bg-dark text-light">
|
||||
<div class="container h-100 d-flex align-items-center">
|
||||
<div class="row flex-grow-1 align-items-center">
|
||||
<div class="col-12 col-md-6 text-center text-small my-1 my-md-0">
|
||||
© 2026 SASEDEV — Demo Ws
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<script type="module" src="ts/demo_ws.ts" defer></script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user