mirror of https://github.com/portainer/portainer
19 lines
373 B
JavaScript
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;
|
|
}]);
|