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>
2022-12-21 12:08:34 -08:00
|
|
|
|
|
|
|
import { httpProxy } from "utils/proxy/http";
|
|
|
|
import getServiceWidget from "utils/config/service-helpers";
|
|
|
|
import createLogger from "utils/logger";
|
|
|
|
|
|
|
|
const proxyName = "omadaProxyHandler";
|
|
|
|
|
|
|
|
const logger = createLogger(proxyName);
|
|
|
|
|
2022-12-21 12:20:17 -08:00
|
|
|
async function login(loginUrl, username, password, controllerVersionMajor) {
|
|
|
|
const params = {
|
2022-12-21 13:04:14 -08:00
|
|
|
username,
|
|
|
|
password
|
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>
2022-12-21 12:08:34 -08:00
|
|
|
}
|
|
|
|
|
2022-12-21 12:51:20 -08:00
|
|
|
if (controllerVersionMajor === 3) {
|
2022-12-21 13:04:14 -08:00
|
|
|
params.method = "login";
|
|
|
|
params.params = {
|
2022-12-21 12:51:20 -08:00
|
|
|
name: username,
|
|
|
|
password
|
|
|
|
};
|
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>
2022-12-21 12:08:34 -08:00
|
|
|
}
|
2022-12-21 13:04:14 -08:00
|
|
|
|
|
|
|
// eslint-disable-next-line no-unused-vars
|
2022-12-21 12:20:17 -08:00
|
|
|
const [status, contentType, data] = await httpProxy(loginUrl, {
|
|
|
|
method: "POST",
|
|
|
|
body: JSON.stringify(params),
|
|
|
|
headers: {
|
|
|
|
"Content-Type": "application/json",
|
|
|
|
},
|
|
|
|
});
|
|
|
|
|
|
|
|
return [status, JSON.parse(data.toString())];
|
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>
2022-12-21 12:08:34 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
export default async function omadaProxyHandler(req, res) {
|
|
|
|
const { group, service } = req.query;
|
|
|
|
|
|
|
|
if (group && service) {
|
|
|
|
const widget = await getServiceWidget(group, service);
|
|
|
|
|
|
|
|
if (widget) {
|
|
|
|
|
|
|
|
const {url} = widget;
|
|
|
|
|
2022-12-21 12:20:17 -08:00
|
|
|
const controllerInfoURL = `${widget.url}/api/info`;
|
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>
2022-12-21 12:08:34 -08:00
|
|
|
|
2022-12-21 12:20:17 -08:00
|
|
|
let [status, contentType, data] = await httpProxy(controllerInfoURL, {
|
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>
2022-12-21 12:08:34 -08:00
|
|
|
headers: {
|
|
|
|
"Content-Type": "application/json",
|
|
|
|
},
|
|
|
|
});
|
|
|
|
|
2022-12-21 12:20:17 -08:00
|
|
|
if (status !== 200) {
|
|
|
|
logger.error("Unable to retrieve Omada controller info");
|
2022-12-21 13:04:14 -08:00
|
|
|
return res.status(status).json({error: {message: `HTTP Error ${status}`, url: controllerInfoURL, data}});
|
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>
2022-12-21 12:08:34 -08:00
|
|
|
}
|
2022-12-21 12:20:17 -08:00
|
|
|
|
2022-12-21 12:51:20 -08:00
|
|
|
let cId;
|
2022-12-21 12:20:17 -08:00
|
|
|
let controllerVersion;
|
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>
2022-12-21 12:08:34 -08:00
|
|
|
|
|
|
|
try {
|
2022-12-21 12:51:20 -08:00
|
|
|
cId = JSON.parse(data).result.omadacId;
|
2022-12-21 12:20:17 -08:00
|
|
|
controllerVersion = JSON.parse(data).result.controllerVer;
|
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>
2022-12-21 12:08:34 -08:00
|
|
|
} catch (e) {
|
2022-12-21 12:51:20 -08:00
|
|
|
controllerVersion = "3.2.x"
|
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>
2022-12-21 12:08:34 -08:00
|
|
|
}
|
2022-12-21 12:20:17 -08:00
|
|
|
|
|
|
|
const controllerVersionMajor = parseInt(controllerVersion.split('.')[0], 10)
|
|
|
|
|
|
|
|
if (![3,4,5].includes(controllerVersionMajor)) {
|
|
|
|
return res.status(500).json({error: {message: "Error determining controller version", data}});
|
|
|
|
}
|
|
|
|
|
|
|
|
let loginUrl;
|
|
|
|
|
|
|
|
switch (controllerVersionMajor) {
|
|
|
|
case 3:
|
|
|
|
loginUrl = `${widget.url}/api/user/login?ajax`;
|
|
|
|
break;
|
|
|
|
case 4:
|
|
|
|
loginUrl = `${widget.url}/api/v2/login`;
|
|
|
|
break;
|
|
|
|
case 5:
|
|
|
|
loginUrl = `${widget.url}/${cId}/api/v2/login`;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
break;
|
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>
2022-12-21 12:08:34 -08:00
|
|
|
}
|
2022-12-21 12:20:17 -08:00
|
|
|
|
|
|
|
const [loginStatus, loginResponseData] = await login(loginUrl, widget.username, widget.password, controllerVersionMajor);
|
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>
2022-12-21 12:08:34 -08:00
|
|
|
|
2022-12-21 12:20:17 -08:00
|
|
|
if (loginStatus !== 200 || loginResponseData.errorCode > 0) {
|
2022-12-21 13:04:14 -08:00
|
|
|
return res.status(status).json({error: {message: "Error logging in to Oamda controller", url: loginUrl, data: loginResponseData}});
|
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>
2022-12-21 12:08:34 -08:00
|
|
|
}
|
|
|
|
|
2022-12-21 13:04:14 -08:00
|
|
|
const { token } = loginResponseData.result;
|
2022-12-21 12:20:17 -08:00
|
|
|
|
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>
2022-12-21 12:08:34 -08:00
|
|
|
let sitesUrl;
|
2022-12-21 12:20:17 -08:00
|
|
|
let body = {};
|
|
|
|
let params = { token };
|
|
|
|
let headers = { "Csrf-Token": token };
|
|
|
|
let method = "GET";
|
|
|
|
|
|
|
|
switch (controllerVersionMajor) {
|
|
|
|
case 3:
|
|
|
|
sitesUrl = `${widget.url}/web/v1/controller?ajax=&token=${token}`;
|
|
|
|
body = {
|
|
|
|
"method": "getUserSites",
|
|
|
|
"params": {
|
|
|
|
"userName": widget.username
|
|
|
|
}
|
|
|
|
};
|
|
|
|
method = "POST";
|
|
|
|
break;
|
|
|
|
case 4:
|
|
|
|
sitesUrl = `${widget.url}/api/v2/sites?token=${token}¤tPage=1¤tPageSize=1000`;
|
|
|
|
break;
|
|
|
|
case 5:
|
|
|
|
sitesUrl = `${widget.url}/${cId}/api/v2/sites?token=${token}¤tPage=1¤tPageSize=1000`;
|
|
|
|
break;
|
2022-12-21 13:04:14 -08:00
|
|
|
default:
|
|
|
|
break;
|
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>
2022-12-21 12:08:34 -08:00
|
|
|
}
|
2022-12-21 12:20:17 -08:00
|
|
|
|
|
|
|
[status, contentType, data] = await httpProxy(sitesUrl, {
|
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>
2022-12-21 12:08:34 -08:00
|
|
|
method,
|
|
|
|
params,
|
2022-12-21 12:20:17 -08:00
|
|
|
body: JSON.stringify(body),
|
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>
2022-12-21 12:08:34 -08:00
|
|
|
headers,
|
|
|
|
});
|
2022-12-21 12:20:17 -08:00
|
|
|
|
|
|
|
const sitesResponseData = JSON.parse(data);
|
|
|
|
|
2022-12-21 12:51:20 -08:00
|
|
|
if (sitesResponseData.errorCode > 0) {
|
2022-12-21 13:04:14 -08:00
|
|
|
logger.debug(`HTTTP ${status} getting sites list: ${sitesResponseData.msg}`);
|
|
|
|
return res.status(status).json({error: {message: "Error getting sites list", url, data: sitesResponseData}});
|
2022-12-21 12:51:20 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
const site = (controllerVersionMajor === 3) ?
|
2022-12-21 13:04:14 -08:00
|
|
|
sitesResponseData.result.siteList.find(s => s.name === widget.site):
|
|
|
|
sitesResponseData.result.data.find(s => s.name === widget.site);
|
2022-12-21 12:51:20 -08:00
|
|
|
|
|
|
|
if (!site) {
|
2022-12-21 13:04:14 -08:00
|
|
|
return res.status(status).json({error: {message: `Site ${widget.site} is not found`, url, data}});
|
2022-12-21 12:51:20 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
let siteResponseData;
|
2022-12-21 12:20:17 -08:00
|
|
|
|
|
|
|
let connectedAp;
|
|
|
|
let activeUser;
|
|
|
|
let connectedSwitches;
|
|
|
|
let connectedGateways;
|
|
|
|
let alerts;
|
|
|
|
|
|
|
|
if (controllerVersionMajor === 3) {
|
2022-12-21 13:04:14 -08:00
|
|
|
// Omada v3 controller requires switching site
|
2022-12-21 12:51:20 -08:00
|
|
|
const switchUrl = `${widget.url}/web/v1/controller?ajax=&token=${token}`;
|
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>
2022-12-21 12:08:34 -08:00
|
|
|
method = "POST";
|
2022-12-21 12:51:20 -08:00
|
|
|
body = {
|
2022-12-21 13:04:14 -08:00
|
|
|
method: "switchSite",
|
|
|
|
params: {
|
|
|
|
siteName: site.siteName,
|
|
|
|
userName: widget.username
|
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>
2022-12-21 12:08:34 -08:00
|
|
|
}
|
2022-12-21 12:51:20 -08:00
|
|
|
};
|
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>
2022-12-21 12:08:34 -08:00
|
|
|
headers = { "Content-Type": "application/json" };
|
2022-12-21 13:04:14 -08:00
|
|
|
params = { token };
|
2022-12-21 12:51:20 -08:00
|
|
|
|
|
|
|
[status, contentType, data] = await httpProxy(switchUrl, {
|
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>
2022-12-21 12:08:34 -08:00
|
|
|
method,
|
|
|
|
params,
|
2022-12-21 12:51:20 -08:00
|
|
|
body: JSON.stringify(body),
|
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>
2022-12-21 12:08:34 -08:00
|
|
|
headers,
|
|
|
|
});
|
2022-12-21 12:51:20 -08:00
|
|
|
|
|
|
|
const switchResponseData = JSON.parse(data);
|
|
|
|
if (status !== 200 || switchResponseData.errorCode > 0) {
|
|
|
|
logger.error(`HTTP ${status} getting sites list: ${data}`);
|
|
|
|
return res.status(status).json({error: {message: "Error switching site", url: switchUrl, data}});
|
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>
2022-12-21 12:08:34 -08:00
|
|
|
}
|
2022-12-21 12:20:17 -08:00
|
|
|
|
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>
2022-12-21 12:08:34 -08:00
|
|
|
const statsUrl = `${widget.url}/web/v1/controller?getGlobalStat=&token=${token}`;
|
2022-12-21 12:51:20 -08:00
|
|
|
[status, contentType, data] = await httpProxy(statsUrl, {
|
|
|
|
method,
|
|
|
|
params,
|
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>
2022-12-21 12:08:34 -08:00
|
|
|
body: JSON.stringify({
|
|
|
|
"method": "getGlobalStat",
|
|
|
|
}),
|
2022-12-21 12:51:20 -08:00
|
|
|
headers
|
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>
2022-12-21 12:08:34 -08:00
|
|
|
});
|
|
|
|
|
2022-12-21 12:51:20 -08:00
|
|
|
siteResponseData = JSON.parse(data);
|
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>
2022-12-21 12:08:34 -08:00
|
|
|
|
2022-12-21 12:51:20 -08:00
|
|
|
if (status !== 200 || siteResponseData.errorCode > 0) {
|
|
|
|
return res.status(status).json({error: {message: "Error getting stats", url: statsUrl, data}});
|
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>
2022-12-21 12:08:34 -08:00
|
|
|
}
|
|
|
|
|
2022-12-21 12:51:20 -08:00
|
|
|
connectedAp = siteResponseData.result.connectedAp;
|
|
|
|
activeUser = siteResponseData.result.activeUser;
|
|
|
|
alerts = siteResponseData.result.alerts;
|
2022-12-21 12:20:17 -08:00
|
|
|
} else if (controllerVersionMajor === 4 || controllerVersionMajor === 5) {
|
|
|
|
const siteName = (controllerVersionMajor === 5) ? site.id : site.key;
|
|
|
|
const siteStatsUrl = (controllerVersionMajor === 4) ?
|
|
|
|
`${url}/api/v2/sites/${siteName}/dashboard/overviewDiagram?token=${token}¤tPage=1¤tPageSize=1000` :
|
|
|
|
`${url}/${cId}/api/v2/sites/${siteName}/dashboard/overviewDiagram?token=${token}¤tPage=1¤tPageSize=1000`;
|
|
|
|
|
|
|
|
[status, contentType, data] = await httpProxy(siteStatsUrl, {
|
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>
2022-12-21 12:08:34 -08:00
|
|
|
headers: {
|
|
|
|
"Csrf-Token": token,
|
|
|
|
},
|
|
|
|
});
|
|
|
|
|
2022-12-21 12:51:20 -08:00
|
|
|
siteResponseData = JSON.parse(data);
|
2022-12-21 12:20:17 -08:00
|
|
|
|
|
|
|
if (status !== 200 || siteResponseData.errorCode > 0) {
|
2022-12-21 13:04:14 -08:00
|
|
|
logger.debug(`HTTP ${status} getting stats for site ${widget.site} with message ${siteResponseData.msg}`);
|
2022-12-21 12:20:17 -08:00
|
|
|
return res.status(500).send(data);
|
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>
2022-12-21 12:08:34 -08:00
|
|
|
}
|
|
|
|
|
2022-12-21 12:20:17 -08:00
|
|
|
const alertUrl = (controllerVersionMajor === 4) ?
|
|
|
|
`${url}/api/v2/sites/${siteName}/alerts/num?token=${token}¤tPage=1¤tPageSize=1000` :
|
|
|
|
`${url}/${cId}/api/v2/sites/${siteName}/alerts/num?token=${token}¤tPage=1¤tPageSize=1000`;
|
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>
2022-12-21 12:08:34 -08:00
|
|
|
|
2022-12-21 13:04:14 -08:00
|
|
|
// eslint-disable-next-line no-unused-vars
|
2022-12-21 12:20:17 -08:00
|
|
|
[status, contentType, data] = await httpProxy(alertUrl, {
|
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>
2022-12-21 12:08:34 -08:00
|
|
|
headers: {
|
|
|
|
"Csrf-Token": token,
|
|
|
|
},
|
|
|
|
});
|
2022-12-21 12:20:17 -08:00
|
|
|
const alertResponseData = JSON.parse(data);
|
2022-12-21 13:04:14 -08:00
|
|
|
|
|
|
|
activeUser = siteResponseData.result.totalClientNum;
|
|
|
|
connectedAp = siteResponseData.result.connectedApNum;
|
|
|
|
connectedGateways = siteResponseData.result.connectedGatewayNum;
|
|
|
|
connectedSwitches = siteResponseData.result.connectedSwitchNum;
|
2022-12-21 12:20:17 -08:00
|
|
|
alerts = alertResponseData.result.alertNum;
|
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>
2022-12-21 12:08:34 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
return res.send(JSON.stringify({
|
2022-12-21 12:20:17 -08:00
|
|
|
connectedAp,
|
|
|
|
activeUser,
|
|
|
|
alerts,
|
|
|
|
connectedGateways,
|
|
|
|
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>
2022-12-21 12:08:34 -08:00
|
|
|
}));
|
|
|
|
}
|
|
|
|
}
|
2022-12-21 12:51:20 -08:00
|
|
|
|
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>
2022-12-21 12:08:34 -08:00
|
|
|
return res.status(400).json({ error: "Invalid proxy service type" });
|
|
|
|
}
|