Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions frontend/main/src/app/insight/insight.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<div class="small-box bg-gradient-success">
<div class="inner">
<h3>{{countPackages}}</h3>
<h3>{{countPacks()}}</h3>
<p>New packages</p>

</div>
Expand All @@ -19,7 +19,7 @@ <h3>{{countPackages}}</h3>

<div class="small-box bg-gradient-yellow">
<div class="inner">
<h3>{{countBounce}}<sup style="font-size: 20px">%</sup></h3>
<h3>{{countBounces()}}<sup style="font-size: 20px">%</sup></h3>
<p>Bounce Rate</p>

</div>
Expand All @@ -35,7 +35,7 @@ <h3>{{countBounce}}<sup style="font-size: 20px">%</sup></h3>
<div class="small-box bg-gradient-blue">
<div class="inner">

<h3>{{countClient}}</h3>
<h3>{{countClients()}}</h3>
<p>Registered Users</p>

</div>
Expand All @@ -49,8 +49,8 @@ <h3>{{countClient}}</h3>
<div class="col-lg-3 col-6">

<div class="small-box bg-gradient-primary">
<div class="inner">
<h3>{{countVisitors}}</h3>
<div class="inner" >
<h3>{{countVisits()}}</h3>
<p>Visits</p>
</div>
<div class="icon">
Expand Down
31 changes: 27 additions & 4 deletions frontend/main/src/app/insight/insight.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ export class InsightComponent implements OnInit {
});

this.http.get(this.APICountVisits)
.subscribe((resultado:any) => {
var count = Object.keys(resultado).length
this.countVisitors = count
});
.subscribe((resultado:any) => {
var count = Object.keys(resultado).length
this.countVisitors = count
});

this.http.get(this.APICountPackages)
.subscribe((response:any)=>{
Expand All @@ -51,6 +51,7 @@ export class InsightComponent implements OnInit {
this.countBounce=response
})



}

Expand All @@ -66,5 +67,27 @@ export class InsightComponent implements OnInit {
this.router.navigateByUrl('visits')
}

countVisits():number{
return this.countVisitors
}

countClients():number{
return this.countClient
}

countPacks():number {
return 1
// while(true){
// setTimeout(() => {
// return this.countPackages
// }, 3000);

// }

}

countBounces(): number{
return this.countBounce
}

}