Refactor the system/graphs view logic

This commit is contained in:
Johannes Zellner
2022-09-16 17:09:54 +02:00
parent 7fbfe4ec98
commit f25158b295
3 changed files with 68 additions and 183 deletions

View File

@@ -3070,8 +3070,6 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout
};
if (hostPath) data.hostPath = hostPath;
var that = this;
post('/api/v1/volumes', data, null, function (error, data, status) {
if (error) return callback(error);
if (status !== 201) return callback(new ClientError(status, data));
@@ -3086,8 +3084,6 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout
mountOptions: mountOptions
};
var that = this;
post('/api/v1/volumes/' + volumeId, data, null, function (error, data, status) {
if (error) return callback(error);
if (status !== 200) return callback(new ClientError(status, data));
@@ -3097,8 +3093,6 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout
};
Client.prototype.remountVolume = function (volumeId, callback) {
var that = this;
post('/api/v1/volumes/' + volumeId + '/remount', {}, null, function (error, data, status) {
if (error) return callback(error);
if (status !== 202) return callback(new ClientError(status, data));