portainer/app/docker/helpers/taskHelper.js

20 lines
450 B
JavaScript
Raw Normal View History

angular.module('portainer.docker').factory('TaskHelper', [
function TaskHelperFactory() {
'use strict';
2018-05-06 07:15:57 +00:00
var helper = {};
2018-05-06 07:15:57 +00:00
helper.associateContainerToTask = function (task, containers) {
for (var i = 0; i < containers.length; i++) {
var container = containers[i];
if (task.ContainerId === container.Id) {
task.Container = container;
break;
}
2018-05-06 07:15:57 +00:00
}
};
2018-05-06 07:15:57 +00:00
return helper;
},
]);