867 Commits

Author SHA1 Message Date
imbeacon
4b8db9f37d Refactored repository method for getting assigned alarms, added limitations, logs and adopted tests for event based model alarms unassigning on user removing 2023-08-16 09:09:40 +03:00
Andrii Landiak
308674ddc7
Create entity on edge and send to cloud 2023-08-16 08:08:56 +03:00
imbeacon
19c5e50884 Updated due to comments 2023-08-15 18:24:38 +03:00
Andrew Shvayka
18a617472a
Merge pull request #8793 from thingsboard/feature/account-notification-settings
User-level notification settings
2023-08-15 17:45:49 +03:00
YevhenBondarenko
1c17b00513 added alarm_types table 2023-08-15 16:00:14 +02:00
ViacheslavKlimov
ce06ea10ca Use user settings api instead of additionalInfo 2023-08-14 17:43:39 +03:00
imbeacon
e7543d78d4 Changed method for user removing, added user as an entity to deleted entity event 2023-08-11 07:56:08 +03:00
imbeacon
328d53dffc Changed alarms unassign method to returen ids instead of Alarm objects and changed to use entity from deleted entity event 2023-08-11 07:52:03 +03:00
Andrii Landiak
9e1ab9abae
Feature/tenant profile edge sync 2023-08-10 10:38:38 +03:00
imbeacon
97d8171f07 Refactored to use events 2023-08-09 14:49:53 +03:00
imbeacon
d4fcd4f814 Merge branch 'develop/3.5.2' of https://github.com/thingsboard/thingsboard into customer-removing-alarm-unassign 2023-08-09 14:26:47 +03:00
Andrii Landiak
8faa1410b6
Edge crud notification: implement event publisher strategy to process pubsub model for detecting changes in entities
* Improve edge notification for entities' CRUD operations. Use service layer to notify instead of TbService

* Improve queue service, delete unused class for edge event updates

* Improve alarm delete and add handle fox delete dao event notification

* Refactoring: provide notification for relations and alarms. Improve logic and bad edge event type using

* Add entity type to SaveEvent to process correct message type to edge

* Improve relation service publish event

* Introduce EdgeEventSourcing service instead of saving edge events on controller/service layers. Part #2

* Improved stability of device edge test

* Push credential updated event only in case update

* Add tenantId to saveUser signature to send correct notification for listener

* Fix tests to send correct notification msg to edge

* Fix tests with correct action type

* Add delete msg to edge for customer

* Refactor ActionEntityEvent to use lombok builder

* Remove unnecessary comments

* Added edgeSynchronizationManager into BaseAlarmProcessor and BaseRelationProcessor

* Fixed license header

* Remove notification to edge from Version Control Service

* Fixed alarm del processing - find related edges inside edge processor

* Fix controller test for publish event to listener if entity was deleted

* Added check for edge imitator messages during login as tenant admin

* Refactoring: Added filtering of relation on EdgeEventSourcingListener

* Refactored to be in sync with PE

* Refactored edge test to be in sync with PE edge test changes

* EdgeControllerTest - moved await block into separate method to reuse it

* Fixed EdgeControllerTest

* Fixed testAssignEdgeToCustomerFromDifferentTenant test

* testSyncEdge - make stable

* Refacroting - update utils method name to pop* in EdgeControllerTest

* testSyncEdge - fixed order and nubmer of edge events

* testGetEdgeEvents - check by pop items, and not by index to improve stability on slow machines

* testGetEdgeEvents - added check that list is empty

* Removed test debug output

* EntityServiceTest - Fixed compilation error after merge

* Improve service layer event publisher to process each notification and validate in listener

* Improve BaseAlarmService to send notification to listener

* Fix asset-device notification action to send delete to all edges

* Delete unnecessary usage of sendMsgToEdge

* Improve processEntityNotification to be in sync with changed needed for PE

* Pull request review - minor refactoring

* Fix tests after review-refactoring

* Refactor tests to be in sync with PE

* Fixed repeated update - added check for old_edge_event table existance before migration

* DeviceEdgeProcessor - do edgeSynchronizationManager as soon as possible to avoid unnecessary downlinks

* BaseEdgeProcessor - refactoring and remove duplicate methods. Introduce EdgeEventType.isAllEdgesRelated

* Organize imports

* Improve Edge test: add sync completed message to await

* Minor refactoring for EdgeProcessor notification: asset and device

* EdgeEventSourcingListener - updated logging to avoid null pointer exception

* BaseAlarmService - added check for alarm to avoid NPE. EdgeEventSourcingListener - added try/catch blocks

* EdgeEventSourcingListener - fixed error message log level

---------

Co-authored-by: Volodymyr Babak <volodymyr.babak@gmail.com>
2023-08-07 13:21:02 +03:00
imbeacon
8e20c6e519 Added gateway launch command 2023-08-04 15:17:05 +03:00
imbeacon
fc7e1d88e6 Optimized imports 2023-08-03 15:15:36 +03:00
imbeacon
ed5b528964 Updated unassign for alarms, on user removing to be transactional 2023-08-03 10:40:50 +03:00
Vladyslav_Prykhodko
5c0fb5e9b4 Merge remote-tracking branch 'upstream/develop/3.5.2' into feature/account-notification-settings 2023-08-01 10:45:16 +03:00
Vladyslav_Prykhodko
b8954da47b Merge branch from develop/3.5.2 2023-07-31 15:50:43 +03:00
Vladyslav_Prykhodko
2d2117e9ac Merge remote-tracking branch 'upstream/develop/3.5.2' into feature/check-connectivity-device 2023-07-28 10:11:54 +03:00
imbeacon
f9a621bcfb Merge remote-tracking branch 'upstream/develop/3.5.2' into fix/removing-relations 2023-07-26 11:18:38 +03:00
YevhenBondarenko
3c6c565732 added docker coap commands and refactoring 2023-07-26 10:06:38 +02:00
Vladyslav_Prykhodko
1dff25518f Merge remote-tracking branch 'upstream/develop/3.5.2' into feature/check-connectivity-device 2023-07-25 10:17:32 +03:00
Vladyslav_Prykhodko
03b49f1ddd Clear code 2023-07-21 18:56:06 +03:00
dashevchenko
fc499c74e3 deleted redundant imports 2023-07-20 17:22:33 +03:00
dashevchenko
db46b7988d refactored code to take into account operating system 2023-07-20 12:33:15 +03:00
ViacheslavKlimov
ddfdcef858 Improvements for user notification settings structure 2023-07-12 12:50:29 +03:00
dashevchenko
9ddc5e5b8d added resource delete validation 2023-07-07 17:42:44 +03:00
dashevchenko
1a2214f7b2 merged with develop/3.5.2 2023-07-07 15:07:09 +03:00
dashevchenko
14216a4882 fixed security transport cases 2023-07-06 15:03:32 +03:00
dashevchenko
fee8aa359a refactoring 2023-07-04 18:18:23 +03:00
YevhenBondarenko
015429d750 merge with develop/3.5.2 2023-07-04 16:56:20 +02:00
YevhenBondarenko
df2ef64e67 added alarm types cache 2023-07-04 16:40:42 +02:00
YevhenBondarenko
1a12d3c395 merge with develop/3.6 2023-06-29 23:40:43 +02:00
Andrii Shvaika
d17c7dbc28 Merge remote-tracking branch 'origin/develop/3.5.2' into develop/3.6 2023-06-29 18:26:23 +03:00
Andrii Shvaika
ecae72e994 Merge with develop/3.5.2 2023-06-29 17:00:23 +03:00
Volodymyr Babak
4a0ff8b968
Edge event seq (#82)
* edge event - added seq id auto generated column to fix issue with concurrent write of multiple edge events with the same created time

* kotlin Pair replaced by springframework class

* Handle cases when seq_id column started new cycle

* Added check for null in case entity was deleted

* GeneralEdgeEventFetched - sort order by seqId and not created time

* Edge event table - added migration script to add seq_id column

* Code review updates to be in sync with PE

* Improved handling cases when edge_event.seqId started new cycle

* Edge event table - seq_id column make to be cycled

* Improved handling of cases when seq_id column of edge_event table started new cycle

* Improved stability by properly handling exceptions
2023-06-27 15:42:23 +03:00
YevhenBondarenko
2d22e8e8a8 implemented alarm types api 2023-06-26 23:54:21 +02:00
ViacheslavKlimov
d49a6c3e92 Notification settings for rules 2023-06-23 16:11:21 +03:00
dashevchenko
66623a2be2 refactoring 2023-06-21 18:37:27 +03:00
dashevchenko
11cb696d5c added conroller method to retrieve list of commands to publish telemetry 2023-06-21 16:04:23 +03:00
ViacheslavKlimov
014497cd89 User-level notification settings 2023-06-20 12:04:48 +03:00
ViacheslavKlimov
f98eee5407 Merge branch 'develop/3.5.2' into feature/exceeded-rate-limits-notifications
# Conflicts:
#	application/src/main/java/org/thingsboard/server/install/ThingsboardInstallService.java
#	application/src/main/resources/thingsboard.yml
#	application/src/test/java/org/thingsboard/server/service/notification/NotificationRuleApiTest.java
#	dao/src/main/java/org/thingsboard/server/dao/notification/DefaultNotifications.java
#	ui-ngx/src/app/modules/common/modules-map.ts
2023-06-13 13:49:51 +03:00
Andrew Shvayka
7d31d25aa0
Merge pull request #8729 from thingsboard/fixes/notification-system
Notifications deduplication improvements
2023-06-13 12:25:07 +03:00
Andrii Shvaika
997b915905 Merge with develop/3.5.2 2023-06-13 11:30:29 +03:00
ViacheslavKlimov
39d7498c59 Merge branch 'develop/3.5.2' into fixes/notification-system 2023-06-12 21:37:21 +03:00
ViacheslavKlimov
b77078c24e Notifications deduplication improvements 2023-06-08 18:15:56 +03:00
dashevchenko
31cf975495 Merge remote-tracking branch 'upstream/develop/3.5.2' into resourcesByType 2023-06-06 12:42:47 +03:00
YevhenBondarenko
7f9a9c7fb3 merge with develop/3.6 2023-06-05 15:58:16 +02:00
YevhenBondarenko
db6f310284 migration to spring boot 3.1 2023-06-05 15:24:47 +02:00
ViacheslavKlimov
2f560315d1 Exceeded rate limits notifications; their deduplication; refactoring 2023-06-02 15:09:09 +03:00
Andrii Shvaika
da90c21b6c Merge with develop/3.5.2. Version set to 3.6.0-SNAPSHOT 2023-05-29 13:45:17 +03:00