Skip to content

Commit

Permalink
fixed linting
Browse files Browse the repository at this point in the history
  • Loading branch information
dweinholz committed Aug 15, 2024
1 parent 55666c3 commit 14a8cbf
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 12 deletions.
10 changes: 5 additions & 5 deletions src/app/api-connector/credits.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ export class CreditsService {
*
* @param group_id
*/
public getCreditsUsageHistoryOfProject(group_id: number): Observable<{}> {
public getCreditsUsageHistoryOfProject(group_id: number): Observable<object> {
return this.http.get(`${ApiSettings.getApiBaseURL()}creditManager/${group_id}/getCreditsHistory/`, {
withCredentials: true,
});
Expand All @@ -124,8 +124,8 @@ export class CreditsService {
flavor_pairs: [string, number][],
compute_center_name: string,
start_timestamp: number,
): Observable<{}> {
const params: {} = {
): Observable<object> {
const params: object = {
hours,
flavor_pairs,
compute_center_name,
Expand All @@ -142,8 +142,8 @@ export class CreditsService {
flavor_pairs: [string, number][],
compute_center_name: string,
start_timestamp: number,
): Observable<{}> {
const params: {} = {
): Observable<object> {
const params: object = {
credits,
flavor_pairs,
compute_center_name,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ export class ModificationRequestComponent implements OnInit, OnDestroy {
}

showSubmitModal(adjustment: boolean): void {
let initialState: {};
let initialState: object;
if (adjustment) {
initialState = {
project: this.project,
Expand Down
13 changes: 7 additions & 6 deletions src/app/projectmanagement/overview.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ import {
ViewChild,
inject,
} from '@angular/core';
import moment from 'moment'; import { forkJoin, Observable, Subscription } from 'rxjs';
import moment from 'moment';
import { forkJoin, Observable, Subscription } from 'rxjs';
import { ActivatedRoute, Router } from '@angular/router';
import { DOCUMENT } from '@angular/common';
import { Chart } from 'chart.js';
Expand Down Expand Up @@ -178,8 +179,8 @@ export class OverviewComponent extends ApplicationBaseClassComponent implements
this.creditHistoryLoaded = false;
this.creditsChart = undefined;
}
} catch (someError) {
// empty catch
} catch (error: Error) {
console.log(error);
}

this.subscription.unsubscribe();
Expand Down Expand Up @@ -217,8 +218,8 @@ export class OverviewComponent extends ApplicationBaseClassComponent implements
if (this.updateCreditsHistoryIntervals) {
clearInterval(this.updateCreditsHistoryIntervals);
}
} catch (someError) {
// empty catch
} catch (error: Error) {
console.log(error);
}
}

Expand Down Expand Up @@ -440,7 +441,7 @@ export class OverviewComponent extends ApplicationBaseClassComponent implements
this.subscription.add(
this.creditsService
.getCreditsUsageHistoryOfProject(Number(this.project_application.project_application_perun_id.toString()))
.subscribe((response: {}): void => {
.subscribe((response: any): void => {
if (response['data_points'] !== undefined) {
const data_points: number[] = response['data_points'];
if (this.creditsChart !== undefined) {
Expand Down

0 comments on commit 14a8cbf

Please sign in to comment.