Skip to content

Commit

Permalink
linter fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ludeknovy committed Sep 14, 2024
1 parent 147003d commit 16befdf
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 25 deletions.
8 changes: 4 additions & 4 deletions src/app/_services/comparison-stats.service.spec.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import { TestBed } from '@angular/core/testing';
import { TestBed } from "@angular/core/testing";

import { ComparisonStatsService } from './comparison-stats.service';
import { ComparisonStatsService } from "./comparison-stats.service";

describe('ComparisonStatsService', () => {
describe("ComparisonStatsService", () => {
let service: ComparisonStatsService;

beforeEach(() => {
TestBed.configureTestingModule({});
service = TestBed.inject(ComparisonStatsService);
});

it('should be created', () => {
it("should be created", () => {
expect(service).toBeTruthy();
});
});
40 changes: 19 additions & 21 deletions src/app/item-detail/stats-compare/stats-compare.component.ts
Original file line number Diff line number Diff line change
@@ -1,38 +1,36 @@
import {Component, OnInit, Output, EventEmitter, Input} from '@angular/core';
import { Component, OnInit, Output, EventEmitter, Input } from "@angular/core";
import { NgbModal } from "@ng-bootstrap/ng-bootstrap";
import { ItemsService } from "src/app/items.service";
import { ActivatedRoute } from "@angular/router";
import { ActivatedRoute, Params } from "@angular/router";
import { Observable } from "rxjs";
import {ItemDetail, Items} from 'src/app/items.service.model';
import { ItemDetail, Items } from "src/app/items.service.model";
import { ItemsApiService } from "src/app/items-api.service";
import {ComparisonChartService} from '../../_services/comparison-chart.service';
import {ToastrService} from 'ngx-toastr';
import {ComparisonStatsService} from '../../_services/comparison-stats.service';
import { ComparisonChartService } from "../../_services/comparison-chart.service";
import { ToastrService } from "ngx-toastr";
import { ComparisonStatsService } from "../../_services/comparison-stats.service";

const LIMIT = 15;
const OFFSET = 15;


@Component({
selector: "app-stats-compare",
templateUrl: "./stats-compare.component.html",
styleUrls: ["./stats-compare.component.css"]
selector: 'app-stats-compare',
templateUrl: './stats-compare.component.html',
styleUrls: ['./stats-compare.component.css']
})

export class StatsCompareComponent implements OnInit {
items$: Observable<Items>;
page = 1;
pageSize = LIMIT;
params;
selectedTestItem;

comparingData;
comparedMetadata;
params: Params;
selectedTestItem: string;
comparingData: ItemDetail;
comparedMetadata: { id: string; maxVu: number };
comparisonWarning = [];



@Input() itemData: ItemDetail
@Input() itemData: ItemDetail;

constructor(
private toastr: ToastrService,
Expand All @@ -43,7 +41,8 @@ export class StatsCompareComponent implements OnInit {
private route: ActivatedRoute,
private comparisonChartService: ComparisonChartService,
private comparisonStatsService: ComparisonStatsService
) { }
) {
}

ngOnInit() {
this.items$ = this.itemsService.items$;
Expand All @@ -55,7 +54,6 @@ export class StatsCompareComponent implements OnInit {
open(content) {
this.modalService.open(content, { size: "xl" });
this.itemsService.fetchItems(this.params.projectName, this.params.scenarioName, { limit: LIMIT, offset: 0 });

}

loadMore() {
Expand Down Expand Up @@ -114,7 +112,7 @@ export class StatsCompareComponent implements OnInit {
if (data.environment !== this.itemData.environment) {
this.comparisonWarning.push("Environments do differ");
}
this.comparisonStatsService.setRequestStats(data.statistics)
this.comparisonStatsService.setRequestStats(data.statistics);

if (this.comparisonWarning.length) {
this.showComparisonWarnings();
Expand All @@ -133,8 +131,8 @@ export class StatsCompareComponent implements OnInit {
}

resetStatsData() {
this.comparingData = null
this.comparingData = null;
this.comparisonChartService.resetPlot();
this.comparisonStatsService.setRequestStats(null)
this.comparisonStatsService.setRequestStats(null);
}
}

0 comments on commit 16befdf

Please sign in to comment.