Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Usage treshold & severity levels #358

Merged
merged 2 commits into from
Nov 20, 2024

Conversation

pixelbrackets
Copy link
Contributor

Based on formating styles in PR #357 and the desire for a threshold in issue #343 I have
tweaked the severity level determination in all usage bars (flashmessage, system infobox, widget).

Based on warning levels in other software (90%, 98%, 100%) each info box will use a different
severity color according to the currently used quota.

The widget is a bit more compact now, since it used a lot of whitespace before,
which makes the dashboard unnecessary large.

Bildschirmfoto vom 2024-09-09 12-09-56

@pixelbrackets pixelbrackets force-pushed the usage-flashmessage-treshold branch from e537b55 to 86ac206 Compare October 21, 2024 05:07
@calien666 calien666 requested a review from sbuerk November 20, 2024 16:07
@calien666 calien666 force-pushed the usage-flashmessage-treshold branch 2 times, most recently from 0de018b to d3d080d Compare November 20, 2024 16:27
Refs web-vision#343

[FEATURE] Make translation limits more readable

[FEATURE] Follow up: More readable quota in toolbar

[FEATURE] Replace severity numbers with constants

[FEATURE] Enable color changes for DeepL action icon

Action icons dont have a fixed color set, in order to let TYPO3 set
the desired color - black in list actions, white in toolbar infos.

Change the DeepL SVG to not use black in all places.

[FEATURE] Determine severity based on quota usage

Calculate the message severity based on the API quota usage rate.
Matching popular quota warning levels if will notify above 90% usage,
and shown an error when the limit is exceeded.

Hide the flashmessage after a translation if the severity is low.

Refs web-vision#343

[FEATURE] Make widget more compact and use severity

Use severity levels in widget as well and reduce the height
to prevent unused whitespace.
@calien666 calien666 force-pushed the usage-flashmessage-treshold branch 2 times, most recently from db44bfa to 0acdc04 Compare November 20, 2024 16:38
For better maintenance move the severity calculation and number
formatting to the UsageService and adjust code.
@calien666 calien666 force-pushed the usage-flashmessage-treshold branch from 0acdc04 to 3376892 Compare November 20, 2024 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants