6 angular.module('opnfvApp')
7 .factory('TableFactory', function($resource, $rootScope, $http) {
9 var BASE_URL = 'http://testresults.opnfv.org/reporting2';
14 success: function (response) {
15 BASE_URL = response.url;
17 error: function (response){
18 alert('fail to get api url, using default: http://testresults.opnfv.org/reporting2')
23 getFilter: function() {
24 return $resource(BASE_URL + '/landing-page/filters', {}, {
31 getScenario: function() {
35 'Content-Type': 'application/x-www-form-urlencoded;charset=utf-8;'
39 return $http.post(BASE_URL + '/landing-page/scenarios', {}, config);
43 getProjectUrl: function() {
44 return $resource(BASE_URL + '/projects-page/projects', {}, {
50 getProjectTestCases: function(name) {
53 'Content-Type': 'application/x-www-form-urlencoded;charset=utf-8;'
56 return $http.get(BASE_URL + '/projects/' + name + '/cases', {}, config)
60 getProjectTestCaseDetail: function() {
61 return $resource(BASE_URL + '/projects/:project/cases/:testcase', { project: '@project', testcase: '@testcase' }, {