2017-05-23 18:56:10 +00:00
|
|
|
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;
|
2018-08-19 06:05:16 +00:00
|
|
|
this.DesiredState = data.DesiredState;
|
2017-05-23 18:56:10 +00:00
|
|
|
this.ServiceId = data.ServiceID;
|
|
|
|
this.NodeId = data.NodeID;
|
2018-05-06 07:15:57 +00:00
|
|
|
if (data.Status && data.Status.ContainerStatus && data.Status.ContainerStatus.ContainerID) {
|
|
|
|
this.ContainerId = data.Status.ContainerStatus.ContainerID;
|
|
|
|
}
|
2017-05-23 18:56:10 +00:00
|
|
|
}
|