Skip to content

Commit 87197c1

Browse files
committed
more small chANGES before shutting down for the day
1 parent a1ce332 commit 87197c1

1 file changed

Lines changed: 17 additions & 15 deletions

File tree

learning_web_proj/angularLearning/app/controllers/reportConfigController.js

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
var cntrlFunction = function ($scope, $routeParams, $location, runReportFactory) {
2+
var cntrlFunction = function ($scope, $routeParams, $location, runReportFactory, productConfig) {
33
$scope.a = 5;
44
$scope.b = 6; //reportConfigController
55

@@ -122,18 +122,20 @@ var cntrlFunction = function ($scope, $routeParams, $location, runReportFactory)
122122
$scope.progressMessage = 'Getting data... (can take a few minutes)'
123123
$scope.progressbarState = 100;
124124
// TODO: modify this query to run a separate query per product
125-
$scope.reportData = runReportFactory.query(
126-
{'startDate': utcStart,
127-
'endDate': utcEnd,
128-
'reportResolution': reportResolution}, function() {
129-
var i, j, row, chartData;
130-
chartData = restructData($scope.reportData);
131-
$scope.chartObject = chartData;
132-
console.log('chartObject');
133-
console.log(JSON.stringify(chartData));
134-
$scope.showprogress = false;
135-
});
136-
125+
//$scope.products = productConfig.query({}, function() {
126+
//console.log("products:" + $scope.products );
127+
$scope.reportData = runReportFactory.query(
128+
{'startDate': utcStart,
129+
'endDate': utcEnd,
130+
'reportResolution': reportResolution}, function() {
131+
var i, j, row, chartData;
132+
chartData = restructData($scope.reportData);
133+
$scope.chartObject = chartData;
134+
console.log('chartObject');
135+
console.log(JSON.stringify(chartData));
136+
$scope.showprogress = false;
137+
});
138+
//)
137139
};
138140

139141
function restructData(inData) {
@@ -211,7 +213,7 @@ var cntrlFunction = function ($scope, $routeParams, $location, runReportFactory)
211213
};
212214
retData.formatters = {};
213215
return retData;
214-
}
216+
};
215217

216218
function showChart() {
217219
$scope.chart = '';
@@ -240,4 +242,4 @@ var cntrlFunction = function ($scope, $routeParams, $location, runReportFactory)
240242

241243
};
242244

243-
ESRIStatsApp.controller('reportConfigController', ['$scope', '$routeParams', '$location', 'runReportFactory', cntrlFunction]);
245+
ESRIStatsApp.controller('reportConfigController', ['$scope', '$routeParams', '$location', 'runReportFactory', 'productConfig', cntrlFunction]);

0 commit comments

Comments
 (0)