SapphireGaze429 commited on
Commit
d62e2b1
Β·
1 Parent(s): 0cc34c9

feat: add cold-start notice banner to dashboard

Browse files

Yellow dismissable banner below tab bar explains the scale-to-zero
delay. Auto-hides after 60s or on clicking X.

Files changed (1) hide show
  1. opensecops_env/server/app.py +8 -0
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 -->