Skip to content

Commit

Permalink
item report status (#59)
Browse files Browse the repository at this point in the history
  • Loading branch information
ludeknovy authored Apr 16, 2020
1 parent 8502add commit a0d972f
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 4 deletions.
27 changes: 24 additions & 3 deletions src/app/item-detail/item-detail.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,34 @@
[itemDetailData]="{note: itemData.note, environment: itemData.environment, hostname: itemData.hostname, isBase: itemData.isBase, params: itemParams}"
(itemDetailChange)="itemDetailChanged($event)"></app-edit-item>
<app-attachements [params]="itemParams" [attachements]="itemData.attachements"></app-attachements>
<app-delete-item [itemData]="itemParams"></app-delete-item>
<app-delete-item *ngIf="itemData.reportStatus !== 'in_progress'" [itemData]="itemParams"></app-delete-item>
</div>

</app-control-panel>

<div class="not-ready content-container" *ngIf="itemData.reportStatus === 'in_progress'">
<dir class="container-fluid">
<div class="row">
<div class="col-sm">
<div class="alert alert-primary" role="alert">
Test report is being processed. Please wait.
</div>
</div>
</div>
</dir>
</div>
<div class="not-ready content-container" *ngIf="itemData.reportStatus === 'error'">
<dir class="container-fluid">
<div class="row">
<div class="col-sm">
<div class="alert alert-danger" role="alert">
An error occured during processing test report.
</div>
</div>
</div>
</dir>
</div>

<div class="items-overview content-container" *ngIf="itemData.overview !== null">
<div class="items-overview content-container" *ngIf="itemData.overview !== null && itemData.reportStatus === 'ready'">
<div class="container-fluid">
<div class="overview-info">
<div class="row">
Expand Down
2 changes: 1 addition & 1 deletion src/app/item-detail/item-detail.component.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.items-overview {
.items-overview, .not-ready {
padding-left: 200px;
padding-right: 200px;
background-color: #f0f1f4;
Expand Down
1 change: 1 addition & 0 deletions src/app/item-detail/item-detail.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export class ItemDetailComponent implements OnInit {
baseId: null,
note: null,
plot: null,
reportStatus: null,
hostname: null,
statistics: [],
testName: null,
Expand Down
7 changes: 7 additions & 0 deletions src/app/items.service.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ export interface Items {
total: number;
}

export enum ReportStatus {
InProgress = 'in_progress',
Error = 'error',
Ready = 'ready'
}

export interface ItemDetail {
overview: {
avgLatency: number
Expand All @@ -25,6 +31,7 @@ export interface ItemDetail {
startDate: string
throughput: number
};
reportStatus: ReportStatus;
monitoringData: { cpu: [], mem: [], maxCpu?: number, maxMem?: number};
baseId: string;
testName: string;
Expand Down

0 comments on commit a0d972f

Please sign in to comment.