Skip to content

Commit

Permalink
fixes #18634 - set Nutupane controllerName
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasmckay committed Feb 24, 2017
1 parent 4f5aa92 commit 4186110
Show file tree
Hide file tree
Showing 62 changed files with 62 additions and 12 deletions.
Expand Up @@ -27,8 +27,8 @@ angular.module('Bastion.activation-keys').controller('ActivationKeysController',
};

var nutupane = new Nutupane(ActivationKey, params);
$scope.controllerName = 'katello_activation_keys';
nutupane.masterOnly = true;
$scope.table = nutupane.table;
$scope.controllerName = 'katello_activation_keys';
}]
);
Expand Up @@ -29,6 +29,7 @@ angular.module('Bastion.activation-keys').controller('ActivationKeyAddHostCollec
};

hostCollectionsPane = new Nutupane(ActivationKey, params, 'availableHostCollections');
$scope.controllerName = 'katello_host_collections';
$scope.table = hostCollectionsPane.table;

$scope.addHostCollections = function () {
Expand Down
Expand Up @@ -30,6 +30,7 @@ angular.module('Bastion.activation-keys').controller('ActivationKeyAddSubscripti
};

$scope.contentNutupane = new Nutupane(Subscription, params);
$scope.controllerName = 'katello_subscriptions';
$scope.table = $scope.contentNutupane.table;
$scope.isAdding = false;
$scope.contentNutupane.setSearchKey('subscriptionSearch');
Expand Down
Expand Up @@ -26,6 +26,7 @@ angular.module('Bastion.activation-keys').controller('ActivationKeyAssociationsC
};

contentHostsNutupane = new Nutupane(Host, params);
$scope.controllerName = 'hosts';
contentHostsNutupane.searchTransform = function (term) {
var searchQuery, addition = "activation_key_id=" + $scope.$stateParams.activationKeyId;
if (term === "" || angular.isUndefined(term)) {
Expand Down
Expand Up @@ -29,6 +29,7 @@ angular.module('Bastion.activation-keys').controller('ActivationKeyHostCollectio
};

hostCollectionsPane = new Nutupane(ActivationKey, params, 'hostCollections');
$scope.controllerName = 'katello_host_collections';
$scope.table = hostCollectionsPane.table;

$scope.removeHostCollections = function () {
Expand Down
Expand Up @@ -25,6 +25,7 @@ angular.module('Bastion.activation-keys').controller('ActivationKeySubscriptions
};

$scope.contentNutupane = new Nutupane(ActivationKey, params, "subscriptions");
$scope.controllerName = 'katello_subscriptions';
$scope.table = $scope.contentNutupane.table;
$scope.contentNutupane.masterOnly = true;
$scope.contentNutupane.setSearchKey('subscriptionSearch');
Expand Down
Expand Up @@ -37,6 +37,7 @@ angular.module('Bastion.content-hosts').controller('ContentHostsBulkErrataModalC
}

nutupane = new Nutupane(HostBulkAction, {}, 'installableErrata');
$scope.controllerName = 'katello_errata';
nutupane.masterOnly = true;

$scope.table = nutupane.table;
Expand Down
Expand Up @@ -34,6 +34,7 @@ angular.module('Bastion.content-hosts').controller('ContentHostsBulkHostCollecti
};

nutupane = new Nutupane(HostCollection, nutupaneParams, 'queryPaged');
$scope.controllerName = 'katello_host_collections';
nutupane.masterOnly = true;

$scope.table = nutupane.table;
Expand Down
Expand Up @@ -46,6 +46,7 @@ angular.module('Bastion.content-hosts').controller('ContentHostsBulkSubscription
};

$scope.contentNutupane = new Nutupane(Subscription, params);
$scope.controllerName = 'katello_subscriptions';
$scope.table = $scope.contentNutupane.table;
$scope.contentNutupane.setSearchKey('subscriptionSearch');
$scope.contentNutupane.masterOnly = true;
Expand Down
Expand Up @@ -36,11 +36,11 @@ angular.module('Bastion.content-hosts').controller('ContentHostsController',
};

nutupane = new Nutupane(Host, params);
$scope.controllerName = 'hosts';
nutupane.masterOnly = true;

$scope.table = nutupane.table;
$scope.nutupane = nutupane;
$scope.controllerName = 'hosts';

// @TODO begin hack necessary because of foreman API bug http://projects.theforeman.org/issues/13877
$scope.table.sortBy = function (column) {
Expand Down
Expand Up @@ -28,6 +28,7 @@ angular.module('Bastion.content-hosts').controller('ContentHostErrataController'
}

errataNutupane = new Nutupane(HostErratum, params, 'get');
$scope.controllerName = 'katello_errata';
errataNutupane.masterOnly = true;
$scope.table = errataNutupane.table;
$scope.table.errataFilterTerm = "";
Expand Down
Expand Up @@ -43,6 +43,7 @@ angular.module('Bastion.content-hosts').controller('ContentHostPackagesApplicabl
};

packagesNutupane = new Nutupane(Package, {'host_id': $scope.$stateParams.hostId, 'packages_restrict_upgradable': true});
$scope.controllerName = 'katello_erratum_packages';
packagesNutupane.masterOnly = true;
$scope.table = packagesNutupane.table;
$scope.table.openEventInfo = openEventInfo;
Expand Down
Expand Up @@ -30,6 +30,7 @@ angular.module('Bastion.content-hosts').controller('ContentHostAddHostCollection
};

nutupane = new Nutupane(HostCollection, params);
$scope.controllerName = 'katello_host_collections';
nutupane.masterOnly = true;

$scope.table = nutupane.table;
Expand Down
Expand Up @@ -26,6 +26,7 @@ angular.module('Bastion.content-hosts').controller('ContentHostAddSubscriptionsC
};

$scope.nutupane = new Nutupane(Subscription, params);
$scope.controllerName = 'katello_subscriptions';
$scope.nutupane.setSearchKey('subscriptionSearch');
$scope.nutupane.masterOnly = true;
$scope.table = $scope.nutupane.table;
Expand Down
Expand Up @@ -29,6 +29,7 @@ angular.module('Bastion.content-hosts').controller('ContentHostHostCollectionsCo
};

nutupane = new Nutupane(HostCollection, params);
$scope.controllerName = 'katello_host_collections';
nutupane.masterOnly = true;

$scope.table = nutupane.table;
Expand Down
Expand Up @@ -23,6 +23,7 @@ angular.module('Bastion.content-hosts').controller('ContentHostSubscriptionsCont
};

$scope.nutupane = new Nutupane(HostSubscription, params);
$scope.controllerName = 'katello_subscriptions';
$scope.nutupane.table.initialLoad = false;
$scope.table = $scope.nutupane.table;
$scope.nutupane.masterOnly = true;
Expand Down
Expand Up @@ -23,8 +23,8 @@ angular.module('Bastion.content-views').controller('ContentViewsController',
'sort_order': 'ASC'
});
nutupane.masterOnly = true;
$scope.controllerName = 'katello_content_views';

$scope.table = nutupane.table;
$scope.controllerName = 'katello_content_views';
}]
);
Expand Up @@ -26,6 +26,7 @@ angular.module('Bastion.content-views').controller('ContentViewVersionDeletionAc
'sort_order': 'ASC'
};
nutupane = new Nutupane(ActivationKey, params);
$scope.controllerName = 'katello_activation_keys';

nutupane.searchTransform = function (term) {
var addition,
Expand Down
Expand Up @@ -27,6 +27,7 @@ angular.module('Bastion.content-views').controller('ContentViewVersionDeletionCo
'sort_order': 'ASC'
};
nutupane = new Nutupane(Host, params);
$scope.controllerName = 'hosts';

nutupane.searchTransform = function (term) {
var addition,
Expand Down
Expand Up @@ -24,6 +24,7 @@ angular.module('Bastion.content-views').controller('ContentViewCompositeAvailabl
};

nutupane = new Nutupane(ContentView, params);
$scope.controllerName = 'katello_content_views';
nutupane.masterOnly = true;
nutupane.table.initialLoad = false;
$scope.table = nutupane.table;
Expand Down
Expand Up @@ -20,6 +20,7 @@ angular.module('Bastion.content-views').controller('ContentViewCompositeContentV
'id': $scope.$stateParams.contentViewId,
'full_result': true
}, 'contentViewComponents');
$scope.controllerName = 'katello_content_views';

nutupane.masterOnly = true;
$scope.table = nutupane.table;
Expand Down
Expand Up @@ -27,6 +27,7 @@ angular.module('Bastion.content-views').controller('ContentViewAvailableDockerRe
'available_for': 'content_view'
},
'queryUnpaged');
$scope.controllerName = 'katello_repositories';

nutupane.masterOnly = true;

Expand Down
Expand Up @@ -26,6 +26,7 @@
'available_for': 'content_view'
},
'queryUnpaged');
$scope.controllerName = 'katello_repositories';

nutupane.load();

Expand Down
Expand Up @@ -27,6 +27,7 @@ angular.module('Bastion.content-views').controller('ContentViewAvailableOstreeRe
'available_for': 'content_view'
},
'queryUnpaged');
$scope.controllerName = 'katello_repositories';

nutupane.masterOnly = true;

Expand Down
Expand Up @@ -29,6 +29,7 @@ angular.module('Bastion.content-views').controller('ContentViewAvailableReposito
'available_for': 'content_view'
},
'queryUnpaged');
$scope.controllerName = 'katello_repositories';

nutupane.load();

Expand Down
Expand Up @@ -24,6 +24,7 @@
'content_type': 'docker'
},
'queryUnpaged');
$scope.controllerName = 'katello_repositories';

nutupane.masterOnly = true;
nutupane.load();
Expand Down
Expand Up @@ -24,6 +24,7 @@
'content_type': 'file'
},
'queryUnpaged');
$scope.controllerName = 'katello_repositories';

nutupane.load();

Expand Down
Expand Up @@ -24,6 +24,7 @@
'content_type': 'ostree'
},
'queryUnpaged');
$scope.controllerName = 'katello_repositories';

nutupane.masterOnly = true;
nutupane.load();
Expand Down
Expand Up @@ -26,6 +26,7 @@ angular.module('Bastion.content-views').controller('ContentViewRepositoriesListC
'content_type': 'yum'
},
'queryUnpaged');
$scope.controllerName = 'katello_repositories';

nutupane.load();

Expand Down
Expand Up @@ -219,6 +219,7 @@ angular.module('Bastion.content-views').controller('ContentViewVersionsControlle
};

nutupane = new Nutupane(ContentViewVersion, {'content_view_id': $scope.$stateParams.contentViewId});
$scope.controllerName = 'katello_content_views';
nutupane.setSearchKey('contentViewVersionSearch');
nutupane.masterOnly = true;
$scope.table = nutupane.table;
Expand Down
Expand Up @@ -99,6 +99,7 @@ angular.module('Bastion.content-views').controller('AvailableErrataFilterControl
},
'queryUnpaged'
);
$scope.controllerName = 'katello_erratum_packages';
nutupane.masterOnly = true;

filterByDate = function (date, type) {
Expand Down
Expand Up @@ -29,6 +29,7 @@ angular.module('Bastion.content-views').controller('AvailablePackageGroupFilterC
},
'queryUnpaged'
);
$scope.controllerName = 'katello_package_groups';

function success(rule) {
nutupane.removeRow(rule.uuid, 'uuid');
Expand Down
Expand Up @@ -55,6 +55,7 @@ angular.module('Bastion.content-views').controller('ErrataFilterListController',
},
'queryUnpaged'
);
$scope.controllerName = 'katello_errata';

$scope.table = nutupane.table;

Expand Down
Expand Up @@ -55,6 +55,7 @@ angular.module('Bastion.content-views').controller('PackageGroupFilterListContro
},
'queryUnpaged'
);
$scope.controllerName = 'katello_package_groups';

$scope.table = nutupane.table;
nutupane.table.closeItem = function () {};
Expand Down
Expand Up @@ -19,6 +19,7 @@ angular.module('Bastion.content-views').controller('ContentViewHistoryController
'sort_by': 'created_at',
'sort_order': 'DESC'
});
$scope.controllerName = 'katello_content_views';

nutupane.table.closeItem = function () {};
$scope.table = nutupane.table;
Expand Down
Expand Up @@ -18,6 +18,7 @@ angular.module('Bastion.content-views').controller('ContentViewPuppetModuleNames
{id: $scope.$stateParams.contentViewId},
'availablePuppetModuleNames'
);
$scope.controllerName = 'katello_content_views';
nutupane.masterOnly = true;
$scope.table = nutupane.table;

Expand Down
Expand Up @@ -23,6 +23,7 @@ angular.module('Bastion.content-views').controller('ContentViewPuppetModuleVersi
};

nutupane = new Nutupane(ContentView, params, 'availablePuppetModules');
$scope.controllerName = 'katello_content_views';
nutupane.masterOnly = true;
$scope.table = nutupane.table;

Expand Down
Expand Up @@ -45,6 +45,7 @@ angular.module('Bastion.docker-tags').controller('DockerTagDetailsController',
'ids[]': _.map($scope.tag['related_tags'], 'uuid')
};
var nutupane = new Nutupane(DockerTag, params);
$scope.controllerName = 'katello_docker_tags';
$scope.table = nutupane.table;
$scope.panel.loading = false;
nutupane.refresh();
Expand Down
Expand Up @@ -25,8 +25,8 @@ angular.module('Bastion.docker-tags').controller('DockerTagsController',
};

var nutupane = new Nutupane(DockerTag, params);
$scope.table = nutupane.table;
$scope.controllerName = 'katello_docker_tags';
$scope.table = nutupane.table;

$scope.table.closeItem = function () {
$scope.transitionTo('docker-tags');
Expand Down
Expand Up @@ -28,6 +28,7 @@ angular.module('Bastion.errata').controller('ErratumContentHostsController',
};

nutupane = new Nutupane(Host, params, 'postIndex');
$scope.controllerName = 'hosts';
nutupane.masterOnly = true;
nutupane.enableSelectAllResults();

Expand Down
Expand Up @@ -22,6 +22,7 @@ function ($scope, $q, Nutupane, Repository, Environment, ContentView, CurrentOrg
};

repositoriesNutupane = new Nutupane(Repository, params);
$scope.controllerName = 'katello_repositories';
$scope.table = repositoriesNutupane.table;
$scope.table.initialLoad = false;
repositoriesNutupane.masterOnly = true;
Expand Down
Expand Up @@ -30,9 +30,9 @@ angular.module('Bastion.errata').controller('ErrataController',
};

nutupane = $scope.nutupane = new Nutupane(Erratum, params);
$scope.controllerName = 'katello_errata';
$scope.table = nutupane.table;
$scope.removeRow = nutupane.removeRow;
$scope.controllerName = 'katello_errata';

Erratum.queryPaged({'organization_id': CurrentOrganization}, function (result) {
$scope.errataCount = result.total;
Expand Down
Expand Up @@ -15,6 +15,7 @@
var nutupane = new Nutupane(GPGKey, {
id: $scope.$stateParams.gpgKeyId
}, 'products');
$scope.controllerName = 'katello_gpg_keys';
nutupane.masterOnly = true;

$scope.panel = $scope.panel || {error: false, loading: false};
Expand Down
Expand Up @@ -15,6 +15,7 @@
var nutupane = new Nutupane(GPGKey, {
id: $scope.$stateParams.gpgKeyId
}, 'repositories');
$scope.controllerName = 'katello_gpg_keys';
nutupane.masterOnly = true;

$scope.panel = $scope.panel || {error: false, loading: false};
Expand Down
Expand Up @@ -25,9 +25,9 @@ angular.module('Bastion.gpg-keys').controller('GPGKeysController',
};

var nutupane = new Nutupane(GPGKey, params);
$scope.controllerName = 'katello_gpg_keys';
$scope.table = nutupane.table;
$scope.panel = {loading: false};
$scope.removeRow = nutupane.removeRow;
$scope.controllerName = 'katello_gpg_keys';
}]
);
Expand Up @@ -28,6 +28,7 @@ angular.module('Bastion.host-collections').controller('HostCollectionAddHostsCon
};

contentNutupane = new Nutupane(Host, params);
$scope.controllerName = 'hosts';
contentNutupane.searchTransform = function (term) {
var addition = "-host_collection_id=" + $scope.$stateParams.hostCollectionId;
if (term === "" || angular.isUndefined(term)) {
Expand Down
Expand Up @@ -28,6 +28,7 @@ angular.module('Bastion.host-collections').controller('HostCollectionHostsContro
};

$scope.contentNutupane = new Nutupane(Host, params);
$scope.controllerName = 'hosts';
$scope.contentNutupane.searchTransform = function (term) {
var addition = "host_collection_id=" + $scope.$stateParams.hostCollectionId;
if (term === "" || angular.isUndefined(term)) {
Expand Down

0 comments on commit 4186110

Please sign in to comment.