1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-30 10:49:40 +02:00

fix(volumes): display an error message when trying to delete a bound volume

This commit is contained in:
Anthony Lapenna 2016-09-07 18:21:46 +12:00
parent 1cd620a45e
commit ca5cf33c8f
2 changed files with 11 additions and 5 deletions

View file

@ -165,7 +165,9 @@ angular.module('portainer.services', ['ngResource', 'ngSanitize'])
query: {method: 'GET'},
get: {method: 'GET'},
create: {method: 'POST', params: {action: 'create'}, transformResponse: genericHandler},
remove: {method: 'DELETE'}
remove: {
method: 'DELETE', transformResponse: genericHandler
}
});
}])
.factory('Config', ['$resource', 'CONFIG_ENDPOINT', function ConfigFactory($resource, CONFIG_ENDPOINT) {
@ -212,7 +214,7 @@ angular.module('portainer.services', ['ngResource', 'ngSanitize'])
msg = e.data.message;
} else if (e.message) {
msg = e.message;
} else if (e.data.length > 0 && e.data[0].message) {
} else if (e.data && e.data.length > 0 && e.data[0].message) {
msg = e.data[0].message;
}
$.gritter.add({