Quest Status window (📜 Quests in sidebar): - Fetches GET /quest-status API (polls every 30s) - Grid: characters as rows × all unique quests as columns - "READY" shown in green, countdowns in yellow, missing as dash - Quest names shortened (removes "Timer", "Pickup" suffixes) - Sticky header row, scrollable body - Replaces broken quest-status.html link Player Dashboard window (👥 Dashboard in sidebar): - Sortable table of all online characters - Columns: Character, State, KPH, Session kills, Total kills, Rares (total + session), Deaths, Uptime, HP%, Tapers - Click column headers to sort (ascending/descending toggle) - State badges: green=combat/hunt, red=other, gray=idle - KPH in green, rares in gold, deaths in red (if > 0) - HP% color-coded: green >80%, yellow >40%, red below Sidebar changes: - Removed broken /quest-status.html external link - Added 👥 Dashboard + 📜 Quests as window opener buttons - Both lazy-loaded (only fetched when first opened) 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-D3oSGfL8.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};
|