summaryrefslogtreecommitdiffstats
path: root/reporting/pages/app/scripts/factory/table.factory.js
blob: 2a8cbd046bcbaaab34b99b71a0062db9204f7bae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
'use strict';

/**
 * get data factory
 */
angular.module('opnfvApp')
    .factory('TableFactory', function($resource, $rootScope) {

        return {
            getFilter: function() {
                return $resource(BASE_URL + '/filters', {}, {
                    'get': {
                        method: 'GET',

                    }
                });
            },
            getScenario: function() {
                return $resource(BASE_URL + '/scenarios', {}, {
                    'post': {
                        method: 'POST',
                    }
                })
            },
            getProjectUrl: function() {
                return $resource(PROJECT_URL + '/projects-page/projects', {}, {
                    'get': {
                        method: 'GET'
                    }
                })
            },
            getProjectTestCases: function() {
                return $resource(PROJECT_URL + '/projects/:project/cases', { project: '@project' }, {
                    'get': {
                        method: 'GET'
                    }
                })
            },
            getProjectTestCaseDetail: function() {
                return $resource(PROJECT_URL + '/projects/:project/cases/:testcase', { project: '@project', testcase: '@testcase' }, {
                    'get': {

                        method: 'GET'
                    }
                })
            }
        };
    });