Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ defaults:

jobs:
docker:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
env:
DOCKER_REGISTRY_URL: tip-tip-wlan-cloud-ucentral.jfrog.io
DOCKER_REGISTRY_USERNAME: ucentral
Expand Down Expand Up @@ -51,7 +51,8 @@ jobs:
SLACK_TITLE: Docker build failed for OWFMS service

trigger-testing:
if: startsWith(github.ref, 'refs/pull/')
#if: startsWith(github.ref, 'refs/pull/')
if: false
runs-on: ubuntu-latest
needs: docker
steps:
Expand Down Expand Up @@ -82,7 +83,8 @@ jobs:

trigger-deploy-to-dev:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
#if: github.ref == 'refs/heads/main'
if: false
needs:
- docker
steps:
Expand Down
3 changes: 1 addition & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.13)
project(owfms VERSION 3.2.0)
project(owfms VERSION 4.2.2)

set(CMAKE_CXX_STANDARD 17)

Expand Down Expand Up @@ -160,4 +160,3 @@ target_link_libraries( owfms PUBLIC
resolv
CppKafka::cppkafka
)

2 changes: 2 additions & 0 deletions openapi/owfms.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,8 @@ components:
$ref: '#/components/schemas/TagIntPairList'
unknownFirmwares:
$ref: '#/components/schemas/TagIntPairList'
matchedRevisions:
$ref: '#/components/schemas/TagIntPairList'
usingLatest:
$ref: '#/components/schemas/TagIntPairList'
totalSecondsOld:
Expand Down
2 changes: 2 additions & 0 deletions src/RESTObjects/RESTAPI_FMSObjects.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ namespace OpenWifi::FMSObjects {
field_to_json(Obj, "endPoints", EndPoints_);
field_to_json(Obj, "usingLatest", UsingLatest_);
field_to_json(Obj, "unknownFirmwares", UnknownFirmwares_);
field_to_json(Obj, "matchedRevisions", MatchedRevisions_);
field_to_json(Obj, "snapshot", snapshot);
field_to_json(Obj, "numberOfDevices", numberOfDevices);
field_to_json(Obj, "totalSecondsOld", totalSecondsOld_);
Expand All @@ -224,6 +225,7 @@ namespace OpenWifi::FMSObjects {
EndPoints_.clear();
UsingLatest_.clear();
UnknownFirmwares_.clear();
MatchedRevisions_.clear();
totalSecondsOld_.clear();
numberOfDevices = 0;
snapshot = Utils::Now();
Expand Down
1 change: 1 addition & 0 deletions src/RESTObjects/RESTAPI_FMSObjects.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ namespace OpenWifi::FMSObjects {
Types::CountedMap EndPoints_;
Types::CountedMap UsingLatest_;
Types::CountedMap UnknownFirmwares_;
Types::CountedMap MatchedRevisions_;
Types::CountedMap totalSecondsOld_;
void to_json(Poco::JSON::Object &Obj) const;
void reset();
Expand Down
5 changes: 5 additions & 0 deletions src/storage/orm_deviceInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,11 @@ namespace OpenWifi {
UpdateCountedMap(Report.EndPoints_, D.endPoint);
UpdateCountedMap(Report.OUI_, D.serialNumber.substr(0, 6));
FMSObjects::FirmwareAgeDetails Age;
FMSObjects::Firmware MatchedFw;
if (StorageService()->FirmwaresDB().GetFirmwareByRevision(
D.revision, D.deviceType, MatchedFw)) {
UpdateCountedMap(Report.MatchedRevisions_, D.revision);
}
if (StorageService()->FirmwaresDB().ComputeFirmwareAge(D.deviceType, D.revision, Age)) {
if (Age.latest) {
UpdateCountedMap(Report.UsingLatest_, D.revision);
Expand Down
Loading