Sha256: 5335c0b7be81fa29348fd6db2960f6c59a40c9c018f7ab264fba2ce13b1a2177

Contents?: true

Size: 1.74 KB

Versions: 25

Compression:

Stored size: 1.74 KB

Contents

/**
 * @ngdoc object
 * @name  Bastion.content-views.controller:ContentViewHistoryController
 *
 * @requires $scope
 * @requires ContentView
 * @requires Nutupane
 *
 * @description
 *   A controller for showing the history of a content view
 */
angular.module('Bastion.content-views').controller('ContentViewHistoryController',
    ['$scope', 'translate', 'ContentViewHistory', 'Nutupane',
    function ($scope, translate, ContentViewHistory, Nutupane) {
        var nutupane;

        nutupane = new Nutupane(ContentViewHistory, {
            contentViewId: $scope.$stateParams.contentViewId,
            'sort_by': 'content_view_version_id',
            'sort_order': 'DESC'
        });
        $scope.controllerName = 'katello_content_views';

        nutupane.table.closeItem = function () {};
        $scope.table = nutupane.table;

        $scope.actionText = function (history) {
            var message,
                taskTypes = $scope.taskTypes,
                taskType = history.task ? history.task.label : taskTypes[history.action];

            if (taskType === taskTypes.deletion) {
                message = translate("Deleted from %s").replace('%s', history.environment.name);
            } else if (taskType === taskTypes.promotion) {
                message = translate("Promoted to %s").replace('%s', history.environment.name);
            } else if (taskType === taskTypes.publish) {
                message = translate("Published new version");
            } else if (taskType === taskTypes.export) {
                message = translate("Exported content view");
            } else if (taskType === taskTypes.incrementalUpdate) {
                message = translate("Incremental update");
            }

            return message;
        };
    }]
);

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
katello-3.13.4 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/histories/content-view-history.controller.js
katello-3.13.3 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/histories/content-view-history.controller.js
katello-3.13.2 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/histories/content-view-history.controller.js
katello-3.13.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/histories/content-view-history.controller.js
katello-3.13.0 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/histories/content-view-history.controller.js
katello-3.13.0.rc2.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/histories/content-view-history.controller.js
katello-3.13.0.rc2 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/histories/content-view-history.controller.js
katello-3.12.3 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/histories/content-view-history.controller.js
katello-3.12.2 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/histories/content-view-history.controller.js
katello-3.13.0.rc1 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/histories/content-view-history.controller.js
katello-3.12.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/histories/content-view-history.controller.js
katello-3.11.2 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/histories/content-view-history.controller.js
katello-3.10.2 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/histories/content-view-history.controller.js
katello-3.12.0 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/histories/content-view-history.controller.js
katello-3.12.0.rc2 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/histories/content-view-history.controller.js
katello-3.10.1.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/histories/content-view-history.controller.js
katello-3.12.0.rc1 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/histories/content-view-history.controller.js
katello-3.10.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/histories/content-view-history.controller.js
katello-3.11.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/histories/content-view-history.controller.js
katello-3.11.0 engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/histories/content-view-history.controller.js