* IoT Hub device packages: the update service becomes DevicePackageService, ready to install too
* IoT Hub device packages: an install saves its entities and the installed item in one transaction
* IoT Hub device packages: an install keeps only entities the user chose, and its errors read for install too
* IoT Hub device packages: an install from a customer or a device group puts its device and dashboard there, in the same transaction
* IoT Hub device packages: an install never moves an overwritten device to another owner
* IoT Hub device install: the wizard checks every step first, asks about all conflicts at once and installs in one request
* IoT Hub device install: an overwritten device takes the package's credentials, a cancelled check installs nothing, one install is one request
* IoT Hub device install: no second check or install from the step header, Retry checks the package again, messages and comments fit install and update
* IoT Hub device packages: install and update share one plan, review and result path, with neutral names
* IoT Hub device install: the plan looks like the update review, with a footer to confirm warnings and no jump to Verify
* IoT Hub device install: the rows after an install say Created, Used existing, Overwritten or Created copy
* IoT Hub device install: no overwrite of a device or gateway, Use existing keeps the step attributes, Try again asks again about the failed choice
- At install a name conflict on a device or gateway offers only Use existing; the
server rejects an install that overwrites one. An overwrite keeps the device's
credentials, which are applied only to a created device.
- Use existing at install writes the step's server and shared attributes after
commit, as the browser install did.
- Try again at install keeps the conflict choices except the one of the failed step.
- The provisioning step label is translated; ca_ES and ar_AE get the install texts.
- Tests check that the audit log, the Hub install report and the attributes run
after commit.
* IoT Hub device packages: a test pins that an overwrite keeps the device's credentials
* IoT Hub device install dialog: cleanup after review
* IoT Hub device install: the conflict check resolves names from the plan, an install overwrite sends the version
- The pre-check resolves each step's template with the names the plan gives the
entities of earlier steps (alias -> name, in step order), not with outputs left
from a failed attempt, so a dashboard titled ${device.name} is checked under the
device's planned name and the first check and Try again agree. Placeholders known
only after the install, e.g. ${device.id}, stay. An update still resolves with the
installed entities. The request sent to the server is unchanged.
- The pre-check keeps the version of the entity it found (rule chain, dashboard,
converter, integration), and an install overwrite sends it as expectedVersion, so
the server rejects an entity changed between the check and the install.
- The conflict message names the existing entity, as a step's name can differ from it.
- The duplicate-key comment says the check runs before the plan is sent, and the
server checks too.
* IoT Hub device install: a device profile overwrite sends the profile's version
The names lookup has no version, so the pre-check reads the matched profile once and keeps its version for expectedVersion.
* IoT Hub device install: a device overwrite sends the device's version
The device lookup of the pre-check now keeps the version, as the other lookups do, and the state key comment says the duplicate check runs before the plan is sent.
* IoT Hub device install: pass the preview outputs instead of swapping entityOutputs
preCheckTemplates passes its preview outputs to resolveTemplateJson instead of temporarily replacing entityOutputs. Drops duplicated comments and redundant optional chaining in templateNameOf.
---------
Co-authored-by: Viacheslav Klimov <vklimov@thingsboard.io>
Co-authored-by: Vladyslav_Prykhodko <vprykhodko@thingsboard.io>
On phones the entity type now wraps so the name gets more room; the
override did not apply before. The dialog uses mat-dialog-content and
mat-dialog-actions, so Material handles scrolling. The group divider
uses Tailwind.
* Port of fix/custom-menu-width onto master
* Custom menu table: names wrap and columns fit, no horizontal scrollbar
---------
Co-authored-by: Vladyslav_Prykhodko <vprykhodko@thingsboard.io>
When updates were already checked and only the count failed, Try again
now recounts instead of re-running the whole check: the header keeps the
note with a spinner on the button, the user's list mode and page stay,
and the checking state is cleared by whichever count finishes last, so a
newer count from a reload can't leave the button spinning. Shorter
comments and plain if/else in reloadAfterChange.
* Serve pre-compressed UI files from web-ui instead of compressing per request
compression 1.8 (pulled in by a CVE fix in 4.2.2.5 / 4.3.1.5) prefers brotli,
and browsers always offer it over HTTPS. Brotli-compressing the 8.5 MB main
chunk on every cache miss fragments native memory that glibc never returns,
so web-ui RSS grows with each traffic burst until the container is OOMKilled.
- ui-ngx: write .gz copies for every compressible file of the production build
in a post-build step. The esbuild plugin it replaces missed global styles,
scripts, polyfills, ace workers and assets/.
- web-ui: serve those copies with Content-Encoding: gzip and drop the
compression middleware and its dependency.
* Run UI compression as a Maven step and ignore aborted downloads in web-ui
- build:prod is a plain ng build again; "yarn run compress" runs as its own
frontend-maven-plugin execution right after it.
- web-ui: like express.static, ignore ECONNABORTED and socket write errors
instead of logging a stack trace for every cancelled download, and fall
back to the original file if its .gz copy is missing.
* Serve pre-built brotli copies of UI files
- compress-build.js also writes <file>.br (brotli quality 10). It is 21.5%
smaller than gzip -9 on the UI bundle (main chunk 0.96 MiB vs 1.47 MiB).
Quality 11 saves only 2% more and takes 3x longer.
- It now uses every available core and starts with the largest files:
7 s for .br and .gz together on 6 cores, against 25 s for quality 11
on the default 4 libuv threads.
- web-ui serves .br when the client accepts it and .gz otherwise. The
server's order wins, because browsers list gzip before br.
* Ignore stale pre-compressed copies and warn when there are none
- web-ui skips a .br/.gz copy that is older than its original or has no
original. Otherwise a file edited after the build, such as a customized
locale, would keep being served from its old copy.
- Log a warning when the web folder has no pre-compressed files at all,
for example a UI built without "yarn run compress".
- compress-build.js runs at most 8 threads.
- Shorter comments; the pom comment duplicated the script header.
* Respect Accept-Encoding q-values and detect edited originals by size
- Pick the encoding with negotiator (already in the tree through express,
now a direct dependency). The highest q wins as RFC 9110 says, and the
server's br-first order only breaks ties. Before, "gzip;q=1, br;q=0.1"
still got br.
- Check a copy against the uncompressed size gzip stores in its trailer
instead of comparing mtimes. Touching or copying the build without
preserving timestamps no longer disables compression, and a customized
file of a different size still gets served fresh.
* Trust pre-compressed copies as built, like nginx, Caddy and Fastify do
The web folder is a build artifact that is not edited by hand, so checking
copies against their originals at startup only added code.
* Load negotiator.d.ts in yarn start and start-prod
ts-node only compiles files that are imported, so it ignored the ambient
declaration and failed with TS7016. tsc, the Docker image and production
were not affected.
* Serve pre-compressed UI files from the monolith again
Spring Boot 2.4 renamed spring.resources.chain.* to spring.web.resources.chain.*,
and Spring Boot 2.6 stopped binding the old keys. Since ThingsBoard 3.4 the
monolith has silently ignored compressed: "true" and served every UI file
uncompressed, although ui-ngx still builds the .gz copies.
Use the current keys. The content version strategy is dropped rather than
renamed: if enabled it rewrites url() references inside CSS files, which the
UI never relied on (esbuild already hashes the file names).
* Mention brotli copies in the resource chain description