* fix(dashboard): hide the side menu toggle in the mobile app
A dashboard with both the dashboard toolbar and the main toolbar hidden shows a floating menu button at phone width that toggles the side navigation. In the mobile app the page runs in forced fullscreen, where the side navigation is disabled, so the button did nothing and covered the start of the first widget title. The app has its own navigation, so the button is no longer rendered there.
* fix(dashboard): visible toolbar icons in mobile app with primary shell
In the mobile app the dashboard toolbar is drawn on a white background. With the primary application shell the toolbar text colour is the primary contrast colour, which is white for dark palettes, so the time window and other toolbar icons were white on white. The dashboard toolbar now uses the light shell colours in the mobile app regardless of the selected application shell.
* Restamp license headers flagged by check-license-headers.sh
---------
Co-authored-by: Artem Babak <ababak@thingsboard.io>
- Make TbAbstractSubCtx.stop() final and move cancellation into a
protected onStop() hook, so subclasses cannot cancel outside the
lifecycle lock.
- Guard doFetchAlarms() instead of fetchAlarms(), so the refresh path
through cleanupOldAlarms() is covered too.
- Cancel dynamic-value subscriptions when an alarm count context stops.
- Make the stop-waits-for-registration test deterministic by waiting
for the stopper to queue on the lifecycle lock.
A subscription command can register subscriptions after its context was
stopped by a concurrent session cleanup, or create a context after the
session was already removed. The registrations then outlive the session
and keep answering alarm updates with queries whose results are dropped.
- Serialize TbAbstractSubCtx.stop() with subscription registration through
a lifecycle lock; registerSubscription() refuses stopped contexts and
sessions unknown to the websocket service.
- Route all context-owned addSubscription calls through registerSubscription().
- Skip alarm fetches on stopped contexts and ignore alarm and entity data
commands for sessions that are no longer registered.
- Add WebSocketService.hasSession().
- Unit tests for the registration guard and the stop/registration ordering.
Migrations started from @PostConstruct ran before Spring registered
@TransactionalEventListener methods, so cache evict events published by
migrations were dropped. With a Redis cache the stale entry survived until
its TTL (e.g. the internal Trendz API key kept its pre-migration
permissions for up to 24 hours).
Start the patch applier on ApplicationReadyEvent with the new
AfterStartUp.SYSTEM_PATCH order (0), so it is still submitted before
partitions, discovery, core and actor startup.
* Add 'Overwrite activity time' column type to device bulk import
* Fix overwriteActivityTime column type not being disabled after selection in bulk import
Remove dead locale key import.column-type.activity-time-from-gateway-device
from all 23 locale files
* Use DataConstants keys for gateway and overwriteActivityTime in device bulk import
* Group gateway columns in bulk import and reuse device.overwrite-activity-time label
* Fixed auto-detection of gateway columns in device bulk import
---------
Co-authored-by: Vladyslav_Prykhodko <vprykhodko@thingsboard.io>
- A dashboard of the package that a profile outside the package uses as its default dashboard, and a device profile of
the package that a firmware or software package refers to, refuse the update before anything is removed.
- The refusal no longer says that nothing was removed: an earlier attempt may have removed part of the package.
- The GATEWAY_CONNECTOR step neither marks the gateway as created in this wizard nor tracks it, so a gateway the user
had and chose to use stays theirs after Back reruns the steps.
- The doc of packageOwnedEntityIds is back above it; tests for the rule chain, the dashboard and the firmware.
- A dashboard of the package that a profile outside the package uses as its default dashboard, and a device profile of
the package that a firmware or software package refers to, refuse the update before anything is removed, as the
profile and the rule chain do.
- The refusal no longer says that nothing was removed: an earlier attempt may have removed part of the package.
- The GATEWAY_CONNECTOR step neither marks the gateway as created in this wizard nor tracks it: the connector is
attributes on the gateway. A gateway the user had and chose to use stays theirs after Back reruns the steps.
- The doc of packageOwnedEntityIds is back above it.
- Tests for the rule chain (root, default of another device or asset profile, default of the package's own profile),
the dashboard and the firmware.
By hand from the 4.2 and PE lines: ThingsBoard refuses to delete a device profile that is the default one or that
devices outside the package use, a converter that an integration outside the package uses, and a rule chain that is
the root one or the default rule chain of a profile outside the package. Found after the dashboard and the device were
gone, such a refusal left the package half removed and failed every Retry. Now it is checked before anything is
removed, and the update is refused with a 400 that names what blocks it.
The PE part of thingsboard-pe#5291 for 4.4.0.x, by hand: the update opens the wizard of the new version with the entity
group (the first one other than All) and the customer of the installed version's device, and the server keeps them in
the install state ($placement) when it removes the entities, so a retry after the device is gone still creates the new
one there. 4.4.1 does not need it: its update keeps the same device.
The update removes the package's entities one by one. ThingsBoard refuses to delete a device profile that is the
default one or that devices outside the package use, and a rule chain that is the root one or the default rule chain
of a profile outside the package. Found after the dashboard and the device were gone, such a refusal left the package
half removed, and every Retry failed the same way. Now it is checked before anything is removed, and the update is
refused with a 400 that names what blocks it.
A failure after the removal has started is thrown without its cause: BaseController answers 400 for an
IncorrectParameterException cause, and a 400 tells the wizard that nothing was removed.
On 4.4.0.x the Update of a device package removed every entity the package created and installed nothing again. Now
the Update opens the install wizard of the new version, with the forms filled from the installed version. Nothing is
removed while the user goes through the forms; the entities of the installed version are removed right before the
wizard creates the new ones, and the installed item keeps the old version until the wizard registers the new one on
the same item. The update dialog warns that the package is reinstalled and its data removed.
The diff of thingsboard#16558 (lts-4.4) applied onto hotfix-4.4, plus three fixes from its review: the removeEntities
endpoint checks the permissions as the other IoT Hub endpoints do; an entity the user had before the install and chose
to use is not tracked as the package's, so a later update or Delete never removes it; a failure after the removal has
started is never answered with a 400, which tells the wizard that nothing was removed.
An entity a new step of the package uses as it was goes into createdEntityIds as well as usedExistingEntityIds, as at install, so deleting the package removes the metadata entries it added to that entity.
The check ran with maven-antrun-plugin in the validate phase. That plugin makes Maven resolve the dependencies of the application module, which fails in 'mvn validate' on a clean machine, where the other modules are not built yet. The check is now a maven-enforcer-plugin rule, which needs no dependency resolution.
Fields that the server sends as null were documented as required, so
generated clients (Dart in particular) failed to parse such responses.
They are now NOT_REQUIRED. Bean validation on save is unchanged.
swagger-core skips @NotNull for a property with
@Schema(requiredMode = NOT_REQUIRED), but still adds the ones with
@NotBlank / @NotEmpty to 'required'; SwaggerConfiguration now removes
them.
- web-report: build the shipped executables without pkg --debug again; the SBOM check makes its own --debug pass into a folder it deletes
- skip the yarn SBOM steps of ui-ngx, web-ui and web-report with -Dskip.ui.build=true (sbom.ui.skip)
- keep Lombok out of the boot jars: it is needed only to compile and is not in the SBOMs
- list the DigiCert root certificate in the package SBOM of the integration executor
- check in every build that the gateway extension SBOM names the hash of the committed .js, and keep Git from changing the line ends of that file
- license headers: mark packaging/java/build.gradle as modified and update the curation of msa/web-report/pom.xml
The key is removed whenever the decoded payload has it, and it names a model only when it is an object, so
tbVersionIds: null or a list gives the same telemetry in JS and TBEL. The test of a tbVersionIds that is not an
object covers a text, null and a list. The test of the renamed profile lists temperature, which is in the history
record and in the latest values, so it fails if a listed key leaves a history record.