fix(service-details): fix an issue when trying to update a global service (#343)

pull/345/head
Anthony Lapenna 2016-11-11 11:26:19 +09:00 committed by GitHub
parent 3b3b23142c
commit 2f35f04207
1 changed files with 3 additions and 1 deletions

View File

@ -71,7 +71,9 @@ function ($scope, $stateParams, $state, Service, ServiceHelper, Task, Node, Mess
config.TaskTemplate.ContainerSpec.Env = translateEnvironmentVariablesToEnv(service.EnvironmentVariables);
config.TaskTemplate.ContainerSpec.Labels = translateServiceLabelsToLabels(service.ServiceLabels);
config.TaskTemplate.ContainerSpec.Image = service.newServiceImage;
config.Mode.Replicated.Replicas = service.Replicas;
if (service.Mode === 'replicated') {
config.Mode.Replicated.Replicas = service.Replicas;
}
Service.update({ id: service.Id, version: service.Version }, config, function (data) {
$('#loadServicesSpinner').hide();