mirror of
https://github.com/portainer/portainer.git
synced 2025-07-23 23:39:41 +02:00
feat(volume-creation): add plugin support (#1044)
* feat(volume-creation): add plugin support * feat(plugins): only use systemInfo to retrieve plugins when API version < 1.25 * refactor(createVolume): remove unused dependencies
This commit is contained in:
parent
3919ad3ccf
commit
b08d2b07bc
5 changed files with 84 additions and 8 deletions
|
@ -3,15 +3,15 @@ angular.module('portainer.services')
|
|||
'use strict';
|
||||
var service = {};
|
||||
|
||||
service.getVolumePlugins = function() {
|
||||
service.plugins = function() {
|
||||
var deferred = $q.defer();
|
||||
System.info({}).$promise
|
||||
.then(function success(data) {
|
||||
var plugins = data.Plugins.Volume;
|
||||
var plugins = data.Plugins;
|
||||
deferred.resolve(plugins);
|
||||
})
|
||||
.catch(function error(err) {
|
||||
deferred.reject({msg: 'Unable to retrieve volume plugin information', err: err});
|
||||
deferred.reject({msg: 'Unable to retrieve plugins information from system', err: err});
|
||||
});
|
||||
return deferred.promise;
|
||||
};
|
||||
|
@ -40,7 +40,7 @@ angular.module('portainer.services')
|
|||
|
||||
return deferred.promise;
|
||||
};
|
||||
|
||||
|
||||
service.dataUsage = function () {
|
||||
return System.dataUsage().$promise;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue