--- a/css/style.css Sat Dec 06 18:38:02 2014 -0600
+++ b/css/style.css Sun Dec 07 22:06:23 2014 -0600
@@ -1,3 +1,5 @@
@@ -13,3 +15,34 @@
+[ng\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], + display: none !important; --- a/html/window.html Sat Dec 06 18:38:02 2014 -0600
+++ b/html/window.html Sun Dec 07 22:06:23 2014 -0600
@@ -9,27 +9,40 @@
<body data-ng-controller="ManifestController">
- <div class="input-group">
+ <form data-ng-submit="refresh()" class="input-group"> <span class="input-group-addon">Registry</span>
<input class="form-control" data-ng-model="registry" placeholder="enter the url of your registry">
+ <span class="input-group-addon">Query</span> + <input class="form-control" data-ng-model="query" placeholder="Search Query"> <span class="input-group-btn">
<button type="button" class="btn btn-primary" data-ng-click="refresh()">Refresh</button>
-<!-- <div class="list-group">
- <a href="#" class="list-group-item" data-ng-repeat="repo in repos" data-ng-click="select_repo(repo)">{{repo.name}}<span class="badge">{{repo.images.length}}</span>
+ <div class="list-group repositories"> + <span class="list-group-item active"><span class="badge">{{repos.length}}</span>Repositories</span> + <a href="#" class="list-group-item" data-ng-repeat="repo in repos" data-ng-click="select_repo(repo)">{{repo.name}}</a> + <div class="repository"> + <div data-ng-show="repo"> + <h1 class="page-header">{{repo.name}}<br> + <small>{{repo.description}}<br> + <span data-ng-show="repo.is_official" class="label label-info">Official</span> + <span data-ng-show="repo.is_trusted" class="label label-info">Trusted</span> + <span data-ng-show="repo.is_automated" class="label label-info">Automated</span> + <span class="label label-info" data-ng-show="repo.star_count > 0">{{repo.star_count}}<span class="glyphicon glyphicon-star"></span></span> + <ul class="list-group"> + <li data-ng-repeat="(layer, tags) in tags" class="list-group-item"> + <span class="label label-info" data-ng-repeat="tag in tags">{{tag}}</span> + <span class="glyphicon glyphicon-info-sign" tooltip="layer:{{layer}}"></span> - --> <accordion close-others="true">
- <accordion-group data-ng-repeat="repo in repos" data-ng-click="select_repo(repo)">
- <accordion-heading>{{repo.name}}<span class="badge">{{repo.images.length}}</span></accordion-heading>
- <span>{{repo.description}}</span>
- <ul class="list-group">
- <li data-ng-repeat="image in repo.images" class="list-group-item">
- <span tooltip="{{image.id}}">{{image.short_id}}<span class="badge" data-ng-repeat="tag in repo.tags[image.id]">{{tag}}</span>
--- a/js/app.js Sat Dec 06 18:38:02 2014 -0600
+++ b/js/app.js Sun Dec 07 22:06:23 2014 -0600
@@ -9,8 +9,12 @@
manifest.factory("manifestREST", function($http) {
- list: function(registry) {
- return $http.get(registry + "/v1/search");
+ search: function(registry, query) { + var url = registry + "/v1/search"; images: function(registry, repo) {
return $http.get(registry + "/v1/repositories/" + repo + "/images")
@@ -26,27 +30,33 @@
tags: function(registry, repo) {
return $http.get(registry + "/v1/repositories/" + repo + "/tags");
+ info: function(registry, image) { + return $http.get(registry + "/v1/images/" + image + "/json"); function ManifestController($scope, manifestREST) {
+ $scope.registry = "registry.hub.docker.com"; + $scope.query = "busybox"; $scope.refresh = function() {
if($scope.registry.indexOf("http://") !== 0 && $scope.registry.indexOf("http://") !== 0) {
$scope.registry = "http://" + $scope.registry;
- manifestREST.list($scope.registry)
+ manifestREST.search($scope.registry, $scope.query) .success(function(data, status, headers, config) {
- $scope.repos = data.results.map(function(repo) {
+ $scope.repos = data.results.map(function(repo) {
.error(function(data, status, headers, config) {
console.log("Failed to get the registry list: " + status);
@@ -56,26 +66,23 @@
$scope.select_repo = function(repo) {
- manifestREST.images($scope.registry, repo.name)
- .success(function(data, status, headers, config) {
- .error(function(data, status, headers, config) {
- console.log("Failed to get the image list: " + status);
+ // manifestREST.images($scope.registry, repo.name) + // .success(function(data, status, headers, config) { + // .error(function(data, status, headers, config) { + // console.log("Failed to get the image list: " + status); manifestREST.tags($scope.registry, repo.name)
.success(function(data, status, headers, config) {
+ for(var ntag in data) { + $scope.tags[tag.layer] = $scope.tags[tag.layer] || [];
- repo.tags[img].push(tag);
- repo.tags[img] = [tag];
+ $scope.tags[tag.layer].push(tag.name); .error(function(data, status, headers, config) {