Sha256: f7a6bb5635f854aa5248b32b89e307aa43b320b2f99174ea68b1d40696b6d7e9

Contents?: true

Size: 1.61 KB

Versions: 10

Compression:

Stored size: 1.61 KB

Contents

/**
 * @ngdoc object
 * @name  Bastion.content-views.controller:ContentViewPublishController
 *
 * @requires $scope
 * @requires translate
 * @requires ContentView
 * @requires GlobalNotification
 *
 * @description
 *   Provides the functionality specific to ContentViews 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.content-views').controller('ContentViewPublishController',
    ['$scope', 'translate', 'ContentView', 'GlobalNotification', function ($scope, translate, ContentView, GlobalNotification) {

        function success() {
            $scope.transitionTo('content-view.versions',
                                {contentViewId: $scope.contentView.id});

            //get the latest version number from the server
            $scope.$parent.contentView = ContentView.get({id: $scope.$stateParams.contentViewId});

            $scope.working = false;
        }

        function failure(response) {
            GlobalNotification.setErrorMessage(response.data.displayMessage);
            $scope.working = false;
        }

        $scope.version = {};

        $scope.publish = function (contentView) {
            var description = $scope.version.description,
                forceMetadataRegeneration = $scope.version.forceMetadataRegeneration,
                data = {'id': contentView.id, 'description': description, 'force_yum_metadata_regeneration': forceMetadataRegeneration};
            $scope.working = true;
            ContentView.publish(data, success, failure);
        };

    }]
);

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
katello-3.5.0.rc1 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-publish.controller.js
katello-3.4.5 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-publish.controller.js
katello-3.4.4 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-publish.controller.js
katello-3.4.2 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-publish.controller.js
katello-3.4.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-publish.controller.js
katello-3.4.0.2 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-publish.controller.js
katello-3.4.0.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-publish.controller.js
katello-3.4.0 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-publish.controller.js
katello-3.4.0.rc2 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-publish.controller.js
katello-3.4.0.rc1 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-publish.controller.js