mirror of
				https://github.com/blakeblackshear/frigate.git
				synced 2025-10-27 10:52:11 +01:00 
			
		
		
		
	Add link to system stats from status bar (#11303)
This commit is contained in:
		
							parent
							
								
									2be15b6c01
								
							
						
					
					
						commit
						e1cbefb692
					
				@ -58,7 +58,8 @@ export default function Statusbar() {
 | 
			
		||||
    <div className="absolute left-0 bottom-0 right-0 w-full h-8 flex justify-between items-center px-4 bg-background_alt z-10 dark:text-secondary-foreground border-t border-secondary-highlight">
 | 
			
		||||
      <div className="h-full flex items-center gap-2">
 | 
			
		||||
        {cpuPercent && (
 | 
			
		||||
          <div className="flex items-center text-sm gap-2">
 | 
			
		||||
          <Link to="/system#general">
 | 
			
		||||
            <div className="flex items-center text-sm gap-2 cursor-pointer hover:underline">
 | 
			
		||||
              <MdCircle
 | 
			
		||||
                className={`size-2 ${
 | 
			
		||||
                  cpuPercent < 50
 | 
			
		||||
@ -70,6 +71,7 @@ export default function Statusbar() {
 | 
			
		||||
              />
 | 
			
		||||
              CPU {cpuPercent}%
 | 
			
		||||
            </div>
 | 
			
		||||
          </Link>
 | 
			
		||||
        )}
 | 
			
		||||
        {Object.entries(stats?.gpu_usages || {}).map(([name, stats]) => {
 | 
			
		||||
          if (name == "error-gpu") {
 | 
			
		||||
@ -93,7 +95,12 @@ export default function Statusbar() {
 | 
			
		||||
          const gpu = parseInt(stats.gpu);
 | 
			
		||||
 | 
			
		||||
          return (
 | 
			
		||||
            <div key={gpuTitle} className="flex items-center text-sm gap-2">
 | 
			
		||||
            <Link key={gpuTitle} to="/system#general">
 | 
			
		||||
              {" "}
 | 
			
		||||
              <div
 | 
			
		||||
                key={gpuTitle}
 | 
			
		||||
                className="flex items-center text-sm gap-2 cursor-pointer hover:underline"
 | 
			
		||||
              >
 | 
			
		||||
                <MdCircle
 | 
			
		||||
                  className={`size-2 ${
 | 
			
		||||
                    gpu < 50
 | 
			
		||||
@ -105,6 +112,7 @@ export default function Statusbar() {
 | 
			
		||||
                />
 | 
			
		||||
                {gpuTitle} {gpu}%
 | 
			
		||||
              </div>
 | 
			
		||||
            </Link>
 | 
			
		||||
          );
 | 
			
		||||
        })}
 | 
			
		||||
      </div>
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user