Command history: - Up/Down arrow keys browse sent command history (like bash/console) - 50 commands stored per character in localStorage - Persists across page reloads and browser sessions - Current input preserved when browsing (restored on Down past end) - Duplicates kept (matches user preference) Smart auto-scroll: - New messages only auto-scroll if user is already at the bottom - If user has scrolled up to read history, it stays put - Sending a message snaps back to bottom - 30px threshold for "at bottom" detection Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 line
1 KiB
JavaScript
1 line
1 KiB
JavaScript
import{r as o,j as t,D as d}from"./index-BZJ3WwmC.js";import"./react-DlyoauG8.js";const c=[{title:"Kills per Hour",id:1},{title:"Memory (MB)",id:2},{title:"CPU (%)",id:3},{title:"Mem Handles",id:4}],m=[{label:"1H",value:"now-1h"},{label:"6H",value:"now-6h"},{label:"24H",value:"now-24h"},{label:"7D",value:"now-7d"}],v=({id:s,charName:a,zIndex:i})=>{const[l,r]=o.useState("now-24h"),n=e=>`/grafana/d-solo/dereth-tracker/dereth-tracker-dashboard?panelId=${e}&var-character=${encodeURIComponent(a)}&from=${l}&to=now&theme=light`;return t.jsxs(d,{id:s,title:`Stats: ${a}`,zIndex:i,width:750,height:480,children:[t.jsx("div",{className:"ml-stats-controls",children:m.map(e=>t.jsx("button",{className:`ml-stats-range-btn ${l===e.value?"active":""}`,onClick:()=>r(e.value),children:e.label},e.value))}),t.jsx("div",{className:"ml-stats-grid",children:c.map(e=>t.jsx("div",{className:"ml-stats-panel",children:t.jsx("iframe",{src:n(e.id),width:"100%",height:"100%",frameBorder:"0",title:e.title})},e.id))})]})};export{v as StatsWindow};
|