Skip to content

Commit 2bd4661

Browse files
renovate[bot]github-actions[bot]
authored andcommitted
fix(Linting):blacked code
1 parent b0ea5b3 commit 2bd4661

File tree

4 files changed

+50
-57
lines changed

4 files changed

+50
-57
lines changed

src/app/facility_manager/resources/resource-machine.ts

Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,62 @@
1-
import { ComputecenterComponent } from '../../projectmanagement/computecenter.component';
2-
import { GPUSpecification } from './gpu-specification';
1+
import { ComputecenterComponent } from '../../projectmanagement/computecenter.component'
2+
import { GPUSpecification } from './gpu-specification'
33

44
/**
55
* ResourceMachine class.
66
*/
77

88
export class ResourceMachine {
9-
id: string;
10-
compute_center: ComputecenterComponent;
11-
name: string;
12-
ram_public_factor: number = 1;
13-
ram_private_factor: number = 1;
14-
cores: number = 0;
15-
cores_private_factor: number = 1;
16-
cores_public_factor: number = 1;
17-
gpu_slots: number = 0;
18-
gpu_used: GPUSpecification[] = [];
19-
public_count: number = 0;
20-
private_count: number = 0;
21-
ram: number = 0;
22-
type: string = 'GENERAL_PURPOSE';
23-
local_disk_storage: number = 0;
24-
local_disk_encrypted: boolean = false;
9+
id: string
10+
compute_center: ComputecenterComponent
11+
name: string
12+
ram_public_factor: number = 1
13+
ram_private_factor: number = 1
14+
cores: number = 0
15+
cores_private_factor: number = 1
16+
cores_public_factor: number = 1
17+
gpu_slots: number = 0
18+
gpu_used: GPUSpecification[] = []
19+
public_count: number = 0
20+
private_count: number = 0
21+
ram: number = 0
22+
type: string = 'GENERAL_PURPOSE'
23+
local_disk_storage: number = 0
24+
local_disk_encrypted: boolean = false
2525

2626
constructor(resourceMachine: ResourceMachine | null) {
2727
if (resourceMachine) {
28-
this.id = resourceMachine.id;
29-
this.compute_center = resourceMachine.compute_center;
30-
this.name = resourceMachine.name;
31-
// eslint-disable-next-line no-multi-assign,no-param-reassign
32-
this.ram_public_factor = resourceMachine.ram_public_factor = 1;
33-
// eslint-disable-next-line no-multi-assign,no-param-reassign
34-
this.ram_private_factor = resourceMachine.ram_private_factor = 1;
35-
this.cores = resourceMachine.cores;
36-
this.local_disk_storage = resourceMachine.local_disk_storage;
37-
this.local_disk_encrypted = resourceMachine.local_disk_encrypted;
38-
this.cores_private_factor = resourceMachine.cores_private_factor;
39-
this.cores_public_factor = resourceMachine.cores_public_factor;
40-
this.gpu_slots = resourceMachine.gpu_slots;
41-
this.gpu_used = resourceMachine.gpu_used;
42-
this.public_count = resourceMachine.public_count;
43-
this.private_count = resourceMachine.private_count;
44-
this.ram = resourceMachine.ram;
45-
this.type = resourceMachine.type;
28+
this.id = resourceMachine.id
29+
this.compute_center = resourceMachine.compute_center
30+
this.name = resourceMachine.name
31+
32+
this.ram_public_factor = resourceMachine.ram_public_factor = 1
33+
34+
this.ram_private_factor = resourceMachine.ram_private_factor = 1
35+
this.cores = resourceMachine.cores
36+
this.local_disk_storage = resourceMachine.local_disk_storage
37+
this.local_disk_encrypted = resourceMachine.local_disk_encrypted
38+
this.cores_private_factor = resourceMachine.cores_private_factor
39+
this.cores_public_factor = resourceMachine.cores_public_factor
40+
this.gpu_slots = resourceMachine.gpu_slots
41+
this.gpu_used = resourceMachine.gpu_used
42+
this.public_count = resourceMachine.public_count
43+
this.private_count = resourceMachine.private_count
44+
this.ram = resourceMachine.ram
45+
this.type = resourceMachine.type
4646
if (this.gpu_used.length < this.gpu_slots) {
4747
while (this.gpu_used.length < this.gpu_slots) {
48-
this.gpu_used.push(new GPUSpecification(null));
48+
this.gpu_used.push(new GPUSpecification(null))
4949
}
5050
}
5151
}
5252
}
5353

5454
changeGpuUsed(): void {
5555
if (this.gpu_slots < this.gpu_used.length) {
56-
this.gpu_used = this.gpu_used.slice(0, this.gpu_slots);
56+
this.gpu_used = this.gpu_used.slice(0, this.gpu_slots)
5757
} else {
5858
while (this.gpu_slots > this.gpu_used.length) {
59-
this.gpu_used.push(new GPUSpecification(null));
59+
this.gpu_used.push(new GPUSpecification(null))
6060
}
6161
}
6262
}

src/app/virtualmachines/virtualmachinemodels/imageTypes.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* Image Types enum.
33
*/
4-
// eslint-disable-next-line no-shadow
4+
55
export enum ImageTypes {
66
IMAGE = 'IMAGE',
77
CLUSTER_IMAGE = 'CLUSTER_IMAGE',
Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,27 @@
1-
// eslint-disable-next-line max-classes-per-file
21
export class UrlData {
3-
user_email: string;
4-
user_name: string;
5-
resenv_url: string;
2+
user_email: string
3+
user_name: string
4+
resenv_url: string
65

76
constructor(url_data?: Partial<UrlData>) {
8-
Object.assign(this, url_data);
7+
Object.assign(this, url_data)
98
}
109
}
1110

1211
export class WorkshopUrlInfoModel {
13-
14-
longname: string;
15-
shortname: string;
16-
url_data: UrlData[];
12+
longname: string
13+
shortname: string
14+
url_data: UrlData[]
1715

1816
constructor(workshop_info?: Partial<WorkshopUrlInfoModel>) {
19-
Object.assign(this, workshop_info);
17+
Object.assign(this, workshop_info)
2018
if (workshop_info) {
2119
if (workshop_info.url_data) {
22-
this.url_data = [];
20+
this.url_data = []
2321
for (const url_data of workshop_info.url_data) {
24-
this.url_data.push(new UrlData(url_data));
22+
this.url_data.push(new UrlData(url_data))
2523
}
2624
}
2725
}
2826
}
29-
3027
}

src/app/vo_manager/vo-guard.service.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,14 @@ import { is_vo } from '../shared/globalvar'
1313
export class VoGuardService {
1414
constructor(private router: Router) {}
1515

16-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
1716
canActivate(
1817
route: ActivatedRouteSnapshot,
1918
state: RouterStateSnapshot
2019
): Observable<boolean> | Promise<boolean> | boolean {
21-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
2220
return new Promise((resolve: any, reject: any): any => {
2321
if (is_vo) {
24-
// eslint-disable-next-line no-promise-executor-return
2522
return resolve(true)
2623
} else {
27-
// eslint-disable-next-line no-promise-executor-return
2824
return resolve(false)
2925
}
3026
})

0 commit comments

Comments
 (0)