-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#22] Split Angular services and modules, cleanup
- Loading branch information
1 parent
2acb016
commit 82248d4
Showing
9 changed files
with
700 additions
and
649 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,45 +3,24 @@ | |
* | ||
* Created by [email protected] on 11/4/17. | ||
*/ | ||
app = angular.module( | ||
'browserperfdash.dashboard.controller', | ||
[ | ||
'browserperfdash.dashboard.services', | ||
'ngAnimate', | ||
'ngSanitize', | ||
'ui.bootstrap' | ||
] | ||
); | ||
|
||
app = angular.module('browserperfdash.dashboard.static', ['ngResource','ngAnimate', 'ngSanitize', 'ui.bootstrap']); | ||
|
||
app.factory('botReportsImprovementFactory', function($resource) { | ||
return $resource('/dash/report/improvement/:days_since/:platform/:gpu/:cpu/:browser/:test/:bot/:limit'); | ||
}); | ||
|
||
app.factory('botReportsRegressionFactory', function($resource) { | ||
return $resource('/dash/report/regression/:days_since/:platform/:gpu/:cpu/:browser/:test/:bot/:limit'); | ||
}); | ||
|
||
app.factory('browserFactory', function($resource) { | ||
return $resource('/dash/browser_results_exist'); | ||
}); | ||
|
||
app.factory('botFullDetailsForResultsExistFactory', function($resource) { | ||
return $resource('/dash/bot_full_details_for_exist/:browser'); | ||
}); | ||
|
||
app.factory('platformFactory', function($resource) { | ||
return $resource('/dash/platform_results_exist'); | ||
}); | ||
|
||
app.factory('gpuFactory', function($resource) { | ||
return $resource('/dash/gpu_results_exist'); | ||
}); | ||
|
||
app.factory('cpuArchFactory', function($resource) { | ||
return $resource('/dash/cpu_results_exist'); | ||
}); | ||
|
||
app.factory('testsForBrowserAndBotFactory', function ($resource) { | ||
return $resource('/dash/tests_for_browser_bot/:browser/:bot'); | ||
}); | ||
|
||
|
||
app.controller('DeltaController', function($scope, botReportsImprovementFactory, botReportsRegressionFactory, | ||
browserFactory, botFullDetailsForResultsExistFactory, platformFactory, gpuFactory, | ||
cpuArchFactory, testsForBrowserAndBotFactory, $interval, $sce, $filter) { | ||
app.controller( | ||
'DeltaController', | ||
function( | ||
$scope, botReportsImprovementFactory, botReportsRegressionFactory, | ||
browserFactory, botFullDetailsForResultsExistFactory, platformFactory, | ||
gpuFactory, cpuArchFactory, testsForBrowserAndBotFactory, $interval, | ||
$sce, $filter | ||
) { | ||
$scope.browsers = browserFactory.query(); | ||
$scope.bots = botFullDetailsForResultsExistFactory.query({ | ||
browser: 'all' | ||
|
38 changes: 38 additions & 0 deletions
38
dashboard/static/js/app_controllers/dashboard/dashboard.services.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/** | ||
* Angular services for dashboard controls on index.html | ||
* | ||
* Created by [email protected] on 01/07/17. | ||
*/ | ||
app = angular.module('browserperfdash.dashboard.services', ['ngResource']); | ||
|
||
app.factory('botReportsImprovementFactory', function($resource) { | ||
return $resource('/dash/report/improvement/:days_since/:platform/:gpu/:cpu/:browser/:test/:bot/:limit'); | ||
}); | ||
|
||
app.factory('botReportsRegressionFactory', function($resource) { | ||
return $resource('/dash/report/regression/:days_since/:platform/:gpu/:cpu/:browser/:test/:bot/:limit'); | ||
}); | ||
|
||
app.factory('browserFactory', function($resource) { | ||
return $resource('/dash/browser_results_exist'); | ||
}); | ||
|
||
app.factory('botFullDetailsForResultsExistFactory', function($resource) { | ||
return $resource('/dash/bot_full_details_for_exist/:browser'); | ||
}); | ||
|
||
app.factory('platformFactory', function($resource) { | ||
return $resource('/dash/platform_results_exist'); | ||
}); | ||
|
||
app.factory('gpuFactory', function($resource) { | ||
return $resource('/dash/gpu_results_exist'); | ||
}); | ||
|
||
app.factory('cpuArchFactory', function($resource) { | ||
return $resource('/dash/cpu_results_exist'); | ||
}); | ||
|
||
app.factory('testsForBrowserAndBotFactory', function ($resource) { | ||
return $resource('/dash/tests_for_browser_bot/:browser/:bot'); | ||
}); |
Oops, something went wrong.