Sha256: e483c77b1f96c1b5bfb83fc9591a651239ff93f536f446dd4250e50798a09c64

Contents?: true

Size: 1.14 KB

Versions: 127

Compression:

Stored size: 1.14 KB

Contents

/**
* @ngdoc object
* @name Bastion.capsule-content.config
*
* @requires $stateProvider
* @requires $urlRouterProvider
*
* @description
*   Used for systems level configuration such as setting up the ui state machine.
*/
angular.module('Bastion.capsule-content').config(['$stateProvider', '$urlRouterProvider', function ($stateProvider, $urlRouterProvider) {
    //Catch the url to prevent the router to perform redirect.
    $urlRouterProvider.when('/smart_proxies/:proxyId', [function () {
        return true;
    }]);
}]);

/**
 * @ngdoc run
 * @name Bastion.capsule-content.run
 *
 * @requires $rootScope
 * @requires $window
 * @requires $timeout
 *
 * @description
 *   Ensure foreman's setTab() function is called on capsule content pages.
 */
angular.module('Bastion.capsule-content').run(['$rootScope', '$window', '$timeout', function ($rootScope, $window, $timeout) {
    var smartProxiesRegex = new RegExp("/smart_proxies/.+#.+");
    $rootScope.$on('$locationChangeStart', function (event, newUrl) {
        if (newUrl.match(smartProxiesRegex)) {
            $timeout(function () {
                $window.setTab();
            });
        }
    });
}]);

Version data entries

127 entries across 127 versions & 1 rubygems

Version Path
katello-3.16.1.2 engines/bastion_katello/app/assets/javascripts/bastion_katello/capsule-content/capsule-content.routes.js
katello-3.16.1.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/capsule-content/capsule-content.routes.js
katello-3.17.0.rc2 engines/bastion_katello/app/assets/javascripts/bastion_katello/capsule-content/capsule-content.routes.js
katello-3.16.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/capsule-content/capsule-content.routes.js
katello-3.17.0.rc1 engines/bastion_katello/app/assets/javascripts/bastion_katello/capsule-content/capsule-content.routes.js
katello-3.16.0 engines/bastion_katello/app/assets/javascripts/bastion_katello/capsule-content/capsule-content.routes.js
katello-3.16.0.rc5.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/capsule-content/capsule-content.routes.js