mirror of
https://github.com/portainer/portainer.git
synced 2025-08-04 21:35:23 +02:00
fix(services): Fix invalid replica count for global services (#1353)
This commit is contained in:
parent
407f0f5807
commit
b9e535d7a5
2 changed files with 9 additions and 6 deletions
|
@ -1,4 +1,4 @@
|
|||
function ServiceViewModel(data, runningTasks, nodes) {
|
||||
function ServiceViewModel(data, runningTasks, allTasks, nodes) {
|
||||
this.Model = data;
|
||||
this.Id = data.ID;
|
||||
this.Tasks = [];
|
||||
|
@ -12,8 +12,8 @@ function ServiceViewModel(data, runningTasks, nodes) {
|
|||
this.Replicas = data.Spec.Mode.Replicated.Replicas;
|
||||
} else {
|
||||
this.Mode = 'global';
|
||||
if (nodes) {
|
||||
this.Replicas = nodes.length;
|
||||
if (allTasks) {
|
||||
this.Replicas = allTasks.length;
|
||||
}
|
||||
}
|
||||
if (runningTasks) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue