diff --git a/app/components/createNetwork/createNetworkController.js b/app/components/createNetwork/createNetworkController.js
deleted file mode 100644
index 44a7bd858..000000000
--- a/app/components/createNetwork/createNetworkController.js
+++ /dev/null
@@ -1,57 +0,0 @@
-angular.module('createNetwork', [])
-.controller('CreateNetworkController', ['$scope', '$state', 'Messages', 'Network', 'ViewSpinner', 'errorMsgFilter',
-function ($scope, $state, Messages, Network, ViewSpinner, errorMsgFilter) {
- $scope.formValues = {
- DriverOptions: []
- };
-
- $scope.config = {
- Driver: 'bridge',
- CheckDuplicate: true,
- Internal: false
- };
-
- $scope.addDriverOption = function() {
- $scope.formValues.DriverOptions.push({ name: '', value: '' });
- };
-
- $scope.removeDriverOption = function(index) {
- $scope.formValues.DriverOptions.splice(index, 1);
- };
-
- function createNetwork(config) {
- ViewSpinner.spin();
- Network.create(config, function (d) {
- if (d.Id) {
- Messages.send("Network created", d.Id);
- ViewSpinner.stop();
- $state.go('networks', {}, {reload: true});
- } else {
- ViewSpinner.stop();
- Messages.error('Unable to create network', errorMsgFilter(d));
- }
- }, function (e) {
- ViewSpinner.stop();
- Messages.error('Unable to create network', e.data);
- });
- }
-
- function prepareDriverOptions(config) {
- var options = {};
- $scope.formValues.DriverOptions.forEach(function (option) {
- options[option.name] = option.value;
- });
- config.Options = options;
- }
-
- function prepareConfiguration() {
- var config = angular.copy($scope.config);
- prepareDriverOptions(config);
- return config;
- }
-
- $scope.create = function () {
- var config = prepareConfiguration();
- createNetwork(config);
- };
-}]);
diff --git a/app/components/createNetwork/createnetwork.html b/app/components/createNetwork/createnetwork.html
deleted file mode 100644
index f4ae1d756..000000000
--- a/app/components/createNetwork/createnetwork.html
+++ /dev/null
@@ -1,80 +0,0 @@
-
-
-
- Networks > Add network
-
-
-
-
-
-
diff --git a/app/components/createVolume/createVolumeController.js b/app/components/createVolume/createVolumeController.js
deleted file mode 100644
index d33d4c7e1..000000000
--- a/app/components/createVolume/createVolumeController.js
+++ /dev/null
@@ -1,56 +0,0 @@
-angular.module('createVolume', [])
-.controller('CreateVolumeController', ['$scope', '$state', 'Volume', 'Messages', 'ViewSpinner', 'errorMsgFilter',
-function ($scope, $state, Volume, Messages, ViewSpinner, errorMsgFilter) {
-
- $scope.formValues = {
- DriverOptions: []
- };
-
- $scope.config = {
- Driver: 'local'
- };
-
- $scope.addDriverOption = function() {
- $scope.formValues.DriverOptions.push({ name: '', value: '' });
- };
-
- $scope.removeDriverOption = function(index) {
- $scope.formValues.DriverOptions.splice(index, 1);
- };
-
- function createVolume(config) {
- ViewSpinner.spin();
- Volume.create(config, function (d) {
- if (d.Name) {
- Messages.send("Volume created", d.Name);
- ViewSpinner.stop();
- $state.go('volumes', {}, {reload: true});
- } else {
- ViewSpinner.stop();
- Messages.error('Unable to create volume', errorMsgFilter(d));
- }
- }, function (e) {
- ViewSpinner.stop();
- Messages.error('Unable to create volume', e.data);
- });
- }
-
- function prepareDriverOptions(config) {
- var options = {};
- $scope.formValues.DriverOptions.forEach(function (option) {
- options[option.name] = option.value;
- });
- config.DriverOpts = options;
- }
-
- function prepareConfiguration() {
- var config = angular.copy($scope.config);
- prepareDriverOptions(config);
- return config;
- }
-
- $scope.create = function () {
- var config = prepareConfiguration();
- createVolume(config);
- };
-}]);
diff --git a/app/components/createVolume/createvolume.html b/app/components/createVolume/createvolume.html
deleted file mode 100644
index d6fb53e5a..000000000
--- a/app/components/createVolume/createvolume.html
+++ /dev/null
@@ -1,69 +0,0 @@
-
-
-
- Volumes > Add volume
-
-
-
-
-
-
diff --git a/app/components/images/images.html b/app/components/images/images.html
index 0a539ee8a..14b84161c 100644
--- a/app/components/images/images.html
+++ b/app/components/images/images.html
@@ -76,18 +76,11 @@
- VirtualSize
+ Size
|
-
-
- Created
-
-
-
- |
@@ -96,7 +89,6 @@
{{ image.Id|truncate:20}} |
{{ image|repotag }} |
{{ image.VirtualSize|humansize }} |
- {{ image.Created|getdate }} |
diff --git a/app/components/images/imagesController.js b/app/components/images/imagesController.js
index 20dbf294f..fc39c46c2 100644
--- a/app/components/images/imagesController.js
+++ b/app/components/images/imagesController.js
@@ -2,7 +2,7 @@ angular.module('images', [])
.controller('ImagesController', ['$scope', '$state', 'Image', 'ViewSpinner', 'Messages',
function ($scope, $state, Image, ViewSpinner, Messages) {
$scope.state = {};
- $scope.sortType = 'Created';
+ $scope.sortType = 'RepoTags';
$scope.sortReverse = true;
$scope.state.toggle = false;
$scope.state.selectedItemCount = 0;
diff --git a/app/components/networks/networks.html b/app/components/networks/networks.html
index 381fd500e..ecfdd1559 100644
--- a/app/components/networks/networks.html
+++ b/app/components/networks/networks.html
@@ -7,6 +7,39 @@
Networks
+
+
@@ -14,7 +47,6 @@
@@ -33,13 +65,6 @@
-
-
- Id
-
-
-
- |
Scope
@@ -47,30 +72,16 @@
|
-
-
- Driver
-
-
-
- |
-
-
- IPAM Driver
-
-
-
- |
- IPAM Subnet
+ Subnet
|
- IPAM Gateway
+ Gateway
@@ -80,13 +91,10 @@
|
|
- {{ network.Name|truncate:20}} |
- {{ network.Id }} |
+ {{ network.Name|truncate:40}} |
{{ network.Scope }} |
- {{ network.Driver }} |
- {{ network.IPAM.Driver }} |
- {{ network.IPAM.Config[0].Subnet }} |
- {{ network.IPAM.Config[0].Gateway }} |
+ {{ network.IPAM.Config[0].Subnet ? network.IPAM.Config[0].Subnet : '-' }} |
+ {{ network.IPAM.Config[0].Gateway ? network.IPAM.Config[0].Gateway : '-' }} |
diff --git a/app/components/networks/networksController.js b/app/components/networks/networksController.js
index c3e8dbc8b..7d8f9f4e6 100644
--- a/app/components/networks/networksController.js
+++ b/app/components/networks/networksController.js
@@ -1,12 +1,15 @@
angular.module('networks', [])
-.controller('NetworksController', ['$scope', 'Network', 'ViewSpinner', 'Messages', 'errorMsgFilter',
-function ($scope, Network, ViewSpinner, Messages, errorMsgFilter) {
-
+.controller('NetworksController', ['$scope', '$state', 'Network', 'ViewSpinner', 'Messages', 'errorMsgFilter',
+function ($scope, $state, Network, ViewSpinner, Messages, errorMsgFilter) {
$scope.state = {};
$scope.state.toggle = false;
$scope.state.selectedItemCount = 0;
- $scope.sortType = 'Name';
- $scope.sortReverse = true;
+ $scope.sortType = 'Scope';
+ $scope.sortReverse = false;
+
+ $scope.config = {
+ Name: ''
+ };
$scope.order = function(sortType) {
$scope.sortReverse = ($scope.sortType === sortType) ? !$scope.sortReverse : false;
@@ -32,6 +35,30 @@ function ($scope, Network, ViewSpinner, Messages, errorMsgFilter) {
}
};
+ function prepareNetworkConfiguration() {
+ var config = angular.copy($scope.config);
+ config.Driver = 'overlay';
+ return config;
+ }
+
+ $scope.createNetwork = function() {
+ ViewSpinner.spin();
+ var config = prepareNetworkConfiguration();
+ Network.create(config, function (d) {
+ if (d.Id) {
+ Messages.send("Network created", d.Id);
+ ViewSpinner.stop();
+ $state.go('networks', {}, {reload: true});
+ } else {
+ ViewSpinner.stop();
+ Messages.error('Unable to create network', errorMsgFilter(d));
+ }
+ }, function (e) {
+ ViewSpinner.stop();
+ Messages.error('Unable to create network', e.data);
+ });
+ };
+
$scope.removeAction = function () {
ViewSpinner.spin();
var counter = 0;
diff --git a/app/components/volumes/volumes.html b/app/components/volumes/volumes.html
index b4f55107e..3ce2824d0 100644
--- a/app/components/volumes/volumes.html
+++ b/app/components/volumes/volumes.html
@@ -7,6 +7,39 @@
Volumes
+
+
@@ -14,7 +47,6 @@
@@ -40,21 +72,13 @@
-
-
- Mountpoint
-
-
-
- |
|
- {{ volume.Name|truncate:20 }} |
+ {{ volume.Name|truncate:50 }} |
{{ volume.Driver }} |
- {{ volume.Mountpoint }} |
diff --git a/app/components/volumes/volumesController.js b/app/components/volumes/volumesController.js
index 750c683f7..dbac34fd2 100644
--- a/app/components/volumes/volumesController.js
+++ b/app/components/volumes/volumesController.js
@@ -1,12 +1,16 @@
angular.module('volumes', [])
-.controller('VolumesController', ['$scope', 'Volume', 'ViewSpinner', 'Messages', 'errorMsgFilter',
-function ($scope, Volume, ViewSpinner, Messages, errorMsgFilter) {
+.controller('VolumesController', ['$scope', '$state', 'Volume', 'ViewSpinner', 'Messages', 'errorMsgFilter',
+function ($scope, $state, Volume, ViewSpinner, Messages, errorMsgFilter) {
$scope.state = {};
$scope.state.toggle = false;
$scope.state.selectedItemCount = 0;
- $scope.sortType = 'Name';
+ $scope.sortType = 'Driver';
$scope.sortReverse = true;
+ $scope.config = {
+ Name: ''
+ };
+
$scope.order = function(sortType) {
$scope.sortReverse = ($scope.sortType === sortType) ? !$scope.sortReverse : false;
$scope.sortType = sortType;
@@ -31,6 +35,32 @@ function ($scope, Volume, ViewSpinner, Messages, errorMsgFilter) {
}
};
+ function prepareVolumeConfiguration() {
+ var config = angular.copy($scope.config);
+ config.Driver = 'local-persist';
+ config.DriverOpts = {};
+ config.DriverOpts.mountpoint = '/volume/' + config.Name;
+ return config;
+ }
+
+ $scope.createVolume = function() {
+ ViewSpinner.spin();
+ var config = prepareVolumeConfiguration();
+ Volume.create(config, function (d) {
+ if (d.Name) {
+ Messages.send("Volume created", d.Name);
+ ViewSpinner.stop();
+ $state.go('volumes', {}, {reload: true});
+ } else {
+ ViewSpinner.stop();
+ Messages.error('Unable to create volume', errorMsgFilter(d));
+ }
+ }, function (e) {
+ ViewSpinner.stop();
+ Messages.error('Unable to create volume', e.data);
+ });
+ };
+
$scope.removeAction = function () {
ViewSpinner.spin();
var counter = 0;
@@ -59,7 +89,7 @@ function ($scope, Volume, ViewSpinner, Messages, errorMsgFilter) {
function fetchVolumes() {
ViewSpinner.spin();
Volume.query({}, function (d) {
- $scope.volumes = d.Volumes;
+ $scope.volumes = _.uniqBy(d.Volumes, 'Name');
ViewSpinner.stop();
}, function (e) {
Messages.error("Failure", e.data);
diff --git a/gruntFile.js b/gruntFile.js
index 606b7fc73..5091c709d 100644
--- a/gruntFile.js
+++ b/gruntFile.js
@@ -268,7 +268,7 @@ module.exports = function (grunt) {
command: [
'docker stop ui-for-docker',
'docker rm ui-for-docker',
- 'docker run --privileged -d -p 9000:9000 -v /tmp/docker-ui:/data --name ui-for-docker ui-for-docker -e http://10.0.7.10:4000 --swarm -d /data'
+ 'docker run --privileged -d -p 9000:9000 -v /tmp/docker-ui:/data --name ui-for-docker ui-for-docker -e http://10.0.7.11:4000 --swarm -d /data'
].join(';')
},
cleanImages: {