Add nzbhydra2 widget
This commit is contained in:
parent
863fd797a2
commit
90ea4d3132
@ -582,5 +582,10 @@
|
|||||||
"whatsupdocker": {
|
"whatsupdocker": {
|
||||||
"monitoring": "Monitoring",
|
"monitoring": "Monitoring",
|
||||||
"updates": "Updates"
|
"updates": "Updates"
|
||||||
|
},
|
||||||
|
"nzbhydra2": {
|
||||||
|
"indexersenabled": "Enabled Indexers",
|
||||||
|
"mostpopular": "Most Popular Indexer",
|
||||||
|
"responsetime": "Average response time"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -582,5 +582,10 @@
|
|||||||
"whatsupdocker": {
|
"whatsupdocker": {
|
||||||
"monitoring": "Monitoring",
|
"monitoring": "Monitoring",
|
||||||
"updates": "Updates"
|
"updates": "Updates"
|
||||||
|
},
|
||||||
|
"nzbhydra2": {
|
||||||
|
"indexersenabled": "Enabled Indexers",
|
||||||
|
"mostpopular": "Most Popular Indexer",
|
||||||
|
"responsetime": "Average response time"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -582,5 +582,10 @@
|
|||||||
"whatsupdocker": {
|
"whatsupdocker": {
|
||||||
"monitoring": "Monitoring",
|
"monitoring": "Monitoring",
|
||||||
"updates": "Updates"
|
"updates": "Updates"
|
||||||
|
},
|
||||||
|
"nzbhydra2": {
|
||||||
|
"indexersenabled": "Enabled Indexers",
|
||||||
|
"mostpopular": "Most Popular Indexer",
|
||||||
|
"responsetime": "Average response time"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -582,5 +582,10 @@
|
|||||||
"whatsupdocker": {
|
"whatsupdocker": {
|
||||||
"monitoring": "Monitoring",
|
"monitoring": "Monitoring",
|
||||||
"updates": "Updates"
|
"updates": "Updates"
|
||||||
|
},
|
||||||
|
"nzbhydra2": {
|
||||||
|
"indexersenabled": "Enabled Indexers",
|
||||||
|
"mostpopular": "Most Popular Indexer",
|
||||||
|
"responsetime": "Average response time"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -582,5 +582,10 @@
|
|||||||
"whatsupdocker": {
|
"whatsupdocker": {
|
||||||
"monitoring": "Monitoring",
|
"monitoring": "Monitoring",
|
||||||
"updates": "Updates"
|
"updates": "Updates"
|
||||||
|
},
|
||||||
|
"nzbhydra2": {
|
||||||
|
"indexersenabled": "Enabled Indexers",
|
||||||
|
"mostpopular": "Most Popular Indexer",
|
||||||
|
"responsetime": "Average response time"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -582,5 +582,10 @@
|
|||||||
"whatsupdocker": {
|
"whatsupdocker": {
|
||||||
"monitoring": "Monitoring",
|
"monitoring": "Monitoring",
|
||||||
"updates": "Updates"
|
"updates": "Updates"
|
||||||
|
},
|
||||||
|
"nzbhydra2": {
|
||||||
|
"indexersenabled": "Enabled Indexers",
|
||||||
|
"mostpopular": "Most Popular Indexer",
|
||||||
|
"responsetime": "Average response time"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -582,5 +582,10 @@
|
|||||||
"whatsupdocker": {
|
"whatsupdocker": {
|
||||||
"monitoring": "Monitoring",
|
"monitoring": "Monitoring",
|
||||||
"updates": "Updates"
|
"updates": "Updates"
|
||||||
|
},
|
||||||
|
"nzbhydra2": {
|
||||||
|
"indexersenabled": "Enabled Indexers",
|
||||||
|
"mostpopular": "Most Popular Indexer",
|
||||||
|
"responsetime": "Average response time"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -591,5 +591,10 @@
|
|||||||
"whatsupdocker": {
|
"whatsupdocker": {
|
||||||
"monitoring": "Monitoring",
|
"monitoring": "Monitoring",
|
||||||
"updates": "Updates"
|
"updates": "Updates"
|
||||||
|
},
|
||||||
|
"nzbhydra2": {
|
||||||
|
"indexersenabled": "Enabled Indexers",
|
||||||
|
"mostpopular": "Most Popular Indexer",
|
||||||
|
"responsetime": "Average response time"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -582,5 +582,10 @@
|
|||||||
"whatsupdocker": {
|
"whatsupdocker": {
|
||||||
"monitoring": "Monitoring",
|
"monitoring": "Monitoring",
|
||||||
"updates": "Updates"
|
"updates": "Updates"
|
||||||
|
},
|
||||||
|
"nzbhydra2": {
|
||||||
|
"indexersenabled": "Enabled Indexers",
|
||||||
|
"mostpopular": "Most Popular Indexer",
|
||||||
|
"responsetime": "Average response time"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -582,5 +582,10 @@
|
|||||||
"whatsupdocker": {
|
"whatsupdocker": {
|
||||||
"monitoring": "Monitoring",
|
"monitoring": "Monitoring",
|
||||||
"updates": "Updates"
|
"updates": "Updates"
|
||||||
|
},
|
||||||
|
"nzbhydra2": {
|
||||||
|
"indexersenabled": "Enabled Indexers",
|
||||||
|
"mostpopular": "Most Popular Indexer",
|
||||||
|
"responsetime": "Average response time"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -582,5 +582,10 @@
|
|||||||
"whatsupdocker": {
|
"whatsupdocker": {
|
||||||
"monitoring": "Monitoring",
|
"monitoring": "Monitoring",
|
||||||
"updates": "Updates"
|
"updates": "Updates"
|
||||||
|
},
|
||||||
|
"nzbhydra2": {
|
||||||
|
"indexersenabled": "Enabled Indexers",
|
||||||
|
"mostpopular": "Most Popular Indexer",
|
||||||
|
"responsetime": "Average response time"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -582,5 +582,10 @@
|
|||||||
"whatsupdocker": {
|
"whatsupdocker": {
|
||||||
"monitoring": "Monitoring",
|
"monitoring": "Monitoring",
|
||||||
"updates": "Updates"
|
"updates": "Updates"
|
||||||
|
},
|
||||||
|
"nzbhydra2": {
|
||||||
|
"indexersenabled": "Enabled Indexers",
|
||||||
|
"mostpopular": "Most Popular Indexer",
|
||||||
|
"responsetime": "Average response time"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -582,5 +582,10 @@
|
|||||||
"whatsupdocker": {
|
"whatsupdocker": {
|
||||||
"monitoring": "Monitoring",
|
"monitoring": "Monitoring",
|
||||||
"updates": "Updates"
|
"updates": "Updates"
|
||||||
|
},
|
||||||
|
"nzbhydra2": {
|
||||||
|
"indexersenabled": "Enabled Indexers",
|
||||||
|
"mostpopular": "Most Popular Indexer",
|
||||||
|
"responsetime": "Average response time"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -582,5 +582,10 @@
|
|||||||
"whatsupdocker": {
|
"whatsupdocker": {
|
||||||
"monitoring": "Monitoring",
|
"monitoring": "Monitoring",
|
||||||
"updates": "Updates"
|
"updates": "Updates"
|
||||||
|
},
|
||||||
|
"nzbhydra2": {
|
||||||
|
"indexersenabled": "Enabled Indexers",
|
||||||
|
"mostpopular": "Most Popular Indexer",
|
||||||
|
"responsetime": "Average response time"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -582,5 +582,10 @@
|
|||||||
"whatsupdocker": {
|
"whatsupdocker": {
|
||||||
"monitoring": "Monitoring",
|
"monitoring": "Monitoring",
|
||||||
"updates": "Updates"
|
"updates": "Updates"
|
||||||
|
},
|
||||||
|
"nzbhydra2": {
|
||||||
|
"indexersenabled": "Enabled Indexers",
|
||||||
|
"mostpopular": "Most Popular Indexer",
|
||||||
|
"responsetime": "Average response time"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -582,5 +582,10 @@
|
|||||||
"whatsupdocker": {
|
"whatsupdocker": {
|
||||||
"monitoring": "Monitoring",
|
"monitoring": "Monitoring",
|
||||||
"updates": "Updates"
|
"updates": "Updates"
|
||||||
|
},
|
||||||
|
"nzbhydra2": {
|
||||||
|
"indexersenabled": "Enabled Indexers",
|
||||||
|
"mostpopular": "Most Popular Indexer",
|
||||||
|
"responsetime": "Average response time"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -582,5 +582,10 @@
|
|||||||
"whatsupdocker": {
|
"whatsupdocker": {
|
||||||
"monitoring": "Monitoring",
|
"monitoring": "Monitoring",
|
||||||
"updates": "Updates"
|
"updates": "Updates"
|
||||||
|
},
|
||||||
|
"nzbhydra2": {
|
||||||
|
"indexersenabled": "Enabled Indexers",
|
||||||
|
"mostpopular": "Most Popular Indexer",
|
||||||
|
"responsetime": "Average response time"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -582,5 +582,10 @@
|
|||||||
"whatsupdocker": {
|
"whatsupdocker": {
|
||||||
"monitoring": "Monitoring",
|
"monitoring": "Monitoring",
|
||||||
"updates": "Updates"
|
"updates": "Updates"
|
||||||
|
},
|
||||||
|
"nzbhydra2": {
|
||||||
|
"indexersenabled": "Enabled Indexers",
|
||||||
|
"mostpopular": "Most Popular Indexer",
|
||||||
|
"responsetime": "Average response time"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -582,5 +582,10 @@
|
|||||||
"whatsupdocker": {
|
"whatsupdocker": {
|
||||||
"monitoring": "Monitoring",
|
"monitoring": "Monitoring",
|
||||||
"updates": "Updates"
|
"updates": "Updates"
|
||||||
|
},
|
||||||
|
"nzbhydra2": {
|
||||||
|
"indexersenabled": "Enabled Indexers",
|
||||||
|
"mostpopular": "Most Popular Indexer",
|
||||||
|
"responsetime": "Average response time"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -582,5 +582,10 @@
|
|||||||
"whatsupdocker": {
|
"whatsupdocker": {
|
||||||
"monitoring": "Monitoring",
|
"monitoring": "Monitoring",
|
||||||
"updates": "Updates"
|
"updates": "Updates"
|
||||||
|
},
|
||||||
|
"nzbhydra2": {
|
||||||
|
"indexersenabled": "Enabled Indexers",
|
||||||
|
"mostpopular": "Most Popular Indexer",
|
||||||
|
"responsetime": "Average response time"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -582,5 +582,10 @@
|
|||||||
"whatsupdocker": {
|
"whatsupdocker": {
|
||||||
"monitoring": "Monitoring",
|
"monitoring": "Monitoring",
|
||||||
"updates": "Updates"
|
"updates": "Updates"
|
||||||
|
},
|
||||||
|
"nzbhydra2": {
|
||||||
|
"indexersenabled": "Enabled Indexers",
|
||||||
|
"mostpopular": "Most Popular Indexer",
|
||||||
|
"responsetime": "Average response time"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -582,5 +582,10 @@
|
|||||||
"whatsupdocker": {
|
"whatsupdocker": {
|
||||||
"monitoring": "Monitoring",
|
"monitoring": "Monitoring",
|
||||||
"updates": "Updates"
|
"updates": "Updates"
|
||||||
|
},
|
||||||
|
"nzbhydra2": {
|
||||||
|
"indexersenabled": "Enabled Indexers",
|
||||||
|
"mostpopular": "Most Popular Indexer",
|
||||||
|
"responsetime": "Average response time"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -582,5 +582,10 @@
|
|||||||
"whatsupdocker": {
|
"whatsupdocker": {
|
||||||
"monitoring": "Monitoring",
|
"monitoring": "Monitoring",
|
||||||
"updates": "Updates"
|
"updates": "Updates"
|
||||||
|
},
|
||||||
|
"nzbhydra2": {
|
||||||
|
"indexersenabled": "Enabled Indexers",
|
||||||
|
"mostpopular": "Most Popular Indexer",
|
||||||
|
"responsetime": "Average response time"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -582,5 +582,10 @@
|
|||||||
"whatsupdocker": {
|
"whatsupdocker": {
|
||||||
"monitoring": "Monitoring",
|
"monitoring": "Monitoring",
|
||||||
"updates": "Updates"
|
"updates": "Updates"
|
||||||
|
},
|
||||||
|
"nzbhydra2": {
|
||||||
|
"indexersenabled": "Enabled Indexers",
|
||||||
|
"mostpopular": "Most Popular Indexer",
|
||||||
|
"responsetime": "Average response time"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -582,5 +582,10 @@
|
|||||||
"whatsupdocker": {
|
"whatsupdocker": {
|
||||||
"monitoring": "Monitoring",
|
"monitoring": "Monitoring",
|
||||||
"updates": "Updates"
|
"updates": "Updates"
|
||||||
|
},
|
||||||
|
"nzbhydra2": {
|
||||||
|
"indexersenabled": "Enabled Indexers",
|
||||||
|
"mostpopular": "Most Popular Indexer",
|
||||||
|
"responsetime": "Average response time"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -591,5 +591,10 @@
|
|||||||
"whatsupdocker": {
|
"whatsupdocker": {
|
||||||
"monitoring": "Monitoring",
|
"monitoring": "Monitoring",
|
||||||
"updates": "Updates"
|
"updates": "Updates"
|
||||||
|
},
|
||||||
|
"nzbhydra2": {
|
||||||
|
"indexersenabled": "Enabled Indexers",
|
||||||
|
"mostpopular": "Most Popular Indexer",
|
||||||
|
"responsetime": "Average response time"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -582,5 +582,10 @@
|
|||||||
"whatsupdocker": {
|
"whatsupdocker": {
|
||||||
"monitoring": "Monitoring",
|
"monitoring": "Monitoring",
|
||||||
"updates": "Updates"
|
"updates": "Updates"
|
||||||
|
},
|
||||||
|
"nzbhydra2": {
|
||||||
|
"indexersenabled": "Enabled Indexers",
|
||||||
|
"mostpopular": "Most Popular Indexer",
|
||||||
|
"responsetime": "Average response time"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -582,5 +582,10 @@
|
|||||||
"whatsupdocker": {
|
"whatsupdocker": {
|
||||||
"monitoring": "Monitoring",
|
"monitoring": "Monitoring",
|
||||||
"updates": "Updates"
|
"updates": "Updates"
|
||||||
|
},
|
||||||
|
"nzbhydra2": {
|
||||||
|
"indexersenabled": "Enabled Indexers",
|
||||||
|
"mostpopular": "Most Popular Indexer",
|
||||||
|
"responsetime": "Average response time"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -582,5 +582,10 @@
|
|||||||
"whatsupdocker": {
|
"whatsupdocker": {
|
||||||
"monitoring": "Monitoring",
|
"monitoring": "Monitoring",
|
||||||
"updates": "Updates"
|
"updates": "Updates"
|
||||||
|
},
|
||||||
|
"nzbhydra2": {
|
||||||
|
"indexersenabled": "Enabled Indexers",
|
||||||
|
"mostpopular": "Most Popular Indexer",
|
||||||
|
"responsetime": "Average response time"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -582,5 +582,10 @@
|
|||||||
"whatsupdocker": {
|
"whatsupdocker": {
|
||||||
"monitoring": "Monitoring",
|
"monitoring": "Monitoring",
|
||||||
"updates": "Updates"
|
"updates": "Updates"
|
||||||
|
},
|
||||||
|
"nzbhydra2": {
|
||||||
|
"indexersenabled": "Enabled Indexers",
|
||||||
|
"mostpopular": "Most Popular Indexer",
|
||||||
|
"responsetime": "Average response time"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -582,5 +582,10 @@
|
|||||||
"whatsupdocker": {
|
"whatsupdocker": {
|
||||||
"monitoring": "Monitoring",
|
"monitoring": "Monitoring",
|
||||||
"updates": "Updates"
|
"updates": "Updates"
|
||||||
|
},
|
||||||
|
"nzbhydra2": {
|
||||||
|
"indexersenabled": "Enabled Indexers",
|
||||||
|
"mostpopular": "Most Popular Indexer",
|
||||||
|
"responsetime": "Average response time"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -582,5 +582,10 @@
|
|||||||
"whatsupdocker": {
|
"whatsupdocker": {
|
||||||
"monitoring": "Monitoring",
|
"monitoring": "Monitoring",
|
||||||
"updates": "Updates"
|
"updates": "Updates"
|
||||||
|
},
|
||||||
|
"nzbhydra2": {
|
||||||
|
"indexersenabled": "Enabled Indexers",
|
||||||
|
"mostpopular": "Most Popular Indexer",
|
||||||
|
"responsetime": "Average response time"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -582,5 +582,10 @@
|
|||||||
"whatsupdocker": {
|
"whatsupdocker": {
|
||||||
"monitoring": "Monitoring",
|
"monitoring": "Monitoring",
|
||||||
"updates": "Updates"
|
"updates": "Updates"
|
||||||
|
},
|
||||||
|
"nzbhydra2": {
|
||||||
|
"indexersenabled": "Enabled Indexers",
|
||||||
|
"mostpopular": "Most Popular Indexer",
|
||||||
|
"responsetime": "Average response time"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -582,5 +582,10 @@
|
|||||||
"whatsupdocker": {
|
"whatsupdocker": {
|
||||||
"monitoring": "Monitoring",
|
"monitoring": "Monitoring",
|
||||||
"updates": "Updates"
|
"updates": "Updates"
|
||||||
|
},
|
||||||
|
"nzbhydra2": {
|
||||||
|
"indexersenabled": "Enabled Indexers",
|
||||||
|
"mostpopular": "Most Popular Indexer",
|
||||||
|
"responsetime": "Average response time"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -582,5 +582,10 @@
|
|||||||
"whatsupdocker": {
|
"whatsupdocker": {
|
||||||
"monitoring": "Monitoring",
|
"monitoring": "Monitoring",
|
||||||
"updates": "Updates"
|
"updates": "Updates"
|
||||||
|
},
|
||||||
|
"nzbhydra2": {
|
||||||
|
"indexersenabled": "Enabled Indexers",
|
||||||
|
"mostpopular": "Most Popular Indexer",
|
||||||
|
"responsetime": "Average response time"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -582,5 +582,10 @@
|
|||||||
"whatsupdocker": {
|
"whatsupdocker": {
|
||||||
"monitoring": "Monitoring",
|
"monitoring": "Monitoring",
|
||||||
"updates": "Updates"
|
"updates": "Updates"
|
||||||
|
},
|
||||||
|
"nzbhydra2": {
|
||||||
|
"indexersenabled": "Enabled Indexers",
|
||||||
|
"mostpopular": "Most Popular Indexer",
|
||||||
|
"responsetime": "Average response time"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -582,5 +582,10 @@
|
|||||||
"whatsupdocker": {
|
"whatsupdocker": {
|
||||||
"monitoring": "Monitoring",
|
"monitoring": "Monitoring",
|
||||||
"updates": "Updates"
|
"updates": "Updates"
|
||||||
|
},
|
||||||
|
"nzbhydra2": {
|
||||||
|
"indexersenabled": "Enabled Indexers",
|
||||||
|
"mostpopular": "Most Popular Indexer",
|
||||||
|
"responsetime": "Average response time"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -582,5 +582,10 @@
|
|||||||
"whatsupdocker": {
|
"whatsupdocker": {
|
||||||
"monitoring": "Monitoring",
|
"monitoring": "Monitoring",
|
||||||
"updates": "Updates"
|
"updates": "Updates"
|
||||||
|
},
|
||||||
|
"nzbhydra2": {
|
||||||
|
"indexersenabled": "Enabled Indexers",
|
||||||
|
"mostpopular": "Most Popular Indexer",
|
||||||
|
"responsetime": "Average response time"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -582,5 +582,10 @@
|
|||||||
"whatsupdocker": {
|
"whatsupdocker": {
|
||||||
"monitoring": "Monitoring",
|
"monitoring": "Monitoring",
|
||||||
"updates": "Updates"
|
"updates": "Updates"
|
||||||
|
},
|
||||||
|
"nzbhydra2": {
|
||||||
|
"indexersenabled": "Enabled Indexers",
|
||||||
|
"mostpopular": "Most Popular Indexer",
|
||||||
|
"responsetime": "Average response time"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -582,5 +582,10 @@
|
|||||||
"whatsupdocker": {
|
"whatsupdocker": {
|
||||||
"monitoring": "Monitoring",
|
"monitoring": "Monitoring",
|
||||||
"updates": "Updates"
|
"updates": "Updates"
|
||||||
|
},
|
||||||
|
"nzbhydra2": {
|
||||||
|
"indexersenabled": "Enabled Indexers",
|
||||||
|
"mostpopular": "Most Popular Indexer",
|
||||||
|
"responsetime": "Average response time"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -18,7 +18,7 @@ export default async function credentialedProxyHandler(req, res, map) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (widget) {
|
if (widget) {
|
||||||
const url = new URL(formatApiCall(widgets[widget.type].api, { endpoint, ...widget }));
|
let url = new URL(formatApiCall(widgets[widget.type].api, { endpoint, ...widget }));
|
||||||
|
|
||||||
const headers = {
|
const headers = {
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
@ -54,6 +54,8 @@ export default async function credentialedProxyHandler(req, res, map) {
|
|||||||
} else {
|
} else {
|
||||||
headers.Authorization = `Basic ${Buffer.from(`${widget.username}:${widget.password}`).toString("base64")}`;
|
headers.Authorization = `Basic ${Buffer.from(`${widget.username}:${widget.password}`).toString("base64")}`;
|
||||||
}
|
}
|
||||||
|
} else if (widget.type === "nzbhydra2") {
|
||||||
|
url += `?apikey=${widget.key}`;
|
||||||
} else {
|
} else {
|
||||||
headers["X-API-Key"] = `${widget.key}`;
|
headers["X-API-Key"] = `${widget.key}`;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -46,6 +46,7 @@ const components = {
|
|||||||
nextdns: dynamic(() => import("./nextdns/component")),
|
nextdns: dynamic(() => import("./nextdns/component")),
|
||||||
npm: dynamic(() => import("./npm/component")),
|
npm: dynamic(() => import("./npm/component")),
|
||||||
nzbget: dynamic(() => import("./nzbget/component")),
|
nzbget: dynamic(() => import("./nzbget/component")),
|
||||||
|
nzbhydra2: dynamic(() => import("./nzbhydra2/component")),
|
||||||
octoprint: dynamic(() => import("./octoprint/component")),
|
octoprint: dynamic(() => import("./octoprint/component")),
|
||||||
omada: dynamic(() => import("./omada/component")),
|
omada: dynamic(() => import("./omada/component")),
|
||||||
ombi: dynamic(() => import("./ombi/component")),
|
ombi: dynamic(() => import("./ombi/component")),
|
||||||
|
|||||||
51
src/widgets/nzbhydra2/component.jsx
Normal file
51
src/widgets/nzbhydra2/component.jsx
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
import { useTranslation } from "next-i18next";
|
||||||
|
|
||||||
|
import Container from "components/services/widget/container";
|
||||||
|
import Block from "components/services/widget/block";
|
||||||
|
import useWidgetAPI from "utils/proxy/use-widget-api";
|
||||||
|
|
||||||
|
const calculateAverage = (key, data) => {
|
||||||
|
const count = data.length;
|
||||||
|
const sum = data.reduce((a,b) => a + b[key], 0);
|
||||||
|
const average = (sum / count).toFixed(1);
|
||||||
|
|
||||||
|
return average;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default function Component({ service }) {
|
||||||
|
const { t } = useTranslation();
|
||||||
|
|
||||||
|
const { widget } = service;
|
||||||
|
const { data: nzbhydra2Data, error: nzbhydra2Error } = useWidgetAPI(widget, "stats");
|
||||||
|
|
||||||
|
if (nzbhydra2Error) {
|
||||||
|
return <Container error={nzbhydra2Error} />;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!nzbhydra2Data) {
|
||||||
|
return (
|
||||||
|
<Container service={service}>
|
||||||
|
<Block label="nzbhydra2.indexersenabled" />
|
||||||
|
<Block label="nzbhydra2.mostpopular" />
|
||||||
|
<Block label="nzbhydra2.responsetime" />
|
||||||
|
</Container>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
const indexerCount = nzbhydra2Data.numberOfConfiguredIndexers;
|
||||||
|
const enabledIndexers = nzbhydra2Data.numberOfEnabledIndexers;
|
||||||
|
|
||||||
|
|
||||||
|
const highestDailyAccesses = Math.max(...nzbhydra2Data.indexerApiAccessStats.map(indexer => indexer.averageAccessesPerDay));
|
||||||
|
const mostPopularIndexer = nzbhydra2Data.indexerApiAccessStats.find((indexer) => indexer.averageAccessesPerDay === highestDailyAccesses);
|
||||||
|
|
||||||
|
const averageResponseTime = calculateAverage("avgResponseTime", nzbhydra2Data.avgResponseTimes);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Container service={service}>
|
||||||
|
<Block label="nzbhydra2.indexersenabled" value={`${enabledIndexers}/${indexerCount}` } />
|
||||||
|
<Block label="nzbhydra2.mostpopular" value={ mostPopularIndexer.indexerName } />
|
||||||
|
<Block label="nzbhydra2.responsetime" value={t("common.ms", { value: averageResponseTime, style: "unit", unit: "millisecond" })} />
|
||||||
|
</Container>
|
||||||
|
);
|
||||||
|
}
|
||||||
14
src/widgets/nzbhydra2/widget.js
Normal file
14
src/widgets/nzbhydra2/widget.js
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
import credentialedProxyHandler from "utils/proxy/handlers/credentialed";
|
||||||
|
|
||||||
|
const widget = {
|
||||||
|
api: "{url}/{endpoint}",
|
||||||
|
proxyHandler: credentialedProxyHandler,
|
||||||
|
|
||||||
|
mappings: {
|
||||||
|
stats: {
|
||||||
|
endpoint: "api/stats",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
export default widget;
|
||||||
@ -40,6 +40,7 @@ import nextcloud from "./nextcloud/widget";
|
|||||||
import nextdns from "./nextdns/widget";
|
import nextdns from "./nextdns/widget";
|
||||||
import npm from "./npm/widget";
|
import npm from "./npm/widget";
|
||||||
import nzbget from "./nzbget/widget";
|
import nzbget from "./nzbget/widget";
|
||||||
|
import nzbhydra2 from "./nzbhydra2/widget";
|
||||||
import octoprint from "./octoprint/widget";
|
import octoprint from "./octoprint/widget";
|
||||||
import omada from "./omada/widget";
|
import omada from "./omada/widget";
|
||||||
import ombi from "./ombi/widget";
|
import ombi from "./ombi/widget";
|
||||||
@ -122,6 +123,7 @@ const widgets = {
|
|||||||
nextdns,
|
nextdns,
|
||||||
npm,
|
npm,
|
||||||
nzbget,
|
nzbget,
|
||||||
|
nzbhydra2,
|
||||||
octoprint,
|
octoprint,
|
||||||
omada,
|
omada,
|
||||||
ombi,
|
ombi,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user