Spaces:
Sleeping
Sleeping
Commit Β·
d62e2b1
1
Parent(s): 0cc34c9
feat: add cold-start notice banner to dashboard
Browse filesYellow dismissable banner below tab bar explains the scale-to-zero
delay. Auto-hides after 60s or on clicking X.
opensecops_env/server/app.py
CHANGED
|
@@ -2166,6 +2166,14 @@ _DASHBOARD_HTML = r"""<!DOCTYPE html>
|
|
| 2166 |
<button class="tab" id="tab-improve" onclick="switchTab('improve')">Learning</button>
|
| 2167 |
</div>
|
| 2168 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2169 |
<!-- βββββββββββββββββββββββββββββββ TAB: Single Agent βββββββββββββββββββββββββββββββ -->
|
| 2170 |
<div class="tab-panel active" id="panel-single" style="height:calc(100vh - 128px)">
|
| 2171 |
<!-- Controls -->
|
|
|
|
| 2166 |
<button class="tab" id="tab-improve" onclick="switchTab('improve')">Learning</button>
|
| 2167 |
</div>
|
| 2168 |
|
| 2169 |
+
<!-- β‘ Cold-start notice β auto-hides after 60s or on dismiss -->
|
| 2170 |
+
<div id="coldStartBanner" style="background:rgba(251,191,36,0.08);border-bottom:1px solid rgba(251,191,36,0.25);padding:9px 20px;display:flex;align-items:center;gap:10px;font-size:12px;color:#d4a017;font-weight:500;">
|
| 2171 |
+
<span style="font-size:15px">β‘</span>
|
| 2172 |
+
<span><strong>AI Endpoint may be cold-starting.</strong> The inference endpoint scales to zero when idle to save costs. If the first episode shows <em>"AI timeout β using fallback"</em>, wait ~2 minutes and run again. Live AI inference will work once the endpoint is warm.</span>
|
| 2173 |
+
<button onclick="document.getElementById('coldStartBanner').style.display='none'" style="margin-left:auto;background:none;border:none;color:#d4a017;cursor:pointer;font-size:16px;opacity:0.7;padding:0 4px" title="Dismiss">β</button>
|
| 2174 |
+
</div>
|
| 2175 |
+
<script>setTimeout(()=>{const b=document.getElementById('coldStartBanner');if(b)b.style.display='none';},60000);</script>
|
| 2176 |
+
|
| 2177 |
<!-- βββββββββββββββββββββββββββββββ TAB: Single Agent βββββββββββββββββββββββββββββββ -->
|
| 2178 |
<div class="tab-panel active" id="panel-single" style="height:calc(100vh - 128px)">
|
| 2179 |
<!-- Controls -->
|