From 528565afc8d047253f61a36e984788e0082e1c82 Mon Sep 17 00:00:00 2001 From: Michael Crosby Date: Mon, 10 Jun 2013 03:59:57 -0900 Subject: [PATCH] Update settings with endpoint --- README.md | 4 ++++ js/app.js | 1 + js/services.js | 5 +++-- partials/settings.html | 1 + 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 05e7aa42f..6de96d5be 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,10 @@ DockerUI is a web interface to interact with the Remote API. The goal is to pro ![Container](/container.png) + +###Goals +* Little to no dependencies - I really want to keep this project a pure html/js app. You can drop the docker binary on your server run so I want to be able to drop these html files on your server and go. + ###Installation Open js/app.js and change the DOCKER_ENDPOINT constant to your docker ip and port. Then host the site like any other html/js application. diff --git a/js/app.js b/js/app.js index b5ea70d84..f0d03aa45 100644 --- a/js/app.js +++ b/js/app.js @@ -10,4 +10,5 @@ angular.module('dockerui', ['dockerui.services', 'dockerui.filters']) $routeProvider.when('/settings', {templateUrl: 'partials/settings.html', controller: 'SettingsController'}); $routeProvider.otherwise({redirectTo: '/'}); }]) + // This is your docker url that the api will use to make requests .constant('DOCKER_ENDPOINT', 'http://192.168.1.9:4243\:4243'); diff --git a/js/services.js b/js/services.js index 21a15056a..27b0bfa5e 100644 --- a/js/services.js +++ b/js/services.js @@ -53,8 +53,9 @@ angular.module('dockerui.services', ['ngResource']) get: {method: 'GET'} }); }) - .factory('Settings', function() { + .factory('Settings', function(DOCKER_ENDPOINT) { return { - displayAll: false + displayAll: false, + endpoint: DOCKER_ENDPOINT }; }); diff --git a/partials/settings.html b/partials/settings.html index 24bb92a37..a1121db7e 100644 --- a/partials/settings.html +++ b/partials/settings.html @@ -6,6 +6,7 @@

Docker Information

+ Endpoint{{ endpoint }}
Version{{ docker.Version }}
GitCommit{{ docker.GitCommit }}
GoVersion{{ docker.GoVersion }}