Sha256: b28dd0057b0311c4e4287d951110093a013f437d402056f46eba77e12b07013e
Contents?: true
Size: 1.35 KB
Versions: 40
Compression:
Stored size: 1.35 KB
Contents
(function () { 'use strict'; /** * @ngdoc service * @name Bastion.products.details.repositories.service:RepositoryTypes * * @description * Provides common functions for managing content types and can build a Nutupane * pre-configured for the content type based on params that are passed in and the * current state of the application. */ function RepositoryTypesService(repositoryTypes) { this.repositoryTypes = function () { return repositoryTypes; }; this.creatable = function() { return _.filter(repositoryTypes, function (type) { return type.creatable; }); }; this.repositoryTypeEnabled = function (desiredType) { var found = _.find(repositoryTypes, function(type) { return type.id === desiredType; }); return angular.isDefined(found); }; this.pulp3Supported = function(desiredType) { var found = _.find(repositoryTypes, function(type) { return type.id === desiredType; }); return found.pulp3_support; }; } angular .module('Bastion.environments') .service('RepositoryTypesService', RepositoryTypesService); RepositoryTypesService.$inject = ['repositoryTypes']; })();
Version data entries
40 entries across 40 versions & 1 rubygems