Update settings with endpoint

pull/2/head
Michael Crosby 2013-06-10 03:59:57 -09:00
parent 880966f3ba
commit 528565afc8
4 changed files with 9 additions and 2 deletions

View File

@ -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.

View File

@ -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');

View File

@ -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
};
});

View File

@ -6,6 +6,7 @@
<h3>Docker Information</h3>
<div>
<p class="lead">
<strong>Endpoint</strong>{{ endpoint }}<br />
<strong>Version</strong>{{ docker.Version }}<br />
<strong>GitCommit</strong>{{ docker.GitCommit }}<br />
<strong>GoVersion</strong>{{ docker.GoVersion }}<br />