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

Clean code #28358

Merged
merged 5 commits into from
Dec 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ describe('HealthModalComponent', () => {
expect(result).toEqual('jhipster');
});

it('should return storage space in an human readable unit (GB)', () => {
it('should return storage space in a human readable unit (GB)', () => {
// GIVEN
comp.health = {
key: 'diskSpace',
Expand All @@ -63,7 +63,7 @@ describe('HealthModalComponent', () => {
expect(result).toEqual('1.00 GB');
});

it('should return storage space in an human readable unit (MB)', () => {
it('should return storage space in a human readable unit (MB)', () => {
// GIVEN
comp.health = {
key: 'diskSpace',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export default class HealthModalComponent {

readableValue(value: any): string {
if (this.health?.key === 'diskSpace') {
// Should display storage space in an human readable unit
// Should display storage space in a human readable unit
const val = value / 1073741824;
if (val > 1) {
return `${val.toFixed(2)} GB`;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export class EventWithContent<T> {
}

/**
* An utility class to manage RX events
* A utility class to manage RX events
*/
@Injectable({
providedIn: 'root',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import { Injectable } from '@angular/core';

/**
* An utility service for link parsing.
* A utility service for link parsing.
*/
@Injectable({
providedIn: 'root',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import { takeUntil } from 'rxjs/operators';
import { translationNotFoundMessage } from 'app/config/translation.config';

/**
* A wrapper directive on top of the translate pipe as the inbuilt translate directive from ngx-translate is too verbose and buggy
* A wrapper directive on top of the translation pipe as the inbuilt translation directive from ngx-translate is too verbose and buggy
*/
@Directive({
selector: '[<%= jhiPrefix %>Translate]',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { Table, Modal, ModalHeader, ModalBody, ModalFooter, Button } from 'react
import { Translate } from 'react-jhipster';

const formatDiskSpaceOutput = rawValue => {
// Should display storage space in an human readable unit
// Should display storage space in a human readable unit
const val = rawValue / 1073741824;
if (val > 1) {
// Value
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export default defineComponent({
},
readableValue(value: any): string {
if (this.currentHealth.name === 'diskSpace') {
// Should display storage space in an human readable unit
// Should display storage space in a human readable unit
const val = value / 1073741824;
if (val > 1) {
// Value
Expand Down
Loading