You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
homepage/src/widgets/omada/component.jsx

48 lines
1.6 KiB

Squashed commit of the following from initial Omada widget: commit ad3e664b56ad2a9024684f2141f8f21ead59177e Author: Benoit <oupsman@oupsman.fr> Date: Tue Dec 13 19:54:54 2022 +0100 Add .idea to .gitignore commit 7e51a093845c6bcda4fac78a2c174adbcc7701b6 Merge: 93d8035 7dd0b0e Author: Benoit SERRA <oupsman@oupsman.fr> Date: Tue Dec 13 18:38:51 2022 +0100 Merge branch 'benphelps:main' into main commit 93d80350b1d4519ac217b880568ccabbef43f03f Author: Benoit <oupsman@oupsman.fr> Date: Tue Dec 13 18:15:20 2022 +0100 Omada widget : One widget, shows only the number alerts, the number of connected AP, the number of connected devices to Wifi, the number of connected switches and gatewawys. commit a1babd860ce8a2dd6981b7fef6e055e249cbccb2 Author: Benoit <oupsman@oupsman.fr> Date: Tue Dec 13 09:33:50 2022 +0100 Omada widget : spliting widget between WLAN and LAN/WAN fields to have no more than 5 fields per widget. commit e12cc65c7703f2f1930fc7646c1f4386b49e73fb Merge: 331f31f 146326f Author: Benoit SERRA <oupsman@oupsman.fr> Date: Sun Dec 11 14:39:27 2022 +0100 Merge branch 'benphelps:main' into main commit 331f31fc2be80e0738869fd050b3034638979350 Merge: 37154e3 ccc1229 Author: Benoit SERRA <oupsman@oupsman.fr> Date: Sat Dec 10 17:56:44 2022 +0100 Merge branch 'benphelps:main' into main commit 37154e327af7d3fe66e7638ba79851ef789d3649 Author: Benoit <oupsman@oupsman.fr> Date: Sat Dec 10 17:11:30 2022 +0100 Omada widget : Improved error handling Omada widget: handling power as common.power in translation commit 1f484914067e514f22c1f250b62f589fedefe1fd Author: Benoit <oupsman@oupsman.fr> Date: Sat Dec 10 10:24:55 2022 +0100 Omada widget : adding stats for isolated aps, connected gateways, connected switches, available ports, power consumption commit f375f0b815bf6697f7044995203084427b14ea69 Merge: 467b678 775b511 Author: Benoit <oupsman@oupsman.fr> Date: Fri Dec 9 21:06:38 2022 +0100 Merge branch 'main' of https://github.com/Oupsman/homepage into main commit 467b67802a7b8dface01703b6035951dcaa1e069 Author: Benoit <oupsman@oupsman.fr> Date: Fri Dec 9 21:06:09 2022 +0100 Omada widget : v3 v4 and v5 versions don't use the same fields for the same stats, I've corrected the code to make it more reliable commit 775b5111e13072a18edb33f30a4d4f0589bc2af0 Merge: 8d66756 88c4375 Author: Benoit SERRA <oupsman@oupsman.fr> Date: Thu Dec 8 15:38:20 2022 +0100 Merge branch 'benphelps:main' into main commit 8d66756a7d8f9e0b43c8abde2f2e6f2fd86a1098 Author: Benoit <oupsman@oupsman.fr> Date: Thu Dec 8 12:45:44 2022 +0100 Omada Widget : code cleanup commit 282a6d0592c53a39184d63bba517f482a84f5b36 Author: Benoit <oupsman@oupsman.fr> Date: Thu Dec 8 12:42:41 2022 +0100 Omada Widget : code cleanup commit c3e9b8f87075e834ea1a520fd8c93708afb15ac0 Author: Benoit <oupsman@oupsman.fr> Date: Thu Dec 8 12:37:10 2022 +0100 Omada Widget : No more legacy variable, the code detects the controller version and adapts the requests. Logic is not duplicated anymore commit eafcc205975cc1bd04f063f1627d380f2a2b7f04 Author: Benoit <oupsman@oupsman.fr> Date: Wed Dec 7 15:46:00 2022 +0100 V2 API is working commit bcc2864ee2e1f0f1d2f4c009df1ba8a1a7244f80 Author: Benoit <oupsman@oupsman.fr> Date: Wed Dec 7 10:01:26 2022 +0100 Code fore v2 API is not working but V1 code is. commit ea8e297e849c2ef5659bfec94d76d2fff8677c4c Author: Benoit <oupsman@oupsman.fr> Date: Tue Dec 6 14:28:05 2022 +0100 Errors handling commit ab6d51a88c8737654dd31bec46106d7c49ed39d2 Author: Benoit <oupsman@oupsman.fr> Date: Tue Dec 6 09:50:14 2022 +0100 Adding alerts commit 047db2cce867c0207be7fe0827b24107fdd84923 Author: Benoit <oupsman@oupsman.fr> Date: Mon Dec 5 22:53:43 2022 +0100 Fixed translation system commit 42c5a3e6658f22662b1c58f54cba31dc90bfbc61 Author: Benoit <oupsman@oupsman.fr> Date: Mon Dec 5 22:34:34 2022 +0100 Translation system is still * up commit c80eac9d5bd5491ec4a61da38cdaf82f0ea1cc2f Author: Benoit <oupsman@oupsman.fr> Date: Mon Dec 5 22:33:50 2022 +0100 Translation system is still * up commit f8ba6b02454d66eb96e7e6ebd8022492ff79e690 Author: Benoit <oupsman@oupsman.fr> Date: Mon Dec 5 22:32:22 2022 +0100 Translation system is still * up commit dec7eec6de26298eb7c90fd01e1c0fd23b6469a4 Author: Benoit <oupsman@oupsman.fr> Date: Mon Dec 5 22:16:13 2022 +0100 Translation system is * up commit cc840cf7ccb40509f1da3f521a4a1b3e26498ac0 Author: Benoit <oupsman@oupsman.fr> Date: Mon Dec 5 21:33:00 2022 +0100 First working version commit 54b65e619e41c9963a614a177df3a4af68ebe77d Author: Benoit <oupsman@oupsman.fr> Date: Mon Dec 5 18:59:09 2022 +0100 Using getGlobalStat method commit 7ebc8500da9d52bd2911a620179fb6585f044c47 Author: Benoit <oupsman@oupsman.fr> Date: Mon Dec 5 14:33:37 2022 +0100 Working on Omada Widget : NOT WORKING FOR NOW commit 04eaf28cae1be0935cb190e50ae5b75c19254403 Merge: 61065ac 826fe15 Author: Benoit <oupsman@oupsman.fr> Date: Mon Dec 5 10:32:30 2022 +0100 Merge branch 'main' of https://github.com/Oupsman/homepage into main commit 61065ace2887c3c1d6486001d34ce6f58d58958d Author: Benoit <oupsman@oupsman.fr> Date: Mon Dec 5 10:24:57 2022 +0100 Working on Omada Widget remove idea Co-Authored-By: Benoit SERRA <11260343+oupsman@users.noreply.github.com>
1 year ago
import { useTranslation } from "next-i18next";
import useWidgetAPI from "../../utils/proxy/use-widget-api";
import Container from "../../components/services/widget/container";
import Block from "../../components/services/widget/block";
export default function Component({ service }) {
const { t } = useTranslation();
const { widget } = service;
const { data: omadaData, error: omadaAPIError } = useWidgetAPI(widget, {
Squashed commit of the following from initial Omada widget: commit ad3e664b56ad2a9024684f2141f8f21ead59177e Author: Benoit <oupsman@oupsman.fr> Date: Tue Dec 13 19:54:54 2022 +0100 Add .idea to .gitignore commit 7e51a093845c6bcda4fac78a2c174adbcc7701b6 Merge: 93d8035 7dd0b0e Author: Benoit SERRA <oupsman@oupsman.fr> Date: Tue Dec 13 18:38:51 2022 +0100 Merge branch 'benphelps:main' into main commit 93d80350b1d4519ac217b880568ccabbef43f03f Author: Benoit <oupsman@oupsman.fr> Date: Tue Dec 13 18:15:20 2022 +0100 Omada widget : One widget, shows only the number alerts, the number of connected AP, the number of connected devices to Wifi, the number of connected switches and gatewawys. commit a1babd860ce8a2dd6981b7fef6e055e249cbccb2 Author: Benoit <oupsman@oupsman.fr> Date: Tue Dec 13 09:33:50 2022 +0100 Omada widget : spliting widget between WLAN and LAN/WAN fields to have no more than 5 fields per widget. commit e12cc65c7703f2f1930fc7646c1f4386b49e73fb Merge: 331f31f 146326f Author: Benoit SERRA <oupsman@oupsman.fr> Date: Sun Dec 11 14:39:27 2022 +0100 Merge branch 'benphelps:main' into main commit 331f31fc2be80e0738869fd050b3034638979350 Merge: 37154e3 ccc1229 Author: Benoit SERRA <oupsman@oupsman.fr> Date: Sat Dec 10 17:56:44 2022 +0100 Merge branch 'benphelps:main' into main commit 37154e327af7d3fe66e7638ba79851ef789d3649 Author: Benoit <oupsman@oupsman.fr> Date: Sat Dec 10 17:11:30 2022 +0100 Omada widget : Improved error handling Omada widget: handling power as common.power in translation commit 1f484914067e514f22c1f250b62f589fedefe1fd Author: Benoit <oupsman@oupsman.fr> Date: Sat Dec 10 10:24:55 2022 +0100 Omada widget : adding stats for isolated aps, connected gateways, connected switches, available ports, power consumption commit f375f0b815bf6697f7044995203084427b14ea69 Merge: 467b678 775b511 Author: Benoit <oupsman@oupsman.fr> Date: Fri Dec 9 21:06:38 2022 +0100 Merge branch 'main' of https://github.com/Oupsman/homepage into main commit 467b67802a7b8dface01703b6035951dcaa1e069 Author: Benoit <oupsman@oupsman.fr> Date: Fri Dec 9 21:06:09 2022 +0100 Omada widget : v3 v4 and v5 versions don't use the same fields for the same stats, I've corrected the code to make it more reliable commit 775b5111e13072a18edb33f30a4d4f0589bc2af0 Merge: 8d66756 88c4375 Author: Benoit SERRA <oupsman@oupsman.fr> Date: Thu Dec 8 15:38:20 2022 +0100 Merge branch 'benphelps:main' into main commit 8d66756a7d8f9e0b43c8abde2f2e6f2fd86a1098 Author: Benoit <oupsman@oupsman.fr> Date: Thu Dec 8 12:45:44 2022 +0100 Omada Widget : code cleanup commit 282a6d0592c53a39184d63bba517f482a84f5b36 Author: Benoit <oupsman@oupsman.fr> Date: Thu Dec 8 12:42:41 2022 +0100 Omada Widget : code cleanup commit c3e9b8f87075e834ea1a520fd8c93708afb15ac0 Author: Benoit <oupsman@oupsman.fr> Date: Thu Dec 8 12:37:10 2022 +0100 Omada Widget : No more legacy variable, the code detects the controller version and adapts the requests. Logic is not duplicated anymore commit eafcc205975cc1bd04f063f1627d380f2a2b7f04 Author: Benoit <oupsman@oupsman.fr> Date: Wed Dec 7 15:46:00 2022 +0100 V2 API is working commit bcc2864ee2e1f0f1d2f4c009df1ba8a1a7244f80 Author: Benoit <oupsman@oupsman.fr> Date: Wed Dec 7 10:01:26 2022 +0100 Code fore v2 API is not working but V1 code is. commit ea8e297e849c2ef5659bfec94d76d2fff8677c4c Author: Benoit <oupsman@oupsman.fr> Date: Tue Dec 6 14:28:05 2022 +0100 Errors handling commit ab6d51a88c8737654dd31bec46106d7c49ed39d2 Author: Benoit <oupsman@oupsman.fr> Date: Tue Dec 6 09:50:14 2022 +0100 Adding alerts commit 047db2cce867c0207be7fe0827b24107fdd84923 Author: Benoit <oupsman@oupsman.fr> Date: Mon Dec 5 22:53:43 2022 +0100 Fixed translation system commit 42c5a3e6658f22662b1c58f54cba31dc90bfbc61 Author: Benoit <oupsman@oupsman.fr> Date: Mon Dec 5 22:34:34 2022 +0100 Translation system is still * up commit c80eac9d5bd5491ec4a61da38cdaf82f0ea1cc2f Author: Benoit <oupsman@oupsman.fr> Date: Mon Dec 5 22:33:50 2022 +0100 Translation system is still * up commit f8ba6b02454d66eb96e7e6ebd8022492ff79e690 Author: Benoit <oupsman@oupsman.fr> Date: Mon Dec 5 22:32:22 2022 +0100 Translation system is still * up commit dec7eec6de26298eb7c90fd01e1c0fd23b6469a4 Author: Benoit <oupsman@oupsman.fr> Date: Mon Dec 5 22:16:13 2022 +0100 Translation system is * up commit cc840cf7ccb40509f1da3f521a4a1b3e26498ac0 Author: Benoit <oupsman@oupsman.fr> Date: Mon Dec 5 21:33:00 2022 +0100 First working version commit 54b65e619e41c9963a614a177df3a4af68ebe77d Author: Benoit <oupsman@oupsman.fr> Date: Mon Dec 5 18:59:09 2022 +0100 Using getGlobalStat method commit 7ebc8500da9d52bd2911a620179fb6585f044c47 Author: Benoit <oupsman@oupsman.fr> Date: Mon Dec 5 14:33:37 2022 +0100 Working on Omada Widget : NOT WORKING FOR NOW commit 04eaf28cae1be0935cb190e50ae5b75c19254403 Merge: 61065ac 826fe15 Author: Benoit <oupsman@oupsman.fr> Date: Mon Dec 5 10:32:30 2022 +0100 Merge branch 'main' of https://github.com/Oupsman/homepage into main commit 61065ace2887c3c1d6486001d34ce6f58d58958d Author: Benoit <oupsman@oupsman.fr> Date: Mon Dec 5 10:24:57 2022 +0100 Working on Omada Widget remove idea Co-Authored-By: Benoit SERRA <11260343+oupsman@users.noreply.github.com>
1 year ago
refreshInterval: 5000,
});
if (omadaAPIError) {
return <Container service={service} error={omadaAPIError} />;
Squashed commit of the following from initial Omada widget: commit ad3e664b56ad2a9024684f2141f8f21ead59177e Author: Benoit <oupsman@oupsman.fr> Date: Tue Dec 13 19:54:54 2022 +0100 Add .idea to .gitignore commit 7e51a093845c6bcda4fac78a2c174adbcc7701b6 Merge: 93d8035 7dd0b0e Author: Benoit SERRA <oupsman@oupsman.fr> Date: Tue Dec 13 18:38:51 2022 +0100 Merge branch 'benphelps:main' into main commit 93d80350b1d4519ac217b880568ccabbef43f03f Author: Benoit <oupsman@oupsman.fr> Date: Tue Dec 13 18:15:20 2022 +0100 Omada widget : One widget, shows only the number alerts, the number of connected AP, the number of connected devices to Wifi, the number of connected switches and gatewawys. commit a1babd860ce8a2dd6981b7fef6e055e249cbccb2 Author: Benoit <oupsman@oupsman.fr> Date: Tue Dec 13 09:33:50 2022 +0100 Omada widget : spliting widget between WLAN and LAN/WAN fields to have no more than 5 fields per widget. commit e12cc65c7703f2f1930fc7646c1f4386b49e73fb Merge: 331f31f 146326f Author: Benoit SERRA <oupsman@oupsman.fr> Date: Sun Dec 11 14:39:27 2022 +0100 Merge branch 'benphelps:main' into main commit 331f31fc2be80e0738869fd050b3034638979350 Merge: 37154e3 ccc1229 Author: Benoit SERRA <oupsman@oupsman.fr> Date: Sat Dec 10 17:56:44 2022 +0100 Merge branch 'benphelps:main' into main commit 37154e327af7d3fe66e7638ba79851ef789d3649 Author: Benoit <oupsman@oupsman.fr> Date: Sat Dec 10 17:11:30 2022 +0100 Omada widget : Improved error handling Omada widget: handling power as common.power in translation commit 1f484914067e514f22c1f250b62f589fedefe1fd Author: Benoit <oupsman@oupsman.fr> Date: Sat Dec 10 10:24:55 2022 +0100 Omada widget : adding stats for isolated aps, connected gateways, connected switches, available ports, power consumption commit f375f0b815bf6697f7044995203084427b14ea69 Merge: 467b678 775b511 Author: Benoit <oupsman@oupsman.fr> Date: Fri Dec 9 21:06:38 2022 +0100 Merge branch 'main' of https://github.com/Oupsman/homepage into main commit 467b67802a7b8dface01703b6035951dcaa1e069 Author: Benoit <oupsman@oupsman.fr> Date: Fri Dec 9 21:06:09 2022 +0100 Omada widget : v3 v4 and v5 versions don't use the same fields for the same stats, I've corrected the code to make it more reliable commit 775b5111e13072a18edb33f30a4d4f0589bc2af0 Merge: 8d66756 88c4375 Author: Benoit SERRA <oupsman@oupsman.fr> Date: Thu Dec 8 15:38:20 2022 +0100 Merge branch 'benphelps:main' into main commit 8d66756a7d8f9e0b43c8abde2f2e6f2fd86a1098 Author: Benoit <oupsman@oupsman.fr> Date: Thu Dec 8 12:45:44 2022 +0100 Omada Widget : code cleanup commit 282a6d0592c53a39184d63bba517f482a84f5b36 Author: Benoit <oupsman@oupsman.fr> Date: Thu Dec 8 12:42:41 2022 +0100 Omada Widget : code cleanup commit c3e9b8f87075e834ea1a520fd8c93708afb15ac0 Author: Benoit <oupsman@oupsman.fr> Date: Thu Dec 8 12:37:10 2022 +0100 Omada Widget : No more legacy variable, the code detects the controller version and adapts the requests. Logic is not duplicated anymore commit eafcc205975cc1bd04f063f1627d380f2a2b7f04 Author: Benoit <oupsman@oupsman.fr> Date: Wed Dec 7 15:46:00 2022 +0100 V2 API is working commit bcc2864ee2e1f0f1d2f4c009df1ba8a1a7244f80 Author: Benoit <oupsman@oupsman.fr> Date: Wed Dec 7 10:01:26 2022 +0100 Code fore v2 API is not working but V1 code is. commit ea8e297e849c2ef5659bfec94d76d2fff8677c4c Author: Benoit <oupsman@oupsman.fr> Date: Tue Dec 6 14:28:05 2022 +0100 Errors handling commit ab6d51a88c8737654dd31bec46106d7c49ed39d2 Author: Benoit <oupsman@oupsman.fr> Date: Tue Dec 6 09:50:14 2022 +0100 Adding alerts commit 047db2cce867c0207be7fe0827b24107fdd84923 Author: Benoit <oupsman@oupsman.fr> Date: Mon Dec 5 22:53:43 2022 +0100 Fixed translation system commit 42c5a3e6658f22662b1c58f54cba31dc90bfbc61 Author: Benoit <oupsman@oupsman.fr> Date: Mon Dec 5 22:34:34 2022 +0100 Translation system is still * up commit c80eac9d5bd5491ec4a61da38cdaf82f0ea1cc2f Author: Benoit <oupsman@oupsman.fr> Date: Mon Dec 5 22:33:50 2022 +0100 Translation system is still * up commit f8ba6b02454d66eb96e7e6ebd8022492ff79e690 Author: Benoit <oupsman@oupsman.fr> Date: Mon Dec 5 22:32:22 2022 +0100 Translation system is still * up commit dec7eec6de26298eb7c90fd01e1c0fd23b6469a4 Author: Benoit <oupsman@oupsman.fr> Date: Mon Dec 5 22:16:13 2022 +0100 Translation system is * up commit cc840cf7ccb40509f1da3f521a4a1b3e26498ac0 Author: Benoit <oupsman@oupsman.fr> Date: Mon Dec 5 21:33:00 2022 +0100 First working version commit 54b65e619e41c9963a614a177df3a4af68ebe77d Author: Benoit <oupsman@oupsman.fr> Date: Mon Dec 5 18:59:09 2022 +0100 Using getGlobalStat method commit 7ebc8500da9d52bd2911a620179fb6585f044c47 Author: Benoit <oupsman@oupsman.fr> Date: Mon Dec 5 14:33:37 2022 +0100 Working on Omada Widget : NOT WORKING FOR NOW commit 04eaf28cae1be0935cb190e50ae5b75c19254403 Merge: 61065ac 826fe15 Author: Benoit <oupsman@oupsman.fr> Date: Mon Dec 5 10:32:30 2022 +0100 Merge branch 'main' of https://github.com/Oupsman/homepage into main commit 61065ace2887c3c1d6486001d34ce6f58d58958d Author: Benoit <oupsman@oupsman.fr> Date: Mon Dec 5 10:24:57 2022 +0100 Working on Omada Widget remove idea Co-Authored-By: Benoit SERRA <11260343+oupsman@users.noreply.github.com>
1 year ago
}
if (!widget.fields) {
widget.fields = ["connectedAp", "activeUser", "alerts", "connectedGateway"];
} else if (widget.fields?.length > 4) {
widget.fields = widget.fields.slice(0, 4);
}
Squashed commit of the following from initial Omada widget: commit ad3e664b56ad2a9024684f2141f8f21ead59177e Author: Benoit <oupsman@oupsman.fr> Date: Tue Dec 13 19:54:54 2022 +0100 Add .idea to .gitignore commit 7e51a093845c6bcda4fac78a2c174adbcc7701b6 Merge: 93d8035 7dd0b0e Author: Benoit SERRA <oupsman@oupsman.fr> Date: Tue Dec 13 18:38:51 2022 +0100 Merge branch 'benphelps:main' into main commit 93d80350b1d4519ac217b880568ccabbef43f03f Author: Benoit <oupsman@oupsman.fr> Date: Tue Dec 13 18:15:20 2022 +0100 Omada widget : One widget, shows only the number alerts, the number of connected AP, the number of connected devices to Wifi, the number of connected switches and gatewawys. commit a1babd860ce8a2dd6981b7fef6e055e249cbccb2 Author: Benoit <oupsman@oupsman.fr> Date: Tue Dec 13 09:33:50 2022 +0100 Omada widget : spliting widget between WLAN and LAN/WAN fields to have no more than 5 fields per widget. commit e12cc65c7703f2f1930fc7646c1f4386b49e73fb Merge: 331f31f 146326f Author: Benoit SERRA <oupsman@oupsman.fr> Date: Sun Dec 11 14:39:27 2022 +0100 Merge branch 'benphelps:main' into main commit 331f31fc2be80e0738869fd050b3034638979350 Merge: 37154e3 ccc1229 Author: Benoit SERRA <oupsman@oupsman.fr> Date: Sat Dec 10 17:56:44 2022 +0100 Merge branch 'benphelps:main' into main commit 37154e327af7d3fe66e7638ba79851ef789d3649 Author: Benoit <oupsman@oupsman.fr> Date: Sat Dec 10 17:11:30 2022 +0100 Omada widget : Improved error handling Omada widget: handling power as common.power in translation commit 1f484914067e514f22c1f250b62f589fedefe1fd Author: Benoit <oupsman@oupsman.fr> Date: Sat Dec 10 10:24:55 2022 +0100 Omada widget : adding stats for isolated aps, connected gateways, connected switches, available ports, power consumption commit f375f0b815bf6697f7044995203084427b14ea69 Merge: 467b678 775b511 Author: Benoit <oupsman@oupsman.fr> Date: Fri Dec 9 21:06:38 2022 +0100 Merge branch 'main' of https://github.com/Oupsman/homepage into main commit 467b67802a7b8dface01703b6035951dcaa1e069 Author: Benoit <oupsman@oupsman.fr> Date: Fri Dec 9 21:06:09 2022 +0100 Omada widget : v3 v4 and v5 versions don't use the same fields for the same stats, I've corrected the code to make it more reliable commit 775b5111e13072a18edb33f30a4d4f0589bc2af0 Merge: 8d66756 88c4375 Author: Benoit SERRA <oupsman@oupsman.fr> Date: Thu Dec 8 15:38:20 2022 +0100 Merge branch 'benphelps:main' into main commit 8d66756a7d8f9e0b43c8abde2f2e6f2fd86a1098 Author: Benoit <oupsman@oupsman.fr> Date: Thu Dec 8 12:45:44 2022 +0100 Omada Widget : code cleanup commit 282a6d0592c53a39184d63bba517f482a84f5b36 Author: Benoit <oupsman@oupsman.fr> Date: Thu Dec 8 12:42:41 2022 +0100 Omada Widget : code cleanup commit c3e9b8f87075e834ea1a520fd8c93708afb15ac0 Author: Benoit <oupsman@oupsman.fr> Date: Thu Dec 8 12:37:10 2022 +0100 Omada Widget : No more legacy variable, the code detects the controller version and adapts the requests. Logic is not duplicated anymore commit eafcc205975cc1bd04f063f1627d380f2a2b7f04 Author: Benoit <oupsman@oupsman.fr> Date: Wed Dec 7 15:46:00 2022 +0100 V2 API is working commit bcc2864ee2e1f0f1d2f4c009df1ba8a1a7244f80 Author: Benoit <oupsman@oupsman.fr> Date: Wed Dec 7 10:01:26 2022 +0100 Code fore v2 API is not working but V1 code is. commit ea8e297e849c2ef5659bfec94d76d2fff8677c4c Author: Benoit <oupsman@oupsman.fr> Date: Tue Dec 6 14:28:05 2022 +0100 Errors handling commit ab6d51a88c8737654dd31bec46106d7c49ed39d2 Author: Benoit <oupsman@oupsman.fr> Date: Tue Dec 6 09:50:14 2022 +0100 Adding alerts commit 047db2cce867c0207be7fe0827b24107fdd84923 Author: Benoit <oupsman@oupsman.fr> Date: Mon Dec 5 22:53:43 2022 +0100 Fixed translation system commit 42c5a3e6658f22662b1c58f54cba31dc90bfbc61 Author: Benoit <oupsman@oupsman.fr> Date: Mon Dec 5 22:34:34 2022 +0100 Translation system is still * up commit c80eac9d5bd5491ec4a61da38cdaf82f0ea1cc2f Author: Benoit <oupsman@oupsman.fr> Date: Mon Dec 5 22:33:50 2022 +0100 Translation system is still * up commit f8ba6b02454d66eb96e7e6ebd8022492ff79e690 Author: Benoit <oupsman@oupsman.fr> Date: Mon Dec 5 22:32:22 2022 +0100 Translation system is still * up commit dec7eec6de26298eb7c90fd01e1c0fd23b6469a4 Author: Benoit <oupsman@oupsman.fr> Date: Mon Dec 5 22:16:13 2022 +0100 Translation system is * up commit cc840cf7ccb40509f1da3f521a4a1b3e26498ac0 Author: Benoit <oupsman@oupsman.fr> Date: Mon Dec 5 21:33:00 2022 +0100 First working version commit 54b65e619e41c9963a614a177df3a4af68ebe77d Author: Benoit <oupsman@oupsman.fr> Date: Mon Dec 5 18:59:09 2022 +0100 Using getGlobalStat method commit 7ebc8500da9d52bd2911a620179fb6585f044c47 Author: Benoit <oupsman@oupsman.fr> Date: Mon Dec 5 14:33:37 2022 +0100 Working on Omada Widget : NOT WORKING FOR NOW commit 04eaf28cae1be0935cb190e50ae5b75c19254403 Merge: 61065ac 826fe15 Author: Benoit <oupsman@oupsman.fr> Date: Mon Dec 5 10:32:30 2022 +0100 Merge branch 'main' of https://github.com/Oupsman/homepage into main commit 61065ace2887c3c1d6486001d34ce6f58d58958d Author: Benoit <oupsman@oupsman.fr> Date: Mon Dec 5 10:24:57 2022 +0100 Working on Omada Widget remove idea Co-Authored-By: Benoit SERRA <11260343+oupsman@users.noreply.github.com>
1 year ago
if (!omadaData) {
return (
<Container service={service}>
<Block label="omada.connectedAp" />
<Block label="omada.activeUser" />
<Block label="omada.alerts" />
<Block label="omada.connectedGateway" />
<Block label="omada.connectedSwitches" />
Squashed commit of the following from initial Omada widget: commit ad3e664b56ad2a9024684f2141f8f21ead59177e Author: Benoit <oupsman@oupsman.fr> Date: Tue Dec 13 19:54:54 2022 +0100 Add .idea to .gitignore commit 7e51a093845c6bcda4fac78a2c174adbcc7701b6 Merge: 93d8035 7dd0b0e Author: Benoit SERRA <oupsman@oupsman.fr> Date: Tue Dec 13 18:38:51 2022 +0100 Merge branch 'benphelps:main' into main commit 93d80350b1d4519ac217b880568ccabbef43f03f Author: Benoit <oupsman@oupsman.fr> Date: Tue Dec 13 18:15:20 2022 +0100 Omada widget : One widget, shows only the number alerts, the number of connected AP, the number of connected devices to Wifi, the number of connected switches and gatewawys. commit a1babd860ce8a2dd6981b7fef6e055e249cbccb2 Author: Benoit <oupsman@oupsman.fr> Date: Tue Dec 13 09:33:50 2022 +0100 Omada widget : spliting widget between WLAN and LAN/WAN fields to have no more than 5 fields per widget. commit e12cc65c7703f2f1930fc7646c1f4386b49e73fb Merge: 331f31f 146326f Author: Benoit SERRA <oupsman@oupsman.fr> Date: Sun Dec 11 14:39:27 2022 +0100 Merge branch 'benphelps:main' into main commit 331f31fc2be80e0738869fd050b3034638979350 Merge: 37154e3 ccc1229 Author: Benoit SERRA <oupsman@oupsman.fr> Date: Sat Dec 10 17:56:44 2022 +0100 Merge branch 'benphelps:main' into main commit 37154e327af7d3fe66e7638ba79851ef789d3649 Author: Benoit <oupsman@oupsman.fr> Date: Sat Dec 10 17:11:30 2022 +0100 Omada widget : Improved error handling Omada widget: handling power as common.power in translation commit 1f484914067e514f22c1f250b62f589fedefe1fd Author: Benoit <oupsman@oupsman.fr> Date: Sat Dec 10 10:24:55 2022 +0100 Omada widget : adding stats for isolated aps, connected gateways, connected switches, available ports, power consumption commit f375f0b815bf6697f7044995203084427b14ea69 Merge: 467b678 775b511 Author: Benoit <oupsman@oupsman.fr> Date: Fri Dec 9 21:06:38 2022 +0100 Merge branch 'main' of https://github.com/Oupsman/homepage into main commit 467b67802a7b8dface01703b6035951dcaa1e069 Author: Benoit <oupsman@oupsman.fr> Date: Fri Dec 9 21:06:09 2022 +0100 Omada widget : v3 v4 and v5 versions don't use the same fields for the same stats, I've corrected the code to make it more reliable commit 775b5111e13072a18edb33f30a4d4f0589bc2af0 Merge: 8d66756 88c4375 Author: Benoit SERRA <oupsman@oupsman.fr> Date: Thu Dec 8 15:38:20 2022 +0100 Merge branch 'benphelps:main' into main commit 8d66756a7d8f9e0b43c8abde2f2e6f2fd86a1098 Author: Benoit <oupsman@oupsman.fr> Date: Thu Dec 8 12:45:44 2022 +0100 Omada Widget : code cleanup commit 282a6d0592c53a39184d63bba517f482a84f5b36 Author: Benoit <oupsman@oupsman.fr> Date: Thu Dec 8 12:42:41 2022 +0100 Omada Widget : code cleanup commit c3e9b8f87075e834ea1a520fd8c93708afb15ac0 Author: Benoit <oupsman@oupsman.fr> Date: Thu Dec 8 12:37:10 2022 +0100 Omada Widget : No more legacy variable, the code detects the controller version and adapts the requests. Logic is not duplicated anymore commit eafcc205975cc1bd04f063f1627d380f2a2b7f04 Author: Benoit <oupsman@oupsman.fr> Date: Wed Dec 7 15:46:00 2022 +0100 V2 API is working commit bcc2864ee2e1f0f1d2f4c009df1ba8a1a7244f80 Author: Benoit <oupsman@oupsman.fr> Date: Wed Dec 7 10:01:26 2022 +0100 Code fore v2 API is not working but V1 code is. commit ea8e297e849c2ef5659bfec94d76d2fff8677c4c Author: Benoit <oupsman@oupsman.fr> Date: Tue Dec 6 14:28:05 2022 +0100 Errors handling commit ab6d51a88c8737654dd31bec46106d7c49ed39d2 Author: Benoit <oupsman@oupsman.fr> Date: Tue Dec 6 09:50:14 2022 +0100 Adding alerts commit 047db2cce867c0207be7fe0827b24107fdd84923 Author: Benoit <oupsman@oupsman.fr> Date: Mon Dec 5 22:53:43 2022 +0100 Fixed translation system commit 42c5a3e6658f22662b1c58f54cba31dc90bfbc61 Author: Benoit <oupsman@oupsman.fr> Date: Mon Dec 5 22:34:34 2022 +0100 Translation system is still * up commit c80eac9d5bd5491ec4a61da38cdaf82f0ea1cc2f Author: Benoit <oupsman@oupsman.fr> Date: Mon Dec 5 22:33:50 2022 +0100 Translation system is still * up commit f8ba6b02454d66eb96e7e6ebd8022492ff79e690 Author: Benoit <oupsman@oupsman.fr> Date: Mon Dec 5 22:32:22 2022 +0100 Translation system is still * up commit dec7eec6de26298eb7c90fd01e1c0fd23b6469a4 Author: Benoit <oupsman@oupsman.fr> Date: Mon Dec 5 22:16:13 2022 +0100 Translation system is * up commit cc840cf7ccb40509f1da3f521a4a1b3e26498ac0 Author: Benoit <oupsman@oupsman.fr> Date: Mon Dec 5 21:33:00 2022 +0100 First working version commit 54b65e619e41c9963a614a177df3a4af68ebe77d Author: Benoit <oupsman@oupsman.fr> Date: Mon Dec 5 18:59:09 2022 +0100 Using getGlobalStat method commit 7ebc8500da9d52bd2911a620179fb6585f044c47 Author: Benoit <oupsman@oupsman.fr> Date: Mon Dec 5 14:33:37 2022 +0100 Working on Omada Widget : NOT WORKING FOR NOW commit 04eaf28cae1be0935cb190e50ae5b75c19254403 Merge: 61065ac 826fe15 Author: Benoit <oupsman@oupsman.fr> Date: Mon Dec 5 10:32:30 2022 +0100 Merge branch 'main' of https://github.com/Oupsman/homepage into main commit 61065ace2887c3c1d6486001d34ce6f58d58958d Author: Benoit <oupsman@oupsman.fr> Date: Mon Dec 5 10:24:57 2022 +0100 Working on Omada Widget remove idea Co-Authored-By: Benoit SERRA <11260343+oupsman@users.noreply.github.com>
1 year ago
</Container>
);
}
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.alerts" value={t("common.number", { value: omadaData.alerts })} />
<Block label="omada.connectedGateway" value={t("common.number", { value: omadaData.connectedGateways })} />
<Block label="omada.connectedSwitches" value={t("common.number", { value: omadaData.connectedSwitches })} />
Squashed commit of the following from initial Omada widget: commit ad3e664b56ad2a9024684f2141f8f21ead59177e Author: Benoit <oupsman@oupsman.fr> Date: Tue Dec 13 19:54:54 2022 +0100 Add .idea to .gitignore commit 7e51a093845c6bcda4fac78a2c174adbcc7701b6 Merge: 93d8035 7dd0b0e Author: Benoit SERRA <oupsman@oupsman.fr> Date: Tue Dec 13 18:38:51 2022 +0100 Merge branch 'benphelps:main' into main commit 93d80350b1d4519ac217b880568ccabbef43f03f Author: Benoit <oupsman@oupsman.fr> Date: Tue Dec 13 18:15:20 2022 +0100 Omada widget : One widget, shows only the number alerts, the number of connected AP, the number of connected devices to Wifi, the number of connected switches and gatewawys. commit a1babd860ce8a2dd6981b7fef6e055e249cbccb2 Author: Benoit <oupsman@oupsman.fr> Date: Tue Dec 13 09:33:50 2022 +0100 Omada widget : spliting widget between WLAN and LAN/WAN fields to have no more than 5 fields per widget. commit e12cc65c7703f2f1930fc7646c1f4386b49e73fb Merge: 331f31f 146326f Author: Benoit SERRA <oupsman@oupsman.fr> Date: Sun Dec 11 14:39:27 2022 +0100 Merge branch 'benphelps:main' into main commit 331f31fc2be80e0738869fd050b3034638979350 Merge: 37154e3 ccc1229 Author: Benoit SERRA <oupsman@oupsman.fr> Date: Sat Dec 10 17:56:44 2022 +0100 Merge branch 'benphelps:main' into main commit 37154e327af7d3fe66e7638ba79851ef789d3649 Author: Benoit <oupsman@oupsman.fr> Date: Sat Dec 10 17:11:30 2022 +0100 Omada widget : Improved error handling Omada widget: handling power as common.power in translation commit 1f484914067e514f22c1f250b62f589fedefe1fd Author: Benoit <oupsman@oupsman.fr> Date: Sat Dec 10 10:24:55 2022 +0100 Omada widget : adding stats for isolated aps, connected gateways, connected switches, available ports, power consumption commit f375f0b815bf6697f7044995203084427b14ea69 Merge: 467b678 775b511 Author: Benoit <oupsman@oupsman.fr> Date: Fri Dec 9 21:06:38 2022 +0100 Merge branch 'main' of https://github.com/Oupsman/homepage into main commit 467b67802a7b8dface01703b6035951dcaa1e069 Author: Benoit <oupsman@oupsman.fr> Date: Fri Dec 9 21:06:09 2022 +0100 Omada widget : v3 v4 and v5 versions don't use the same fields for the same stats, I've corrected the code to make it more reliable commit 775b5111e13072a18edb33f30a4d4f0589bc2af0 Merge: 8d66756 88c4375 Author: Benoit SERRA <oupsman@oupsman.fr> Date: Thu Dec 8 15:38:20 2022 +0100 Merge branch 'benphelps:main' into main commit 8d66756a7d8f9e0b43c8abde2f2e6f2fd86a1098 Author: Benoit <oupsman@oupsman.fr> Date: Thu Dec 8 12:45:44 2022 +0100 Omada Widget : code cleanup commit 282a6d0592c53a39184d63bba517f482a84f5b36 Author: Benoit <oupsman@oupsman.fr> Date: Thu Dec 8 12:42:41 2022 +0100 Omada Widget : code cleanup commit c3e9b8f87075e834ea1a520fd8c93708afb15ac0 Author: Benoit <oupsman@oupsman.fr> Date: Thu Dec 8 12:37:10 2022 +0100 Omada Widget : No more legacy variable, the code detects the controller version and adapts the requests. Logic is not duplicated anymore commit eafcc205975cc1bd04f063f1627d380f2a2b7f04 Author: Benoit <oupsman@oupsman.fr> Date: Wed Dec 7 15:46:00 2022 +0100 V2 API is working commit bcc2864ee2e1f0f1d2f4c009df1ba8a1a7244f80 Author: Benoit <oupsman@oupsman.fr> Date: Wed Dec 7 10:01:26 2022 +0100 Code fore v2 API is not working but V1 code is. commit ea8e297e849c2ef5659bfec94d76d2fff8677c4c Author: Benoit <oupsman@oupsman.fr> Date: Tue Dec 6 14:28:05 2022 +0100 Errors handling commit ab6d51a88c8737654dd31bec46106d7c49ed39d2 Author: Benoit <oupsman@oupsman.fr> Date: Tue Dec 6 09:50:14 2022 +0100 Adding alerts commit 047db2cce867c0207be7fe0827b24107fdd84923 Author: Benoit <oupsman@oupsman.fr> Date: Mon Dec 5 22:53:43 2022 +0100 Fixed translation system commit 42c5a3e6658f22662b1c58f54cba31dc90bfbc61 Author: Benoit <oupsman@oupsman.fr> Date: Mon Dec 5 22:34:34 2022 +0100 Translation system is still * up commit c80eac9d5bd5491ec4a61da38cdaf82f0ea1cc2f Author: Benoit <oupsman@oupsman.fr> Date: Mon Dec 5 22:33:50 2022 +0100 Translation system is still * up commit f8ba6b02454d66eb96e7e6ebd8022492ff79e690 Author: Benoit <oupsman@oupsman.fr> Date: Mon Dec 5 22:32:22 2022 +0100 Translation system is still * up commit dec7eec6de26298eb7c90fd01e1c0fd23b6469a4 Author: Benoit <oupsman@oupsman.fr> Date: Mon Dec 5 22:16:13 2022 +0100 Translation system is * up commit cc840cf7ccb40509f1da3f521a4a1b3e26498ac0 Author: Benoit <oupsman@oupsman.fr> Date: Mon Dec 5 21:33:00 2022 +0100 First working version commit 54b65e619e41c9963a614a177df3a4af68ebe77d Author: Benoit <oupsman@oupsman.fr> Date: Mon Dec 5 18:59:09 2022 +0100 Using getGlobalStat method commit 7ebc8500da9d52bd2911a620179fb6585f044c47 Author: Benoit <oupsman@oupsman.fr> Date: Mon Dec 5 14:33:37 2022 +0100 Working on Omada Widget : NOT WORKING FOR NOW commit 04eaf28cae1be0935cb190e50ae5b75c19254403 Merge: 61065ac 826fe15 Author: Benoit <oupsman@oupsman.fr> Date: Mon Dec 5 10:32:30 2022 +0100 Merge branch 'main' of https://github.com/Oupsman/homepage into main commit 61065ace2887c3c1d6486001d34ce6f58d58958d Author: Benoit <oupsman@oupsman.fr> Date: Mon Dec 5 10:24:57 2022 +0100 Working on Omada Widget remove idea Co-Authored-By: Benoit SERRA <11260343+oupsman@users.noreply.github.com>
1 year ago
</Container>
);
}