mirror of https://github.com/portainer/portainer
feat(global): change the strategy used to determine if swarm mode is used
parent
fe63f9939a
commit
e27282de3c
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
});
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
});
|
||||
|
|
|
@ -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: {
|
||||
|
|
Loading…
Reference in New Issue