mirror of https://github.com/portainer/portainer
Merge branch 'fix-113-images-view-delete' into internal
commit
fd1496df93
|
@ -71,15 +71,17 @@ function ($scope, $state, Config, Image, Messages) {
|
|||
if (i.Checked) {
|
||||
counter = counter + 1;
|
||||
Image.remove({id: i.Id}, function (d) {
|
||||
angular.forEach(d, function (resource) {
|
||||
Messages.send("Image deleted", resource.Deleted);
|
||||
});
|
||||
var index = $scope.images.indexOf(i);
|
||||
$scope.images.splice(index, 1);
|
||||
if (d[0].message) {
|
||||
$('#loadingViewSpinner').hide();
|
||||
Messages.error("Unable to remove image", d[0].message);
|
||||
} else {
|
||||
Messages.send("Image deleted", i.Id);
|
||||
var index = $scope.images.indexOf(i);
|
||||
$scope.images.splice(index, 1);
|
||||
}
|
||||
complete();
|
||||
}, function (e) {
|
||||
Messages.error("Failure", e.data);
|
||||
$('#loadImagesSpinner').hide();
|
||||
Messages.error("Unable to remove image", e.data);
|
||||
complete();
|
||||
});
|
||||
}
|
||||
|
|
|
@ -152,11 +152,11 @@ module.exports = function (grunt) {
|
|||
}
|
||||
},
|
||||
angular: {
|
||||
src: ['bower_components/angular/angular.min.js',
|
||||
src: ['bower_components/angular/angular.js',
|
||||
'bower_components/angular-sanitize/angular-sanitize.min.js',
|
||||
'bower_components/angular-cookies/angular-cookies.min.js',
|
||||
'bower_components/angular-ui-router/release/angular-ui-router.min.js',
|
||||
'bower_components/angular-resource/angular-resource.min.js',
|
||||
'bower_components/angular-resource/angular-resource.js',
|
||||
'bower_components/angular-bootstrap/ui-bootstrap-tpls.min.js',
|
||||
'bower_components/angular-ui-select/dist/select.min.js'],
|
||||
dest: '<%= distdir %>/js/angular.js'
|
||||
|
|
Loading…
Reference in New Issue