Skip to content

Commit

Permalink
Merge pull request #55 from dydokamil/fix/metric-prefix
Browse files Browse the repository at this point in the history
fix: metric prefixes
  • Loading branch information
NyaGarcia committed Jan 16, 2020
2 parents 66f61de + ee59753 commit 754cd1f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions __tests__/result.service.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,8 @@ describe('Result Service', () => {

it('should get stats of results', () => {
const expectResult = {
spaceReleased: '9 gb',
totalSpace: '38 gb',
spaceReleased: '9 GB',
totalSpace: '38 GB',
};

const stats = resultService.getStats();
Expand Down
2 changes: 1 addition & 1 deletion src/constants/main.constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { IUiPosition } from '../interfaces/ui-positions.interface';
export const MIN_CLI_COLUMNS_SIZE = 60;
export const CURSOR_SIMBOL = '~>';
export const WIDTH_OVERFLOW = '...';
export const DEFAULT_SIZE = '0 mb';
export const DEFAULT_SIZE = '0 MB';
export const DECIMALS_SIZE = 2;
export const OVERFLOW_CUT_FROM = 8;

Expand Down
4 changes: 2 additions & 2 deletions src/controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -329,11 +329,11 @@ export class Controller {

private getFolderTexts(folder: IFolder): { path: string; size: string } {
const folderText = this.getFolderPathText(folder);
let folderSize = `${this.round(folder.size, 3)} gb`;
let folderSize = `${this.round(folder.size, 3)} GB`;

if (!this.config.folderSizeInGb) {
const size = this.fileService.convertGbToMb(folder.size);
folderSize = `${this.round(size, DECIMALS_SIZE)} mb`;
folderSize = `${this.round(size, DECIMALS_SIZE)} MB`;
}

const folderSizeText = folder.size ? folderSize : '--';
Expand Down
4 changes: 2 additions & 2 deletions src/services/results.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ export class ResultsService {
}, 0);

return {
spaceReleased: `${this.round(spaceReleased, 2)} gb`,
totalSpace: `${this.round(totalSpace, 2)} gb`,
spaceReleased: `${this.round(spaceReleased, 2)} GB`,
totalSpace: `${this.round(totalSpace, 2)} GB`,
};
}

Expand Down

0 comments on commit 754cd1f

Please sign in to comment.