From b4e8d0b46e2b50d5e808964bb189222ec3b9c9de Mon Sep 17 00:00:00 2001 From: Michael Crosby Date: Thu, 8 Aug 2013 19:18:51 +0000 Subject: [PATCH 01/11] Add growl files for notifications --- images/gritter-light.png | Bin 0 -> 4978 bytes images/gritter-long.png | Bin 0 -> 6299 bytes images/gritter.png | Bin 0 -> 4880 bytes images/ie-spacer.gif | Bin 0 -> 43 bytes img/.gitkeep | 0 index.html | 13 +- js/controllers.js | 68 +++---- js/services.js | 27 ++- lib/jquery.gritter.css | 101 +++++++++ lib/jquery.gritter.js | 418 ++++++++++++++++++++++++++++++++++++++ lib/jquery.gritter.min.js | 1 + partials/container.html | 21 ++ partials/image.html | 4 + partials/messages.html | 5 +- 14 files changed, 612 insertions(+), 46 deletions(-) create mode 100644 images/gritter-light.png create mode 100755 images/gritter-long.png create mode 100755 images/gritter.png create mode 100644 images/ie-spacer.gif delete mode 100644 img/.gitkeep create mode 100755 lib/jquery.gritter.css create mode 100755 lib/jquery.gritter.js create mode 100644 lib/jquery.gritter.min.js diff --git a/images/gritter-light.png b/images/gritter-light.png new file mode 100644 index 0000000000000000000000000000000000000000..1b5238efc5d524014046ad5cd90ab1024c9ba250 GIT binary patch literal 4978 zcmeHL_gfQL7an87hv|K|un9q6rW}@(tg!|G@XVGtbOC_ug~wJ#)@^-*cWDfBl-dgqWNd z000sem(kV$u+I?ygme#xKt1)b#8FP1?#q~0 zCQhW32JM2Mf1OkDRe7#b?O?5&c0#U^d^Om;#LJ!g+IHuk3t#p(N}OO7`6Qoh{L}F) zMy5K3ZQ_&cr>MAYVlJlD6V*E|8swpWvSLMdI@I-6`6skN=CL%vL+n)KJW5cK@SJp- z%4ikWC}k}!mdMGGa=(fB<8X!EdgZ3~a25<&$A`mxij_@6%M0g@uK6aGd2+N5x`~>FDUhc64-{?|!0| zXqqUUZfImA8n!w`r$Vp4K-px_ZM%>NM4u{VBBqdN^li@ac(rG4gvZ>S3>RI`?Tya_ zYUK7tI+;wC86FwQwc9?3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Mc#+AogK;`LIc2GmMl+`6P-=CL5`qc@d1Bi5fqrQs??}p{&Wp(?SF(7Z(@G12%K4E^sccx0EQ!`_%hywK5)U z@lS1}>+a~5ymENyTPUSFImu^W@e$5JA9Mz$rj(#My@DkAVsU9HQPC*04UuYmcypRS z2o4KV-tIAMO}*R)f=dX7vWwY_|CjiUKWHx7^RV1JsBSv3ni=x9=Ro!mSO&VS{<9!& zQEp$n2!as?Ten6VA9L4B!@s+sWW$6c>6vV*LF_Zve?+{NpwltH!t@%t%*6FS{{^Nf Bt!)4R literal 0 HcmV?d00001 diff --git a/images/gritter-long.png b/images/gritter-long.png new file mode 100755 index 0000000000000000000000000000000000000000..578b89104feb2460a821b8543be29c50008666b6 GIT binary patch literal 6299 zcmeHM>0eR_+dkE#jgHy-R;~#>IW0C)rddud%-A?uPHGt{xR9A!NLKD5pjrB+DdUWp zSxV%j2_kN|fJ#>6B&nH!i6SnUg*%E1o6q5|c)$4J{LcBE{oL1eFV}VMdU?3&>6qvM z0HAlq?Y9d6uo(p||GP~K+_TFocnVw@$GZ5%dPj%FCIsIM1%AB}eK~aR8EkNP=!MYW zD@ixrhB^R%k>i=)e!Z9|oEG8k1#V62Sg>Jugcru&j&yI_C3GpdaItci-?lsXyY^l4 zG6}d_xZ|pjxHrprpU$De9VdScUGM!(ue$8V>b%s7um=Zp5LVI%mRFHWx^q&#E9}09 zeX(!&^5buWmY+M;ve=E8oteQ(=H{YJ zjEo{s%{N0a;o;$Z2^@u}U9#w1?qODZ0xSG#PI9ompcw8I)}TvEOSb|qD3vlGjUQl- z@^Dyq-SD@^sfyB+L1c!{)R(SDuKp<0_Gl~?YY~E3ytP#~D{1jd&NX3uA>G2|Z(hl8puGKGrU@Ctmk0gOedtBV=o8ls1q zv4ahg3hv=1$&|pz(`+-4$@+qSN|Psc4mHQvcmF*3*w{DV1~-$@BJD&VuITCMHZWqh;7VK9T@xY%-#1s zB~BQeX(m8SBbg{2o&jKW*O{iy4<5W{Y_r{d@^MVAd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~KeML|LZ#;oIBITbJL+r`Nd8G#-?WSIVR{yRHQU%s{!UP;%e={5)3K zcjWFuZCBk9N7LwU82CXFVQqTDLGj!*{%n_?R=Zl;tv>7p1CLt&hxNM-$oJ;!_JY%6 zELi5Mh+V=JvaptUTQ;o}H{0cL%tz6yewKm5k-TXai=d(T^*3soJn?}z#RY}icK*0x*m$+nzzb@R!~_!{?)SFN|i*}yKK Zf3P5-;PGuo@D~?gbJgKWjfL<1{{eTAuA%?{ literal 0 HcmV?d00001 diff --git a/images/ie-spacer.gif b/images/ie-spacer.gif new file mode 100644 index 0000000000000000000000000000000000000000..5bfd67a2d6f72ac3a55cbfcea5866e841d22f5d9 GIT binary patch literal 43 mcmZ?wbhEHbWMp7uXkdT>#h)yUAf^t80Ld^gF}W}@SOWlZ0R#L1 literal 0 HcmV?d00001 diff --git a/img/.gitkeep b/img/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/index.html b/index.html index 10bb01c9c..ec17c1263 100644 --- a/index.html +++ b/index.html @@ -7,10 +7,11 @@ - - + + + - + +
+
+

Running Containers

+ +
+
+ + Get a better broswer... Your holding everyone back. + +
+
+

DockerUI

From 7ae0b175732b607ffddc68ce58c185053fc334ce Mon Sep 17 00:00:00 2001 From: Michael Crosby Date: Mon, 2 Sep 2013 15:00:22 -0700 Subject: [PATCH 05/11] Improve messages --- index.html | 1 - js/controllers.js | 35 +++++++++-------------------------- partials/dashboard.html | 17 +++++++++-------- partials/messages.html | 4 ---- 4 files changed, 18 insertions(+), 39 deletions(-) delete mode 100644 partials/messages.html diff --git a/index.html b/index.html index aa94a20e7..9a5efea8e 100644 --- a/index.html +++ b/index.html @@ -30,7 +30,6 @@
-
diff --git a/js/controllers.js b/js/controllers.js index b5bdb938c..606ada8d1 100644 --- a/js/controllers.js +++ b/js/controllers.js @@ -51,23 +51,6 @@ function DashboardController($scope, Container) { }); } -function MessageController($scope, Messages) { - $scope.template = 'partials/messages.html'; - $scope.messages = []; - $scope.$watch('messages.length', function(o, n) { - $('#message-display').show(); - }); - - $scope.$on(Messages.event, function(e, msg) { - $scope.messages.push(msg); - var s = $scope; - setTimeout(function() { - $('#message-display').hide('slow'); - s.messages = []; - }, 20000); - }); -} - function StatusBarController($scope, Settings) { $scope.template = 'partials/statusbar.html'; @@ -109,7 +92,7 @@ function ContainerController($scope, $routeParams, $location, Container, Message $scope.stop = function() { Container.stop({id: $routeParams.id}, function(d) { - Messages.success("Container stopped", $routeParams.id); + Messages.send("Container stopped", $routeParams.id); }, function(e) { Messages.error("Failure", "Container failed to stop." + e.data); }); @@ -117,7 +100,7 @@ function ContainerController($scope, $routeParams, $location, Container, Message $scope.kill = function() { Container.kill({id: $routeParams.id}, function(d) { - Messages.success("Container killed", $routeParams.id); + Messages.send("Container killed", $routeParams.id); }, function(e) { Messages.error("Failure", "Container failed to die." + e.data); }); @@ -125,7 +108,7 @@ function ContainerController($scope, $routeParams, $location, Container, Message $scope.remove = function() { Container.remove({id: $routeParams.id}, function(d) { - Messages.success("Container removed", $routeParams.id); + Messages.send("Container removed", $routeParams.id); }, function(e){ Messages.error("Failure", "Container failed to remove." + e.data); }); @@ -169,7 +152,7 @@ function ContainersController($scope, Container, Settings, Messages, ViewSpinner }); }; - var batch = function(items, action) { + var batch = function(items, action, msg) { ViewSpinner.spin(); var counter = 0; var complete = function() { @@ -182,7 +165,7 @@ function ContainersController($scope, Container, Settings, Messages, ViewSpinner if (c.Checked) { counter = counter + 1; action({id: c.Id}, function(d) { - Messages.error("Container Removed", c.Id); + Messages.send("Container " + msg, c.Id); var index = $scope.containers.indexOf(c); $scope.containers.splice(index, 1); complete(); @@ -211,19 +194,19 @@ function ContainersController($scope, Container, Settings, Messages, ViewSpinner }; $scope.startAction = function() { - batch($scope.containers, Container.start); + batch($scope.containers, Container.start, "Started"); }; $scope.stopAction = function() { - batch($scope.containers, Container.stop); + batch($scope.containers, Container.stop, "Stopped"); }; $scope.killAction = function() { - batch($scope.containers, Container.kill); + batch($scope.containers, Container.kill, "Killed"); }; $scope.removeAction = function() { - batch($scope.containers, Container.remove); + batch($scope.containers, Container.remove, "Removed"); }; update({all: $scope.displayAll ? 1 : 0}); diff --git a/partials/dashboard.html b/partials/dashboard.html index 2fd8fbbc7..20c97f2a8 100644 --- a/partials/dashboard.html +++ b/partials/dashboard.html @@ -1,8 +1,16 @@ -
+
+
+
+

DockerUI

+

The Linux container engine

+ Learn more. +
+
+

Running Containers

@@ -20,11 +28,4 @@
-
-
-

DockerUI

-

The Linux container engine

- Learn more. -
-
diff --git a/partials/messages.html b/partials/messages.html deleted file mode 100644 index 90527bb6f..000000000 --- a/partials/messages.html +++ /dev/null @@ -1,4 +0,0 @@ - - From b1228a7439fc3de0e3217b40cf0507fc9d409ba2 Mon Sep 17 00:00:00 2001 From: Michael Crosby Date: Mon, 2 Sep 2013 15:10:40 -0700 Subject: [PATCH 06/11] Fix alignment and floats --- css/app.css | 4 ---- partials/dashboard.html | 6 +++--- partials/images.html | 1 - 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/css/app.css b/css/app.css index 1dc27fbf8..54db7ccba 100644 --- a/css/app.css +++ b/css/app.css @@ -110,10 +110,6 @@ overflow-x: hidden; } -.legend { - width: 7em; -} - .legend .title { margin: 0.5em; border-style: solid; diff --git a/partials/dashboard.html b/partials/dashboard.html index 20c97f2a8..1506365ad 100644 --- a/partials/dashboard.html +++ b/partials/dashboard.html @@ -21,11 +21,11 @@
-
- +
+ Get a better broswer... Your holding everyone back. -
+
diff --git a/partials/images.html b/partials/images.html index df661da55..fa2df94d0 100644 --- a/partials/images.html +++ b/partials/images.html @@ -4,7 +4,6 @@

Images:

+
+

Containers created:

+ + Get a better broswer... Your holding everyone back. + +
@@ -23,10 +29,6 @@ - - - - @@ -95,7 +97,6 @@
-
diff --git a/partials/images.html b/partials/images.html index fa2df94d0..7751b5d07 100644 --- a/partials/images.html +++ b/partials/images.html @@ -16,7 +16,6 @@ - @@ -24,9 +23,8 @@ - - - + + From 3643525126e4eead7469535934cf657837448444 Mon Sep 17 00:00:00 2001 From: Michael Crosby Date: Mon, 2 Sep 2013 17:08:06 -0700 Subject: [PATCH 08/11] Change image chart sizes --- js/controllers.js | 7 +++++-- partials/dashboard.html | 2 +- partials/image.html | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/js/controllers.js b/js/controllers.js index 8faddc9ec..724015180 100644 --- a/js/controllers.js +++ b/js/controllers.js @@ -304,8 +304,11 @@ function ImageController($scope, $q, $routeParams, $location, Image, Container, Image.get({id: $routeParams.id}, function(d) { $scope.image = d; - if ($routeParams.tag) { - var promise = getContainersFromImage($q, Container, $routeParams.tag); + $scope.tag = d.id; + var t = $routeParams.tag; + if (t && t !== ":") { + $scope.tag = t; + var promise = getContainersFromImage($q, Container, t); promise.then(function(containers) { var map = {}; diff --git a/partials/dashboard.html b/partials/dashboard.html index 1506365ad..b06dfd224 100644 --- a/partials/dashboard.html +++ b/partials/dashboard.html @@ -16,7 +16,7 @@

Running Containers

diff --git a/partials/image.html b/partials/image.html index 28bfb4ae1..4d9e43efe 100644 --- a/partials/image.html +++ b/partials/image.html @@ -6,7 +6,7 @@
-

Image: {{ image.id }}

+

Image: {{ tag }}

From 847c2d570c4f5ba8d83de0353f7a0261ed28e7d7 Mon Sep 17 00:00:00 2001 From: Michael Crosby Date: Mon, 2 Sep 2013 17:18:54 -0700 Subject: [PATCH 09/11] Hide masthead after first load --- js/controllers.js | 13 +++++++++++-- js/services.js | 3 ++- partials/dashboard.html | 2 +- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/js/controllers.js b/js/controllers.js index 724015180..2ef0bd4d1 100644 --- a/js/controllers.js +++ b/js/controllers.js @@ -3,9 +3,18 @@ function MastheadController($scope) { $scope.template = 'partials/masthead.html'; } -function DashboardController($scope, Container) { +function DashboardController($scope, Container, Settings) { $scope.predicate = '-Created'; $scope.containers = []; + var opts = {animation:false}; + if (Settings.firstLoad) { + opts.animation = true; + Settings.firstLoad = false; + $('#masthead').show(); + setTimeout(function() { + $('#masthead').slideUp('slow'); + }, 5000); + } Container.query({all: 1}, function(d) { var running = 0 @@ -44,7 +53,7 @@ function DashboardController($scope, Container) { } // ghost ]; - c.Doughnut(data, {}); + c.Doughnut(data, opts); var lgd = $('#chart-legend').get(0); legend(lgd, data); }); diff --git a/js/services.js b/js/services.js index 18fcae21a..9a6a00268 100644 --- a/js/services.js +++ b/js/services.js @@ -64,7 +64,8 @@ angular.module('dockerui.services', ['ngResource']) version: DOCKER_API_VERSION, rawUrl: DOCKER_ENDPOINT + DOCKER_PORT + '/' + DOCKER_API_VERSION, uiVersion: UI_VERSION, - url: url + url: url, + firstLoad: true, }; }) .factory('ViewSpinner', function() { diff --git a/partials/dashboard.html b/partials/dashboard.html index b06dfd224..18ae5a509 100644 --- a/partials/dashboard.html +++ b/partials/dashboard.html @@ -3,7 +3,7 @@ -
+ - +

Running Containers

@@ -22,10 +22,27 @@
+

Status

Get a better broswer... Your holding everyone back.
+ + +
+
+

Containers created

+ + Get a better broswer... Your holding everyone back. + +

{{ totalContainers }}

+
+

Images created

+ + Get a better broswer... Your holding everyone back. + +

{{ totalImages }}

+
From 007492b77d36ba01e04b27973abea9d316935db8 Mon Sep 17 00:00:00 2001 From: Michael Crosby Date: Mon, 2 Sep 2013 18:55:00 -0700 Subject: [PATCH 11/11] Update dockerfile and server --- Dockerfile | 6 +++--- dockerui.go | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5e452c425..dec150fae 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,11 +6,11 @@ MAINTAINER Michael Crosby http://crosbymichael.com RUN echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list RUN apt-get update -RUN apt-get upgrade +RUN apt-get upgrade -y ADD . /app/ -RUN ln -s /app/dockerui /dockerui EXPOSE 9000 +WORKDIR /app/ -ENTRYPOINT ["/dockerui"] +ENTRYPOINT ["./dockerui"] diff --git a/dockerui.go b/dockerui.go index f6ca4f6c3..cfc26f153 100644 --- a/dockerui.go +++ b/dockerui.go @@ -13,7 +13,7 @@ var ( endpoint = flag.String("e", "", "Dockerd endpoint") verbose = flag.Bool("v", false, "Verbose logging") port = flag.String("p", "9000", "Port to serve dockerui") - assets = flag.String("a", "/app", "Path to the assets") + assets = flag.String("a", ".", "Path to the assets") ) type multiHandler struct {
Parent: {{ image.parent }}
Container:{{ image.container }}
Size: {{ image.Size|humansize }}
Action IdTag Repository Created
{{ image.Id|truncate:20}}{{ image.Tag }}{{ image.Repository }}{{ image.Id|truncate:20}}{{ image.Repository }}:{{ image.Tag }} {{ image.Created|getdate }}