Skip to content

Commit

Permalink
New Features:
Browse files Browse the repository at this point in the history
1. Results for Unit Tests
New Pages:
Bugs Corrected:
To Be Corrected:
0. On product delete, delete trace results
1. On product delete, delete flamegraph result
  • Loading branch information
juanfranciscocis committed Sep 9, 2024
1 parent 0578493 commit e1e2ef4
Show file tree
Hide file tree
Showing 13 changed files with 272 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ <h1 class="text-4xl lg:text-6xl font-bold">Traceroute Graph</h1>
<h1 class="text-6xl font-bold text-white">{{ country }}</h1>
</ion-card-title>
<br>
<div echarts [options]="countryOptions[country]" class="demo-chart h-full w-full min-w-full"></div>
<div echarts id="chart-{{country}}" [options]="countryOptions[country]" class="demo-chart h-full w-full min-w-full"></div>
</ion-card>

</ion-col>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ export class GraphTracePage implements OnInit {
* Fetches user data and trace results, then processes the data.
*/
async ionViewWillEnter() {

// Get parameters from the URL
this.route.queryParams.subscribe(params => {
this.productObjective = params['product'];
Expand All @@ -95,11 +96,17 @@ export class GraphTracePage implements OnInit {
this.groupByCountry().then(() => {
this.populateCountries();
this.generateCountryOptions()
});
})
});
});




}



/**
* Fetches the history results for RTT (Round Trip Time) and processes the data.
*/
Expand Down Expand Up @@ -272,6 +279,8 @@ export class GraphTracePage implements OnInit {
animationDelayUpdate: i => i * 5,
};
}


}

/**
Expand Down Expand Up @@ -408,4 +417,8 @@ export class GraphTracePage implements OnInit {







}
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,37 @@ <H2>Choose a type of test.</H2>
<p>Created tests for product step: {{productStep}}</p>
</ion-col>
</ion-row>
<ion-row class="lg:m-10 md:m-10">
<ion-col size="6" size-md="6" size-lg="6" class="">
<ion-card>
<ion-card-header>
<ion-card-title class="flex flex-col justify-center items-center text-green-600">Passed Tests</ion-card-title>
</ion-card-header>
<ion-card-content class="flex flex-col justify-center items-center">
<h1>{{passedUnitTests}}</h1>
</ion-card-content>
</ion-card>
</ion-col>
<ion-col size="6" size-md="6" size-lg="6" class="">
<ion-card>
<ion-card-header>
<ion-card-title class="flex flex-col justify-center items-center text-red-800">Failed Tests</ion-card-title>
</ion-card-header>
<ion-card-content class="flex flex-col justify-center items-center">
<h1>{{ failedUnitTests }}</h1>
</ion-card-content>
</ion-card>
</ion-col>
</ion-row>
<ion-row class="lg:m-10 md:m-10">
<ion-col size="12" size-md="12" size-lg="12" class="">
<ion-card>
<ion-card-content class="h-[25em] ">
<div id="unitChart" echarts [options]="unitTestsChart" class="demo-chart h-full w-full p-4"></div>
</ion-card-content>
</ion-card>
</ion-col>
</ion-row>
<ion-row class="lg:m-10 md:m-10">
@for (unit of unitTests; track unit){
<ion-col size="12" size-md="3" size-lg="3" class="">
Expand All @@ -73,16 +104,17 @@ <H2>Choose a type of test.</H2>
<p> Change the Test State: </p>
<div class="flex flex-row justify-center items-center">
@if (unit.state){
<ion-icon name="checkmark-circle" class="text-green-600 text-3xl"></ion-icon>
<ion-icon name="close-circle" class="text-3xl" (click)="updateUnitState(unit.title)"></ion-icon>
<ion-icon name="checkmark-circle" class="text-green-600 text-3xl" (click)="updateUnitState(unit.title, true)"></ion-icon>
<ion-icon name="close-circle" class="text-3xl" (click)="updateUnitState(unit.title, false)"></ion-icon>
}
@if (!unit.state){
<ion-icon name="checkmark-circle" class="text-3xl" (click)="updateUnitState(unit.title)"></ion-icon>
<ion-icon name="close-circle" class="text-red-800 text-3xl"></ion-icon>
<ion-icon name="checkmark-circle" class="text-3xl" (click)="updateUnitState(unit.title, true)"></ion-icon>
<ion-icon name="close-circle" class="text-red-800 text-3xl" (click)="updateUnitState(unit.title , false)"></ion-icon>
}
</div>
</ion-card-content>
<ion-card-content>
<ion-button color="primary" expand="block" (click)="copyUnitTestCode(unit.title)">Copy Test Code</ion-button>
<ion-button color="danger" expand="block" (click)="deleteUnitTest(unit.title)">Delete Test</ion-button>
</ion-card-content>
</ion-card>
Expand Down Expand Up @@ -138,7 +170,7 @@ <h1>{{ failedSystemTests }}</h1>
<ion-col size="12" size-md="12" size-lg="12" class="">
<ion-card>
<ion-card-content class="h-[25em]">
<div echarts [options]="systemTestsChart" class="demo-chart h-full w-full p-4"></div>
<div id="systemChart" echarts [options]="systemTestsChart" class="demo-chart h-full w-full p-4"></div>
</ion-card-content>
</ion-card>
</ion-col>
Expand Down
Loading

0 comments on commit e1e2ef4

Please sign in to comment.