Translation system is fucked up
This commit is contained in:
parent
cc840cf7cc
commit
dec7eec6de
4 changed files with 13 additions and 13 deletions
|
@ -84,7 +84,11 @@
|
||||||
"playing": "Playing",
|
"playing": "Playing",
|
||||||
"transcoding": "Transcoding",
|
"transcoding": "Transcoding",
|
||||||
"bitrate": "Bitrate",
|
"bitrate": "Bitrate",
|
||||||
"no_active": "No Active Streams"
|
"no_active": "No Active Streamsssssss"
|
||||||
|
},
|
||||||
|
"omada": {
|
||||||
|
"activeUser": "Active users",
|
||||||
|
"connectedAp": "Connected APs"
|
||||||
},
|
},
|
||||||
"nzbget": {
|
"nzbget": {
|
||||||
"rate": "Rate",
|
"rate": "Rate",
|
||||||
|
|
|
@ -27,6 +27,10 @@
|
||||||
"error": "Erreur",
|
"error": "Erreur",
|
||||||
"unknown": "Inconnu"
|
"unknown": "Inconnu"
|
||||||
},
|
},
|
||||||
|
"omada": {
|
||||||
|
"activeUser": "Utilisateurs actifs",
|
||||||
|
"connectedAp": "AP connectés"
|
||||||
|
},
|
||||||
"emby": {
|
"emby": {
|
||||||
"playing": "En lecture",
|
"playing": "En lecture",
|
||||||
"transcoding": "Transcodage",
|
"transcoding": "Transcodage",
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
import { useTranslation } from "next-i18next";
|
import { useTranslation } from "next-i18next";
|
||||||
|
|
||||||
import useWidgetAPI from "../../utils/proxy/use-widget-api";
|
import useWidgetAPI from "../../utils/proxy/use-widget-api";
|
||||||
|
@ -29,8 +28,8 @@ export default function Component({ service }) {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Container service={service}>
|
<Container service={service}>
|
||||||
<Block label="omada.connectedAp" value={t("common.number", { value: omadaData.connectedAp })} />
|
<Block label="omada.connectedAp" value={omadaData.connectedAp} />
|
||||||
<Block label="omada.activeUser" value={t("common.number", { value: omadaData.activeUser })} />
|
<Block label="omada.activeUser" value={omadaData.activeUser } />
|
||||||
</Container>
|
</Container>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,7 +14,6 @@ const logger = createLogger(proxyName);
|
||||||
|
|
||||||
|
|
||||||
async function login(loginUrl, username, password) {
|
async function login(loginUrl, username, password) {
|
||||||
console.log("Login in Omada")
|
|
||||||
const authResponse = await httpProxy(loginUrl,
|
const authResponse = await httpProxy(loginUrl,
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
|
@ -69,9 +68,8 @@ export default async function omadaProxyHandler(req, res) {
|
||||||
return res.status(status).send(token);
|
return res.status(status).send(token);
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log("Token: ", token);
|
|
||||||
const url = `${widget.url}/web/v1/controller?globalStat=&token=${token}`;
|
const url = `${widget.url}/web/v1/controller?globalStat=&token=${token}`;
|
||||||
console.log("URL: ", url);
|
|
||||||
[status, contentType, result] = await httpProxy(url, {
|
[status, contentType, result] = await httpProxy(url, {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
params: {"token": token},
|
params: {"token": token},
|
||||||
|
@ -83,12 +81,7 @@ export default async function omadaProxyHandler(req, res) {
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
console.log(result.toString())
|
|
||||||
// data = JSON.parse(result);
|
|
||||||
console.log ("Status: ", status);
|
|
||||||
// console.log ("Data: ", data);
|
|
||||||
data = JSON.parse(result);
|
data = JSON.parse(result);
|
||||||
console.log ("Data: ", data);
|
|
||||||
if (status === 403) {
|
if (status === 403) {
|
||||||
logger.debug(`HTTTP ${status} retrieving data from Omada api, logging in and trying again.`);
|
logger.debug(`HTTTP ${status} retrieving data from Omada api, logging in and trying again.`);
|
||||||
cache.del(tokenCacheKey);
|
cache.del(tokenCacheKey);
|
||||||
|
|
Loading…
Add table
Reference in a new issue