Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f9aedad71a | |||
| d4cfa11569 | |||
| 2f003a5bb5 | |||
| 75085b213a |
+2
-2
@@ -48,5 +48,5 @@ angular.module('dockerui', ['dockerui.templates', 'ngRoute', 'dockerui.services'
|
||||
// You need to set this to the api endpoint without the port i.e. http://192.168.1.9
|
||||
.constant('DOCKER_ENDPOINT', 'dockerapi')
|
||||
.constant('DOCKER_PORT', '') // Docker port, leave as an empty string if no port is requred. If you have a port, prefix it with a ':' i.e. :4243
|
||||
.constant('UI_VERSION', 'v0.8.0')
|
||||
.constant('DOCKER_API_VERSION', 'v1.20');
|
||||
.constant('UI_VERSION', 'v0.8.1')
|
||||
.constant('DOCKER_API_VERSION', 'v1.21');
|
||||
|
||||
@@ -63,10 +63,29 @@ angular.module('image', [])
|
||||
return defer.promise;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get RepoTags from the /images/query endpoint instead of /image/json,
|
||||
* for backwards compatibility with Docker API versions older than 1.21
|
||||
* @param {string} imageId
|
||||
*/
|
||||
function getRepoTags(imageId) {
|
||||
Image.query({}, function (d) {
|
||||
d.forEach(function(image) {
|
||||
if (image.Id === imageId && image.RepoTags[0] !== '<none>:<none>') {
|
||||
$scope.RepoTags = image.RepoTags;
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
Image.get({id: $routeParams.id}, function (d) {
|
||||
$scope.image = d;
|
||||
$scope.id = d.Id;
|
||||
$scope.RepoTags = d.RepoTags;
|
||||
if (d.RepoTags) {
|
||||
$scope.RepoTags = d.RepoTags;
|
||||
} else {
|
||||
getRepoTags($scope.id);
|
||||
}
|
||||
|
||||
getContainersFromImage($q, Container, $scope.id).then(function (containers) {
|
||||
LineChart.build('#containers-started-chart', containers, function (c) {
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "dockerui",
|
||||
"version": "0.8.0",
|
||||
"version": "0.8.1",
|
||||
"homepage": "https://github.com/crosbymichael/dockerui",
|
||||
"authors": [
|
||||
"Michael Crosby <crosbymichael@gmail.com>",
|
||||
|
||||
Vendored
+2
-2
File diff suppressed because one or more lines are too long
+1
-1
@@ -2,7 +2,7 @@
|
||||
"author": "Michael Crosby & Kevan Ahlquist",
|
||||
"name": "dockerui",
|
||||
"homepage": "https://github.com/crosbymichael/dockerui",
|
||||
"version": "0.8.0",
|
||||
"version": "0.8.1",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git@github.com:crosbymichael/dockerui.git"
|
||||
|
||||
Reference in New Issue
Block a user