-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New Pages: 1. Load Test Chooser Page Bugs Corrected: 1. Dates where not being sorted corrctly in the software testing chooser page To Be Corrected: 0. On product delete, delete trace results 1. On product delete, delete flamegraph result
- Loading branch information
1 parent
1e2f975
commit abe4843
Showing
18 changed files
with
186 additions
and
89 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
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
6 changes: 3 additions & 3 deletions
6
...-restart/render-restart-routing.module.ts → ...ooser/load-test-chooser-routing.module.ts
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,17 +1,17 @@ | ||
import { NgModule } from '@angular/core'; | ||
import { Routes, RouterModule } from '@angular/router'; | ||
|
||
import { RenderRestartPage } from './render-restart.page'; | ||
import { LoadTestChooserPage } from './load-test-chooser.page'; | ||
|
||
const routes: Routes = [ | ||
{ | ||
path: '', | ||
component: RenderRestartPage | ||
component: LoadTestChooserPage | ||
} | ||
]; | ||
|
||
@NgModule({ | ||
imports: [RouterModule.forChild(routes)], | ||
exports: [RouterModule], | ||
}) | ||
export class RenderRestartPageRoutingModule {} | ||
export class LoadTestChooserPageRoutingModule {} |
22 changes: 22 additions & 0 deletions
22
src/app/pages/load_test/load-test-chooser/load-test-chooser.module.ts
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,22 @@ | ||
import { NgModule } from '@angular/core'; | ||
import { CommonModule } from '@angular/common'; | ||
import { FormsModule } from '@angular/forms'; | ||
|
||
import { IonicModule } from '@ionic/angular'; | ||
|
||
import { LoadTestChooserPageRoutingModule } from './load-test-chooser-routing.module'; | ||
|
||
import { LoadTestChooserPage } from './load-test-chooser.page'; | ||
import {ComponentsModule} from "../../../components/components.module"; | ||
|
||
@NgModule({ | ||
imports: [ | ||
CommonModule, | ||
FormsModule, | ||
IonicModule, | ||
LoadTestChooserPageRoutingModule, | ||
ComponentsModule | ||
], | ||
declarations: [LoadTestChooserPage] | ||
}) | ||
export class LoadTestChooserPageModule {} |
34 changes: 34 additions & 0 deletions
34
src/app/pages/load_test/load-test-chooser/load-test-chooser.page.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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
|
||
<app-header [title]="'Load Test Chooser'"></app-header> | ||
|
||
<ion-content [fullscreen]="true"> | ||
<ion-refresher slot="fixed" (ionRefresh)="doRefresh($event)"> | ||
<ion-refresher-content></ion-refresher-content> | ||
</ion-refresher> | ||
|
||
<ion-grid> | ||
<app-title [title]="'Load Test Chooser'"></app-title> | ||
<ion-row class="lg:m-10 md:m-10"> | ||
<ion-col size="12" size-md="4" size-lg="4" class=""> | ||
<p>Choose a product and a product step to load test the product step.</p> | ||
</ion-col> | ||
</ion-row> | ||
<ion-row class="lg:m-10 md:m-10"> | ||
<ion-col size="12" size-md="4" size-lg="4" class="" *ngFor="let product of products"> | ||
<ion-card> | ||
<ion-card-header> | ||
<ion-card-title>{{ product.productObjective }}</ion-card-title> | ||
</ion-card-header> | ||
<ion-card-content> | ||
<ion-list> | ||
<ion-item *ngFor="let step of product.productSteps" (click)="navigateToLoadTest(product, step)"> | ||
<ion-label>{{ step }}</ion-label> | ||
<ion-icon name="arrow-forward" color="primary"></ion-icon> | ||
</ion-item> | ||
</ion-list> | ||
</ion-card-content> | ||
</ion-card> | ||
</ion-col> | ||
</ion-row> | ||
</ion-grid> | ||
</ion-content> |
File renamed without changes.
17 changes: 17 additions & 0 deletions
17
src/app/pages/load_test/load-test-chooser/load-test-chooser.page.spec.ts
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,17 @@ | ||
import { ComponentFixture, TestBed } from '@angular/core/testing'; | ||
import { LoadTestChooserPage } from './load-test-chooser.page'; | ||
|
||
describe('LoadTestChooserPage', () => { | ||
let component: LoadTestChooserPage; | ||
let fixture: ComponentFixture<LoadTestChooserPage>; | ||
|
||
beforeEach(() => { | ||
fixture = TestBed.createComponent(LoadTestChooserPage); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
86 changes: 86 additions & 0 deletions
86
src/app/pages/load_test/load-test-chooser/load-test-chooser.page.ts
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,86 @@ | ||
import { Component, OnInit } from '@angular/core'; | ||
import {Product} from "../../../interfaces/product"; | ||
import {ProductService} from "../../../services/product.service"; | ||
import {Router} from "@angular/router"; | ||
import {LoadingController} from "@ionic/angular"; | ||
import {User} from "../../../interfaces/user"; | ||
|
||
@Component({ | ||
selector: 'app-load-test-chooser', | ||
templateUrl: './load-test-chooser.page.html', | ||
styleUrls: ['./load-test-chooser.page.scss'], | ||
}) | ||
export class LoadTestChooserPage implements OnInit { | ||
products: Product[] = []; | ||
|
||
/** | ||
* @constructor | ||
* @param {ProductService} productService - The service to handle product operations. | ||
* @param {Router} router - The router object to handle routing operations. | ||
*/ | ||
constructor( | ||
private productService: ProductService, | ||
private router: Router, | ||
private loadingCtrl: LoadingController | ||
) { | ||
} | ||
|
||
ngOnInit() { | ||
} | ||
|
||
/** | ||
* @method ionViewWillEnter | ||
* @description Lifecycle hook that is called when the page is about to enter and become the active page. | ||
*/ | ||
async ionViewWillEnter() { | ||
await this.showLoading(); | ||
this.getAllProducts(); | ||
await this.hideLoading(); | ||
} | ||
|
||
/** | ||
* @method getAllProducts | ||
* @description Fetches all products for the current user's organization. | ||
*/ | ||
async getAllProducts(){ | ||
const userString = localStorage.getItem('user'); | ||
if (!userString) { | ||
return; | ||
} | ||
const user: User = JSON.parse(userString); | ||
const orgName = user.orgName!; | ||
this.products = await this.productService.getProducts(orgName); | ||
} | ||
|
||
/** | ||
* @method doRefresh | ||
* @description Refreshes the product list. | ||
* @param {any} $event - The event object. | ||
*/ | ||
async doRefresh($event: any) { | ||
this.getAllProducts().then(() => { | ||
$event.target.complete(); | ||
}); | ||
} | ||
|
||
async navigateToLoadTest(product: Product, step: string) { | ||
await this.router.navigate(['/load-test', {productObjective: product.productObjective, step: step}]); | ||
} | ||
|
||
|
||
/** | ||
* Show a loading spinner. | ||
*/ | ||
async showLoading() { | ||
const loading = await this.loadingCtrl.create({ | ||
}); | ||
await loading.present(); | ||
} | ||
|
||
/** | ||
* Hide the loading spinner. | ||
*/ | ||
async hideLoading() { | ||
await this.loadingCtrl.dismiss(); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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 was deleted.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.