portainer/app/helpers/registryHelper.js

19 lines
373 B
JavaScript

angular.module('portainer.helpers')
.factory('RegistryHelper', [function RegistryHelperFactory() {
'use strict';
var helper = {};
helper.getRegistryByURL = function(registries, url) {
for (var i = 0; i < registries.length; i++) {
if (registries[i].URL === url) {
return registries[i];
}
}
return null;
};
return helper;
}]);