--- a/js/app.js Sun Jan 25 03:13:04 2015 -0600
+++ b/js/app.js Sun Jan 25 04:33:37 2015 -0600
@@ -38,11 +38,11 @@
function ManifestController($scope, manifestREST) {
$scope.refreshing = false;
$scope.refreshing_repo = false;
$scope.registry = "registry.hub.docker.com";
- $scope.query = "busybox";
@@ -121,28 +121,49 @@
* and the private registry returns a dictionary of tag
- * This function will normalize them into an object like
- * {"deadb33f", ["latest"]}
+ * This function will normalize them into a sorted list like + * Image IDs are thrown away because we don't care about them. $scope.ga_tracker.sendEvent("repo", "get tags", "success");
if(data.constructor === Array) { /* registry.hub.docker.com */
- $scope.tags[tag.layer] = $scope.tags[tag.layer] || [];
+ dtags[tag.layer] = dtags[tag.layer] || []; + dtags[tag.layer].push(tag.name); - $scope.tags[tag.layer].push(tag.name);
+ for(var tag in dtags) { + tags.push(dtags[tag].sort()); + $scope.tags = tags.sort(function(a, b) { return a[0] - b[0]}); } else if(data !== null && typeof data === 'object') { /* private registries */
- $scope.tags[layer] = $scope.tags[layer] || [];
- $scope.tags[layer].push(tag);
+ dtags[layer] = dtags[layer] || []; + dtags[layer].push(tag); + for(var tag in dtags) { + tags.push(dtags[tag].sort()); + $scope.tags = tags.sort(function(a, b) { return a[0] - b[0]}); $scope.refreshing_repo = false;