1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-19 05:19:39 +02:00
portainer/app/docker/models/task.js

14 lines
426 B
JavaScript
Raw Normal View History

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.ServiceId = data.ServiceID;
this.NodeId = data.NodeID;
2018-05-06 09:15:57 +02:00
if (data.Status && data.Status.ContainerStatus && data.Status.ContainerStatus.ContainerID) {
this.ContainerId = data.Status.ContainerStatus.ContainerID;
}
}