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

Add unlimited option to space quota #6693

Merged
merged 3 commits into from
Mar 31, 2022
Merged

Conversation

AlexAndBear
Copy link
Contributor

@AlexAndBear AlexAndBear commented Mar 31, 2022

Description

Enhancement: Spaces quota unlimited option

Space quota can now be set to unlimited

Related Issue

  • Fixes <issue_link>

Motivation and Context

How Has This Been Tested?

  • test environment:
  • test case 1:
  • test case 2:
  • ...

Screenshots (if appropriate):

image

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket raised:

Open tasks:

  • ...

@@ -63,8 +63,21 @@ export default {
data: function () {
return {
selectedOption: {},
options: [],
DEFAULT_OPTIONS: [
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

moved to computed, due the need of gettext

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

76.2% 76.2% Coverage
0.0% 0.0% Duplication

Copy link
Contributor

@lookacat lookacat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍🏼 found one little thing


const newOption = {
displayValue: (this.space.spaceQuota.total * Math.pow(10, -9))
.toFixed(2)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would maybe extract this into a variable for better readability, but not a show stopper.

Copy link
Contributor Author

@AlexAndBear AlexAndBear Mar 31, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

   const newOption = {
        displayValue: (this.space.spaceQuota.total * Math.pow(10, -9))
          .toFixed(2)
          .toString()
          .replace('.00', ''),
        displayUnit: 'GB',
        value: this.space.spaceQuota.total
      }

vs

    const displayValue = (this.space.spaceQuota.total * Math.pow(10, -9))
        .toFixed(2)
        .toString()
        .replace('.00', '')

      const newOption = {
        displayValue,
        displayUnit: 'GB',
        value: this.space.spaceQuota.total
      }
  IHMO this is not more readable if you keep the code in mind, that is on the same level 

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

true

@AlexAndBear AlexAndBear marked this pull request as ready for review March 31, 2022 08:37
@AlexAndBear AlexAndBear merged commit 982e947 into master Mar 31, 2022
@delete-merged-branch delete-merged-branch bot deleted the space-quota-enhancements branch March 31, 2022 08:45
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