File tree Expand file tree Collapse file tree 2 files changed +25
-10
lines changed
new/apps/web/src/lib/components Expand file tree Collapse file tree 2 files changed +25
-10
lines changed Original file line number Diff line number Diff line change 4040</div >
4141
4242<div class =" widgets" >
43+ <CpuUsage cpuLoad ={report .Hardware .Cpu .LoadPercentage } />
4344 <!-- <CpuUsage cpuloadData={rawJSON.Hardware.Cpu.LoadPercentage} />
4445 <RamUsage runprocData={rawJSON.System.RunningProcesses} ramData={rawJSON.Hardware.Ram} />
4546 <Temps /> -->
Original file line number Diff line number Diff line change 22<script lang =" ts" >
33 import Widget from ' ../../common/ModalWidget.svelte' ;
44
5- export let cpuloadData;
5+ interface Props {
6+ cpuLoad: number ;
7+ }
8+
9+ let {
10+ cpuLoad,
11+ }: Props = $props ();
612 </script >
713
814<!-- CPU Usage -->
9- <Widget title =" CPU Usage" type = " " modalId = " cpu-usage-modal " >
10- < div slot = " values " >
15+ <Widget title =" CPU Usage" >
16+ {# snippet widgetContents ()}
1117 <div class =" widget-value" >
12- <div class =" widget-value" >
13- <span class =" green" >
14- {cpuloadData ?? ' --' }%
15- <!-- <?= $json_data['Hardware']['Cpu']['LoadPercentage'] ?? '--' ?>% -->
16- </span >
17- </div >
18+ <span class =" green" >
19+ {cpuLoad ?? ' --' }%
20+ </span >
1821 </div >
19- </ div >
22+ { / snippet }
2023</Widget >
24+
25+ <style >
26+ span {
27+ color : var (--color-secondary-50 );
28+ }
29+
30+ div {
31+ color : var (--color-surface-300 );
32+ font-size : 13pt ;
33+ }
34+ </style >
You can’t perform that action at this time.
0 commit comments