mirror of
https://github.com/Telecominfraproject/wlan-cloud-ucentralgw.git
synced 2025-11-03 12:17:56 +00:00
Compare commits
6 Commits
sqlopt1
...
v3.0.0-RC2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c44cd617e4 | ||
|
|
46846973a1 | ||
|
|
500688edb7 | ||
|
|
810e492ff3 | ||
|
|
222b98d019 | ||
|
|
3eb45c219c |
@@ -9,7 +9,7 @@ fullnameOverride: ""
|
||||
images:
|
||||
owgw:
|
||||
repository: tip-tip-wlan-cloud-ucentral.jfrog.io/owgw
|
||||
tag: master
|
||||
tag: v3.0.0-RC2
|
||||
pullPolicy: Always
|
||||
# regcred:
|
||||
# registry: tip-tip-wlan-cloud-ucentral.jfrog.io
|
||||
|
||||
@@ -58,7 +58,7 @@ namespace OpenWifi {
|
||||
}
|
||||
|
||||
StateUtils::ComputeAssociations(StateObj, State_.Associations_2G,
|
||||
State_.Associations_5G, State_.Associations_6G);
|
||||
State_.Associations_5G, State_.Associations_6G, State_.uptime);
|
||||
|
||||
if (KafkaManager()->Enabled() && !AP_WS_Server()->KafkaDisableState()) {
|
||||
KafkaManager()->PostMessage(KafkaTopics::STATE, SerialNumber_, *ParamsObj);
|
||||
|
||||
@@ -276,6 +276,7 @@ namespace OpenWifi::GWObjects {
|
||||
field_to_json(Obj, "totalConnectionTime", Utils::Now() - started);
|
||||
field_to_json(Obj, "certificateExpiryDate", certificateExpiryDate);
|
||||
field_to_json(Obj, "connectReason", connectReason);
|
||||
field_to_json(Obj, "uptime", uptime);
|
||||
|
||||
#ifdef TIP_GATEWAY_SERVICE
|
||||
hasRADIUSSessions = RADIUSSessionTracker()->HasSessions(SerialNumber);
|
||||
|
||||
@@ -49,6 +49,7 @@ namespace OpenWifi::GWObjects {
|
||||
std::double_t load=0.0;
|
||||
std::double_t temperature=0.0;
|
||||
std::string connectReason;
|
||||
std::uint64_t uptime=0;
|
||||
|
||||
void to_json(const std::string &SerialNumber, Poco::JSON::Object &Obj) ;
|
||||
};
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace OpenWifi::StateUtils {
|
||||
}
|
||||
|
||||
bool ComputeAssociations(const Poco::JSON::Object::Ptr RawObject, uint64_t &Radios_2G,
|
||||
uint64_t &Radios_5G, uint64_t &Radios_6G) {
|
||||
uint64_t &Radios_5G, uint64_t &Radios_6G, uint64_t &UpTime ) {
|
||||
Radios_2G = 0;
|
||||
Radios_5G = 0;
|
||||
Radios_6G = 0;
|
||||
@@ -90,9 +90,15 @@ namespace OpenWifi::StateUtils {
|
||||
}
|
||||
}
|
||||
}
|
||||
// std::cout << Radios_2G << " " << Radios_5G << " " << Radios_6G << std::endl;
|
||||
return true;
|
||||
}
|
||||
|
||||
if(RawObject->has("unit") && !RawObject->isNull("unit") && RawObject->isObject("unit")) {
|
||||
auto unit = RawObject->getObject("unit");
|
||||
if(unit->has("uptime")) {
|
||||
UpTime = unit->get("uptime");
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
} // namespace OpenWifi::StateUtils
|
||||
@@ -8,5 +8,5 @@
|
||||
|
||||
namespace OpenWifi::StateUtils {
|
||||
bool ComputeAssociations(const Poco::JSON::Object::Ptr RawObject, uint64_t &Radios_2G,
|
||||
uint64_t &Radios_5G, uint64_t &Radio_6G);
|
||||
uint64_t &Radios_5G, uint64_t &Radio_6G, uint64_t &UpTime);
|
||||
}
|
||||
@@ -1056,9 +1056,9 @@ namespace OpenWifi {
|
||||
}
|
||||
}
|
||||
|
||||
uint64_t Associations_2G, Associations_5G, Associations_6G;
|
||||
uint64_t Associations_2G, Associations_5G, Associations_6G, uptime;
|
||||
StateUtils::ComputeAssociations(RawObject, Associations_2G, Associations_5G,
|
||||
Associations_6G);
|
||||
Associations_6G, uptime);
|
||||
UpdateCountedMap(Dashboard.associations, "2G", Associations_2G);
|
||||
UpdateCountedMap(Dashboard.associations, "5G", Associations_5G);
|
||||
UpdateCountedMap(Dashboard.associations, "6G", Associations_6G);
|
||||
|
||||
Reference in New Issue
Block a user