diff --git a/dashboard/src/js/client.js b/dashboard/src/js/client.js index c8422007b..09fa21cf3 100644 --- a/dashboard/src/js/client.js +++ b/dashboard/src/js/client.js @@ -2097,15 +2097,6 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout }); }; - Client.prototype.disks = function (callback) { - get('/api/v1/system/disks', null, function (error, data, status) { - if (error) return callback(error); - if (status !== 200) return callback(new ClientError(status, data)); - - callback(null, data); - }); - }; - Client.prototype.diskUsage = function (callback) { get('/api/v1/system/disk_usage', null, function (error, data, status) { if (error) return callback(error); diff --git a/src/routes/system.js b/src/routes/system.js index 1a656695f..5ff2844ac 100644 --- a/src/routes/system.js +++ b/src/routes/system.js @@ -3,7 +3,6 @@ exports = module.exports = { reboot, getInfo, - getDisks, getDiskUsage, updateDiskUsage, getMemory, @@ -36,16 +35,6 @@ async function getInfo(req, res, next) { next(new HttpSuccess(200, { info })); } -async function getDisks(req, res, next) { - const [getDisksError, disks] = await safe(system.getDisks()); - if (getDisksError) return next(BoxError.toHttpError(getDisksError)); - - let [getSwapsError, swaps] = await safe(system.getSwaps()); - if (getSwapsError) return next(BoxError.toHttpError(getSwapsError)); - - next(new HttpSuccess(200, { disks, swaps })); -} - async function getDiskUsage(req, res, next) { const [error, result] = await safe(system.getDiskUsage()); if (error) return next(BoxError.toHttpError(error)); diff --git a/src/server.js b/src/server.js index ed0947ca6..74e49d555 100644 --- a/src/server.js +++ b/src/server.js @@ -118,7 +118,6 @@ async function initializeExpressSync() { router.get ('/api/v1/system/info', token, authorizeAdmin, routes.system.getInfo); router.post('/api/v1/system/reboot', json, token, authorizeAdmin, routes.system.reboot); router.get ('/api/v1/system/graphs', token, authorizeAdmin, routes.system.getSystemGraphs); - router.get ('/api/v1/system/disks', token, authorizeAdmin, routes.system.getDisks); router.get ('/api/v1/system/cpus', token, authorizeAdmin, routes.system.getCpus); router.get ('/api/v1/system/disk_usage', token, authorizeAdmin, routes.system.getDiskUsage); router.post('/api/v1/system/disk_usage', token, authorizeAdmin, routes.system.updateDiskUsage);