Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show overview of gateway status #170

Merged
merged 14 commits into from
May 18, 2022

Conversation

AramAlsabti
Copy link
Contributor

Supports fetching the status of all gateways. The backend now also subscribes to a topic on Chirpstack which receives gateway status messages from time to time. It stores the status messages in a separate table which can then be fetched by a client

Note that this differs from the application server which shows gateways as offline if they haven't received a packages in the last couple of minutes.

OS2iot/OS2iot-frontend#84

Migration, data storage and error handling are missing.
…-online-status

# Conflicts:
#	src/modules/shared.module.ts
#	src/services/data-management/chirpstack-mqtt-listener.service.ts
#	src/services/data-management/device-integration-persistence.service.ts
#	src/services/data-management/receive-data.service.ts
#	src/services/data-targets/data-target-kafka-listener.service.ts
Copy link
Contributor

@GufCab GufCab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very minor feedback, solve these and merge

@AramAlsabti
Copy link
Contributor Author

As discussed, the migration timestamp has been bumped. Remember to update the entry in your migrations table.

@GufCab GufCab self-requested a review May 18, 2022 15:18
@GufCab GufCab merged commit 2da087c into stage May 18, 2022
AramAlsabti added a commit that referenced this pull request May 19, 2022
* Add flow for hiding new welcome screen (#172)

* Merge permission entities into one. Support multiple levels per permission

* Fix some test errors

* Feature/iot 1320 fix sig fox connection (#165)

* Fixes issues with communication with the SigFox API

* Better description for SigFox controller endpoint

Co-authored-by: nlg <nlg@iterator-it.dk>

* Feature/iot 1249 manage kombit users merged (#168)

* Made it possible to get all organizations without other permissions that you have to be logged in. Nessesary since a new user should choose which organizations the user wishes to be a part of.

* Ready for put setEmail

* set email for user

* When logging in to kombit user, the entered email and organizations is now saved in db.

* changed to ManyToMany between user and organizations. Made a migration

* Possible to update the organizations that the user applies.

* Changed names so it's more clear that the organizations on the user is requested organizations. Changed the migration.

* Made mail work with mail test server. It's possible to send a mail. Only org admins should get the mail, and if no org admins then global admin. Need to take care of exception in user.service

* Changed user name to awaiting users. Made api call to get awaiting users.

* Made backend for kombit. Sends mail at verification and rejection. Has to be changed to environment variables. Check all TODOS before merging

* changed migration to match with stage

* Getting ready for OAuth2 mail system. We need to generate refreshtoken ourselves. Made TODO::: for places that needs to do.

* Service is now looking at environment variables. Currently set to Ethereal Email server for test.

* Changed default email values to mailgun

* Made a new controller for new kombit users so endpoints is allowed without permissions. Made map functions

* Now possible to get permissions onto an organization

* updated to correct and latest migration

* Renamed migration

* Added frontend.baseurl environment property

Changed UserRejectDTO to also have id of the user to reject
Minor code quality changes

Co-authored-by: August Andersen <aha@iterator-it.dk>
Co-authored-by: nlg <nlg@iterator-it.dk>

* Bumped momemnt version one minor version

* Fixed package.lock

* Fixed casing of Kombit migration

* Finish permission levels migration

* Deny duplicate permission types

* Constrain permission type to enum

* Removed unused permission types

* Fix kombit permissions

* Show overview of gateway status (#170)

* Init kafka  for online status service

* Subscribe to gateway connection state

Migration, data storage and error handling are missing.

* Init get gateway status

* Refactor gateway status

* Implement gateway status fetch. Missing save in db

* Store gateway status messages. Cleanup

* Organization id is optional

* Re-timestamped migration to to make it fit in the migration timeline

* Minor renaming

* Bump migration timestamp

* Fetch status for single gateway (#171)

Co-authored-by: nlg <nlg@iterator-it.dk>

* Update accept kombit to use group instead of level

* Remove permission check from gateway status

* Cleanup permission relations on down

* Fix multiple permission relations not mapped to the same new permissions

* Fix global admin not created on startup

Co-authored-by: Nikolaj Gustafsson <nikolaj@iterator-it.dk>
Co-authored-by: nlg <nlg@iterator-it.dk>
Co-authored-by: augusthjerrild <70511721+augusthjerrild@users.noreply.github.com>
Co-authored-by: August Andersen <aha@iterator-it.dk>
AramAlsabti added a commit that referenced this pull request May 19, 2022
* Revised permission system on backend. Pending integration test with frontend

* Check for the proper permissions

* Initial migration

* Fix proper linting ignore of migrations

* Migrate existing permissions

* Update organization controller role

* Fix merge issues

* Migrations build

* Modified Migration

* Fixed permission migration and the organizationID check

* New user management multiple levels (#174)

* Add flow for hiding new welcome screen (#172)

* Merge permission entities into one. Support multiple levels per permission

* Fix some test errors

* Feature/iot 1320 fix sig fox connection (#165)

* Fixes issues with communication with the SigFox API

* Better description for SigFox controller endpoint

Co-authored-by: nlg <nlg@iterator-it.dk>

* Feature/iot 1249 manage kombit users merged (#168)

* Made it possible to get all organizations without other permissions that you have to be logged in. Nessesary since a new user should choose which organizations the user wishes to be a part of.

* Ready for put setEmail

* set email for user

* When logging in to kombit user, the entered email and organizations is now saved in db.

* changed to ManyToMany between user and organizations. Made a migration

* Possible to update the organizations that the user applies.

* Changed names so it's more clear that the organizations on the user is requested organizations. Changed the migration.

* Made mail work with mail test server. It's possible to send a mail. Only org admins should get the mail, and if no org admins then global admin. Need to take care of exception in user.service

* Changed user name to awaiting users. Made api call to get awaiting users.

* Made backend for kombit. Sends mail at verification and rejection. Has to be changed to environment variables. Check all TODOS before merging

* changed migration to match with stage

* Getting ready for OAuth2 mail system. We need to generate refreshtoken ourselves. Made TODO::: for places that needs to do.

* Service is now looking at environment variables. Currently set to Ethereal Email server for test.

* Changed default email values to mailgun

* Made a new controller for new kombit users so endpoints is allowed without permissions. Made map functions

* Now possible to get permissions onto an organization

* updated to correct and latest migration

* Renamed migration

* Added frontend.baseurl environment property

Changed UserRejectDTO to also have id of the user to reject
Minor code quality changes

Co-authored-by: August Andersen <aha@iterator-it.dk>
Co-authored-by: nlg <nlg@iterator-it.dk>

* Bumped momemnt version one minor version

* Fixed package.lock

* Fixed casing of Kombit migration

* Finish permission levels migration

* Deny duplicate permission types

* Constrain permission type to enum

* Removed unused permission types

* Fix kombit permissions

* Show overview of gateway status (#170)

* Init kafka  for online status service

* Subscribe to gateway connection state

Migration, data storage and error handling are missing.

* Init get gateway status

* Refactor gateway status

* Implement gateway status fetch. Missing save in db

* Store gateway status messages. Cleanup

* Organization id is optional

* Re-timestamped migration to to make it fit in the migration timeline

* Minor renaming

* Bump migration timestamp

* Fetch status for single gateway (#171)

Co-authored-by: nlg <nlg@iterator-it.dk>

* Update accept kombit to use group instead of level

* Remove permission check from gateway status

* Cleanup permission relations on down

* Fix multiple permission relations not mapped to the same new permissions

* Fix global admin not created on startup

Co-authored-by: Nikolaj Gustafsson <nikolaj@iterator-it.dk>
Co-authored-by: nlg <nlg@iterator-it.dk>
Co-authored-by: augusthjerrild <70511721+augusthjerrild@users.noreply.github.com>
Co-authored-by: August Andersen <aha@iterator-it.dk>

Co-authored-by: nlg <nlg@iterator-it.dk>
Co-authored-by: Nikolaj Gustafsson <nikolaj@iterator-it.dk>
Co-authored-by: augusthjerrild <70511721+augusthjerrild@users.noreply.github.com>
Co-authored-by: August Andersen <aha@iterator-it.dk>
@AramAlsabti AramAlsabti deleted the feature/1299_gateway-online-status-without-1242 branch June 23, 2022 11:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants