[PRISM] Show model-centric DB counters in studio header
This commit is contained in:
1 parent
e6bd4061a8
commit
7b6866a8ee
1 file changed
+9
@@ -59,6 +59,7 @@ main{max-width:1560px;margin:0 auto;padding:22px 26px 70px}.view{display:none}.v
|
||||
</nav>
|
||||
<div class="spacer"></div>
|
||||
<select id="globalVendor" title="Вендор"><option value="all">Все вендоры</option></select>
|
||||
<span class="tiny" id="prismDbStat" title="model-centric база Prism">DB: …</span>
|
||||
<button class="btn ghost" onclick="location.href='/classic'">Классический конструктор</button>
|
||||
</header>
|
||||
<main>
|
||||
@@ -577,5 +578,13 @@ async function boot(){
|
||||
}
|
||||
boot();
|
||||
</script>
|
||||
|
||||
<script>
|
||||
fetch('/api/prism/summary').then(r => r.json()).then(d => {
|
||||
if (!d || !d.ok) return;
|
||||
const el = document.getElementById('prismDbStat');
|
||||
if (el) el.textContent = `DB: ${d.products} продуктов / ${d.support_articles} статей / ${d.specs} specs`;
|
||||
}).catch(() => {});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in new issue
Block a user