Skip to content
This repository has been archived by the owner on Apr 28, 2020. It is now read-only.

Change Font size and Units in Capacity card #328

Merged
merged 1 commit into from
Apr 9, 2019

Conversation

AyushAmbastha
Copy link
Contributor

Changes done-

  1. Font size of 'Total capacity' reduced as it shouldn't be larger than the card title. This also maintains consistency across cards in terms of aesthetics.
  2. Units changed from GB to GiB and so on.

Before-
Screenshot from 2019-04-09 16-17-01

After-
Screenshot from 2019-04-09 16-36-47

@AyushAmbastha AyushAmbastha changed the title Change Font size and Units for Capacity card Change Font size and Units in Capacity card Apr 9, 2019
@coveralls
Copy link

coveralls commented Apr 9, 2019

Pull Request Test Coverage Report for Build 1316

  • 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 87.283%

Totals Coverage Status
Change from base Build 1087: 0.0%
Covered Lines: 3196
Relevant Lines: 3511

💛 - Coveralls

@coveralls
Copy link

Pull Request Test Coverage Report for Build 1314

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.02%) to 87.264%

Totals Coverage Status
Change from base Build 1087: -0.02%
Covered Lines: 3196
Relevant Lines: 3511

💛 - Coveralls

@rawagner
Copy link
Contributor

rawagner commented Apr 9, 2019

please change

unit = unit || Object.keys(BYTE_UNITS).find(key => bytes < 1024 ** (BYTE_UNITS[key] + 1)) || 'PB';
to PiB too. Or maybe better would be Object.keys(BYTE_UNITS)[Object.keys(BYTE_UNITS).length-1] to avoid this in the future

@AyushAmbastha
Copy link
Contributor Author

AyushAmbastha commented Apr 9, 2019

please change

web-ui-components/src/utils/utils.js

Line 95 in 0fba1d4

unit = unit || Object.keys(BYTE_UNITS).find(key => bytes < 1024 ** (BYTE_UNITS[key] + 1)) || 'PB';
to PiB too. Or maybe better would be Object.keys(BYTE_UNITS)[Object.keys(BYTE_UNITS).length-1] to avoid this in the future

Should I change 1024 to 1000 everywhere as well? As Gibibytes is by 1000 and Gigabytes is by 1024, for an example. Else we'll just be displaying the value in GB written as GiB.
@rawagner ^

@rawagner
Copy link
Contributor

rawagner commented Apr 9, 2019

hm..i think 1 KiB = 1024 Bytes and 1 KB = 1000 Bytes so if we keep the calculations and change units to *iB we should be fine.

@AyushAmbastha
Copy link
Contributor Author

@rawagner Sorry for the confusion regarding the units, I've made the requested changes. Please review.

@rawagner rawagner merged commit 9eeb456 into kubevirt:master Apr 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants