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