Sha256: dca64f1d982a9e622db9fd82ca9661d1f311ccbdb9be8b9b33b3374083cd9647
Contents?: true
Size: 1.72 KB
Versions: 20
Compression:
Stored size: 1.72 KB
Contents
/** * @ngdoc object * @name Bastion.host-collections.controller:HostCollectionsController * * @requires $scope * @requires $location * @requires translate * @requires Nutupane * @requires HostCollection * @requires CurrentOrganization * * @description * Provides the functionality specific to host collections for use with the Nutupane UI pattern. * Defines the columns to display and the transform function for how to generate each row * within the table. */ angular.module('Bastion.host-collections').controller('HostCollectionsController', ['$scope', '$location', 'translate', 'Nutupane', 'HostCollection', 'CurrentOrganization', 'urlencodeFilter', function ($scope, $location, translate, Nutupane, HostCollection, CurrentOrganization, urlencodeFilter) { var params = { 'organization_id': CurrentOrganization, 'search': $location.search().search || "", 'sort_by': 'name', 'sort_order': 'ASC', 'paged': true }; var nutupane = new Nutupane(HostCollection, params); $scope.table = nutupane.table; $scope.removeRow = nutupane.removeRow; $scope.controllerName = 'katello_host_collections'; $scope.table.closeItem = function () { $scope.transitionTo('host-collections.index'); }; $scope.getHostCollectionSearchUrl = function (hostCollectionName) { var search = 'host_collection="%s"'.replace('%s', hostCollectionName); return '?select_all=true&search=' + urlencodeFilter(search); }; $scope.$on("updateContentHostCollection", function (event, hostCollectionRow) { $scope.table.replaceRow(hostCollectionRow); }); }] );
Version data entries
20 entries across 20 versions & 1 rubygems