chongsun ahn <> in openlmis-cce

Update raml2html to 3.0

To fix security vulnerabilities of nunjucks and minimatch.

OLMIS-4105 Add more description to GET cceAlerts

    • -1
    • +1
OLMIS-4196 Add CCE serial number to FHIR device

Using serial number specific classes, because it's not clear we're going to need generic versions yet.

OLMIS-4105 Change CCE Alerts performance tests to use config user

Should not use divo1, but the one in the configuration.

OLMIS-4105 Add performance tests for CCE alerts APIs

This is a first iteration of performance tests. Some limitations that may need to be expanded:

* The divo1 user is used, since administrator in demo data currently does not have the correct rights

* Spring by default returns max 2000 results for a paginated response, we'll need to override this and it will affect performance results

* About 100,000 alerts are added to performance data, which may be a bit small for the upper limit on how many alerts may be in a production system

* The get collection test checks by devices, because this is the most likely use case; there is no test on getting all alerts

    • -0
    • +66
OLMIS-4105 Replace residual incorrect locales

Rename remaining en_US to en-US.

OLMIS-4105 Update RAML with active query parameter

    • -1
    • +6
OLMIS-4197 Change schema from dismissed to dismissTimestamp

Will need the timestamp to show when the alert was dismissed, but we do not need both values.

    • -14
    • +14
Fix sonar issues

OLMIS-4105 Support alert_id in DTO to be a non-UUID string

This is done by adding a new field called externalId which is what is mapped to alert_id. Validation added to make sure it matches FHID id datatype regex. New repository methods and make sure JPA knows to update based on externalId, not id.

    • -11
    • +16
OLMIS-4105 Ensure status keys are in correct locale format

Validate alert status keys are in correct locale format. Fix demo data as well.

    • -9
    • +9
Fix potential integration test failure

Ensure the dates are in the exact same format.

OLMIS-4129 Add active field to Alert to simply queries

To make the queries more readable, add an active field to Alert, which is determined by the other fields. Save this to database, so the queries can read from it.

OLMIS-4125 Add demo data for CCE alerts

Add inactive alerts to CCE inventory at Cuamba, Cuamba, for testing.

    • -0
    • +15
OLMIS-4129 Add unit tests

To check branching logic in controller.

    • -0
    • +105
OLMIS-4129 Retain end timestamp and dismissed values

Retain values from existing alert if they were not passed in from DTO. This is so different alert saves can save different parts of the alert without overwriting other parts not specified.

    • -0
    • +84
OLMIS-4129 Allow any token to save CCE alerts

Any token (user, service, API key) should be able to save alerts, since we are going to use the same API to for other clients, like the UI.

OLMIS-4129 Allow dismissed to be null

This is so alerts can be created with dismissed as nullable, which implicitly means false. This is so we do not explicitly set dismissed to false when constructing it.

OLMIS-4105 Change start and end timestamp to ISO date

Changed from Unix epoch in milliseconds to ISO-formatted date.

    • -2
    • +2
OLMIS-4105 Add logger warning message about device ID not found

To determine what device ID was provided that was not found in the system.

OLMIS-4127 Add demo data for CCE alerts

An assortment of alerts at Lurio, Cuamba district.

    • -0
    • +32
    • -0
    • +45
OLMIS-4105 Change alert type from enum to string

We do not use the type in any business logic, so it would couple too much how we understand alert types. If a new type is saved, we do not need to add to the enum.

OLMIS-4105 Message strings added

OLMIS-4105 Add support for filtering by active alerts

New query methods had to be created to support querying by device IDs, active, or both. Some were made into native queries.

OLMIS-4105 Make dismissed not nullable

So that dismissed must either be true or false and not a third state (null). This is to simplify querying.

OLMIS-4105 Support searching for alerts by multiple device IDs

OLMIS-4105 Add test coverage

For Sonar.

    • -0
    • +80
OLMIS-4105 Add CCE alerts resource

Add save alert and get alerts.

    • -0
    • +151
    • -0
    • +25
    • -0
    • +139
    • -0
    • +42
    • -0
    • +30
    • -0
    • +157
    • -2
    • +2
OLMIS-4105 Change timestamps to numbers in JSON schema

We may be using Unix epoch timestamps for now.

    • -2
    • +2
Add db port in override

So port can be accessible to the host.