Commit Graph

2578 Commits

Author SHA1 Message Date
Bondar Bogdan
537548defb Update jsoup (#1276)
* upgraded jsoup to 1.15.3
* removed deprecated safe html annotation
* added own valid string jsoup validator, disabled hibernate parallel method declaration constraint
* adapted valid string validator
* static method
* return invalid value in case of processing exception

Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>
2022-09-05 15:49:38 +02:00
Dimitar Shterev
bc2f228edc Dmf batch support changes. (#1273)
* Dmf batch support changes. Implement single batch message instead of multiple messages for assigment on multiple targets. Added system property to switch on/off.

Signed-off-by: Dimitar Shterev <dimitar.shterev@bosch.io>

* Dmf batch support changes. Implement single batch message instead of multiple messages for assigment on multiple targets. Added system property to switch on/off.

Signed-off-by: Dimitar Shterev <dimitar.shterev@bosch.io>

* Dmf batch support changes. Implement single batch message instead of multiple messages for assigment on multiple targets. Added system property to switch on/off.

Signed-off-by: Dimitar Shterev <dimitar.shterev@bosch.io>

* Dmf batch support changes. Implement single batch message instead of multiple messages for assigment on multiple targets. Added system property to switch on/off.

Signed-off-by: Dimitar Shterev <dimitar.shterev@bosch.io>

* Update hawkbit-dmf/hawkbit-dmf-amqp/src/test/java/org/eclipse/hawkbit/integration/AmqpMessageDispatcherServiceIntegrationTest.java

Co-authored-by: Bondar Bogdan <36962546+bogdan-bondar@users.noreply.github.com>

* Dmf batch support changes. Implement single batch message instead of multiple messages for assigment on multiple targets. Added system property to switch on/off.

Signed-off-by: Dimitar Shterev <dimitar.shterev@bosch.io>

* Dmf batch support changes. Implement single batch message instead of multiple messages for assigment on multiple targets. Added system property to switch on/off.

Signed-off-by: Dimitar Shterev <dimitar.shterev@bosch.io>

* Dmf batch support changes. Implement code review comments.

Signed-off-by: Dimitar Shterev <dimitar.shterev@bosch.io>

Signed-off-by: Dimitar Shterev <dimitar.shterev@bosch.io>
Co-authored-by: Bondar Bogdan <36962546+bogdan-bondar@users.noreply.github.com>
2022-08-30 09:55:52 +02:00
Bondar Bogdan
ccb5fa3b3f changed cors configuration bean definition to be reusable under different routes (#1272)
Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>

Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>
2022-08-19 09:12:22 +02:00
Stefan Klotz
a8ab467ac5 add SystemSecurityContext (#1269)
Signed-off-by: Stefan Klotz <stefan.klotz@bosch.io>
2022-08-08 13:59:02 +02:00
Michael Herdt
1682b526ef Make custom target filter table expandable (#1267)
* initial draft to maximize custom target filer table for better UX in case of long keys/names
* Set correct maximize icon identifier and fix problem with wrong db table structure.
* Remove unnecessary local variable.
* Fix db migration scripts
* Fix losing the target tag table when mac and minimizing target table.
* fixed minor styling, removed duplication

Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>
Signed-off-by: Michael Herdt <Michael.Herdt@bosch.io>
2022-08-05 11:52:52 +02:00
Michael Herdt
5c95c4ce28 Provide API for auto assignment check for specific device (#1262)
* Extend the auto assign executor to execute a auto assignment check for a specific device.

Signed-off-by: Michael Herdt <Michael.Herdt@bosch.io>

* add tests and handle exceptions

Signed-off-by: Stefan Klotz <stefan.klotz@bosch.io>

* add unit test

Signed-off-by: Stefan Klotz <stefan.klotz@bosch.io>

* add Copyright header

Signed-off-by: Stefan Klotz <stefan.klotz@bosch.io>

* fix Copyright header

Signed-off-by: Stefan Klotz <stefan.klotz@bosch.io>

* add authorization

Signed-off-by: Stefan Klotz <stefan.klotz@bosch.io>

* fix exception handling and authorization

Signed-off-by: Stefan Klotz <stefan.klotz@bosch.io>

* renaming

Signed-off-by: Stefan Klotz <stefan.klotz@bosch.io>

* Rename auto assignment functions

Signed-off-by: Michael Herdt <Michael.Herdt@bosch.io>

Co-authored-by: Stefan Klotz <stefan.klotz@bosch.io>
2022-07-12 15:47:38 +02:00
Bondar Bogdan
1ec5eb6ede Calculate target count asynchronously (#1263)
* first prototype

Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>

* moved asynchrinous count caclucation to abstract footer support

Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>

* added asynchronous count details calculation

Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>

* fixed typo

Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>
2022-07-07 09:46:46 +02:00
Michael Herdt
f0a7c2d07d Improve target management (#1260)
* Fix join type for targets with their assignedDs

Signed-off-by: Michael Herdt <Michael.Herdt@bosch.io>

* Override saveAll method and make use of it in the JpaTargetManagement

Signed-off-by: Michael Herdt <Michael.Herdt@bosch.io>

* Use unmodifiable list and flip transactional logic

Signed-off-by: Michael Herdt <Michael.Herdt@bosch.io>

* Initialize new list instead of an unmodifiable list.

Signed-off-by: Michael Herdt <Michael.Herdt@bosch.io>

* Fix testdata factory

Signed-off-by: Michael Herdt <Michael.Herdt@bosch.io>
2022-07-01 13:47:00 +02:00
Michael Herdt
d3ef290ec7 Avoid using RegexRequestMatcher due to [CVE-2022-22978] (#1258)
* Use ant instead of regex matcher.

Signed-off-by: Michael Herdt <Michael.Herdt@bosch.io>

* fix ant matcher

Signed-off-by: Michael Herdt <Michael.Herdt@bosch.io>

* Do some cleanup and revert unnecessary changes.

Signed-off-by: Michael Herdt <Michael.Herdt@bosch.io>
2022-06-10 18:28:59 +02:00
Bondar Bogdan
f15cc690f0 improved debug logs for autoassignment (#1253)
Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>
2022-05-16 08:53:43 +02:00
Michael Herdt
59932b1d6f Extend event for entity events (#1250)
* Extend event information by it's first interface class and improve constructing the event by providing the directly only.

Signed-off-by: Michael Herdt <Michael.Herdt@bosch.io>

* Check if entity interface is assignable from TenantAwareBaseEntity.

Signed-off-by: Michael Herdt <Michael.Herdt@bosch.io>
2022-04-25 15:39:44 +02:00
Bondar Bogdan
0e6ef2e468 upgrade spring framework to 5.2.20 (#1243)
Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>
2022-04-01 12:45:58 +02:00
Bondar Bogdan
527f7de6a8 Fix overdue timestamp calculation permission (#1235)
* fixed overdue timestamp calculation permission error

Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>

* changed method visibility

Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>
2022-03-25 16:00:18 +01:00
Bondar Bogdan
c9eafbbc26 Optimize UI queries (#1234)
* first iteration of query optimization for target and distribution set
* fixed type distribution set filter
* adapted all ui dataproviders to use repository count
* adapted test to not check target attributes within search query
* unified search behaviuor for ds and sm
* removed unneccessary count queries for some mgmt calls
* removed unneccessary type id proprty from ProxyDistributionSetInfo to minimize lazy fetches
* refactored mgmt classes
* removed duplication of name version filter
* fixed copy rollout compatibility check
* cleaned-up management left overs
* added index to rollouts table on tenant/status queries

Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>
2022-03-23 09:08:56 +01:00
Natalia Kislicyn
681df6c1f1 Fix installedBase link in DDI base resource (#1232)
* add test for installedBase bug

Signed-off-by: Natalia Kislicyn <natalia.kislicyn@bosch.io>

* fix for test scenario I

Signed-off-by: Natalia Kislicyn <natalia.kislicyn@bosch.io>

* add another test scenario for installedbase bug

Signed-off-by: Natalia Kislicyn <natalia.kislicyn@bosch.io>

* add fix for scenario 2a+b

Signed-off-by: Natalia Kislicyn <natalia.kislicyn@bosch.io>
2022-02-22 15:09:51 +01:00
Bondar Bogdan
cc60725c08 UI deep-linking for targets (#1230)
* added target deeplinking through url param
* populate search irregardless of target existence
* adapted view state paramater evaluation flow
* fixed review comments

Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>
2022-02-22 09:24:30 +01:00
Ahmed Sayed
949cd8cd8b Feature/speedup quota tests (#1125)
* reduce the number of created entities in tests

Signed-off-by: Ahmed Sayed <ahmed.sayed@bosch.io>

* fixed tests

Signed-off-by: Ahmed Sayed <ahmed.sayed@bosch.io>

* fixed review findings

Signed-off-by: Ahmed Sayed <ahmed.sayed@bosch.io>

* merged master

Signed-off-by: Ahmed Sayed <ahmed.sayed@bosch.io>

* adapted target count

Signed-off-by: Ahmed Sayed <ahmed.sayed@bosch.io>

* fixed review findings

Signed-off-by: Ahmed Sayed <ahmed.sayed@bosch.io>

* fixed RolloutManagementTest

Signed-off-by: Ahmed Sayed <ahmed.sayed@bosch.io>

* fixed flaky test ConcurrentDistributionSetInvalidationTest

Signed-off-by: Ahmed Sayed <ahmed.sayed@bosch.io>
2022-02-21 12:58:05 +01:00
Peter Vigier
44a85f20eb Feature/fix sonar warnings (#1226)
* Fixed sonar warnings

- "Cognitive Complexity"
- "Do not use replaceAll when not using a regex"
- java:S5869 - Character classes in regular expressions should not contain the same character twice
- Improved bad name
- Typos
- reduced code duplications
- Replaced hand-made wait-utility with Awaitility
- Log messages
- Duplicate code
- Typos
- Removed Thread.sleep, instead relaxed check condition
- Removed use of deprecated API
- Removed use of deprecated API
- Added supress-warnings as I do not see a better way to write the tests
- Removed Thread.sleep / redundant functionality to Awaitility
- Fixed other warnings (use isZero, isEmpty, hasToString)
- Removed/Reduced duplicate code
- Added generics
- Fixed asserts
- removed: field.setAccessible(true) actually should not be needed for public static fields!
- Too long constructor passes arguments in wrong order - how surprisingly...
- Clean-up use of varargs arguments
- Fixed regex
- Fixed typos and other minor stuff
- Making public constructors protected in abstract classes
- Swapped expected and asserted argument
- volatile not enough for syncing threads
- volatile not enough for syncing threads
- out-commented code
- Made regex not-greedy, added tests for verification
- Avoid exposure of thread-local member var

Signed-off-by: Peter Vigier <Peter.Vigier@bosch.io>

* Fixed Sonar warnings

* License header fix

Signed-off-by: Peter Vigier <Peter.Vigier@bosch.io>

* License header fix #2

Signed-off-by: Peter Vigier <Peter.Vigier@bosch.io>

* Fixing review findings

Signed-off-by: Peter Vigier <Peter.Vigier@bosch.io>

* Fixing tests

- Fixed '&' usage in javadoc and typos
- Fixing some warnings

Signed-off-by: Peter Vigier <Peter.Vigier@bosch.io>
2022-01-31 21:59:46 +01:00
Bondar Bogdan
5443b5df9c Updated migration guide to include deprecated property (#1225)
* updated m7 migration to include spring boot deprecated property

Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>

* fixed hawkbit sandbox link

Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>
2022-01-31 11:40:39 +01:00
Robert Sing
cc3d36e442 set the JpaControllerManagement constructor public (#1227)
Signed-off-by: Robert Sing <robert.sing@bosch-si.com>
2022-01-31 11:36:13 +01:00
Natalia Kislicyn
69e6488004 DDI API: /controller/v1/{controllerid}/installedBase/{actionId} (#1220)
* installedBase DDI: initial impl + rest docs

Signed-off-by: Natalia Kislicyn <natalia.kislicyn@bosch.io>

* refactor installedBase implementation

Signed-off-by: Natalia Kislicyn <natalia.kislicyn@bosch.io>

* ddi installed base tests

Signed-off-by: Natalia Kislicyn <natalia.kislicyn@bosch.io>

* restructure root controller rest docs

Signed-off-by: Natalia Kislicyn <natalia.kislicyn@bosch.io>

* fix some java docs and formatting

Signed-off-by: Natalia Kislicyn <natalia.kislicyn@bosch.io>

* don't add action history message when calling /installedBase

Signed-off-by: Natalia Kislicyn <natalia.kislicyn@bosch.io>

* fix test after removing action history message

Signed-off-by: Natalia Kislicyn <natalia.kislicyn@bosch.io>

* fix review comments

Signed-off-by: Natalia Kislicyn <natalia.kislicyn@bosch.io>

* fix review comments

Signed-off-by: Natalia Kislicyn <natalia.kislicyn@bosch.io>
2022-01-24 18:13:03 +01:00
Natalia Kislicyn
7a1905cf5b add license header for Bosch.IO 2022 (#1221)
Signed-off-by: Natalia Kislicyn <natalia.kislicyn@bosch.io>
2022-01-18 11:46:22 +01:00
Natalia Kislicyn
94d9e373b8 fix distribution set tag api doc (#1219)
Signed-off-by: Natalia Kislicyn <natalia.kislicyn@bosch.io>
2022-01-13 10:21:39 +01:00
Stefan Klotz
476d1c37ed Make entity object of event optional (#1209)
* explicitly return an optional entity by an event

Signed-off-by: Stefan Klotz <stefan.klotz@bosch.io>

* fix assertions in tests

Signed-off-by: Stefan Klotz <stefan.klotz@bosch.io>
2021-12-08 11:28:01 +01:00
Bondar Bogdan
7cc89d6291 added same origin x-frame-options header security config (#1207)
Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>
2021-12-06 10:08:45 +01:00
Bondar Bogdan
146735012a Artifact Encryption plug point (#1202)
* added ArtifactEncryption interface, injected it into SM creation UI module, added encryption metadata key generation upon SM creation, used encryptor during file upload

Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>

* add default artifact encryption implementation based on gcm aes algorithm

Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>

* changed ArtifactEncryptor interface to manage encryption secrets by itself

Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>

* cleaned up stale code, fixed sonar

Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>

* fixed software module encryption within transaction

Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>

* added artifact encryption secrets store

Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>

* extended ArtifactEncryption interface to allow decryption, secrets store provides removeSecret, added missing javadocs

Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>

* intriduced DbArtifact interface, use EncryptionAwareDbArtifact for artifact decryption during download

Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>

* introduced ArtifactEncryptionService to minimize duplications and unneccessary dependency injections

Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>

* declared ArtifactEncryptionService as a bean

Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>

* added persistant encryption flag to software module

Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>

* further adptations for encryption flag persistence

Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>

* added ArtifactEncryptionException, fixed encryption check in UI

Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>

* added encryption error handling

Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>

* added encrypted flag to DDI/DMF, adapted exception handling

Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>

* adapted rest docs

Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>

* Add test to verify artifact encryption is not given by default

Signed-off-by: Florian Ruschbaschan <Florian.Ruschbaschan@bosch.io>

* Add isEncrypted() to toString() of JpaSoftwareModule, fix typos

Signed-off-by: Florian Ruschbaschan <Florian.Ruschbaschan@bosch.io>

* Fix sql migration scripts

Signed-off-by: Florian Ruschbaschan <Florian.Ruschbaschan@bosch.io>

* Calculate encrypted artifact size by subtract encryption size overhead

Signed-off-by: Florian Ruschbaschan <Florian.Ruschbaschan@bosch.io>

* publish upload failed without waiting for interuption during UI file upload

Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>

* upgraded cron utils to 9.1.6

Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>

Co-authored-by: Florian Ruschbaschan <Florian.Ruschbaschan@bosch.io>
2021-11-18 09:07:05 +01:00
Florian Ruschbaschan
7e28fba104 Use an empty AMQP Message body instead of a null value (#1200) 2021-11-03 13:15:47 +01:00
Natalia Kislicyn
3d35ff5aef mention target type in docu (#1199)
Signed-off-by: Natalia Kislicyn <natalia.kislicyn@bosch.io>
2021-11-03 13:13:37 +01:00
Robert Sing
f6c39a3589 fixed compatibility check bug (#1198)
* fixed compatibility check bug & improved testing

Signed-off-by: Robert Sing <robert.sing@bosch-si.com>

* fixed review finding

Signed-off-by: Robert Sing <robert.sing@bosch-si.com>

* reduced amount of targets in test

Signed-off-by: Robert Sing <robert.sing@bosch-si.com>
2021-10-29 14:15:16 +02:00
Michael Gilroy
ae4fb5fe00 Remove mysql_user and update documentation (#1139)
* Remove mysql_user and update documentation

* MG, udpate based on maintainers feedback

* Remove extra comments for password, already in doc
2021-10-28 17:24:42 +02:00
Anand Kumar
70779d1ac7 Feature target type filter (#1197)
* Added Target type filter with drag and drop support

Signed-off-by: Anand kumar <anand.kumar@bosch-si.com>

* Removed the unused enums and target type filter button class

Signed-off-by: Anand kumar <anand.kumar@bosch-si.com>

* Resolved merge conflicts

Signed-off-by: Anand kumar <anand.kumar@bosch-si.com>

* Fixed java doc issue with the method link in the comment

Signed-off-by: Anand kumar <anand.kumar@bosch-si.com>

* Fixed the IN query overflow for target Type assignment

Signed-off-by: Anand kumar <anand.kumar@bosch-si.com>

* Fixed Review comments

Signed-off-by: Anand kumar <anand.kumar@bosch-si.com>
2021-10-27 15:24:09 +02:00
Robert Sing
dea6fa3ce6 Adapt UI for target type compatibility check (#1189)
* Added compatibility calls needed for UI

Signed-off-by: Robert Sing <robert.sing@bosch-si.com>

* Adapted UI for target type compatibility checks

Signed-off-by: Robert Sing <robert.sing@bosch-si.com>

* improved exception handling for incompatibility check

Signed-off-by: Robert Sing <robert.sing@bosch-si.com>

* added & fixed unit tests

Signed-off-by: Robert Sing <robert.sing@bosch-si.com>

* fixed merged conflicts

Signed-off-by: Robert Sing <robert.sing@bosch-si.com>

* fixed target type incompatibly specification

Signed-off-by: Robert Sing <robert.sing@bosch-si.com>

* changed UI behaviour to close assignment popup in case of IncompatibleTargetTypeException

Signed-off-by: Robert Sing <robert.sing@bosch-si.com>

* added unit test to validate incompatibly specification fix

Signed-off-by: Robert Sing <robert.sing@bosch-si.com>

* fixed review findings

Signed-off-by: Robert Sing <robert.sing@bosch-si.com>

* fixed review findings

Signed-off-by: Robert Sing <robert.sing@bosch-si.com>

* fix potential null pointer

Signed-off-by: Robert Sing <robert.sing@bosch-si.com>

* Fixed rolloutcopy by adding dsTypeId to ProxyDistributionSetInfo

Signed-off-by: Robert Sing <robert.sing@bosch-si.com>

* suppressed warning

Signed-off-by: Robert Sing <robert.sing@bosch-si.com>
2021-10-22 16:23:25 +02:00
Bondar Bogdan
f94b4430e0 added Insufficient Permissions UI error extractor (#1196)
Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>
2021-10-21 15:47:31 +02:00
Alexander Dobler
3621015f93 Specification and BaseRepositotyProvider improvements (#1182)
* Introduce custom base repository factory bean

Signed-off-by: Alexander Dobler <alexander.dobler3@bosch.io>

* Simplify ordered DS service call by using specs

Signed-off-by: Alexander Dobler <alexander.dobler3@bosch.io>

* Annotate getBaseRepoType interface as FunctionalInterface

Signed-off-by: Alexander Dobler <alexander.dobler3@bosch.io>

* Use CustomBaseRepositoryFactory instead of static BaseClass

Signed-off-by: Alexander Dobler <alexander.dobler3@bosch.io>

* Fix license headers

Signed-off-by: Alexander Dobler <alexander.dobler3@bosch.io>

* Add ordered specification back

Signed-off-by: Alexander Dobler <alexander.dobler3@bosch.io>
2021-10-21 15:46:13 +02:00
Virginijus Kandrotas
d80d0d6349 Implement target type CRUD UI operations (#1184)
* implement target type CRUD UI operations

Signed-off-by: Virginijus Kandrotas <Virginijus.Kandrotas@bosch.io>

* fix licenses

Signed-off-by: Virginijus Kandrotas <Virginijus.Kandrotas@bosch.io>

* code clean up

Signed-off-by: Virginijus Kandrotas <Virginijus.Kandrotas@bosch.io>

* code clean up

Signed-off-by: Virginijus Kandrotas <Virginijus.Kandrotas@bosch.io>

* refactor proxy target type

Signed-off-by: Virginijus Kandrotas <Virginijus.Kandrotas@bosch.io>

* refactor proxy target type

Signed-off-by: Virginijus Kandrotas <Virginijus.Kandrotas@bosch.io>

* fix review comments

Signed-off-by: Virginijus Kandrotas <Virginijus.Kandrotas@bosch.io>

* fix review comments

Signed-off-by: Virginijus Kandrotas <Virginijus.Kandrotas@bosch.io>

* fix review comments

Signed-off-by: Virginijus Kandrotas <Virginijus.Kandrotas@bosch.io>

* update class description

Signed-off-by: Virginijus Kandrotas <Virginijus.Kandrotas@bosch.io>

* fix review comments

Signed-off-by: Virginijus Kandrotas <Virginijus.Kandrotas@bosch.io>

* fix review comments

Signed-off-by: Virginijus Kandrotas <Virginijus.Kandrotas@bosch.io>

* fix review comments

Signed-off-by: Virginijus Kandrotas <Virginijus.Kandrotas@bosch.io>

* fix sonar issue

Signed-off-by: Virginijus Kandrotas <Virginijus.Kandrotas@bosch.io>

* fix sonar issue

Signed-off-by: Virginijus Kandrotas <Virginijus.Kandrotas@bosch.io>

* fix sonar issue

Signed-off-by: Virginijus Kandrotas <Virginijus.Kandrotas@bosch.io>

* fix showing assigned ds types

Signed-off-by: Virginijus Kandrotas <Virginijus.Kandrotas@bosch.io>

* remove unused import

Signed-off-by: Virginijus Kandrotas <Virginijus.Kandrotas@bosch.io>
2021-10-21 15:18:39 +02:00
Natalia Kislicyn
d5661d2fe2 Support keywords in queries (#1193)
* support targettype as keyword in target-queries

Signed-off-by: Natalia Kislicyn <natalia.kislicyn@bosch.io>

* support valid as keyword in distributionset-queries

Signed-off-by: Natalia Kislicyn <natalia.kislicyn@bosch.io>

* remove targettype.id from filter queries

Signed-off-by: Natalia Kislicyn <natalia.kislicyn@bosch.io>

* remove targettype.description from filter queries

Signed-off-by: Natalia Kislicyn <natalia.kislicyn@bosch.io>
2021-10-20 13:13:24 +02:00
Markus Block
be3dfbf617 Ensure a '.' character is allowed to be used in target filter query for metadata key and attribute name (#1186)
* Adapted code to allow '.' inside of metadata key and attribute names


Signed-off-by: Markus Block <markus.block@bosch-si.com>

* added handling of corner cases

Signed-off-by: Markus Block <markus.block@bosch-si.com>

* Adapted metadata and attribute tests to check that dot is allowed

Signed-off-by: Markus Block <markus.block@bosch-si.com>

* fixed documentation

Signed-off-by: Markus Block <markus.block@bosch-si.com>

* Allow usage of dot in key names for every map attribute, e.g. also for
metadata in distribution set

Signed-off-by: Markus Block <markus.block@bosch-si.com>

* fixed typo

Signed-off-by: Markus Block <markus.block@bosch-si.com>

* adapted test key to ensure a dot can be used

Signed-off-by: Markus Block <markus.block@bosch-si.com>

* fixed typo

Signed-off-by: Markus Block <markus.block@bosch-si.com>
2021-10-18 10:51:04 +02:00
Natalia Kislicyn
998518d8e0 fix api doc tests in regard to type compatibility (#1191)
Signed-off-by: Natalia Kislicyn <natalia.kislicyn@bosch.io>
2021-10-18 10:49:33 +02:00
Natalia Kislicyn
745a0c6a10 Docu for target type endpoints in Target API (#1185)
* add assign/unassign type endpoints to target api docs

Signed-off-by: Natalia Kislicyn <natalia.kislicyn@bosch.io>

* fix target type creation for api rest docs test

Signed-off-by: Natalia Kislicyn <natalia.kislicyn@bosch.io>

* fix review comments: rename tests

Signed-off-by: Natalia Kislicyn <natalia.kislicyn@bosch.io>

* adapt test to avoid failing when translated

Signed-off-by: Natalia Kislicyn <natalia.kislicyn@bosch.io>
2021-10-15 16:22:20 +02:00
Bondar Bogdan
e5dbbbbc7b Vaadin security upgrade to 8.14.1 (#1188)
Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>
2021-10-15 15:48:18 +02:00
Robert Sing
76be812cf1 Feature - TargetType compatibility check (#1180)
* added targettype compatibility check in deployment

Signed-off-by: Robert Sing <robert.sing@bosch-si.com>

* added targettype compatibility for autssignment

Signed-off-by: Robert Sing <robert.sing@bosch-si.com>

* added / fixed tests for auto assignment compatibility check

Signed-off-by: Robert Sing <robert.sing@bosch-si.com>

* adapted rollout creation to use JPA specifications for compatibility checks

Signed-off-by: Robert Sing <robert.sing@bosch-si.com>

* fix unit tests and javadoc

Signed-off-by: Robert Sing <robert.sing@bosch-si.com>

* fix copyright header

Signed-off-by: Robert Sing <robert.sing@bosch-si.com>

* fixed review findings

Signed-off-by: Robert Sing <robert.sing@bosch-si.com>

* fixed review findings

Signed-off-by: Robert Sing <robert.sing@bosch-si.com>

* replaced validated-DS management calls

Signed-off-by: Robert Sing <robert.sing@bosch-si.com>

* improved compatibility check in DeploymentManagementTest

Signed-off-by: Robert Sing <robert.sing@bosch-si.com>

* fixed review findings

Signed-off-by: Robert Sing <robert.sing@bosch-si.com>
2021-10-15 15:39:21 +02:00
Anand Kumar
39ccf65f2e Feature target with target type in UI (#1178)
* Added the target type combo box to add or update Target in UI

Signed-off-by: Anand kumar <anand.kumar@bosch-si.com>

* Fixed NPE for empty target type

Signed-off-by: Anand kumar <anand.kumar@bosch-si.com>

* Added target type option to target bulk upload

Signed-off-by: Anand kumar <anand.kumar@bosch-si.com>

* Added Target type filter

Signed-off-by: Anand kumar <anand.kumar@bosch-si.com>

* Added Named entity mapper for target type UI

Signed-off-by: Anand kumar <anand.kumar@bosch-si.com>

* Fixed review comments

Signed-off-by: Anand kumar <anand.kumar@bosch-si.com>

* Fixed sonar issues for serialization

Signed-off-by: Anand kumar <anand.kumar@bosch-si.com>

* Fixed Review comments

Signed-off-by: Anand kumar <anand.kumar@bosch-si.com>

* Fixed Bulk upload target type combo box

Signed-off-by: Anand kumar <anand.kumar@bosch-si.com>
2021-10-11 15:00:16 +02:00
Natalia Kislicyn
70d0fe879e Feature mass cancel running actions on ds invalidation (#1177)
* Extend DS invalidation dialog to include mass-cancellation of actions

Signed-off-by: Natalia Kislicyn <natalia.kislicyn@bosch.io>

add component id for cancelation type radio buttons

Signed-off-by: Natalia Kislicyn <natalia.kislicyn@bosch.io>

* add infos about ds invalidation to UI documentation;
update UI images; add screenshot about ds invalidation

Signed-off-by: Natalia Kislicyn <natalia.kislicyn@bosch.io>

* fix review findings

Signed-off-by: Natalia Kislicyn <natalia.kislicyn@bosch.io>

* add link property to invalidation docu

Signed-off-by: Natalia Kislicyn <natalia.kislicyn@bosch.io>

* Put invalidation counts into one object

Signed-off-by: Natalia Kislicyn <natalia.kislicyn@bosch.io>

* add hint to invalidation dialog, that invalidation is unrepeatable

Signed-off-by: Natalia Kislicyn <natalia.kislicyn@bosch.io>

* disable invalidate button if insufficient permission

Signed-off-by: Natalia Kislicyn <natalia.kislicyn@bosch.io>

* fix auto assignment error with insufficient permission

Signed-off-by: Natalia Kislicyn <natalia.kislicyn@bosch.io>

* implement permissions check for invalidation dialog

Signed-off-by: Natalia Kislicyn <natalia.kislicyn@bosch.io>

* add update_target permission to api doc description

Signed-off-by: Natalia Kislicyn <natalia.kislicyn@bosch.io>
2021-10-05 14:15:43 +02:00
Enrico Jorns
aaa023732e README.md: Add rauc-hawkbit-updater to the list of clients supporting hawkBit (#1181)
Also add the word 'demo' to the python variant to give a hint to not use
this for real-world applications.

Signed-off-by: Enrico Joerns <ejo@pengutronix.de>
2021-10-05 10:41:58 +02:00
Markus Block
56e4066f12 Feature invalidation of distribution sets [UI part] (#1176)
* Visualization of action/button invalidate DistributionSet

Signed-off-by: Markus Block <markus.block@bosch-si.com>

* introduced two dialogs to confirm ds invalidation

Signed-off-by: Markus Block <markus.block@bosch-si.com>

* fixed dialog titles appear centered and added manamgement classes

Signed-off-by: Markus Block <markus.block@bosch-si.com>

* retrieving affected entities from repository

Signed-off-by: Markus Block <markus.block@bosch-si.com>

* considered multiselection for invalidating dist sets

Signed-off-by: Markus Block <markus.block@bosch-si.com>

* adapt style and tooltip of invalid distributions in grid

Signed-off-by: Markus Block <markus.block@bosch-si.com>

* showing errors for actions not allowed for invalidate DS

Signed-off-by: Markus Block <markus.block@bosch-si.com>

* enhanced error message with dist name and version

Signed-off-by: Markus Block <markus.block@bosch-si.com>

* added ids to the labels to be used in tests

Signed-off-by: Markus Block <markus.block@bosch-si.com>

* added support for overwriting entity specific edit behaviour

Signed-off-by: Markus Block <markus.block@bosch-si.com>

* Fixed incorrect label for cancelled action due to invalidation of ds in
a rollout

Signed-off-by: Markus Block <markus.block@bosch-si.com>

* Fixed error notification to not show "please try again" for an invalid
DS

Signed-off-by: Markus Block <markus.block@bosch-si.com>

* fixed typo

Signed-off-by: Markus Block <markus.block@bosch-si.com>

* fixed Sonar findings

Signed-off-by: Markus Block <markus.block@bosch-si.com>

* remove DS of a copied Rollout in case the DS is invalidated

Signed-off-by: Markus Block <markus.block@bosch-si.com>

* changed icon of RolloutActionStatus in case of stopped Rollout because
of invalidation of DS and DS wasn't yet assigned to target. This is to
distinguish from the case of not assigned DS because of duplicate DS
assignemnt

Signed-off-by: Markus Block <markus.block@bosch-si.com>

* Prevent editing Metadata of invalid DS

Signed-off-by: Markus Block <markus.block@bosch-si.com>

* show DS as invalidated in Rollout view

Signed-off-by: Markus Block <markus.block@bosch-si.com>

* incorporated code review remarks

Signed-off-by: Markus Block <markus.block@bosch-si.com>

* invalidated DS should be removed from the list of DS to be invalidated

Signed-off-by: Markus Block <markus.block@bosch-si.com>

* fixed missing code due to merge

Signed-off-by: Markus Block <markus.block@bosch-si.com>

* Fixed compile error due to rebase

Signed-off-by: Markus Block <markus.block@bosch-si.com>
2021-10-01 16:15:05 +02:00
Sebastian Firsching
825cb64448 Introduce basic functionality for invalidation of distributionsets (#1179)
* Basic DS invalidation functionality

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>

* Add checks for valid/complete DS

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>

* Stop rollouts + auto assignments when invalidating a DS

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>

* Add methods to count AAs + rollouts for invalidation

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>

* Small refactoring for DS management

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>

* Add invalidation functionality to REST API

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>

* Fix update stopped rollouts status

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>

* Add various tests

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>

* Introduce countActionsForInvalidation

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>

* Fix event tests with incomplete DS

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>

* Add H2 migration script

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>

* Fix action count method

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>

* Fix REST documentation tests

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>

* Change flyway version number

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>

* Add lock for DS invalidation + adapt tests

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>

* Move concurrency test to own class

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>

* Handle possible InterruptedException

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>

* Fix concurrency test

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>

* Use one transaction for all invalidations

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>

* Add invalidate endpoint to REST docu

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>

* Execute invalidation in transaction when actions are cancelled

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>

* Check that distribution set is valid when editing/creating metadata

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>

* Remove all changes in UI

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>

* Add DB migration files for all databases

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>

* Implement review findings

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>

* Move DS invalidation to own class to check permissions for single steps

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>

* Move invalidation count methods to management classes

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>

* Fix failing tests

Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>
2021-09-30 15:26:36 +02:00
Diego Rondini
b25e118e6c README: add mention to Hara and hara-ddiclient (#1173)
Add a mention to the Eclipse Hara project and the hara-ddiclient library
that has been pushed recently to the Eclipse Foundation repositories.
Rework a bit the text to reflect this change.

Signed-off-by: Diego Rondini <diego.rondini@kynetics.com>
2021-09-16 17:31:40 +02:00
Natalia Kislicyn
ec8b4b27b3 Test: max DS Types per TargetType (#1175)
* add dsTypes in targetType quota test

Signed-off-by: Natalia Kislicyn <natalia.kislicyn@bosch.io>

* fix review findings

Signed-off-by: Natalia Kislicyn <natalia.kislicyn@bosch.io>
2021-09-13 13:27:39 +02:00
Natalia Kislicyn
b5fcb48ab1 Colour property in Mgmt API response for DS/SM type (#1174)
* Update name SP to hawkbit in api guide adocs

Signed-off-by: Natalia Kislicyn <natalia.kislicyn@bosch.io>

* fix javadoc class descriptions of existing resource/api classes

Signed-off-by: Natalia Kislicyn <natalia.kislicyn@bosch.io>

* Add color property to api response of ds/sw type

Signed-off-by: Natalia Kislicyn <natalia.kislicyn@bosch.io>

* Add color property to sw type test data & adapt rest docu

Signed-off-by: Natalia Kislicyn <natalia.kislicyn@bosch.io>

* Add missing property description for "colour" and "deleted"

Signed-off-by: Natalia Kislicyn <natalia.kislicyn@bosch.io>

* fix review findings

Signed-off-by: Natalia Kislicyn <natalia.kislicyn@bosch.io>
2021-09-02 10:09:17 +02:00
Bondar Bogdan
42b1fc9439 fix null pointer exception in rsql target field validation test (#1172)
Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch.io>
2021-08-30 20:17:52 +02:00