@@ -819,14 +819,6 @@ async function renderOverview() {
819819 < div class ="stat-card "> < div class ="stat-icon "> < svg width ="20 " height ="20 " viewBox ="0 0 24 24 " fill ="none " stroke ="currentColor " stroke-width ="2 "> < rect x ="2 " y ="2 " width ="20 " height ="20 " rx ="4 "/> < circle cx ="12 " cy ="12 " r ="6 "/> < circle cx ="12 " cy ="12 " r ="2 "/> </ svg > </ div > < div class ="stat-value " id ="stat-slots "> —</ div > < div class ="stat-label "> Server Slots</ div > </ div >
820820 < div class ="stat-card "> < div class ="stat-icon "> < svg width ="20 " height ="20 " viewBox ="0 0 24 24 " fill ="none " stroke ="currentColor " stroke-width ="2 "> < path d ="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z "/> < circle cx ="12 " cy ="12 " r ="3 "/> </ svg > </ div > < div class ="stat-value " id ="stat-renew "> —</ div > < div class ="stat-label "> To Renew</ div > </ div >
821821 </ div >
822- < div class ="card " id ="server-status-card " style ="display:none ">
823- < div class ="card-header ">
824- < h2 class ="card-title "> Server Status</ h2 >
825- </ div >
826- < div class ="chart-container ">
827- < canvas id ="server-status-chart "> </ canvas >
828- </ div >
829- </ div >
830822 < div class ="card ">
831823 < div class ="card-header ">
832824 < h2 class ="card-title "> Your Servers</ h2 >
@@ -866,44 +858,6 @@ async function renderOverview() {
866858 $ ( '#stat-renew' ) . textContent = toRenew ;
867859 state . servers = data . servers ;
868860
869- const statusCard = $ ( '#server-status-card' ) ;
870- if ( data . servers . length > 0 && typeof Chart !== 'undefined' ) {
871- if ( state . _chart ) state . _chart . destroy ( ) ;
872- statusCard . style . display = 'block' ;
873- const counts = { active : 0 , suspended : 0 , expired : 0 } ;
874- data . servers . forEach ( s => {
875- const st = s . serverMeta ?. status || 'active' ;
876- if ( st === 'expired' ) counts . expired ++ ;
877- else if ( st === 'suspended' ) counts . suspended ++ ;
878- else counts . active ++ ;
879- } ) ;
880- const ctx = document . getElementById ( 'server-status-chart' ) . getContext ( '2d' ) ;
881- state . _chart = new Chart ( ctx , {
882- type : 'pie' ,
883- data : {
884- labels : [ 'Active' , 'Suspended' , 'Expired' ] ,
885- datasets : [ {
886- data : [ counts . active , counts . suspended , counts . expired ] ,
887- backgroundColor : [ '#059669' , '#f59e0b' , '#ef4444' ] ,
888- borderColor : '#1c1917' ,
889- borderWidth : 2 ,
890- } ]
891- } ,
892- options : {
893- responsive : true ,
894- maintainAspectRatio : true ,
895- plugins : {
896- legend : {
897- position : 'bottom' ,
898- labels : { color : '#a8a29e' , padding : 16 , usePointStyle : true }
899- }
900- }
901- }
902- } ) ;
903- } else {
904- statusCard . style . display = 'none' ;
905- }
906-
907861 if ( data . servers . length === 0 && ! data . pteroError ) {
908862 $ ( '#recent-servers-list' ) . innerHTML = html `
909863 < div class ="empty-state ">
0 commit comments