diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000..5a9e97f1 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,6 @@ +{ + "files.exclude": { + "**/.next": true, + "**/node_modules": true + } +} \ No newline at end of file diff --git a/README.md b/README.md index c1f5e23f..2eeb6dc9 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ - Images built for AMD64 (x86_64), ARM64, ARMv7 and ARMv6 - Supports all Raspberry Pi's, most SBCs & Apple Silicon - Full i18n support with automatic language detection - - Translantions for Chinese, Dutch, Finnish, French, German, Hebrew, Hungarian, Norwegian Bokmål, Polish, Portuguese, Portuguese (Brazil), Romainian, Russian, Spanish, Swedish and Yue + - Translantions for Catalan, Chinese, Dutch, Finnish, French, German, Hebrew, Hungarian, Norwegian Bokmål, Polish, Portuguese, Portuguese (Brazil), Romainian, Russian, Spanish, Swedish and Yue - Want to help translate? [Join the Weblate project](https://hosted.weblate.org/engage/homepage/) - Service & Web Bookmarks - Docker Integration diff --git a/public/locales/ca/common.json b/public/locales/ca/common.json index 8ef784cb..4f46fff0 100644 --- a/public/locales/ca/common.json +++ b/public/locales/ca/common.json @@ -177,8 +177,19 @@ }, "proxmox": { "vms": "VMs", - "mem": "MEM", - "cpu": "CPU", + "mem": "Memòria", + "cpu": "Processador", "lxc": "LXC" + }, + "unifi": { + "users": "Users", + "uptime": "System Uptime", + "days": "Days", + "wan": "WAN", + "lan_users": "LAN Users", + "wlan_users": "WLAN Users", + "up": "UP", + "down": "DOWN", + "wait": "Please wait" } } diff --git a/public/locales/de/common.json b/public/locales/de/common.json index 0b84664f..0070cb5a 100644 --- a/public/locales/de/common.json +++ b/public/locales/de/common.json @@ -180,5 +180,16 @@ "cpu": "CPU", "lxc": "LXC", "vms": "VMs" + }, + "unifi": { + "users": "Users", + "uptime": "System Uptime", + "days": "Days", + "wan": "WAN", + "lan_users": "LAN Users", + "wlan_users": "WLAN Users", + "up": "UP", + "down": "DOWN", + "wait": "Please wait" } } diff --git a/public/locales/en/common.json b/public/locales/en/common.json index dfc1a5ba..b1097904 100644 --- a/public/locales/en/common.json +++ b/public/locales/en/common.json @@ -31,6 +31,17 @@ "used": "Used", "load": "Load" }, + "unifi": { + "users": "Users", + "uptime": "System Uptime", + "days": "Days", + "wan": "WAN", + "lan_users": "LAN Users", + "wlan_users": "WLAN Users", + "up": "UP", + "down": "DOWN", + "wait": "Please wait" + }, "docker": { "rx": "RX", "tx": "TX", diff --git a/public/locales/es/common.json b/public/locales/es/common.json index fe9a7253..3184d8b7 100644 --- a/public/locales/es/common.json +++ b/public/locales/es/common.json @@ -176,9 +176,20 @@ "failedLoginsLast24H": "Inicios de sesión fallidos (24h)" }, "proxmox": { - "mem": "MEM", - "cpu": "CPU", + "mem": "Memoria", + "cpu": "Procesador", "lxc": "LXC", "vms": "VMs" + }, + "unifi": { + "up": "UP", + "users": "Users", + "uptime": "System Uptime", + "days": "Days", + "wan": "WAN", + "lan_users": "LAN Users", + "wlan_users": "WLAN Users", + "down": "DOWN", + "wait": "Please wait" } } diff --git a/public/locales/fi/common.json b/public/locales/fi/common.json index 133a0f32..c4654377 100644 --- a/public/locales/fi/common.json +++ b/public/locales/fi/common.json @@ -176,9 +176,20 @@ "failedLoginsLast24H": "Epäonnistuneita kirjautumisia (24h)" }, "proxmox": { - "mem": "MEM", + "mem": "RAM", "cpu": "CPU", "lxc": "LXC", - "vms": "VMs" + "vms": "VKt" + }, + "unifi": { + "users": "Users", + "uptime": "System Uptime", + "lan_users": "LAN Users", + "wlan_users": "WLAN Users", + "wait": "Please wait", + "days": "Days", + "wan": "WAN", + "up": "UP", + "down": "DOWN" } } diff --git a/public/locales/fr/common.json b/public/locales/fr/common.json index c0a72e95..e893fccb 100644 --- a/public/locales/fr/common.json +++ b/public/locales/fr/common.json @@ -176,9 +176,20 @@ "failedLoginsLast24H": "Cnx. échouées (24h)" }, "proxmox": { - "mem": "MEM", - "cpu": "CPU", - "lxc": "LXC", + "mem": "Mém", + "cpu": "Cpu", + "lxc": "LxC", "vms": "VMs" + }, + "unifi": { + "users": "Users", + "uptime": "System Uptime", + "days": "Days", + "wan": "WAN", + "lan_users": "LAN Users", + "wlan_users": "WLAN Users", + "up": "UP", + "down": "DOWN", + "wait": "Please wait" } } diff --git a/public/locales/he/common.json b/public/locales/he/common.json index 9414f038..532fce39 100644 --- a/public/locales/he/common.json +++ b/public/locales/he/common.json @@ -180,5 +180,16 @@ "cpu": "CPU", "lxc": "LXC", "vms": "VMs" + }, + "unifi": { + "users": "Users", + "uptime": "System Uptime", + "days": "Days", + "wan": "WAN", + "lan_users": "LAN Users", + "wlan_users": "WLAN Users", + "up": "UP", + "down": "DOWN", + "wait": "Please wait" } } diff --git a/public/locales/hr/common.json b/public/locales/hr/common.json index 36b970a0..e11164b4 100644 --- a/public/locales/hr/common.json +++ b/public/locales/hr/common.json @@ -180,5 +180,16 @@ "cpu": "CPU", "lxc": "LXC", "vms": "VMs" + }, + "unifi": { + "users": "Users", + "uptime": "System Uptime", + "days": "Days", + "wan": "WAN", + "lan_users": "LAN Users", + "wlan_users": "WLAN Users", + "up": "UP", + "down": "DOWN", + "wait": "Please wait" } } diff --git a/public/locales/hu/common.json b/public/locales/hu/common.json index ac4d7fff..581420ea 100644 --- a/public/locales/hu/common.json +++ b/public/locales/hu/common.json @@ -180,5 +180,16 @@ "cpu": "CPU", "lxc": "LXC", "vms": "VMs" + }, + "unifi": { + "users": "Users", + "uptime": "System Uptime", + "days": "Days", + "wan": "WAN", + "lan_users": "LAN Users", + "wlan_users": "WLAN Users", + "up": "UP", + "down": "DOWN", + "wait": "Please wait" } } diff --git a/public/locales/it/common.json b/public/locales/it/common.json index 09f32213..9403315c 100644 --- a/public/locales/it/common.json +++ b/public/locales/it/common.json @@ -180,5 +180,16 @@ "cpu": "CPU", "lxc": "LXC", "vms": "VMs" + }, + "unifi": { + "users": "Users", + "uptime": "System Uptime", + "days": "Days", + "wan": "WAN", + "lan_users": "LAN Users", + "wait": "Please wait", + "wlan_users": "WLAN Users", + "up": "UP", + "down": "DOWN" } } diff --git a/public/locales/nb-NO/common.json b/public/locales/nb-NO/common.json index cea70d93..dc9992d4 100644 --- a/public/locales/nb-NO/common.json +++ b/public/locales/nb-NO/common.json @@ -180,5 +180,16 @@ "cpu": "CPU", "lxc": "LXC", "vms": "VMs" + }, + "unifi": { + "users": "Users", + "uptime": "System Uptime", + "days": "Days", + "wan": "WAN", + "lan_users": "LAN Users", + "wlan_users": "WLAN Users", + "up": "UP", + "down": "DOWN", + "wait": "Please wait" } } diff --git a/public/locales/nl/common.json b/public/locales/nl/common.json index b13cd912..07250217 100644 --- a/public/locales/nl/common.json +++ b/public/locales/nl/common.json @@ -180,5 +180,16 @@ "cpu": "CPU", "lxc": "LXC", "vms": "VMs" + }, + "unifi": { + "users": "Users", + "lan_users": "LAN Users", + "uptime": "System Uptime", + "days": "Days", + "wan": "WAN", + "wlan_users": "WLAN Users", + "up": "UP", + "down": "DOWN", + "wait": "Please wait" } } diff --git a/public/locales/pl/common.json b/public/locales/pl/common.json index 4eb9ffa1..d34b7c80 100644 --- a/public/locales/pl/common.json +++ b/public/locales/pl/common.json @@ -180,5 +180,16 @@ "cpu": "CPU", "lxc": "LXC", "vms": "VMs" + }, + "unifi": { + "users": "Users", + "uptime": "System Uptime", + "days": "Days", + "wan": "WAN", + "lan_users": "LAN Users", + "wlan_users": "WLAN Users", + "up": "UP", + "down": "DOWN", + "wait": "Please wait" } } diff --git a/public/locales/pt-BR/common.json b/public/locales/pt-BR/common.json index 5596ac64..61e704d8 100644 --- a/public/locales/pt-BR/common.json +++ b/public/locales/pt-BR/common.json @@ -180,5 +180,16 @@ "cpu": "CPU", "lxc": "LXC", "vms": "VMs" + }, + "unifi": { + "users": "Users", + "uptime": "System Uptime", + "days": "Days", + "wan": "WAN", + "lan_users": "LAN Users", + "wlan_users": "WLAN Users", + "up": "UP", + "down": "DOWN", + "wait": "Please wait" } } diff --git a/public/locales/pt/common.json b/public/locales/pt/common.json index fc7b3c9c..a8257926 100644 --- a/public/locales/pt/common.json +++ b/public/locales/pt/common.json @@ -191,5 +191,16 @@ "cpu": "CPU", "lxc": "LXC", "vms": "VMs" + }, + "unifi": { + "users": "Users", + "uptime": "System Uptime", + "days": "Days", + "wan": "WAN", + "lan_users": "LAN Users", + "wlan_users": "WLAN Users", + "up": "UP", + "down": "DOWN", + "wait": "Please wait" } } diff --git a/public/locales/ro/common.json b/public/locales/ro/common.json index eaa9af3a..c3371cd0 100644 --- a/public/locales/ro/common.json +++ b/public/locales/ro/common.json @@ -180,5 +180,16 @@ "mem": "MEM", "cpu": "CPU", "lxc": "LXC" + }, + "unifi": { + "users": "Users", + "uptime": "System Uptime", + "days": "Days", + "wan": "WAN", + "lan_users": "LAN Users", + "wlan_users": "WLAN Users", + "up": "UP", + "down": "DOWN", + "wait": "Please wait" } } diff --git a/public/locales/ru/common.json b/public/locales/ru/common.json index d06131fd..57e1eb93 100644 --- a/public/locales/ru/common.json +++ b/public/locales/ru/common.json @@ -180,5 +180,16 @@ "cpu": "CPU", "lxc": "LXC", "vms": "VMs" + }, + "unifi": { + "users": "Users", + "uptime": "System Uptime", + "days": "Days", + "wan": "WAN", + "lan_users": "LAN Users", + "wlan_users": "WLAN Users", + "up": "UP", + "down": "DOWN", + "wait": "Please wait" } } diff --git a/public/locales/sv/common.json b/public/locales/sv/common.json index c42ecabb..b36e77ae 100644 --- a/public/locales/sv/common.json +++ b/public/locales/sv/common.json @@ -180,5 +180,16 @@ "cpu": "CPU", "lxc": "LXC", "vms": "VMs" + }, + "unifi": { + "users": "Users", + "uptime": "System Uptime", + "days": "Days", + "wan": "WAN", + "lan_users": "LAN Users", + "wlan_users": "WLAN Users", + "up": "UP", + "down": "DOWN", + "wait": "Please wait" } } diff --git a/public/locales/te/common.json b/public/locales/te/common.json new file mode 100644 index 00000000..c5a5323d --- /dev/null +++ b/public/locales/te/common.json @@ -0,0 +1,195 @@ +{ + "readarr": { + "books": "పుస్తకాలు", + "wanted": "కావలెను", + "queued": "క్యూయూఎడ్" + }, + "adguard": { + "blocked": "నిరోధించబడింది", + "filtered": "ఫిల్టర్ చేయబడింది", + "latency": "జాప్యం", + "queries": "ప్రశ్నలు" + }, + "strelaysrv": { + "numActiveSessions": "సెషన్స్", + "numConnections": "కనెక్షన్లు", + "dataRelayed": "రెలయెడఁ", + "transferRate": "రేటు" + }, + "widget": { + "missing_type": "విడ్జెట్ లేదు: {{type}}", + "api_error": "API లోపం", + "status": "హోదా" + }, + "weather": { + "current": "ప్రస్తుత స్తలం", + "allow": "అనుమతించడానికి క్లిక్ చేయండి", + "updating": "నవీకరిస్తోంది", + "wait": "దయచేసి వేచి ఉండండి" + }, + "search": { + "placeholder": "వెతకండి…" + }, + "resources": { + "cpu": "సీ పి యూ", + "total": "మొత్తం", + "free": "ఉచిత", + "used": "ఉపయోగించబడిన", + "load": "లోడ్" + }, + "docker": { + "rx": "RX", + "tx": "TX", + "mem": "MEM", + "cpu": "CPU", + "offline": "ఆఫ్లైన్" + }, + "emby": { + "playing": "ఆడుతున్నారు", + "transcoding": "ట్రాన్స్కోడింగ్", + "bitrate": "బిట్రేట్", + "no_active": "యాక్టివ్ స్ట్రీమ్లు లేవు" + }, + "tautulli": { + "playing": "ఆడుతున్నారు", + "transcoding": "ట్రాన్స్కోడింగ్", + "bitrate": "బిట్రేట్", + "no_active": "యాక్టివ్ స్ట్రీమ్లు లేవు" + }, + "nzbget": { + "rate": "రేట్", + "remaining": "మిగిలింది", + "downloaded": "డౌన్లోడ్ చేయబడింది" + }, + "sabnzbd": { + "rate": "రేట్", + "queue": "వరుస", + "timeleft": "మిగిలి వున్న సమయం" + }, + "rutorrent": { + "active": "చురుకుగా", + "upload": "అప్లోడ్", + "download": "డౌన్లోడ్" + }, + "transmission": { + "download": "డౌన్లోడ్", + "upload": "అప్లోడ్", + "leech": "జలగ", + "seed": "సీడ్" + }, + "qbittorrent": { + "download": "డౌన్లోడ్", + "upload": "అప్లోడ్", + "leech": "లీచ్", + "seed": "సీడ్" + }, + "sonarr": { + "wanted": "కావలెను", + "queued": "క్యూయూఎడ్", + "series": "సిరీస్" + }, + "radarr": { + "wanted": "కావలెను", + "queued": "క్యూయూఎడ్", + "movies": "సినిమాలు" + }, + "lidarr": { + "wanted": "కావలెను", + "queued": "క్యూయూఎడ్", + "albums": "ఆల్బములు" + }, + "bazarr": { + "missingEpisodes": "ఎపిసోడ్లు లేవు", + "missingMovies": "సినిమాలు లేవు" + }, + "ombi": { + "pending": "పెండింగ్", + "approved": "ఆమోదించబడింది", + "available": "అందుబాటులో వున్నవి" + }, + "jellyseerr": { + "pending": "పెండింగ్", + "approved": "ఆమోదించబడింది", + "available": "అందుబాటులో" + }, + "overseerr": { + "pending": "పెండింగ్", + "approved": "ఆమోదించబడింది", + "available": "అందుబాటులో" + }, + "pihole": { + "queries": "ప్రశ్నలు", + "blocked": "నిరోధించబడింది", + "gravity": "గురుత్వాకర్షణ" + }, + "speedtest": { + "upload": "అప్లోడ్", + "download": "డౌన్లోడ్", + "ping": "పింగ్" + }, + "portainer": { + "running": "నడుస్తోంది", + "stopped": "ఆగిపోయింది", + "total": "మొత్తం" + }, + "traefik": { + "routers": "రౌటర్లు", + "services": "సేవలు", + "middleware": "మిడిల్వేర్" + }, + "npm": { + "enabled": "ప్రారంభించబడింది", + "disabled": "Disabled", + "total": "మొత్తం" + }, + "coinmarketcap": { + "configure": "ట్రాక్ చేయడానికి ఒకటి లేదా అంతకంటే ఎక్కువ క్రిప్టో కరెన్సీలను కాన్ఫిగర్ చేయండి", + "1hour": "1 గంట", + "1day": "1 రోజు", + "7days": "7 రోజులు", + "30days": "30 రోజులు" + }, + "gotify": { + "apps": "అప్లికేషన్లు", + "clients": "ఖాతాదారులు", + "messages": "సందేశాలు" + }, + "prowlarr": { + "enableIndexers": "సూచికలు", + "numberOfGrabs": "గ్రాబ్స్", + "numberOfQueries": "ప్రశ్నలు", + "numberOfFailGrabs": "ఫెయిల్ గ్రాబ్స్", + "numberOfFailQueries": "విఫలమైన ప్రశ్నలు" + }, + "jackett": { + "configured": "కాన్ఫిగర్ చేయబడింది", + "errored": "పొరపాటు జరిగింది" + }, + "mastodon": { + "user_count": "వినియోగదారులు", + "status_count": "పోస్ట్లు", + "domain_count": "డొమైన్లు" + }, + "authentik": { + "users": "వినియోగదారులు", + "loginsLast24H": "లాగిన్లు (24గం)", + "failedLoginsLast24H": "విఫలమైన లాగిన్లు (24గం)" + }, + "proxmox": { + "mem": "MEM", + "cpu": "CPU", + "lxc": "LXC", + "vms": "VMs" + }, + "unifi": { + "users": "Users", + "uptime": "System Uptime", + "days": "Days", + "wan": "WAN", + "lan_users": "LAN Users", + "wlan_users": "WLAN Users", + "up": "UP", + "down": "DOWN", + "wait": "Please wait" + } +} diff --git a/public/locales/vi/common.json b/public/locales/vi/common.json index 736120cf..5a27fd85 100644 --- a/public/locales/vi/common.json +++ b/public/locales/vi/common.json @@ -180,5 +180,16 @@ "cpu": "CPU", "lxc": "LXC", "vms": "VMs" + }, + "unifi": { + "users": "Users", + "uptime": "System Uptime", + "days": "Days", + "wan": "WAN", + "lan_users": "LAN Users", + "wlan_users": "WLAN Users", + "up": "UP", + "down": "DOWN", + "wait": "Please wait" } } diff --git a/public/locales/yue/common.json b/public/locales/yue/common.json index 72e2ddde..a49767c4 100644 --- a/public/locales/yue/common.json +++ b/public/locales/yue/common.json @@ -180,5 +180,16 @@ "cpu": "CPU", "lxc": "LXC", "vms": "VMs" + }, + "unifi": { + "users": "Users", + "uptime": "System Uptime", + "days": "Days", + "wan": "WAN", + "lan_users": "LAN Users", + "wlan_users": "WLAN Users", + "up": "UP", + "down": "DOWN", + "wait": "Please wait" } } diff --git a/public/locales/zh-CN/common.json b/public/locales/zh-CN/common.json index 4fcc1702..d80a0534 100644 --- a/public/locales/zh-CN/common.json +++ b/public/locales/zh-CN/common.json @@ -162,23 +162,34 @@ "mastodon": { "user_count": "用户", "status_count": "Posts", - "domain_count": "Domains" + "domain_count": "域" }, "strelaysrv": { - "numActiveSessions": "Sessions", - "dataRelayed": "Relayed", - "numConnections": "Connections", - "transferRate": "Rate" + "numActiveSessions": "会话", + "dataRelayed": "中继", + "numConnections": "连接", + "transferRate": "速度" }, "authentik": { - "users": "Users", - "loginsLast24H": "Logins (24h)", - "failedLoginsLast24H": "Failed Logins (24h)" + "users": "用户", + "loginsLast24H": "登录 (24h)", + "failedLoginsLast24H": "登录失败 (24h)" }, "proxmox": { - "mem": "MEM", - "cpu": "CPU", + "mem": "内存", + "cpu": "处理器", "lxc": "LXC", "vms": "VMs" + }, + "unifi": { + "users": "Users", + "uptime": "System Uptime", + "days": "Days", + "wan": "WAN", + "lan_users": "LAN Users", + "wlan_users": "WLAN Users", + "up": "UP", + "down": "DOWN", + "wait": "Please wait" } } diff --git a/public/locales/zh-Hant/common.json b/public/locales/zh-Hant/common.json index 70dba911..3ad0ed06 100644 --- a/public/locales/zh-Hant/common.json +++ b/public/locales/zh-Hant/common.json @@ -180,5 +180,16 @@ "cpu": "CPU", "lxc": "LXC", "vms": "VMs" + }, + "unifi": { + "users": "Users", + "uptime": "System Uptime", + "days": "Days", + "wan": "WAN", + "lan_users": "LAN Users", + "wlan_users": "WLAN Users", + "up": "UP", + "down": "DOWN", + "wait": "Please wait" } } diff --git a/src/components/widgets/unifi_console/unifi_console.jsx b/src/components/widgets/unifi_console/unifi_console.jsx new file mode 100644 index 00000000..7427bd23 --- /dev/null +++ b/src/components/widgets/unifi_console/unifi_console.jsx @@ -0,0 +1,119 @@ +import { BiError, BiWifi, BiCheckCircle, BiXCircle } from "react-icons/bi"; +import { MdSettingsEthernet } from "react-icons/md"; +import { useTranslation } from "next-i18next"; +import { SiUbiquiti } from "react-icons/si"; + +import useWidgetAPI from "utils/proxy/use-widget-api"; + +export default function Widget({ options }) { + const { t } = useTranslation(); + + // eslint-disable-next-line no-param-reassign + options.type = "unifi_console"; + const { data: statsData, error: statsError } = useWidgetAPI(options, "stat/sites"); + + if (statsError || statsData?.error) { + return ( +