Sha256: 9d849ef0f49b31595b19cd37448a68025884d9e6596450ffa4617a2b95543a23

Contents?: true

Size: 1.1 KB

Versions: 58

Compression:

Stored size: 1.1 KB

Contents

/**
 * @ngdoc object
 * @name  Bastion.environments.controller:EnvironmentsController
 *
 * @requires $scope
 * @requires Organization
 * @requires CurrentOrganization
 *
 * @description
 *   Provides the functionality for the environments path page.
 */
angular.module('Bastion.environments').controller('EnvironmentsController',
    ['$scope', 'Organization', 'CurrentOrganization',
        function ($scope, Organization, CurrentOrganization) {

            Organization.paths({id: CurrentOrganization}, function (paths) {
                var actualPaths = [];

                $scope.library = paths[0].environments[0];

                angular.forEach(paths, function (path, index) {
                    paths[index].environments.splice(0, 1);

                    if (paths[index].environments.length !== 0) {
                        actualPaths.push(path);
                    }
                });

                $scope.paths = actualPaths;
            });

            $scope.lastEnvironment = function (path) {
                return path.environments[path.environments.length - 1];
            };

        }]
);

Version data entries

58 entries across 58 versions & 1 rubygems

Version Path
katello-3.7.0.rc1 engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/environments.controller.js
katello-3.5.2 engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/environments.controller.js
katello-3.6.0 engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/environments.controller.js
katello-3.6.0.1.rc2 engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/environments.controller.js
katello-3.6.0.rc2 engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/environments.controller.js
katello-3.6.0.rc1 engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/environments.controller.js
katello-3.5.1.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/environments.controller.js
katello-3.5.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/environments.controller.js
katello-3.5.0.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/environments.controller.js
katello-3.5.0 engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/environments.controller.js
katello-3.5.0.rc2 engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/environments.controller.js
katello-3.5.0.rc1 engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/environments.controller.js
katello-3.4.5 engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/environments.controller.js
katello-3.4.4 engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/environments.controller.js
katello-3.4.2 engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/environments.controller.js
katello-3.4.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/environments.controller.js
katello-3.4.0.2 engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/environments.controller.js
katello-3.4.0.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/environments.controller.js
katello-3.3.2 engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/environments.controller.js
katello-3.4.0 engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/environments.controller.js