Skip to content

Commit

Permalink
fix(Linting):blacked code
Browse files Browse the repository at this point in the history
  • Loading branch information
renovate[bot] authored and github-actions[bot] committed Aug 15, 2024
1 parent 7db9de6 commit 07be5df
Show file tree
Hide file tree
Showing 11 changed files with 69 additions and 62 deletions.
8 changes: 4 additions & 4 deletions src/app/api-connector/group.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ export class GroupService {
this.http = http;
}

toggleVisibility(groupId: string | number): Observable<Object> {
return this.http.post<Object>(`${ApiSettings.getApiBaseURL()}projects/${groupId}/toggle_member_names_visibility/`, {
toggleVisibility(groupId: string | number): Observable<object> {
return this.http.post<object>(`${ApiSettings.getApiBaseURL()}projects/${groupId}/toggle_member_names_visibility/`, {
withCredentials: true,
});
}

toggleStartingMachines(groupId: string | number): Observable<Object> {
return this.http.post<Object>(`${ApiSettings.getApiBaseURL()}projects/${groupId}/toggle_starting_machines/`, {
toggleStartingMachines(groupId: string | number): Observable<object> {
return this.http.post<object>(`${ApiSettings.getApiBaseURL()}projects/${groupId}/toggle_starting_machines/`, {
withCredentials: true,
});
}
Expand Down
4 changes: 2 additions & 2 deletions src/app/api-connector/news.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ export class NewsService {
});
}

getFacilitiesFromWagtail(): Observable<Object[]> {
return this.http.get<Object[]>(`${ApiSettings.getApiBaseURL()}facility-management/`, {
getFacilitiesFromWagtail(): Observable<object[]> {
return this.http.get<object[]>(`${ApiSettings.getApiBaseURL()}facility-management/`, {
withCredentials: true,
});
}
Expand Down
4 changes: 1 addition & 3 deletions src/app/api-connector/playbook.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,8 @@ export class PlaybookService {
}

getPlaybookForVM(vm_id: string): Observable<any> {

return this.http.get<Object>(`${this.baseUrl}${vm_id}/`, {
return this.http.get<object>(`${this.baseUrl}${vm_id}/`, {
withCredentials: true,
});
}

}
18 changes: 9 additions & 9 deletions src/app/applications/type-overview.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,19 @@ export class TypeOverviewComponent implements OnInit {
kubernetes_color: string = '#326ce5';
is_vo_admin: boolean = is_vo;

simpleVM_logo_link: String;
simpleVM_ease_logo: String;
simpleVM_curve_logo: String;
simpleVM_remote_logo: String;
simpleVM_logo_link: string;
simpleVM_ease_logo: string;
simpleVM_curve_logo: string;
simpleVM_remote_logo: string;

kubernetes_logo_link: string;
kubernetes_logo_border: string;

openstack_logo_link: String;
openstack_api_logo: String;
openstack_conf_logo: String;
openstack_scale_logo: String;
static_img_folder: String = 'static/webapp/assets/img/';
openstack_logo_link: string;
openstack_api_logo: string;
openstack_conf_logo: string;
openstack_scale_logo: string;
static_img_folder: string = 'static/webapp/assets/img/';

WIKI_WORKSHOPS: string = WIKI_WORKSHOPS;
SIMPLE_VM_LINK: string = SIMPLE_VM_LINK;
Expand Down
72 changes: 39 additions & 33 deletions src/app/shared/breadcrumb.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,46 +6,52 @@ import { filter } from 'rxjs/operators';
// tslint:disable
@Component({
selector: 'app-breadcrumbs',
template: `
<ng-template ngFor let-breadcrumb [ngForOf]="breadcrumbs" let-last=last>
<li class="breadcrumb-item"
*ngIf="breadcrumb.label.title&&breadcrumb.url.substring(breadcrumb.url.length-1) === '/'||breadcrumb.label.title&&last"
[ngClass]="{active: last}">
<a *ngIf="!last" [routerLink]="breadcrumb.url">{{breadcrumb.label.title}}</a>
<span *ngIf="last" [routerLink]="breadcrumb.url">{{breadcrumb.label.title}}</span>
</li>
</ng-template>`,
template: ` <ng-template ngFor let-breadcrumb [ngForOf]="breadcrumbs" let-last="last">
<li
class="breadcrumb-item"
*ngIf="
(breadcrumb.label.title && breadcrumb.url.substring(breadcrumb.url.length - 1) === '/') ||
(breadcrumb.label.title && last)
"
[ngClass]="{ active: last }"
>
<a *ngIf="!last" [routerLink]="breadcrumb.url">{{ breadcrumb.label.title }}</a>
<span *ngIf="last" [routerLink]="breadcrumb.url">{{ breadcrumb.label.title }}</span>
</li>
</ng-template>`,
})
export class BreadcrumbsComponent implements OnInit {
breadcrumbs: Object[];
breadcrumbs: object[];

constructor(private router: Router, private route: ActivatedRoute) {
constructor(
private router: Router,
private route: ActivatedRoute,
) {
this.router = router;
this.route = route;
}

ngOnInit(): void {
this.router.events.pipe(filter(event => event instanceof NavigationEnd))
.subscribe(() => {
this.breadcrumbs = [];
let currentRoute = this.route.root;
let url = '';
do {
const childrenRoutes = currentRoute.children;
currentRoute = null;
// eslint-disable-next-line no-loop-func
childrenRoutes.forEach(route => {
if (route.outlet === 'primary') {
const routeSnapshot = route.snapshot;
url += `/${routeSnapshot.url.map(segment => segment.path).join('/')}`;
this.breadcrumbs.push({
label: route.snapshot.data,
url,
});
currentRoute = route;
}
});
} while (currentRoute);
});
this.router.events.pipe(filter(event => event instanceof NavigationEnd)).subscribe(() => {
this.breadcrumbs = [];
let currentRoute = this.route.root;
let url = '';
do {
const childrenRoutes = currentRoute.children;
currentRoute = null;
// eslint-disable-next-line no-loop-func
childrenRoutes.forEach(route => {
if (route.outlet === 'primary') {
const routeSnapshot = route.snapshot;
url += `/${routeSnapshot.url.map(segment => segment.path).join('/')}`;
this.breadcrumbs.push({
label: route.snapshot.data,
url,
});
currentRoute = route;
}
});
} while (currentRoute);
});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export class ApplicationBaseClassComponent extends AbstractBaseClass {
/**
*
*/
constantStrings: Object;
constantStrings: object;

/**
* List of flavors.
Expand Down
2 changes: 1 addition & 1 deletion src/app/virtualmachines/conda/res-env.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export class ResEnvComponent implements OnInit, OnChanges, OnDestroy {
@Input() blockedImageTagsResenv: BlockedImageTagResenv[];
@Input() workshopMode: boolean = false;

Object: Object = Object;
Object: object = Object;

templates_to_block: string[] = [];

Expand Down
4 changes: 2 additions & 2 deletions src/app/virtualmachines/flavordetail.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export class FlavorDetailComponent implements OnInit, OnChanges {

// icons for graphics within flavor cards:

STATIC_IMG_FOLDER: String = 'static/webapp/assets/img/';
STATIC_IMG_FOLDER: string = 'static/webapp/assets/img/';

CPU_ICON_PATH: string = `${this.STATIC_IMG_FOLDER}/new_instance/cpu_icon.svg`;
RAM_ICON_PATH: string = `${this.STATIC_IMG_FOLDER}/new_instance/ram_icon.svg`;
Expand All @@ -72,7 +72,7 @@ export class FlavorDetailComponent implements OnInit, OnChanges {
pullDrag: false,
dots: true,
navSpeed: 700,
navText: ['<i class=\'fa fa-chevron-left\'></i>', '<i class=\'fa fa-chevron-right\'></i>'],
navText: ["<i class='fa fa-chevron-left'></i>", "<i class='fa fa-chevron-right'></i>"],
responsive: {
0: {
items: 1,
Expand Down
2 changes: 1 addition & 1 deletion src/app/virtualmachines/imageCarouselSlide.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export class ImageCarouselSlideComponent implements OnInit {
object_fit_scale: string = 'scale';
image_visible: boolean = true;
regexp_data_test_id: RegExp = /[ ().]/g;
STATIC_IMG_FOLDER: String = 'static/webapp/assets/img/';
STATIC_IMG_FOLDER: string = 'static/webapp/assets/img/';

RAM_ICON_PATH: string = `${this.STATIC_IMG_FOLDER}/new_instance/ram_icon.svg`;
STORAGE_ICON_PATH: string = `${this.STATIC_IMG_FOLDER}/new_instance/storage_icon.svg`;
Expand Down
9 changes: 6 additions & 3 deletions src/app/virtualmachines/imagedetail.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export class ImageDetailComponent implements OnInit, OnDestroy {
}
}

STATIC_IMG_FOLDER: String = 'static/webapp/assets/img/';
STATIC_IMG_FOLDER: string = 'static/webapp/assets/img/';
RAM_ICON_PATH: string = `${this.STATIC_IMG_FOLDER}/new_instance/ram_icon.svg`;
STORAGE_ICON_PATH: string = `${this.STATIC_IMG_FOLDER}/new_instance/storage_icon.svg`;

Expand All @@ -76,7 +76,7 @@ export class ImageDetailComponent implements OnInit, OnDestroy {
pullDrag: false,
dots: true,
navSpeed: 700,
navText: ['<i class=\'fa fa-chevron-left\'></i>', '<i class=\'fa fa-chevron-right\'></i>'],
navText: ["<i class='fa fa-chevron-left'></i>", "<i class='fa fa-chevron-right'></i>"],
responsive: {
0: {
items: 1,
Expand All @@ -94,7 +94,10 @@ export class ImageDetailComponent implements OnInit, OnDestroy {
nav: true,
};

constructor(private imageService: ImageService, private condaService: BiocondaService) {
constructor(
private imageService: ImageService,
private condaService: BiocondaService,
) {
// eslint-disable-next-line no-empty-function
}

Expand Down
6 changes: 3 additions & 3 deletions src/app/vo_manager/number-charts/number-charts.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export class NumberChartsComponent implements OnInit {
getData(): void {
/* tslint:disable */
this.numbersService.getProjectCounterTimeline().subscribe(
(result: Object[]): void => {
(result: object[]): void => {
result.forEach((valuePack: any): void => {
this.runningOpenstack.push(valuePack['running_openstack']);
this.runningSimpleVM.push(valuePack['running_simple_vm']);
Expand All @@ -89,8 +89,8 @@ export class NumberChartsComponent implements OnInit {
);

this.numbersService.getRamCoresTimeline().subscribe(
(result: Object[]): void => {
result.forEach((valuePack: Object): void => {
(result: object[]): void => {
result.forEach((valuePack: object): void => {
this.openstackCores.push(valuePack['openstack_cores']);
this.openstackRam.push(valuePack['openstack_ram']);
this.simpleVMCores.push(valuePack['simple_vm_cores']);
Expand Down

0 comments on commit 07be5df

Please sign in to comment.