mirror of https://github.com/portainer/portainer
Add err message when image or container not found
parent
20f67f9f4a
commit
3985e608c2
|
@ -96,3 +96,8 @@
|
|||
.footer {
|
||||
max-height:6px;
|
||||
}
|
||||
|
||||
#response {
|
||||
width: 80%;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
|
|
@ -151,7 +151,10 @@ function ContainerController($scope, $routeParams, $location, Container) {
|
|||
$scope.container = d;
|
||||
}, function(e) {
|
||||
console.log(e);
|
||||
$location.path('/containers/');
|
||||
setFailedResponse($scope, e.data, '#response');
|
||||
if (e.status === 404) {
|
||||
$('.detail').hide();
|
||||
}
|
||||
});
|
||||
|
||||
$scope.getChanges();
|
||||
|
@ -185,9 +188,14 @@ function ContainersController($scope, Container, Settings) {
|
|||
// Controller for the list of images
|
||||
function ImagesController($scope, Image) {
|
||||
$scope.predicate = '-Created';
|
||||
$('#response').hide();
|
||||
$scope.alertClass = 'block';
|
||||
|
||||
Image.query({}, function(d) {
|
||||
$scope.images = d;
|
||||
}, function (e) {
|
||||
console.log(e);
|
||||
setFailedResponse($scope, e.data, '#response');
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -232,7 +240,10 @@ function ImageController($scope, $routeParams, $location, Image) {
|
|||
$scope.image = d;
|
||||
}, function(e) {
|
||||
console.log(e);
|
||||
$location.path('/images/');
|
||||
setFailedResponse($scope, e.data, '#response');
|
||||
if (e.status === 404) {
|
||||
$('.detail').hide();
|
||||
}
|
||||
});
|
||||
|
||||
$scope.getHistory();
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
<div class="detail">
|
||||
<div id="response" class="alert alert-{{ alertClass }}">
|
||||
<div id="response" class="alert alert-{{ alertClass }}">
|
||||
{{ response }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="detail">
|
||||
|
||||
<h4>Container: {{ container.Id }}</h4>
|
||||
|
||||
<div class="btn-group detail">
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<div class="detail">
|
||||
|
||||
<div id="response" class="alert alert-{{ alertClass }}">
|
||||
<div id="response" class="alert alert-{{ alertClass }}">
|
||||
{{ response }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="detail">
|
||||
|
||||
<h4>Image: {{ image.id }}</h4>
|
||||
|
||||
<table class="table table-striped">
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
|
||||
<h2>Images:</h2>
|
||||
|
||||
<div id="response" class="alert alert-{{ alertClass }}">
|
||||
{{ response }}
|
||||
</div>
|
||||
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
|
|
Loading…
Reference in New Issue