Merge pull request #89 from dasJ/master

Improve settings page
pull/2/head
Kevan Ahlquist 2015-02-14 14:02:43 -06:00
commit 8848d2d53c
7 changed files with 269 additions and 113 deletions

View File

@ -1,4 +1,4 @@
angular.module('dockerui', ['dockerui.templates', 'ngRoute', 'dockerui.services', 'dockerui.filters', 'masthead', 'footer', 'dashboard', 'container', 'containers', 'images', 'image', 'startContainer', 'sidebar', 'settings', 'builder', 'containerLogs'])
angular.module('dockerui', ['dockerui.templates', 'ngRoute', 'dockerui.services', 'dockerui.filters', 'masthead', 'footer', 'dashboard', 'container', 'containers', 'images', 'image', 'startContainer', 'sidebar', 'info', 'builder', 'containerLogs'])
.config(['$routeProvider', function ($routeProvider) {
'use strict';
$routeProvider.when('/', {templateUrl: 'app/components/dashboard/dashboard.html', controller: 'DashboardController'});
@ -7,7 +7,7 @@ angular.module('dockerui', ['dockerui.templates', 'ngRoute', 'dockerui.services'
$routeProvider.when('/containers/:id/logs/', {templateUrl: 'app/components/containerLogs/containerlogs.html', controller: 'ContainerLogsController'});
$routeProvider.when('/images/', {templateUrl: 'app/components/images/images.html', controller: 'ImagesController'});
$routeProvider.when('/images/:id/', {templateUrl: 'app/components/image/image.html', controller: 'ImageController'});
$routeProvider.when('/settings', {templateUrl: 'app/components/settings/settings.html', controller: 'SettingsController'});
$routeProvider.when('/info', {templateUrl: 'app/components/info/info.html', controller: 'InfoController'});
$routeProvider.otherwise({redirectTo: '/'});
}])
// This is your docker url that the api will use to make requests

View File

@ -0,0 +1,101 @@
<div class="detail">
<h2>Docker Information</h2>
<div>
<p class="lead">
<strong>Endpoint: </strong>{{ endpoint }}<br />
<strong>Api Version: </strong>{{ apiVersion }}<br />
<strong>Version: </strong>{{ docker.Version }}<br />
<strong>Git Commit: </strong>{{ docker.GitCommit }}<br />
<strong>Go Version: </strong>{{ docker.GoVersion }}<br />
</p>
</div>
<table class="table table-striped">
<tbody>
<tr>
<td>Containers:</td>
<td>{{ info.Containers }}</td>
</tr>
<tr>
<td>Images:</td>
<td>{{ info.Images }}</td>
</tr>
<tr>
<td>Debug:</td>
<td>{{ info.Debug }}</td>
</tr>
<tr>
<td>CPUs:</td>
<td>{{ info.NCPU }}</td>
</tr>
<tr>
<td>Total Memory:</td>
<td>{{ info.MemTotal|humansize }}</td>
</tr>
<tr>
<td>Operating System:</td>
<td>{{ info.OperatingSystem }}</td>
</tr>
<tr>
<td>Kernel Version:</td>
<td>{{ info.KernelVersion }}</td>
</tr>
<tr>
<td>ID:</td>
<td>{{ info.ID }}</td>
</tr>
<tr>
<td>Labels:</td>
<td>{{ info.Labels }}</td>
</tr>
<tr>
<td>File Descriptors:</td>
<td>{{ info.NFd }}</td>
</tr>
<tr>
<td>Goroutines:</td>
<td>{{ info.NGoroutines }}</td>
</tr>
<tr>
<td>Storage Driver:</td>
<td>{{ info.Driver }}</td>
</tr>
<tr>
<td>Storage Driver Status:</td>
<td>{{ info.DriverStatus }}</td>
</tr>
<tr>
<td>Execution Driver:</td>
<td>{{ info.ExecutionDriver }}</td>
</tr>
<tr>
<td>IPv4 Forwarding:</td>
<td>{{ info.IPv4Forwarding }}</td>
</tr>
<tr>
<td>Index Server Address:</td>
<td>{{ info.IndexServerAddress }}</td>
</tr>
<tr>
<td>Init Path:</td>
<td>{{ info.InitPath }}</td>
</tr>
<tr>
<td>Docker Root Directory:</td>
<td>{{ info.DockerRootDir }}</td>
</tr>
<tr>
<td>Init SHA1</td>
<td>{{ info.InitSha1 }}</td>
</tr>
<tr>
<td>Memory Limit:</td>
<td>{{ info.MemoryLimit }}</td>
</tr>
<tr>
<td>Swap Limit:</td>
<td>{{ info.SwapLimit }}</td>
</tr>
</tbody>
</table>
</div>

View File

@ -1,5 +1,5 @@
angular.module('settings', [])
.controller('SettingsController', ['$scope', 'System', 'Docker', 'Settings', 'Messages',
angular.module('info', [])
.controller('InfoController', ['$scope', 'System', 'Docker', 'Settings', 'Messages',
function($scope, System, Docker, Settings, Messages) {
$scope.info = {};
$scope.docker = {};

View File

@ -4,6 +4,6 @@
<li><a href="#">Dashboard</a></li>
<li><a href="#/containers/">Containers</a></li>
<li><a href="#/images/">Images</a></li>
<li><a href="#/settings/">Settings</a></li>
<li><a href="#/info/">Info</a></li>
</ul>
</div>

View File

@ -1,49 +0,0 @@
<div class="detail">
<h2>Docker Information</h2>
<div>
<p class="lead">
<strong>Endpoint: </strong>{{ endpoint }}<br />
<strong>Api Version: </strong>{{ apiVersion }}<br />
<strong>Version: </strong>{{ docker.Version }}<br />
<strong>Git Commit: </strong>{{ docker.GitCommit }}<br />
<strong>Go Version: </strong>{{ docker.GoVersion }}<br />
</p>
</div>
<table class="table table-striped">
<tbody>
<tr>
<td>Containers:</td>
<td>{{ info.Containers }}</td>
</tr>
<tr>
<td>Images:</td>
<td>{{ info.Images }}</td>
</tr>
<tr>
<td>Debug:</td>
<td>{{ info.Debug }}</td>
</tr>
<tr>
<td>NFd:</td>
<td>{{ info.NFd }}</td>
</tr>
<tr>
<td>NGoroutines:</td>
<td>{{ info.NGoroutines }}</td>
</tr>
<tr>
<td>MemoryLimit:</td>
<td>{{ info.MemoryLimit }}</td>
</tr>
<tr>
<td>SwapLimit:</td>
<td>{{ info.SwapLimit }}</td>
</tr>
<tr>
<td>NFd:</td>
<td>{{ info.NFd }}</td>
</tr>
</tbody>
</table>
</div>

116
dist/dockerui.js vendored
View File

@ -3,7 +3,7 @@
* Copyright (c) 2015 Michael Crosby & Kevan Ahlquist;
* Licensed MIT
*/
angular.module('dockerui', ['dockerui.templates', 'ngRoute', 'dockerui.services', 'dockerui.filters', 'masthead', 'footer', 'dashboard', 'container', 'containers', 'images', 'image', 'startContainer', 'sidebar', 'settings', 'builder', 'containerLogs'])
angular.module('dockerui', ['dockerui.templates', 'ngRoute', 'dockerui.services', 'dockerui.filters', 'masthead', 'footer', 'dashboard', 'container', 'containers', 'images', 'image', 'startContainer', 'sidebar', 'info', 'builder', 'containerLogs'])
.config(['$routeProvider', function ($routeProvider) {
'use strict';
$routeProvider.when('/', {templateUrl: 'app/components/dashboard/dashboard.html', controller: 'DashboardController'});
@ -12,7 +12,7 @@ angular.module('dockerui', ['dockerui.templates', 'ngRoute', 'dockerui.services'
$routeProvider.when('/containers/:id/logs/', {templateUrl: 'app/components/containerLogs/containerlogs.html', controller: 'ContainerLogsController'});
$routeProvider.when('/images/', {templateUrl: 'app/components/images/images.html', controller: 'ImagesController'});
$routeProvider.when('/images/:id/', {templateUrl: 'app/components/image/image.html', controller: 'ImageController'});
$routeProvider.when('/settings', {templateUrl: 'app/components/settings/settings.html', controller: 'SettingsController'});
$routeProvider.when('/info', {templateUrl: 'app/components/info/info.html', controller: 'InfoController'});
$routeProvider.otherwise({redirectTo: '/'});
}])
// This is your docker url that the api will use to make requests
@ -502,13 +502,8 @@ function($scope, Image, ViewSpinner, Messages) {
});
}]);
angular.module('masthead', [])
.controller('MastheadController', ['$scope', function($scope) {
$scope.template = 'app/components/masthead/masthead.html';
}]);
angular.module('settings', [])
.controller('SettingsController', ['$scope', 'System', 'Docker', 'Settings', 'Messages',
angular.module('info', [])
.controller('InfoController', ['$scope', 'System', 'Docker', 'Settings', 'Messages',
function($scope, System, Docker, Settings, Messages) {
$scope.info = {};
$scope.docker = {};
@ -519,6 +514,11 @@ function($scope, System, Docker, Settings, Messages) {
System.get({}, function(d) { $scope.info = d; });
}]);
angular.module('masthead', [])
.controller('MastheadController', ['$scope', function($scope) {
$scope.template = 'app/components/masthead/masthead.html';
}]);
angular.module('sidebar', [])
.controller('SideBarController', ['$scope', 'Container', 'Settings',
function($scope, Container, Settings) {
@ -1009,7 +1009,7 @@ function ContainerViewModel(data) {
this.Names = data.Names;
}
angular.module('dockerui.templates', ['app/components/builder/builder.html', 'app/components/container/container.html', 'app/components/containerLogs/containerlogs.html', 'app/components/containers/containers.html', 'app/components/dashboard/dashboard.html', 'app/components/footer/statusbar.html', 'app/components/image/image.html', 'app/components/images/images.html', 'app/components/masthead/masthead.html', 'app/components/settings/settings.html', 'app/components/sidebar/sidebar.html', 'app/components/startContainer/startcontainer.html']);
angular.module('dockerui.templates', ['app/components/builder/builder.html', 'app/components/container/container.html', 'app/components/containerLogs/containerlogs.html', 'app/components/containers/containers.html', 'app/components/dashboard/dashboard.html', 'app/components/footer/statusbar.html', 'app/components/image/image.html', 'app/components/images/images.html', 'app/components/info/info.html', 'app/components/masthead/masthead.html', 'app/components/sidebar/sidebar.html', 'app/components/startContainer/startcontainer.html']);
angular.module("app/components/builder/builder.html", []).run(["$templateCache", function($templateCache) {
$templateCache.put("app/components/builder/builder.html",
@ -1470,22 +1470,8 @@ angular.module("app/components/images/images.html", []).run(["$templateCache", f
"");
}]);
angular.module("app/components/masthead/masthead.html", []).run(["$templateCache", function($templateCache) {
$templateCache.put("app/components/masthead/masthead.html",
" <div class=\"masthead\">\n" +
" <h3 class=\"text-muted\">DockerUI</h3>\n" +
" <ul class=\"nav well\">\n" +
" <li><a href=\"#\">Dashboard</a></li>\n" +
" <li><a href=\"#/containers/\">Containers</a></li>\n" +
" <li><a href=\"#/images/\">Images</a></li>\n" +
" <li><a href=\"#/settings/\">Settings</a></li>\n" +
" </ul>\n" +
" </div>\n" +
"");
}]);
angular.module("app/components/settings/settings.html", []).run(["$templateCache", function($templateCache) {
$templateCache.put("app/components/settings/settings.html",
angular.module("app/components/info/info.html", []).run(["$templateCache", function($templateCache) {
$templateCache.put("app/components/info/info.html",
"<div class=\"detail\">\n" +
" <h2>Docker Information</h2>\n" +
" <div>\n" +
@ -1513,14 +1499,70 @@ angular.module("app/components/settings/settings.html", []).run(["$templateCache
" <td>{{ info.Debug }}</td>\n" +
" </tr>\n" +
" <tr>\n" +
" <td>NFd:</td>\n" +
" <td>CPUs:</td>\n" +
" <td>{{ info.NCPU }}</td>\n" +
" </tr>\n" +
" <tr>\n" +
" <td>Total Memory:</td>\n" +
" <td>{{ info.MemTotal|humansize }}</td>\n" +
" </tr>\n" +
" <tr>\n" +
" <td>Operating System:</td>\n" +
" <td>{{ info.OperatingSystem }}</td>\n" +
" </tr>\n" +
" <tr>\n" +
" <td>Kernel Version:</td>\n" +
" <td>{{ info.KernelVersion }}</td>\n" +
" </tr>\n" +
" <tr>\n" +
" <td>ID:</td>\n" +
" <td>{{ info.ID }}</td>\n" +
" </tr>\n" +
" <tr>\n" +
" <td>Labels:</td>\n" +
" <td>{{ info.Labels }}</td>\n" +
" </tr>\n" +
" <tr>\n" +
" <td>File Descriptors:</td>\n" +
" <td>{{ info.NFd }}</td>\n" +
" </tr>\n" +
" <tr>\n" +
" <td>NGoroutines:</td>\n" +
" <td>Goroutines:</td>\n" +
" <td>{{ info.NGoroutines }}</td>\n" +
" </tr>\n" +
" <tr>\n" +
" <td>Storage Driver:</td>\n" +
" <td>{{ info.Driver }}</td>\n" +
" </tr>\n" +
" <tr>\n" +
" <td>Storage Driver Status:</td>\n" +
" <td>{{ info.DriverStatus }}</td>\n" +
" </tr>\n" +
" <tr>\n" +
" <td>Execution Driver:</td>\n" +
" <td>{{ info.ExecutionDriver }}</td>\n" +
" </tr>\n" +
" <tr>\n" +
" <td>IPv4 Forwarding:</td>\n" +
" <td>{{ info.IPv4Forwarding }}</td>\n" +
" </tr>\n" +
" <tr>\n" +
" <td>Index Server Address:</td>\n" +
" <td>{{ info.IndexServerAddress }}</td>\n" +
" </tr>\n" +
" <tr>\n" +
" <td>Init Path:</td>\n" +
" <td>{{ info.InitPath }}</td>\n" +
" </tr>\n" +
" <tr>\n" +
" <td>Docker Root Directory:</td>\n" +
" <td>{{ info.DockerRootDir }}</td>\n" +
" </tr>\n" +
" <tr>\n" +
" <td>Init SHA1</td>\n" +
" <td>{{ info.InitSha1 }}</td>\n" +
" </tr>\n" +
" <tr>\n" +
" <td>Memory Limit:</td>\n" +
" <td>{{ info.MemoryLimit }}</td>\n" +
" </tr>\n" +
@ -1528,16 +1570,26 @@ angular.module("app/components/settings/settings.html", []).run(["$templateCache
" <td>Swap Limit:</td>\n" +
" <td>{{ info.SwapLimit }}</td>\n" +
" </tr>\n" +
" <tr>\n" +
" <td>NFd:</td>\n" +
" <td>{{ info.NFd }}</td>\n" +
" </tr>\n" +
" </tbody>\n" +
" </table>\n" +
"</div>\n" +
"");
}]);
angular.module("app/components/masthead/masthead.html", []).run(["$templateCache", function($templateCache) {
$templateCache.put("app/components/masthead/masthead.html",
" <div class=\"masthead\">\n" +
" <h3 class=\"text-muted\">DockerUI</h3>\n" +
" <ul class=\"nav well\">\n" +
" <li><a href=\"#\">Dashboard</a></li>\n" +
" <li><a href=\"#/containers/\">Containers</a></li>\n" +
" <li><a href=\"#/images/\">Images</a></li>\n" +
" <li><a href=\"#/info/\">Info</a></li>\n" +
" </ul>\n" +
" </div>\n" +
"");
}]);
angular.module("app/components/sidebar/sidebar.html", []).run(["$templateCache", function($templateCache) {
$templateCache.put("app/components/sidebar/sidebar.html",
"<div class=\"well\">\n" +

98
dist/templates/app.js vendored
View File

@ -1,4 +1,4 @@
angular.module('dockerui.templates', ['app/components/builder/builder.html', 'app/components/container/container.html', 'app/components/containerLogs/containerlogs.html', 'app/components/containers/containers.html', 'app/components/dashboard/dashboard.html', 'app/components/footer/statusbar.html', 'app/components/image/image.html', 'app/components/images/images.html', 'app/components/masthead/masthead.html', 'app/components/settings/settings.html', 'app/components/sidebar/sidebar.html', 'app/components/startContainer/startcontainer.html']);
angular.module('dockerui.templates', ['app/components/builder/builder.html', 'app/components/container/container.html', 'app/components/containerLogs/containerlogs.html', 'app/components/containers/containers.html', 'app/components/dashboard/dashboard.html', 'app/components/footer/statusbar.html', 'app/components/image/image.html', 'app/components/images/images.html', 'app/components/info/info.html', 'app/components/masthead/masthead.html', 'app/components/sidebar/sidebar.html', 'app/components/startContainer/startcontainer.html']);
angular.module("app/components/builder/builder.html", []).run(["$templateCache", function($templateCache) {
$templateCache.put("app/components/builder/builder.html",
@ -459,22 +459,8 @@ angular.module("app/components/images/images.html", []).run(["$templateCache", f
"");
}]);
angular.module("app/components/masthead/masthead.html", []).run(["$templateCache", function($templateCache) {
$templateCache.put("app/components/masthead/masthead.html",
" <div class=\"masthead\">\n" +
" <h3 class=\"text-muted\">DockerUI</h3>\n" +
" <ul class=\"nav well\">\n" +
" <li><a href=\"#\">Dashboard</a></li>\n" +
" <li><a href=\"#/containers/\">Containers</a></li>\n" +
" <li><a href=\"#/images/\">Images</a></li>\n" +
" <li><a href=\"#/settings/\">Settings</a></li>\n" +
" </ul>\n" +
" </div>\n" +
"");
}]);
angular.module("app/components/settings/settings.html", []).run(["$templateCache", function($templateCache) {
$templateCache.put("app/components/settings/settings.html",
angular.module("app/components/info/info.html", []).run(["$templateCache", function($templateCache) {
$templateCache.put("app/components/info/info.html",
"<div class=\"detail\">\n" +
" <h2>Docker Information</h2>\n" +
" <div>\n" +
@ -502,14 +488,70 @@ angular.module("app/components/settings/settings.html", []).run(["$templateCache
" <td>{{ info.Debug }}</td>\n" +
" </tr>\n" +
" <tr>\n" +
" <td>NFd:</td>\n" +
" <td>CPUs:</td>\n" +
" <td>{{ info.NCPU }}</td>\n" +
" </tr>\n" +
" <tr>\n" +
" <td>Total Memory:</td>\n" +
" <td>{{ info.MemTotal|humansize }}</td>\n" +
" </tr>\n" +
" <tr>\n" +
" <td>Operating System:</td>\n" +
" <td>{{ info.OperatingSystem }}</td>\n" +
" </tr>\n" +
" <tr>\n" +
" <td>Kernel Version:</td>\n" +
" <td>{{ info.KernelVersion }}</td>\n" +
" </tr>\n" +
" <tr>\n" +
" <td>ID:</td>\n" +
" <td>{{ info.ID }}</td>\n" +
" </tr>\n" +
" <tr>\n" +
" <td>Labels:</td>\n" +
" <td>{{ info.Labels }}</td>\n" +
" </tr>\n" +
" <tr>\n" +
" <td>File Descriptors:</td>\n" +
" <td>{{ info.NFd }}</td>\n" +
" </tr>\n" +
" <tr>\n" +
" <td>NGoroutines:</td>\n" +
" <td>Goroutines:</td>\n" +
" <td>{{ info.NGoroutines }}</td>\n" +
" </tr>\n" +
" <tr>\n" +
" <td>Storage Driver:</td>\n" +
" <td>{{ info.Driver }}</td>\n" +
" </tr>\n" +
" <tr>\n" +
" <td>Storage Driver Status:</td>\n" +
" <td>{{ info.DriverStatus }}</td>\n" +
" </tr>\n" +
" <tr>\n" +
" <td>Execution Driver:</td>\n" +
" <td>{{ info.ExecutionDriver }}</td>\n" +
" </tr>\n" +
" <tr>\n" +
" <td>IPv4 Forwarding:</td>\n" +
" <td>{{ info.IPv4Forwarding }}</td>\n" +
" </tr>\n" +
" <tr>\n" +
" <td>Index Server Address:</td>\n" +
" <td>{{ info.IndexServerAddress }}</td>\n" +
" </tr>\n" +
" <tr>\n" +
" <td>Init Path:</td>\n" +
" <td>{{ info.InitPath }}</td>\n" +
" </tr>\n" +
" <tr>\n" +
" <td>Docker Root Directory:</td>\n" +
" <td>{{ info.DockerRootDir }}</td>\n" +
" </tr>\n" +
" <tr>\n" +
" <td>Init SHA1</td>\n" +
" <td>{{ info.InitSha1 }}</td>\n" +
" </tr>\n" +
" <tr>\n" +
" <td>Memory Limit:</td>\n" +
" <td>{{ info.MemoryLimit }}</td>\n" +
" </tr>\n" +
@ -517,16 +559,26 @@ angular.module("app/components/settings/settings.html", []).run(["$templateCache
" <td>Swap Limit:</td>\n" +
" <td>{{ info.SwapLimit }}</td>\n" +
" </tr>\n" +
" <tr>\n" +
" <td>NFd:</td>\n" +
" <td>{{ info.NFd }}</td>\n" +
" </tr>\n" +
" </tbody>\n" +
" </table>\n" +
"</div>\n" +
"");
}]);
angular.module("app/components/masthead/masthead.html", []).run(["$templateCache", function($templateCache) {
$templateCache.put("app/components/masthead/masthead.html",
" <div class=\"masthead\">\n" +
" <h3 class=\"text-muted\">DockerUI</h3>\n" +
" <ul class=\"nav well\">\n" +
" <li><a href=\"#\">Dashboard</a></li>\n" +
" <li><a href=\"#/containers/\">Containers</a></li>\n" +
" <li><a href=\"#/images/\">Images</a></li>\n" +
" <li><a href=\"#/info/\">Info</a></li>\n" +
" </ul>\n" +
" </div>\n" +
"");
}]);
angular.module("app/components/sidebar/sidebar.html", []).run(["$templateCache", function($templateCache) {
$templateCache.put("app/components/sidebar/sidebar.html",
"<div class=\"well\">\n" +