mirror of
https://github.com/gethomepage/homepage.git
synced 2026-01-10 10:32:09 +08:00
add gpu metric
This commit is contained in:
@@ -4,6 +4,7 @@ import Sensor from "./metrics/sensor";
|
||||
import Net from "./metrics/net";
|
||||
import Process from "./metrics/process";
|
||||
import Disk from "./metrics/disk";
|
||||
import GPU from "./metrics/gpu";
|
||||
|
||||
export default function Component({ service }) {
|
||||
const { widget } = service;
|
||||
@@ -28,6 +29,10 @@ export default function Component({ service }) {
|
||||
return <Disk service={service} />;
|
||||
}
|
||||
|
||||
if (widget.metric.match(/^gpu:/)) {
|
||||
return <GPU service={service} />;
|
||||
}
|
||||
|
||||
if (widget.metric === "cpu") {
|
||||
return <Cpu service={service} />;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user