mirror of
https://github.com/gethomepage/homepage.git
synced 2026-05-18 11:27:33 +08:00
Enhancement: Add node parameter to Technitium DNS Widget (#6638)
This commit is contained in:
committed by
GitHub
parent
72b0e493d0
commit
ce8f020b7b
@@ -665,6 +665,7 @@ export function cleanServiceGroups(groups) {
|
||||
if (enableRecentEvents !== undefined) widget.enableRecentEvents = enableRecentEvents;
|
||||
}
|
||||
if (type === "technitium") {
|
||||
if (node !== undefined) widget.node = node;
|
||||
if (range !== undefined) widget.range = range;
|
||||
}
|
||||
if (type === "lubelogger") {
|
||||
|
||||
@@ -14,6 +14,7 @@ export default function Component({ service }) {
|
||||
const { widget } = service;
|
||||
|
||||
const params = {
|
||||
node: widget.node ?? "",
|
||||
type: widget.range ?? "LastHour",
|
||||
};
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ const widget = {
|
||||
stats: {
|
||||
endpoint: "dashboard/stats/get",
|
||||
validate: ["response", "status"],
|
||||
params: ["type"],
|
||||
params: ["node", "type"],
|
||||
map: (data) => asJson(data).response?.stats,
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user