Sha256: 53041535a4914cba807a1155b9ac6b87e6cd588c3360eb4134fddc932eca8af0
Contents?: true
Size: 1.12 KB
Versions: 79
Compression:
Stored size: 1.12 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); }; } angular .module('Bastion.environments') .service('RepositoryTypesService', RepositoryTypesService); RepositoryTypesService.$inject = ['repositoryTypes']; })();
Version data entries
79 entries across 79 versions & 1 rubygems