Spaces:
Paused
Paused
sort by requests not tokens
Browse files
internal/handler/index.html
CHANGED
|
@@ -115,7 +115,7 @@ async function updateStats(){
|
|
| 115 |
const r=await fetch(window.location.origin+'/stats');
|
| 116 |
const data=await r.json();
|
| 117 |
const container=document.getElementById('ranking-frente');
|
| 118 |
-
const entries=Object.entries(data.keys||{}).map(([name,info])=>({name,tokens:info.tokens||0})).sort((a,b)=>b.
|
| 119 |
if(!entries.length)return;
|
| 120 |
const maxTokens=Math.max(...entries.map(e=>e.tokens),5000);
|
| 121 |
container.innerHTML=entries.map((u,i)=>`
|
|
|
|
| 115 |
const r=await fetch(window.location.origin+'/stats');
|
| 116 |
const data=await r.json();
|
| 117 |
const container=document.getElementById('ranking-frente');
|
| 118 |
+
const entries=Object.entries(data.keys||{}).map(([name,info])=>({name,tokens:info.tokens||0})).sort((a,b)=>b.requests-a.requests);
|
| 119 |
if(!entries.length)return;
|
| 120 |
const maxTokens=Math.max(...entries.map(e=>e.tokens),5000);
|
| 121 |
container.innerHTML=entries.map((u,i)=>`
|