mirror of
https://github.com/portainer/portainer.git
synced 2025-07-21 14:29:40 +02:00
* fix(services): replicas numbers display is now correct with constraints and down nodes * refactor(helpers): constraint helper has less complexity * feat(services): constraints on node/engine labels are now supported * refactor(helpers): ConstraintsHelper - remove regex patterns and improve code lisibility * refactor(helpers): rework matchesConstraint() for better code lisibility and lodash find() instead for IE compatibility
14 lines
467 B
JavaScript
14 lines
467 B
JavaScript
function TaskViewModel(data) {
|
|
this.Id = data.ID;
|
|
this.Created = data.CreatedAt;
|
|
this.Updated = data.UpdatedAt;
|
|
this.Slot = data.Slot;
|
|
this.Spec = data.Spec;
|
|
this.Status = data.Status;
|
|
this.DesiredState = data.DesiredState;
|
|
this.ServiceId = data.ServiceID;
|
|
this.NodeId = data.NodeID;
|
|
if (data.Status && data.Status.ContainerStatus && data.Status.ContainerStatus.ContainerID) {
|
|
this.ContainerId = data.Status.ContainerStatus.ContainerID;
|
|
}
|
|
}
|