From 7f2c8a6f78b95f23e85a0ec398bfbbd1ab5c2cb5 Mon Sep 17 00:00:00 2001 From: Ludek <13610612+ludeknovy@users.noreply.github.com> Date: Tue, 27 Apr 2021 21:15:32 +0200 Subject: [PATCH] request stats refactroing (#140) --- src/app/app.module.ts | 2 + .../item-detail/item-detail.component.html | 128 +----------- .../item-detail/item-detail.component.spec.ts | 1 - src/app/item-detail/item-detail.component.ts | 95 +-------- .../request-stats-compare.component.css | 0 .../request-stats-compare.component.html | 116 +++++++++++ .../request-stats-compare.component.spec.ts | 87 ++++++++ .../request-stats-compare.component.ts | 190 ++++++++++++++++++ 8 files changed, 403 insertions(+), 216 deletions(-) create mode 100644 src/app/item-detail/request-stats-compare/request-stats-compare.component.css create mode 100644 src/app/item-detail/request-stats-compare/request-stats-compare.component.html create mode 100644 src/app/item-detail/request-stats-compare/request-stats-compare.component.spec.ts create mode 100644 src/app/item-detail/request-stats-compare/request-stats-compare.component.ts diff --git a/src/app/app.module.ts b/src/app/app.module.ts index aa54e93f..e0a74aa9 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -65,6 +65,7 @@ import { LabelChartComponent } from './item-detail/label-chart/label-chart.compo import { AnalyzeChartsComponent } from './item-detail/analyze-charts/analyze-charts.component'; import { AddMetricComponent } from './item-detail/analyze-charts/add-metric/add-metric.component'; import { ScenarioTrendsComponent } from './scenario/scenario-trends/scenario-trends.component'; +import { RequestStatsCompareComponent } from './item-detail/request-stats-compare/request-stats-compare.component'; const appRoutes: Routes = [ { path: 'dashboard', component: DashboardComponent, canActivate: [AuthGuard] }, @@ -150,6 +151,7 @@ const appRoutes: Routes = [ AnalyzeChartsComponent, AddMetricComponent, ScenarioTrendsComponent, + RequestStatsCompareComponent, ], imports: [ RouterModule.forRoot( diff --git a/src/app/item-detail/item-detail.component.html b/src/app/item-detail/item-detail.component.html index 5d9b565f..038da7ff 100644 --- a/src/app/item-detail/item-detail.component.html +++ b/src/app/item-detail/item-detail.component.html @@ -160,11 +160,12 @@
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
-
- |
- - | -- | -
---|---|---|---|---|---|---|---|---|---|---|---|---|
{{_.label}} | -{{_.samples}} | -{{_.avgResponseTime}} 0 ? 'value-positive' : 'value-negative'" - *ngIf="_.avgDiff">{{_.avgDiff}} | -{{_.minResponseTime}} 0 ? 'value-positive' : 'value-negative'" - *ngIf="_.minDiff">{{_.minDiff}} | -{{_.maxResponseTime}} 0 ? 'value-positive' : 'value-negative'" - *ngIf="_.maxDiff">{{_.maxDiff}} | -{{_.n0}} 0 ? 'value-positive' : 'value-negative'" - *ngIf="_.n0Diff">{{_.n0Diff}} | -{{_.n5}} 0 ? 'value-positive' : 'value-negative'" - *ngIf="_.n5Diff">{{_.n5Diff}} | -{{_.n9}} 0 ? 'value-positive' : 'value-negative'" - *ngIf="_.n9Diff">{{_.n9Diff}} | -{{_.throughput || "n/a"}} {{_.throughputDiff}} | -{{convertBytesToMbps(_.bytesPerSecond + _.bytesSentPerSecond) || "n/a"}} {{_.bytesDiff}} | -{{_.errorRate}} % 0 ? 'value-positive' : 'value-negative'" - *ngIf="_.errorRateDiff">{{_.errorRateDiff}} - | -
- |
-
- |
-
+ |
+
+ |
+
+ |
+
+ |
+
+ |
+
+ |
+
+ |
+
+ |
+
+ |
+
+ |
+
+ |
+ + | ++ | +
---|---|---|---|---|---|---|---|---|---|---|---|---|
{{_.label}} | +{{_.samples}} | +0 ? 'value-positive' : 'value-negative' : ''">{{_.avgResponseTime}} | +0 ? 'value-positive' : 'value-negative' : ''">{{_.minResponseTime}} | +0 ? 'value-positive' : 'value-negative' : ''">{{_.maxResponseTime}} | +0 ? 'value-positive' : 'value-negative' : ''">{{_.n0}} | +0 ? 'value-positive' : 'value-negative' : ''">{{_.n5}} | +0 ? 'value-positive' : 'value-negative' : ''">{{_.n9}} | ++ 0 ? 'value-negative' : 'value-positive' : ''">{{_.throughput}} + | ++ 0 ? 'value-positive' : 'value-negative' : ''">{{convertBytesToMbps(_.bytesPerSecond + _.bytesSentPerSecond) || 0 }} + | ++ 0 ? 'value-positive' : 'value-negative' : ''">{{_.errorRate}} + | +
+ |
+
+ |
+