diff --git a/frontend/main/src/app/insight/insight.component.html b/frontend/main/src/app/insight/insight.component.html index 4741b70..950fa7d 100644 --- a/frontend/main/src/app/insight/insight.component.html +++ b/frontend/main/src/app/insight/insight.component.html @@ -4,7 +4,7 @@
-

{{countPackages}}

+

{{countPacks()}}

New packages

@@ -19,7 +19,7 @@

{{countPackages}}

-

{{countBounce}}%

+

{{countBounces()}}%

Bounce Rate

@@ -35,7 +35,7 @@

{{countBounce}}%

-

{{countClient}}

+

{{countClients()}}

Registered Users

@@ -49,8 +49,8 @@

{{countClient}}

-
-

{{countVisitors}}

+
+

{{countVisits()}}

Visits

diff --git a/frontend/main/src/app/insight/insight.component.ts b/frontend/main/src/app/insight/insight.component.ts index f94e47c..8df0566 100644 --- a/frontend/main/src/app/insight/insight.component.ts +++ b/frontend/main/src/app/insight/insight.component.ts @@ -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)=>{ @@ -51,6 +51,7 @@ export class InsightComponent implements OnInit { this.countBounce=response }) + } @@ -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 + } }