portainer/app/docker/helpers/taskHelper.js

19 lines
419 B
JavaScript
Raw Normal View History

2018-05-06 07:15:57 +00:00
angular.module('portainer.docker')
.factory('TaskHelper', [function TaskHelperFactory() {
'use strict';
var helper = {};
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;
}
}
};
return helper;
}]);