mirror of
https://github.com/portainer/portainer.git
synced 2025-07-23 15:29:42 +02:00
refactor(global): service separation #552
This commit is contained in:
parent
0abe8883d1
commit
fe0bf77bbb
48 changed files with 1029 additions and 1015 deletions
15
app/models/task.js
Normal file
15
app/models/task.js
Normal file
|
@ -0,0 +1,15 @@
|
|||
function TaskViewModel(data, node_data) {
|
||||
this.Id = data.ID;
|
||||
this.Created = data.CreatedAt;
|
||||
this.Updated = data.UpdatedAt;
|
||||
this.Slot = data.Slot;
|
||||
this.Status = data.Status.State;
|
||||
this.Image = data.Spec.ContainerSpec ? data.Spec.ContainerSpec.Image : '';
|
||||
if (node_data) {
|
||||
for (var i = 0; i < node_data.length; ++i) {
|
||||
if (data.NodeID === node_data[i].ID) {
|
||||
this.Node = node_data[i].Description.Hostname;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue