-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into snyk-upgrade-e19ddd06753a27eec69d5a13d91fd0a2
- Loading branch information
Showing
15 changed files
with
411 additions
and
322 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { TestBed } from "@angular/core/testing"; | ||
|
||
import { ComparisonStatsService } from "./comparison-stats.service"; | ||
|
||
describe("ComparisonStatsService", () => { | ||
let service: ComparisonStatsService; | ||
|
||
beforeEach(() => { | ||
TestBed.configureTestingModule({}); | ||
service = TestBed.inject(ComparisonStatsService); | ||
}); | ||
|
||
it("should be created", () => { | ||
expect(service).toBeTruthy(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { Injectable } from "@angular/core"; | ||
import { BehaviorSubject } from "rxjs"; | ||
import { ItemStatistics } from "../items.service.model"; | ||
|
||
@Injectable({ | ||
providedIn: 'root' | ||
}) | ||
export class ComparisonStatsService { | ||
|
||
private requestStats = new BehaviorSubject<ItemStatistics[]>([]); | ||
|
||
requestStats$ = this.requestStats.asObservable(); | ||
|
||
|
||
setRequestStats(data: ItemStatistics[]) { | ||
this.requestStats.next(data); | ||
} | ||
|
||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,3 +11,8 @@ | |
.monitoring-data:hover { | ||
color: #105196 | ||
} | ||
|
||
|
||
.card { | ||
margin-top: 20px; | ||
} |
31 changes: 14 additions & 17 deletions
31
src/app/item-detail/monitoring-stats/monitoring-stats.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,16 @@ | ||
<ng-template #content let-modal> | ||
<div class="modal-header" ngbAutofocus> | ||
<h5 class="modal-title" id="modal-basic-title">Monitoring stats</h5> | ||
<button type="button" style="outline: none;" class="btn-close" aria-label="" (click)="modal.dismiss('Cross click')"> | ||
|
||
</button> | ||
</div> | ||
<div class="modal-body"> | ||
<div *ngIf="monitoringChartOptions"> | ||
<highcharts-chart [Highcharts]="Highcharts" [options]="monitoringChartOptions" [callbackFunction]="chartCallback" [(update)]="updateFlag" | ||
[constructorType]="chartConstructor" style="width: auto; height: 400px; display: block;"></highcharts-chart> | ||
<div class="row charts"> | ||
<div class="col tab-charts" *ngIf="data.length > 0"> | ||
<div class="card overview-chart-card card-shadow"> | ||
<h6 class="card-header bg-transparent">Monitoring</h6> | ||
<div class="card-body"> | ||
<div class="chart"> | ||
<highcharts-chart [Highcharts]="Highcharts" [options]="monitoringChartOptions" | ||
[callbackFunction]="chartCallback" | ||
[(update)]="updateFlag" | ||
[constructorType]="chartConstructor" | ||
style="width: auto; height: 400px; display: block;"></highcharts-chart> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</ng-template> | ||
|
||
|
||
|
||
|
||
<a class="monitoring-data" (click)="open(content)"><i class="fas fa-heartbeat"></i></a> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.