volumes: add mount UI
This commit is contained in:
@@ -2665,10 +2665,12 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout
|
||||
});
|
||||
};
|
||||
|
||||
Client.prototype.addVolume = function (name, hostPath, callback) {
|
||||
Client.prototype.addVolume = function (name, hostPath, mountType, mountOptions, callback) {
|
||||
var data = {
|
||||
name: name,
|
||||
hostPath: hostPath
|
||||
hostPath: hostPath,
|
||||
mountType: mountType,
|
||||
mountOptions: mountOptions
|
||||
};
|
||||
var that = this;
|
||||
|
||||
@@ -2676,6 +2678,17 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout
|
||||
if (error) return callback(error);
|
||||
if (status !== 201) return callback(new ClientError(status, data));
|
||||
|
||||
callback(null, data.id);
|
||||
});
|
||||
};
|
||||
|
||||
Client.prototype.mountVolume = function (volumeId, data, callback) {
|
||||
var that = this;
|
||||
|
||||
post('/api/v1/volumes/' + volumeId + '/mount_config', data, null, function (error, data, status) {
|
||||
if (error) return callback(error);
|
||||
if (status !== 201) return callback(new ClientError(status, data));
|
||||
|
||||
callback();
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user