mirror of
https://github.com/portainer/portainer.git
synced 2025-07-22 06:49:40 +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
20
app/helpers/containerHelper.js
Normal file
20
app/helpers/containerHelper.js
Normal file
|
@ -0,0 +1,20 @@
|
|||
angular.module('portainer.helpers')
|
||||
.factory('ContainerHelper', [function ContainerHelperFactory() {
|
||||
'use strict';
|
||||
return {
|
||||
hideContainers: function(containers, containersToHideLabels) {
|
||||
return containers.filter(function (container) {
|
||||
var filterContainer = false;
|
||||
containersToHideLabels.forEach(function(label, index) {
|
||||
if (_.has(container.Labels, label.name) &&
|
||||
container.Labels[label.name] === label.value) {
|
||||
filterContainer = true;
|
||||
}
|
||||
});
|
||||
if (!filterContainer) {
|
||||
return container;
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
}]);
|
Loading…
Add table
Add a link
Reference in a new issue