diff --git a/app/components/containers/containersController.js b/app/components/containers/containersController.js index 71a3b9c19..d807cc226 100644 --- a/app/components/containers/containersController.js +++ b/app/components/containers/containersController.js @@ -152,7 +152,7 @@ function ($scope, Container, ContainerHelper, Info, Settings, Messages, Config) $scope.swarm = c.swarm; if (c.swarm) { Info.get({}, function (d) { - if (d.Swarm) { + if (!_.startsWith(d.ServerVersion, 'swarm')) { $scope.swarm_mode = true; } else { $scope.swarm_hosts = retrieveSwarmHostsInfo(d); diff --git a/app/components/createContainer/createContainerController.js b/app/components/createContainer/createContainerController.js index 8449a34d6..939534f58 100644 --- a/app/components/createContainer/createContainerController.js +++ b/app/components/createContainer/createContainerController.js @@ -56,7 +56,7 @@ function ($scope, $state, Config, Info, Container, Image, Volume, Network, Messa Config.$promise.then(function (c) { var swarm = c.swarm; Info.get({}, function(info) { - if (swarm && info.Swarm) { + if (swarm && !_.startsWith(info.ServerVersion, 'swarm')) { $scope.swarm_mode = true; } }); diff --git a/app/components/dashboard/dashboardController.js b/app/components/dashboard/dashboardController.js index 1eba490a2..884633943 100644 --- a/app/components/dashboard/dashboardController.js +++ b/app/components/dashboard/dashboardController.js @@ -64,7 +64,7 @@ function ($scope, $q, Config, Container, ContainerHelper, Image, Network, Volume function prepareInfoData(d) { var info = d; $scope.infoData = info; - if ($scope.swarm && info.Swarm) { + if ($scope.swarm && !_.startsWith(info.ServerVersion, 'swarm')) { $scope.swarm_mode = true; } } diff --git a/app/components/dashboard/master-ctrl.js b/app/components/dashboard/master-ctrl.js index 498bbee13..abbb4295d 100644 --- a/app/components/dashboard/master-ctrl.js +++ b/app/components/dashboard/master-ctrl.js @@ -15,7 +15,7 @@ function ($scope, $cookieStore, Settings, Config, Info) { Config.$promise.then(function (c) { $scope.swarm = c.swarm; Info.get({}, function(d) { - if ($scope.swarm && d.Swarm) { + if ($scope.swarm && !_.startsWith(d.ServerVersion, 'swarm')) { $scope.swarm_mode = true; $scope.swarm_manager = false; if (d.Swarm.ControlAvailable) { diff --git a/app/components/swarm/swarmController.js b/app/components/swarm/swarmController.js index 148155011..b0a1435fc 100644 --- a/app/components/swarm/swarmController.js +++ b/app/components/swarm/swarmController.js @@ -22,7 +22,7 @@ function ($scope, Info, Version, Node) { Info.get({}, function (d) { $scope.info = d; - if (d.Swarm) { + if (!_.startsWith(d.ServerVersion, 'swarm')) { $scope.swarm_mode = true; Node.query({}, function(d) { $scope.nodes = d; diff --git a/app/components/templates/templatesController.js b/app/components/templates/templatesController.js index 99b8b1629..3c373f1c1 100644 --- a/app/components/templates/templatesController.js +++ b/app/components/templates/templatesController.js @@ -166,7 +166,7 @@ function ($scope, $q, $state, $filter, Config, Info, Container, ContainerHelper, Config.$promise.then(function (c) { $scope.swarm = c.swarm; Info.get({}, function(info) { - if ($scope.swarm && info.Swarm) { + if ($scope.swarm && !_.startsWith(info.ServerVersion, 'swarm')) { $scope.swarm_mode = true; } }); diff --git a/gruntFile.js b/gruntFile.js index abf497528..4b9ae9fb8 100644 --- a/gruntFile.js +++ b/gruntFile.js @@ -274,7 +274,7 @@ module.exports = function (grunt) { command: [ 'docker stop portainer', 'docker rm portainer', - 'docker run -d -p 9000:9000 -v /tmp/portainer:/data --name portainer portainer -H tcp://10.0.7.10:2375 --swarm -d /data' + 'docker run -d -p 9000:9000 -v /tmp/portainer:/data --name portainer portainer -H tcp://10.0.7.10:4000 --swarm -d /data' ].join(';') }, runSsl: {