Compare commits

...

4 Commits

Author SHA1 Message Date
Kevan Ahlquist f9aedad71a Merge branch 'crosbymichael-master' into crosbymichael-dist 2015-12-14 22:46:01 -06:00
Kevan Ahlquist d4cfa11569 Merge branch 'crosbymichael-master' into crosbymichael-dist 2015-12-14 22:45:22 -06:00
Kevan Ahlquist 2f003a5bb5 Merge pull request #159 from crosbymichael/tags-support
Support RepoTags for versions of the Docker API older than 1.21.
2015-12-14 22:24:41 -06:00
Kevan Ahlquist 75085b213a Support RepoTags for versions of the Docker API older than 1.21. 2015-12-13 23:28:28 -06:00
5 changed files with 26 additions and 7 deletions
+2 -2
View File
@@ -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');
+20 -1
View File
@@ -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
View File
@@ -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>",
+2 -2
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -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"