Added a CPU info page with some rudimentary CPU temperature polling
	
		
			
	
		
	
	
		
	
		
			All checks were successful
		
		
	
	
		
			
				
	
				ci/woodpecker/push/woodpecker Pipeline was successful
				
			
		
		
	
	
				
					
				
			
		
			All checks were successful
		
		
	
	ci/woodpecker/push/woodpecker Pipeline was successful
				
			This commit is contained in:
		| @@ -1,13 +1,22 @@ | ||||
| si = require('systeminformation') | ||||
| 
 | ||||
| window.onload = () -> | ||||
|   # Grab the static CPU information | ||||
|   si.cpu() | ||||
|     .then((data) -> | ||||
|       document.getElementById('cpuInfo').innerText = data.brand | ||||
|       document.getElementById('cpuCores').innerText = data.physicalCores | ||||
|       document.getElementById('cpuThreads').innerText = data.cores | ||||
|       document.getElementById('cpuClock').innerText = data.speed | ||||
|       console.log(data) | ||||
|     ).catch((error) -> | ||||
|       console.error(error) | ||||
|     ) | ||||
| 
 | ||||
|   # Start the CPU temperature loop | ||||
|   setCpuTemp() | ||||
| 
 | ||||
| setCpuTemp = () -> | ||||
|   si.cpuTemperature() | ||||
|     .then((data) -> | ||||
|       document.getElementById('cpuTemp').innerText = data.main | ||||
| @@ -15,11 +24,4 @@ window.onload = () -> | ||||
|     ).catch((error) -> | ||||
|       console.error(error) | ||||
|     ) | ||||
| 
 | ||||
|   si.graphics() | ||||
|     .then((data) -> | ||||
|       document.getElementById('gpuInfo').innerText = data.controllers[0].model | ||||
|       console.log(data) | ||||
|     ).catch((error) -> | ||||
|       console.error(error) | ||||
|     ) | ||||
|   setTimeout(setCpuTemp, 2000) | ||||
							
								
								
									
										10
									
								
								assets/coffee/gpu.coffee
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								assets/coffee/gpu.coffee
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,10 @@ | ||||
| si = require('systeminformation') | ||||
|  | ||||
| window.onload = () -> | ||||
|   si.graphics() | ||||
|     .then((data) -> | ||||
|       document.getElementById('gpuInfo').innerText = data.controllers[0].model | ||||
|       console.log(data) | ||||
|     ).catch((error) -> | ||||
|       console.error(error) | ||||
|     ) | ||||
		Reference in New Issue
	
	Block a user