mirror of
https://github.com/karl0ss/homepage.git
synced 2025-05-01 21:13:39 +01:00
cloudflared widget working locally
This commit is contained in:
parent
fa1792cd5f
commit
2836ee1f3b
@ -3,7 +3,6 @@ import Block from "components/services/widget/block";
|
|||||||
import useWidgetAPI from "utils/proxy/use-widget-api";
|
import useWidgetAPI from "utils/proxy/use-widget-api";
|
||||||
|
|
||||||
export default function Component({ service }) {
|
export default function Component({ service }) {
|
||||||
const { t } = useTranslation();
|
|
||||||
const { widget } = service;
|
const { widget } = service;
|
||||||
|
|
||||||
const { data: statsData, error: statsError } = useWidgetAPI(widget, "cfd_tunnel");
|
const { data: statsData, error: statsError } = useWidgetAPI(widget, "cfd_tunnel");
|
||||||
@ -23,8 +22,8 @@ export default function Component({ service }) {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Container service={service}>
|
<Container service={service}>
|
||||||
<Block label="cloudflared.status" value={statsData.status} />
|
<Block label="cloudflared.status" value={statsData.result.status} />
|
||||||
<Block label="cloudflared.origin_ip" value={statsData.origin_ip} />
|
<Block label="cloudflared.origin_ip" value={statsData.result.connections.origin_ip} />
|
||||||
</Container>
|
</Container>
|
||||||
);
|
);
|
||||||
}
|
}
|
@ -7,10 +7,6 @@ const widget = {
|
|||||||
mappings: {
|
mappings: {
|
||||||
"cfd_tunnel": {
|
"cfd_tunnel": {
|
||||||
endpoint: "cfd_tunnel",
|
endpoint: "cfd_tunnel",
|
||||||
validate: [
|
|
||||||
"origin_ip",
|
|
||||||
"status",
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user