1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-24 15:59:41 +02:00

feat(global): introduce user teams and new UAC system (#868)

This commit is contained in:
Anthony Lapenna 2017-05-23 20:56:10 +02:00 committed by GitHub
parent a380fd9adc
commit 5523fc9023
160 changed files with 7112 additions and 3166 deletions

View file

@ -8,21 +8,21 @@ angular.module('portainer.helpers')
role: ''
};
if (_.startsWith(info.ServerVersion, 'swarm')) {
mode.provider = "DOCKER_SWARM";
mode.provider = 'DOCKER_SWARM';
if (info.SystemStatus[0][1] === 'primary') {
mode.role = "PRIMARY";
mode.role = 'PRIMARY';
} else {
mode.role = "REPLICA";
mode.role = 'REPLICA';
}
} else {
if (!info.Swarm || _.isEmpty(info.Swarm.NodeID)) {
mode.provider = "DOCKER_STANDALONE";
mode.provider = 'DOCKER_STANDALONE';
} else {
mode.provider = "DOCKER_SWARM_MODE";
mode.provider = 'DOCKER_SWARM_MODE';
if (info.Swarm.ControlAvailable) {
mode.role = "MANAGER";
mode.role = 'MANAGER';
} else {
mode.role = "WORKER";
mode.role = 'WORKER';
}
}
}