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

Improve displaying license #3374

Merged
merged 7 commits into from
Mar 16, 2022
Merged

Improve displaying license #3374

merged 7 commits into from
Mar 16, 2022

Conversation

bjoernricks
Copy link
Contributor

What:

  • Move license into a model module and adjust its parsing
  • Introduce functions to display descriptive model names and types
  • Fix model and model_type usage in tests

Why:

For example trial and 450 are just values for the models. A model type can be virtual or hardware. But both values should not be displayed 1:1 to the user.

How:

Checklist:

  • Tests
  • PR merge commit message adjusted
  • Labels for ports to other branches

Handle the License class in an own ES module and adjust the class to the
"normal" module behavior. When generated from response data the
fromElement method should be used to parse the response and create the
license data.
It is better to use the explicitly provided method for checking the
capabilities of a user.
The License class only contains values as representation of a model and
a model type. In the UI these values should be displayed with their more
descriptive meaning.
Fix model and model type in license notification test and update the
displayed text when the license is to expiring.
@bjoernricks bjoernricks requested a review from a team March 14, 2022 16:12
@bjoernricks bjoernricks enabled auto-merge March 14, 2022 16:12
@codecov
Copy link

codecov bot commented Mar 14, 2022

Codecov Report

Merging #3374 (eb735b3) into main (4f8edc4) will increase coverage by 0.00%.
The diff coverage is 93.33%.

❗ Current head eb735b3 differs from pull request most recent head 549e59f. Consider uploading reports for the commit 549e59f to get more accurate results

@@           Coverage Diff           @@
##             main    #3374   +/-   ##
=======================================
  Coverage   58.98%   58.99%           
=======================================
  Files        1045     1046    +1     
  Lines       25172    25183   +11     
  Branches     7178     7183    +5     
=======================================
+ Hits        14848    14857    +9     
- Misses       9363     9365    +2     
  Partials      961      961           
Impacted Files Coverage Δ
src/gmp/models/license.js 92.59% <92.59%> (ø)
src/gmp/commands/license.js 81.81% <100.00%> (-9.10%) ⬇️
...web/components/notification/licensenotification.js 92.85% <100.00%> (-0.48%) ⬇️
src/web/pages/licenses/licensepage.js 71.42% <100.00%> (ø)
src/version.js 100.00% <0.00%> (ø)
src/gmp/gmpsettings.js 95.74% <0.00%> (ø)

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

@bjoernricks bjoernricks disabled auto-merge March 15, 2022 08:41
@bjoernricks bjoernricks enabled auto-merge March 15, 2022 08:42
@bjoernricks bjoernricks merged commit 4c5c4d1 into main Mar 16, 2022
@bjoernricks bjoernricks deleted the improve-displaying-license branch March 16, 2022 07:42
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.

2 participants