Revision 56023
Added by Sandro La Bruzzo almost 5 years ago
service_v10.js | ||
---|---|---|
9 | 9 |
var factory = {} |
10 | 10 |
factory.query = function (query, page, filter, value) { |
11 | 11 |
$http.defaults.headers.post["Content-Type"] = "application/x-www-form-urlencoded; charset=UTF-8"; |
12 |
if (page === null){ |
|
13 |
return $http.post('/api/post/', $.param({'action': "query", 'query': query, 'filter':filter, 'value':value}));
|
|
12 |
if (page === undefined || page ==null){
|
|
13 |
return $http.post('/api/post/', $.param({'action': "query", 'query': query, 'filter':filter, start:0}));
|
|
14 | 14 |
} |
15 | 15 |
else { |
16 | 16 |
return $http.post('/api/post/', $.param({'action': "query", 'query': query, 'start': (page - 1) * 10, 'filter':filter, 'value':value})); |
... | ... | |
25 | 25 |
|
26 | 26 |
factory.getStatsDetail = function () { |
27 | 27 |
//$http.defaults.headers.get["Content-Type"] = "application/x-www-form-urlencoded; charset=UTF-8"; |
28 |
return $http.get('currentStats.json'); |
|
28 |
return $http.get('static/currentStats.json');
|
|
29 | 29 |
}; |
30 | 30 |
|
31 | 31 |
factory.getMainPageStats = function () { |
... | ... | |
35 | 35 |
|
36 | 36 |
factory.getStats = function () { |
37 | 37 |
//$http.defaults.headers.post["Content-Type"] = "application/x-www-form-urlencoded; charset=UTF-8"; |
38 |
return $http.get('stats2.json'); |
|
38 |
return $http.get('static/stats2.json');
|
|
39 | 39 |
}; |
40 | 40 |
|
41 | 41 |
factory.getDatasources = function() { |
... | ... | |
51 | 51 |
|
52 | 52 |
factory.getItem = function (identifier, type, from) { |
53 | 53 |
$http.defaults.headers.post["Content-Type"] = "application/x-www-form-urlencoded; charset=UTF-8"; |
54 |
return $http.post('/api/item/' + identifier, $.param({'type': type, 'from': from}));
|
|
54 |
return $http.post('/api/item/' + identifier, $.param({'object_type': type, 'start': from}));
|
|
55 | 55 |
}; |
56 | 56 |
|
57 | 57 |
factory.getDsInfo = function (identifier, name) { |
Also available in: Unified diff
implemented new portal with fastapi