@@ -19,10 +19,12 @@ export const statistics = {
1919 this . name = data . name
2020 this . groups = data . groups ? data . groups : { }
2121 this . data = [ ]
22+ this . uniqueVisitorOfTheMonth = 0
2223 this . get ( )
23- this . getProfiles ( )
24+ /* this.getProfiles()
2425 this.getModules()
2526 this.getModulesByProfile()
27+ this.getChartData("UNIQUE_VISITORS_MONTH",statistics.scope.monthlySumFunction,statistics.scope.date)*/
2628 } ,
2729 scope : { } as any
2830}
@@ -73,6 +75,7 @@ statistics.IndicatorContainer.prototype = {
7375 stats . data [ prop ] = data [ prop ]
7476 }
7577 if ( statistics . scope ) statistics . scope . $apply ( )
78+ stats . getProfiles ( )
7679 } )
7780 } ,
7881 //AJAX get - retrieves values by profile
@@ -87,6 +90,7 @@ statistics.IndicatorContainer.prototype = {
8790 return http ( ) . get ( this . API_PATH + 'list' + getquery ) . done ( function ( data ) {
8891 stats . data . profil = data
8992 if ( statistics . scope ) statistics . scope . $apply ( )
93+ stats . getModules ( )
9094 } )
9195 } ,
9296 //AJAX get - retrieves values by module
@@ -101,6 +105,7 @@ statistics.IndicatorContainer.prototype = {
101105 return http ( ) . get ( this . API_PATH + 'list' + getquery ) . done ( function ( data ) {
102106 stats . data . module = data
103107 if ( statistics . scope ) statistics . scope . $apply ( )
108+ stats . getModulesByProfile ( )
104109 } )
105110 } ,
106111 //AJAX GET - retrieves values by profile by module
@@ -115,6 +120,7 @@ statistics.IndicatorContainer.prototype = {
115120 return http ( ) . get ( this . API_PATH + 'list' + getquery ) . done ( function ( data ) {
116121 stats . data . moduleByProfile = data
117122 if ( statistics . scope ) statistics . scope . $apply ( )
123+ stats . getChartData ( "UNIQUE_VISITORS_MONTH" , statistics . scope . lastDayOfMonthAggregationFunction , statistics . scope . date )
118124 } )
119125 } ,
120126 //Returns the last value (date wise)
@@ -276,6 +282,8 @@ statistics.IndicatorContainer.prototype = {
276282 refDate = refDate . add ( 1 , 'd' )
277283 }
278284
285+ this . uniqueVisitorOfTheMonth = chartData [ chartData . length - 1 ] [ 0 ] ;
286+
279287 return chartData
280288 }
281289}
0 commit comments