Sha256: 3ecbaed7409041fe05ebcaafa14d5562046df104ffd8354b7122a4db04d7d9cc

Contents?: true

Size: 1.74 KB

Versions: 18

Compression:

Stored size: 1.74 KB

Contents

/**
 * @ngdoc object
 * @name  Bastion.sync-plan.controller:SyncPlanDetailsController
 *
 * @requires $scope
 * @requires $state
 * @requires translate
 * @requires SyncPlan
 * @requires ApiErrorHandler
 * @requires GlobalNotification
 *
 * @description
 *   Provides the functionality for the sync plan details action pane.
 */
angular.module('Bastion.sync-plans').controller('SyncPlanDetailsController',
    ['$scope', '$state', 'translate', 'SyncPlan', 'ApiErrorHandler', 'GlobalNotification',
        function ($scope, $state, translate, SyncPlan, ApiErrorHandler, GlobalNotification) {
            $scope.panel = {
                error: false,
                loading: true
            };

            if ($scope.syncPlan) {
                $scope.panel.loading = false;
            }

            $scope.syncPlan = SyncPlan.get({id: $scope.$stateParams.syncPlanId}, function () {
                $scope.panel.loading = false;
            }, function (response) {
                $scope.panel.loading = false;
                ApiErrorHandler.handleGETRequestErrors(response, $scope);
            });

            $scope.runSyncPlan = function () {
                SyncPlan.sync({id: $scope.$stateParams.syncPlanId}, function (task) {
                    $scope.task = task;
                }, function (response) {
                    GlobalNotification.setErrorMessage(response.data.errors[0]);
                });
            };

            $scope.removeSyncPlan = function (syncPlan) {
                syncPlan.$remove(function () {
                    GlobalNotification.setSuccessMessage(translate('Sync Plan %s has been deleted.').replace('%s', syncPlan.name));
                    $scope.transitionTo('sync-plans');
                });
            };
        }
    ]
);

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
katello-3.5.0.rc1 engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/details/sync-plan-details.controller.js
katello-3.4.5 engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/details/sync-plan-details.controller.js
katello-3.4.4 engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/details/sync-plan-details.controller.js
katello-3.4.2 engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/details/sync-plan-details.controller.js
katello-3.4.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/details/sync-plan-details.controller.js
katello-3.4.0.2 engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/details/sync-plan-details.controller.js
katello-3.4.0.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/details/sync-plan-details.controller.js
katello-3.3.2 engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/details/sync-plan-details.controller.js
katello-3.4.0 engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/details/sync-plan-details.controller.js
katello-3.4.0.rc2 engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/details/sync-plan-details.controller.js
katello-3.4.0.rc1 engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/details/sync-plan-details.controller.js
katello-3.3.1.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/details/sync-plan-details.controller.js
katello-3.3.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/details/sync-plan-details.controller.js
katello-3.3.0.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/details/sync-plan-details.controller.js
katello-3.3.0 engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/details/sync-plan-details.controller.js
katello-3.3.0.rc2 engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/details/sync-plan-details.controller.js
katello-3.3.0.rc1.1 engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/details/sync-plan-details.controller.js
katello-3.3.0.rc1 engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/details/sync-plan-details.controller.js