diff --git a/app/components/docker/docker.html b/app/components/docker/docker.html index a3f723781..ac5f797a8 100644 --- a/app/components/docker/docker.html +++ b/app/components/docker/docker.html @@ -3,139 +3,113 @@ + Docker -
-
- - -
- -
-
{{ docker.Version }}
-
Docker version
-
-
-
-
- - -
- -
-
{{ docker.ApiVersion }}
-
API version
-
-
-
-
- - -
- -
-
{{ docker.GoVersion }}
-
Go version
-
-
-
-
-
-
+
+
- + - - - - - - + + - - + + - - + + - - + + - + - - + + - - + + + +
Containers{{ info.Containers }}
Images{{ info.Images }}Version{{ version.Version }}
Debug{{ info.Debug }}API version{{ version.ApiVersion }}
CPUs{{ info.NCPU }}Go version{{ version.GoVersion }}
Total Memory{{ info.MemTotal|humansize }}OS type{{ version.Os }}
Operating SystemOS {{ info.OperatingSystem }}
Kernel Version{{ info.KernelVersion }}Architecture{{ version.Arch }}
ID{{ info.ID }}Kernel version{{ version.KernelVersion }}
+
+
+
+
+ +
+
+ + + + + - - + + - - + + - - + + - + - - - - - - - - - - - - - - + + - - - + + + - - - + + + - - - + +
Labels{{ info.Labels }}Total CPU{{ info.NCPU }}
File Descriptors{{ info.NFd }}Total memory{{ info.MemTotal|humansize }}
Goroutines{{ info.NGoroutines }}Docker root directory{{ info.DockerRootDir }}
Storage DriverStorage driver {{ info.Driver }}
Storage Driver Status -

- {{ val[0] }}: {{ val[1] }} -

-
Execution Driver{{ info.ExecutionDriver }}
IPv4 Forwarding{{ info.IPv4Forwarding }}
Index Server Address{{ info.IndexServerAddress }}Logging driver{{ info.LoggingDriver }}
Init Path{{ info.InitPath }}
Cgroup driver{{ info.CgroupDriver }}
Docker Root Directory{{ info.DockerRootDir }}
Execution driver{{ info.ExecutionDriver }}
Init SHA1{{ info.InitSha1 }}
+
+
+
+
+ +
+
+ + + + + + + + - - - + + + - - - + + +
Volume{{ info.Plugins.Volume|arraytostr: ', '}}
Memory Limit{{ info.MemoryLimit }}
Network{{ info.Plugins.Network|arraytostr: ', '}}
Swap Limit{{ info.SwapLimit }}
Authorization{{ info.Plugins.Authorization|arraytostr: ', '}}
diff --git a/app/components/docker/dockerController.js b/app/components/docker/dockerController.js index f20233aae..42e8c7792 100644 --- a/app/components/docker/dockerController.js +++ b/app/components/docker/dockerController.js @@ -1,19 +1,24 @@ angular.module('docker', []) -.controller('DockerController', ['$scope', 'Info', 'Version', 'Settings', -function ($scope, Info, Version, Settings) { - - $scope.info = {}; - $scope.docker = {}; - - $scope.order = function(sortType) { - $scope.sortReverse = ($scope.sortType === sortType) ? !$scope.sortReverse : false; - $scope.sortType = sortType; +.controller('DockerController', ['$scope', 'Info', 'Version', 'Messages', +function ($scope, Info, Version, Messages) { + $scope.state = { + loaded: false }; + $scope.info = {}; + $scope.version = {}; - Version.get({}, function (d) { - $scope.docker = d; - }); - Info.get({}, function (d) { - $scope.info = d; + Info.get({}, function (infoData) { + $scope.info = infoData; + Version.get({}, function (versionData) { + $scope.version = versionData; + $scope.state.loaded = true; + $('#loadingViewSpinner').hide(); + }, function (e) { + Messages.error("Failure", e, 'Unable to retrieve engine details'); + $('#loadingViewSpinner').hide(); + }); + }, function (e) { + Messages.error("Failure", e, 'Unable to retrieve engine information'); + $('#loadingViewSpinner').hide(); }); }]); diff --git a/app/shared/filters.js b/app/shared/filters.js index 2de2e49c8..981626427 100644 --- a/app/shared/filters.js +++ b/app/shared/filters.js @@ -213,4 +213,13 @@ angular.module('portainer.filters', []) return function (ip) { return ip.slice(0, ip.indexOf('/')); }; +}) +.filter('arraytostr', function () { + 'use strict'; + return function (arr, separator) { + if (arr) { + return _.join(arr, separator); + } + return ''; + }; }); diff --git a/index.html b/index.html index 71859a52d..4396996a0 100644 --- a/index.html +++ b/index.html @@ -66,7 +66,7 @@ Swarm