提交 00d9f6ae 编写于 作者: N nicolargo

Upgrade RestFul API to api/3

上级 172fc2ca
......@@ -73,7 +73,7 @@ def compress(func):
class GlancesBottle(object):
"""This class manages the Bottle Web server."""
API_VERSION = '2'
API_VERSION = '3'
def __init__(self, config=None, args=None):
# Init config
......
......@@ -2,7 +2,7 @@
export default function GlancesHelpController($http) {
var vm = this;
$http.get('api/2/help').then(function (response) {
$http.get('api/3/help').then(function (response) {
vm.help = response.data;
});
}
......@@ -34,13 +34,13 @@ function GlancesStats ($http, $q, $rootScope, $timeout, GlancesPluginHelper, REF
};
// load limits to init GlancePlugin helper
$http.get('api/2/all/limits').then(function (response) {
$http.get('api/3/all/limits').then(function (response) {
GlancesPluginHelper.setLimits(response.data);
});
$http.get('api/2/config').then(function (response) {
$http.get('api/3/config').then(function (response) {
angular.extend(CONFIG, response.data);
});
$http.get('api/2/args').then(function (response) {
$http.get('api/3/args').then(function (response) {
angular.extend(ARGUMENTS, response.data);
});
......@@ -58,13 +58,13 @@ function GlancesStats ($http, $q, $rootScope, $timeout, GlancesPluginHelper, REF
}
var getAllStats = function () {
return $http.get('api/2/all').then(function (response) {
return $http.get('api/3/all').then(function (response) {
return response.data;
});
};
var getAllViews = function () {
return $http.get('api/2/all/views').then(function (response) {
return $http.get('api/3/all/views').then(function (response) {
return response.data;
});
};
......
......@@ -32,7 +32,7 @@ from glances.compat import text_type
import requests
SERVER_PORT = 61234
API_VERSION = 2
API_VERSION = 3
URL = "http://localhost:{}/api/{}".format(SERVER_PORT, API_VERSION)
pid = None
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册