katello 3.0.0.rc1 → 3.0.0.rc2
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of katello might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/app/assets/stylesheets/katello/katello.scss +5 -5
- data/app/controllers/katello/api/rhsm/candlepin_proxies_controller.rb +3 -3
- data/app/controllers/katello/api/v2/activation_keys_controller.rb +12 -12
- data/app/controllers/katello/api/v2/api_controller.rb +13 -5
- data/app/controllers/katello/api/v2/content_view_versions_controller.rb +30 -27
- data/app/controllers/katello/api/v2/content_views_controller.rb +4 -1
- data/app/controllers/katello/api/v2/host_subscriptions_controller.rb +100 -3
- data/app/controllers/katello/api/v2/repositories_controller.rb +2 -2
- data/app/controllers/katello/api/v2/repository_sets_controller.rb +1 -1
- data/app/controllers/katello/api/v2/subscriptions_controller.rb +0 -1
- data/app/controllers/katello/api/v2/systems_controller.rb +1 -88
- data/app/controllers/katello/concerns/api/v2/bulk_hosts_extensions.rb +10 -4
- data/app/controllers/katello/remote_execution_controller.rb +1 -1
- data/app/helpers/katello/concerns/settings_helper_extensions.rb +50 -0
- data/app/helpers/katello/hosts_and_hostgroups_helper.rb +17 -4
- data/app/helpers/katello/katello_urls_helper.rb +3 -2
- data/app/helpers/katello/providers_helper.rb +2 -5
- data/app/lib/actions/katello/capsule_content/configure_capsule.rb +1 -1
- data/app/lib/actions/katello/capsule_content/{create_or_update.rb → create_repos.rb} +2 -7
- data/app/lib/actions/katello/capsule_content/remove_orphans.rb +15 -0
- data/app/lib/actions/katello/capsule_content/remove_unneeded_repos.rb +6 -5
- data/app/lib/actions/katello/capsule_content/sync.rb +32 -0
- data/app/lib/actions/katello/content_view/incremental_updates.rb +4 -3
- data/app/lib/actions/katello/content_view/promote.rb +4 -0
- data/app/lib/actions/katello/content_view/publish.rb +4 -0
- data/app/lib/actions/katello/content_view_puppet_module/destroy.rb +4 -5
- data/app/lib/actions/katello/content_view_version/incremental_update.rb +5 -3
- data/app/lib/actions/katello/host/erratum/applicable_errata_install.rb +2 -2
- data/app/lib/actions/katello/host/generate_applicability.rb +1 -1
- data/app/lib/actions/katello/host/hypervisors_update.rb +1 -1
- data/app/lib/actions/katello/host/register.rb +10 -4
- data/app/lib/actions/katello/repository/destroy.rb +2 -1
- data/app/lib/actions/katello/repository/import_applicability.rb +23 -0
- data/app/lib/actions/katello/repository/sync.rb +1 -8
- data/app/lib/actions/pulp/abstract_async_task.rb +8 -0
- data/app/lib/actions/pulp/consumer/content_install.rb +14 -0
- data/app/lib/actions/pulp/repository/create.rb +2 -1
- data/app/lib/actions/pulp/repository/delete_distributor.rb +18 -0
- data/app/lib/actions/pulp/repository/refresh.rb +25 -7
- data/app/lib/katello/api/v2/error_handling.rb +2 -2
- data/app/lib/katello/capsule_content.rb +11 -0
- data/app/lib/katello/errors.rb +1 -1
- data/app/mailers/katello/errata_mailer.rb +3 -3
- data/app/models/katello/activation_key.rb +6 -6
- data/app/models/katello/candlepin/product_content.rb +15 -0
- data/app/models/katello/concerns/content_facet_host_extensions.rb +13 -0
- data/app/models/katello/concerns/operatingsystem_extensions.rb +17 -1
- data/app/models/katello/concerns/pulp_database_unit.rb +3 -1
- data/app/models/katello/concerns/setting_extensions.rb +12 -0
- data/app/models/katello/content_view.rb +2 -2
- data/app/models/katello/erratum.rb +7 -0
- data/app/models/katello/glue/candlepin/product.rb +4 -0
- data/app/models/katello/glue/candlepin/subscription.rb +1 -1
- data/app/models/katello/glue/pulp/repo.rb +31 -3
- data/app/models/katello/host/content_facet.rb +43 -16
- data/app/models/katello/host/subscription_facet.rb +1 -0
- data/app/models/katello/pool.rb +6 -11
- data/app/models/katello/repository.rb +20 -15
- data/app/models/katello/subscription.rb +14 -0
- data/app/models/katello/sync_plan.rb +5 -0
- data/app/models/katello/system.rb +0 -10
- data/app/models/setting/katello.rb +2 -1
- data/app/presenters/katello/product_content_presenter.rb +16 -0
- data/app/services/katello/candlepin/consumer.rb +22 -1
- data/app/services/katello/repository_type_manager.rb +4 -0
- data/app/views/dashboard/_content_views_widget.html.erb +2 -2
- data/app/views/dashboard/_errata_widget.html.erb +1 -1
- data/app/views/dashboard/_host_collection_widget.html.erb +2 -2
- data/app/views/dashboard/_subscription_status_widget.html.erb +5 -5
- data/app/views/dashboard/_subscription_widget.html.erb +1 -1
- data/app/views/dashboard/_sync_widget.html.erb +2 -2
- data/app/views/foreman/unattended/finish-katello.erb +2 -0
- data/app/views/foreman/unattended/kickstart-katello-atomic.erb +42 -0
- data/app/views/foreman/unattended/kickstart-katello.erb +2 -0
- data/app/views/foreman/unattended/snippets/_subscription_manager_registration.erb +15 -9
- data/app/views/foreman/unattended/userdata-katello.erb +6 -1
- data/app/views/katello/api/v2/activation_keys/show.json.rabl +2 -2
- data/app/views/katello/api/v2/common/_metadata.json.rabl +1 -0
- data/app/views/katello/api/v2/content_facet/show.json.rabl +4 -0
- data/app/views/katello/api/v2/host_subscriptions/content_override.json.rabl +3 -0
- data/app/views/katello/api/v2/{systems/_content.json.rabl → host_subscriptions/product_content.json.rabl} +1 -3
- data/app/views/katello/api/v2/sync_plans/show.json.rabl +5 -1
- data/app/views/katello/errata_mailer/host_errata.html.erb +2 -2
- data/app/views/katello/errata_mailer/promote_errata.html.erb +1 -1
- data/app/views/katello/errata_mailer/promote_errata.text.erb +1 -1
- data/app/views/katello/errata_mailer/sync_errata.html.erb +1 -1
- data/app/views/katello/errata_mailer/sync_errata.text.erb +1 -1
- data/app/views/overrides/activation_keys/_host_environment_select.html.erb +21 -11
- data/config/katello.yaml.example +1 -0
- data/config/routes/api/v2.rb +0 -6
- data/config/routes/overrides.rb +3 -0
- data/db/migrate/20140117160939_refactor_content_views.rb +1 -0
- data/db/migrate/20140222022712_remove_provider_discovery.rb +2 -0
- data/db/migrate/20140502164009_rename_system_groups_to_host_collections.rb +7 -0
- data/db/migrate/20141210173220_create_docker_tables.rb +4 -3
- data/db/migrate/20151219203225_rename_index_repository_puppet_module.rb +1 -1
- data/db/migrate/20160203195736_remove_docker_image_schema.rb +1 -0
- data/db/migrate/20160317171813_change_activation_key_column_names.rb +11 -0
- data/db/migrate/20160323065901_increase_cdn_length.rb +11 -0
- data/db/migrate/20160404132250_remove_katello_from_notification_name.rb +26 -0
- data/db/seeds.d/103-provisioning_templates.rb +3 -1
- data/db/seeds.d/106-mail_notifications.rb +3 -3
- data/db/seeds.d/109-atomic_os.rb +11 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/activationKeyConsumed.filter.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/activation-key-associations.controller.js +21 -9
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/views/activation-key-add-subscriptions.html +3 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/views/activation-key-associations-content-hosts.html +41 -40
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/views/activation-key-details.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/views/activation-key-info.html +7 -7
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/views/activation-key-subscriptions-list.html +3 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/new/new-activation-key.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/new/views/activation-key-new.html +8 -8
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/capsule-content/capsule-content.routes.js +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-hosts.controller.js +0 -8
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-errata.controller.js +19 -16
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-errata.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-details-info.controller.js +5 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-details.controller.js +27 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-products.controller.js +79 -26
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-add-subscriptions.html +3 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-details.html +32 -10
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-info.html +8 -8
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-products.html +11 -11
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-subscriptions-list.html +3 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-promotion.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/views/content-view-version-puppet-modules.html +3 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/apply-errata.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/details/errata-content-hosts.controller.js +33 -10
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/details/views/errata-details-content-hosts.html +5 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/views/apply-errata-confirm.html +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/gpg-keys/details/views/gpg-key-details.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/gpg-keys/new/new-gpg-key.controller.js +7 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/host-collections/details/views/host-collection-details.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/host-collections/new/views/host-collection-new-form.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/hosts/host-subscription.factory.js +3 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/organizations/check-current-organization.run.js +3 -15
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/organizations/fenced-pages.service.js +36 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/organizations/organization.factory.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/bulk/views/bulk-actions.html +14 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/views/product-details.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/views/product-repositories.html +13 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/repositories/details/views/repository-info.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/repositories/details/views/repository-manage-docker-manifests.html +3 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/repositories/details/views/repository-manage-packages.html +7 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/repositories/details/views/repository-manage-puppet-modules.html +5 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/manifest/manifest-import.controller.js +16 -6
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/details/sync-plan-details-info.controller.js +7 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/details/views/sync-plan-details.html +1 -1
- data/engines/bastion_katello/app/assets/stylesheets/bastion_katello/bastion_katello.scss +6 -0
- data/lib/katello/engine.rb +4 -3
- data/lib/katello/permissions/host_permissions.rb +1 -0
- data/lib/katello/version.rb +1 -1
- metadata +17 -11
- data/app/controllers/katello/concerns/api/v2/bulk_systems_extensions.rb +0 -39
- data/app/views/katello/api/v2/systems/content_override.json.rabl +0 -3
- data/app/views/katello/api/v2/systems/product_content.json.rabl +0 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-product-details.controller.js +0 -97
- data/lib/katello/tasks/upgrades/2.1/import_errata.rake +0 -45
- data/lib/katello/tasks/upgrades/2.2/update_gpg_key_urls.rake +0 -20
- data/lib/katello/tasks/upgrades/2.2/update_metadata_expire.rake +0 -18
@@ -18,9 +18,10 @@ class CreateDockerTables < ActiveRecord::Migration
|
|
18
18
|
|
19
19
|
add_index :katello_docker_tags, [:docker_image_id, :repository_id, :name],
|
20
20
|
:name => :docker_tag_docker_image_repo_name, :unique => true
|
21
|
-
|
22
|
-
|
23
|
-
|
21
|
+
unless foreign_key_exists?(:katello_repository_docker_images, :column => :docker_image_id)
|
22
|
+
add_foreign_key :katello_repository_docker_images, :katello_docker_images,
|
23
|
+
:column => :docker_image_id
|
24
|
+
end
|
24
25
|
end
|
25
26
|
|
26
27
|
def down
|
@@ -3,7 +3,7 @@ class RenameIndexRepositoryPuppetModule < ActiveRecord::Migration
|
|
3
3
|
original_name = 'index_katello_repository_puppet_module_on_module_id_and_repo_id'
|
4
4
|
shorter_name = 'index_katello_repo_puppet_module_on_module_id_and_repo_id'
|
5
5
|
|
6
|
-
if index_exists?(:
|
6
|
+
if index_exists?(:katello_repository_puppet_modules, [:module_id, :repo_id], :name => original_name)
|
7
7
|
rename_index :katello_repository_puppet_modules, original_name, shorter_name
|
8
8
|
end
|
9
9
|
end
|
@@ -1,5 +1,6 @@
|
|
1
1
|
class RemoveDockerImageSchema < ActiveRecord::Migration
|
2
2
|
def up
|
3
|
+
remove_foreign_key :katello_docker_tags, :name => "katello_docker_tags_docker_image_id_fk"
|
3
4
|
remove_column :katello_docker_tags, :docker_image_id
|
4
5
|
drop_table :katello_repository_docker_images
|
5
6
|
drop_table :katello_docker_images
|
@@ -0,0 +1,11 @@
|
|
1
|
+
class ChangeActivationKeyColumnNames < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
rename_column :katello_activation_keys, :max_content_hosts, :max_hosts
|
4
|
+
rename_column :katello_activation_keys, :unlimited_content_hosts, :unlimited_hosts
|
5
|
+
end
|
6
|
+
|
7
|
+
def self.down
|
8
|
+
rename_column :katello_activation_keys, :max_hosts, :max_content_hosts
|
9
|
+
rename_column :katello_activation_keys, :unlimited_hosts, :unlimited_content_hosts
|
10
|
+
end
|
11
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
class IncreaseCdnLength < ActiveRecord::Migration
|
2
|
+
def up
|
3
|
+
change_column :katello_providers, :repository_url, :string, :limit => 1024
|
4
|
+
change_column :katello_repositories, :url, :string, :limit => 1024
|
5
|
+
end
|
6
|
+
|
7
|
+
def down
|
8
|
+
change_column :katello_providers, :repository_url, :string, :limit => 255
|
9
|
+
change_column :katello_repositories, :url, :string, :limit => 255
|
10
|
+
end
|
11
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
class RemoveKatelloFromNotificationName < ActiveRecord::Migration
|
2
|
+
class FakeMailNotification < ActiveRecord::Base
|
3
|
+
self.table_name = 'mail_notifications'
|
4
|
+
end
|
5
|
+
|
6
|
+
def up
|
7
|
+
FakeMailNotification.all.each do |notification|
|
8
|
+
if notification_names.keys.include?(notification.name)
|
9
|
+
new_name = notification_names[notification.name]
|
10
|
+
FakeMailNotification.where(:name => new_name).destroy_all
|
11
|
+
notification.name = new_name
|
12
|
+
notification.save!
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
private
|
18
|
+
|
19
|
+
def notification_names
|
20
|
+
{
|
21
|
+
:katello_promote_errata => 'promote_errata',
|
22
|
+
:katello_sync_errata => 'sync_errata',
|
23
|
+
:katello_host_advisory => 'host_errata_advisory'
|
24
|
+
}.with_indifferent_access
|
25
|
+
end
|
26
|
+
end
|
@@ -16,7 +16,8 @@ end
|
|
16
16
|
templates = [{:name => "Katello Kickstart Default", :source => "kickstart-katello.erb", :template_kind => kinds[:provision]},
|
17
17
|
{:name => "Katello Kickstart Default User Data", :source => "userdata-katello.erb", :template_kind => kinds[:user_data]},
|
18
18
|
{:name => "Katello Kickstart Default Finish", :source => "finish-katello.erb", :template_kind => kinds[:finish]},
|
19
|
-
{:name => "subscription_manager_registration", :source => "snippets/_subscription_manager_registration.erb", :snippet => true}
|
19
|
+
{:name => "subscription_manager_registration", :source => "snippets/_subscription_manager_registration.erb", :snippet => true},
|
20
|
+
{:name => "Katello Atomic Kickstart Default", :source => "kickstart-katello-atomic.erb", :template_kind => kinds[:provision]}]
|
20
21
|
|
21
22
|
templates.each do |template|
|
22
23
|
template[:template] = File.read(File.join(Katello::Engine.root, "app/views/foreman/unattended", template.delete(:source)))
|
@@ -29,6 +30,7 @@ templates.each do |template|
|
|
29
30
|
pt.template_kind = template[:template_kind] if template[:template_kind]
|
30
31
|
pt.snippet = template[:snippet] if template[:snippet]
|
31
32
|
end
|
33
|
+
ProvisioningTemplate.find_by(name: template[:name]).update_attributes!(:template => template[:template])
|
32
34
|
end
|
33
35
|
|
34
36
|
# Ensure all default templates are seeded into the first org and loc
|
@@ -7,21 +7,21 @@
|
|
7
7
|
|
8
8
|
# Mail Notifications
|
9
9
|
notifications = [
|
10
|
-
{:name => :
|
10
|
+
{:name => :host_errata_advisory,
|
11
11
|
:description => N_('A summary of available and applicable errata for your hosts'),
|
12
12
|
:mailer => 'Katello::ErrataMailer',
|
13
13
|
:method => 'host_errata',
|
14
14
|
:subscription_type => 'report'
|
15
15
|
},
|
16
16
|
|
17
|
-
{:name => :
|
17
|
+
{:name => :sync_errata,
|
18
18
|
:description => N_('A summary of new errata after a repository is synchronized'),
|
19
19
|
:mailer => 'Katello::ErrataMailer',
|
20
20
|
:method => 'sync_errata',
|
21
21
|
:subscription_type => 'alert'
|
22
22
|
},
|
23
23
|
|
24
|
-
{:name => :
|
24
|
+
{:name => :promote_errata,
|
25
25
|
:description => N_('A post-promotion summary of hosts with installable errata'),
|
26
26
|
:mailer => 'Katello::ErrataMailer',
|
27
27
|
:method => 'promote_errata',
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# This file should contain all the record creation needed to seed the database with its default values.
|
2
|
+
# The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
|
3
|
+
#
|
4
|
+
# !!! PLEASE KEEP THIS SCRIPT IDEMPOTENT !!!
|
5
|
+
#
|
6
|
+
|
7
|
+
::User.current = ::User.anonymous_api_admin
|
8
|
+
os_attributes = {:major => "7", :minor => "2", :name => ::Operatingsystem::REDHAT_ATOMIC_HOST_OS}
|
9
|
+
Operatingsystem.where(os_attributes).first_or_create!
|
10
|
+
|
11
|
+
::User.current = nil
|
@@ -6,7 +6,7 @@ angular.module('Bastion.activation-keys').filter('activationKeyConsumedFilter',
|
|
6
6
|
['$filter', 'translate',
|
7
7
|
function ($filter, translate) {
|
8
8
|
return function (activationKey) {
|
9
|
-
var quantity = $filter('unlimitedFilter')(activationKey['
|
9
|
+
var quantity = $filter('unlimitedFilter')(activationKey['max_hosts'], activationKey['unlimited_hosts']);
|
10
10
|
return translate('%(consumed)s out of %(quantity)s')
|
11
11
|
.replace('%(consumed)s', activationKey['usage_count'])
|
12
12
|
.replace('%(quantity)s', quantity);
|
@@ -3,7 +3,9 @@
|
|
3
3
|
* @name Bastion.activation-keys.controller:ActivationKeyAssociationsController
|
4
4
|
*
|
5
5
|
* @requires $scope
|
6
|
+
* @requires $location
|
6
7
|
* @requires translate
|
8
|
+
* @requires Nutupane
|
7
9
|
* @requires ActivationKey
|
8
10
|
* @requires ContentHostsHelper
|
9
11
|
* @requires CurrentOrganization
|
@@ -12,21 +14,31 @@
|
|
12
14
|
* Provides the functionality for activation key associations.
|
13
15
|
*/
|
14
16
|
angular.module('Bastion.activation-keys').controller('ActivationKeyAssociationsController',
|
15
|
-
['$scope', 'translate', 'ActivationKey', 'ContentHostsHelper', 'CurrentOrganization',
|
16
|
-
function ($scope, translate, ActivationKey, ContentHostsHelper, CurrentOrganization) {
|
17
|
+
['$scope', '$location', 'translate', 'Nutupane', 'ActivationKey', 'ContentHostsHelper', 'CurrentOrganization',
|
18
|
+
function ($scope, $location, translate, Nutupane, ActivationKey, ContentHostsHelper, CurrentOrganization) {
|
19
|
+
var contentHostsNutupane, params = {
|
20
|
+
'organization_id': CurrentOrganization,
|
21
|
+
'search': $location.search().search || "",
|
22
|
+
'page': 1,
|
23
|
+
'sort_by': 'name',
|
24
|
+
'sort_order': 'ASC',
|
25
|
+
'paged': true
|
26
|
+
};
|
27
|
+
|
28
|
+
$scope.table.working = true;
|
17
29
|
|
18
30
|
if ($scope.contentHosts) {
|
19
31
|
$scope.table.working = false;
|
20
|
-
} else {
|
21
|
-
$scope.table.working = true;
|
22
32
|
}
|
23
33
|
|
34
|
+
contentHostsNutupane = new Nutupane(ActivationKey, params, 'contentHosts');
|
35
|
+
contentHostsNutupane.masterOnly = true;
|
36
|
+
$scope.detailsTable = contentHostsNutupane.table;
|
37
|
+
|
24
38
|
$scope.activationKey.$promise.then(function () {
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
$scope.table.working = false;
|
29
|
-
});
|
39
|
+
params.id = $scope.activationKey.id;
|
40
|
+
contentHostsNutupane.setParams(params);
|
41
|
+
contentHostsNutupane.load();
|
30
42
|
});
|
31
43
|
|
32
44
|
$scope.getSubscriptionStatusColor = ContentHostsHelper.getSubscriptionStatusColor;
|
@@ -36,12 +36,12 @@
|
|
36
36
|
|
37
37
|
<tbody>
|
38
38
|
<tr bst-table-row ng-repeat-start="(name, subscriptions) in groupedSubscriptions">
|
39
|
-
<td class="row-select"
|
40
|
-
|
41
|
-
<a href='/subscriptions/{{ subscription.id }}/info'>
|
39
|
+
<td class="row-select">
|
40
|
+
<a href='/subscriptions/{{ subscription.id }}/info' class='confined-text'>
|
42
41
|
{{ name }}
|
43
42
|
</a>
|
44
43
|
</td>
|
44
|
+
<td bst-table-cell colspan="8"></td>
|
45
45
|
</tr>
|
46
46
|
<tr bst-table-row ng-repeat-end ng-repeat="subscription in subscriptions" row-select="subscription">
|
47
47
|
<td bst-table-cell>
|
@@ -1,47 +1,48 @@
|
|
1
1
|
<span page-title ng-model="activationKey">{{ 'Content Hosts for Activation Key:' | translate }} {{ activationKey.name }}</span>
|
2
2
|
|
3
|
-
<div
|
3
|
+
<div data-extend-template="layouts/details-nutupane.html">
|
4
4
|
|
5
|
-
<
|
6
|
-
|
7
|
-
|
5
|
+
<div data-block="messages"></div>
|
6
|
+
<div data-block="actions"></div>
|
7
|
+
<div data-block="selection-summary"></div>
|
8
8
|
|
9
|
-
<
|
10
|
-
|
11
|
-
</
|
12
|
-
|
13
|
-
<table class="table table-bordered table-striped" bst-table="table" ng-show="contentHosts.length > 0" ng-class="{'table-mask': table.working}">
|
14
|
-
<thead>
|
15
|
-
<tr bst-table-head>
|
16
|
-
<th bst-table-column="name" sortable><span translate>Name</span></th>
|
17
|
-
<th bst-table-column="status">
|
18
|
-
{{ "Subscription Status" | translate }}
|
19
|
-
</th>
|
20
|
-
<th bst-table-column="environment" sortable><span translate>Environment</span></th>
|
21
|
-
<th bst-table-column="contentView"><span translate>Content View</span></th>
|
22
|
-
<th bst-table-column="serviceLevel"><span translate>Service Level</span></th>
|
23
|
-
<th bst-table-column="releaseVersion"><span translate>Release Version</span></th>
|
24
|
-
</tr>
|
25
|
-
</thead>
|
9
|
+
<span data-block="no-rows-message" translate>
|
10
|
+
This activation key is not associated with any content hosts.
|
11
|
+
</span>
|
26
12
|
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
<
|
31
|
-
<
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
<
|
37
|
-
</span>
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
<td bst-table-cell>{{ contentHost.service_level }}</td>
|
42
|
-
<td bst-table-cell>{{ contentHost.release_ver }}</td>
|
43
|
-
</tr>
|
44
|
-
</tbody>
|
45
|
-
</table>
|
13
|
+
<div data-block="table">
|
14
|
+
<table class="table table-bordered table-striped" bst-table="table" ng-class="{'table-mask': detailsTable.working}">
|
15
|
+
<thead>
|
16
|
+
<tr bst-table-head>
|
17
|
+
<th bst-table-column="name" sortable><span translate>Name</span></th>
|
18
|
+
<th bst-table-column="status" translate>
|
19
|
+
Subscription Status
|
20
|
+
</th>
|
21
|
+
<th bst-table-column="environment" sortable><span translate>Environment</span></th>
|
22
|
+
<th bst-table-column="contentView"><span translate>Content View</span></th>
|
23
|
+
<th bst-table-column="serviceLevel"><span translate>Service Level</span></th>
|
24
|
+
<th bst-table-column="releaseVersion"><span translate>Release Version</span></th>
|
25
|
+
</tr>
|
26
|
+
</thead>
|
46
27
|
|
28
|
+
<tbody>
|
29
|
+
<tr bst-table-row ng-repeat="contentHost in detailsTable.rows"
|
30
|
+
ng-controller="ContentHostStatusController">
|
31
|
+
<td bst-table-cell>
|
32
|
+
<a ui-sref="content-hosts.details.info({hostId: contentHost.host_id})">
|
33
|
+
{{ contentHost.name }}
|
34
|
+
</a>
|
35
|
+
</td>
|
36
|
+
<td bst-table-cell>
|
37
|
+
<span class="fa fa-circle" ng-class="getSubscriptionStatusColor(contentHost.entitlementStatus)">
|
38
|
+
</span>
|
39
|
+
</td>
|
40
|
+
<td bst-table-cell>{{ contentHost.environment.name }}</td>
|
41
|
+
<td bst-table-cell>{{ contentHost.content_view.name || "" }}</td>
|
42
|
+
<td bst-table-cell>{{ contentHost.service_level }}</td>
|
43
|
+
<td bst-table-cell>{{ contentHost.release_ver }}</td>
|
44
|
+
</tr>
|
45
|
+
</tbody>
|
46
|
+
</table>
|
47
|
+
</div>
|
47
48
|
</div>
|
@@ -31,7 +31,7 @@
|
|
31
31
|
{{ "Close" | translate }}
|
32
32
|
</button>
|
33
33
|
|
34
|
-
<div bst-modal="removeActivationKey(activationKey)">
|
34
|
+
<div bst-modal="removeActivationKey(activationKey)" model="activationKey">
|
35
35
|
<div data-block="modal-header" translate>Remove Activation Key "{{ activationKey.name }}"?</div>
|
36
36
|
<div data-block="modal-body" translate>Are you sure you want to remove Activation Key "{{ activationKey.name }}"?</div>
|
37
37
|
</div>
|
@@ -36,9 +36,9 @@
|
|
36
36
|
<span class="info-label" translate>Host Limit</span>
|
37
37
|
|
38
38
|
<span class="info-value"
|
39
|
-
bst-edit-custom="activationKey.
|
39
|
+
bst-edit-custom="activationKey.max_hosts"
|
40
40
|
formatter="unlimitedFilter"
|
41
|
-
formatter-options="activationKey.
|
41
|
+
formatter-options="activationKey.unlimited_hosts"
|
42
42
|
readonly="denied('edit_activation_keys', activationKey)"
|
43
43
|
on-save="save(activationKey)">
|
44
44
|
|
@@ -47,17 +47,17 @@
|
|
47
47
|
<span translate>
|
48
48
|
Unlimited Content Hosts:
|
49
49
|
</span>
|
50
|
-
<input type='checkbox' ng-model="activationKey.
|
50
|
+
<input type='checkbox' ng-model="activationKey.unlimited_hosts"/>
|
51
51
|
</div>
|
52
|
-
<div ng-hide="activationKey.
|
52
|
+
<div ng-hide="activationKey.unlimited_hosts" >
|
53
53
|
<span translate>
|
54
54
|
Limit:
|
55
55
|
</span>
|
56
|
-
<input ng-model="activationKey.
|
57
|
-
name="
|
56
|
+
<input ng-model="activationKey.max_hosts"
|
57
|
+
name="max_hosts"
|
58
58
|
type="number"
|
59
59
|
min="1"
|
60
|
-
ng-required="!activationKey.
|
60
|
+
ng-required="!activationKey.unlimited_hosts"
|
61
61
|
tabindex="2"/>
|
62
62
|
</div>
|
63
63
|
</div>
|
@@ -48,12 +48,12 @@
|
|
48
48
|
|
49
49
|
<tbody>
|
50
50
|
<tr bst-table-row ng-repeat-start="(name, subscriptions) in groupedSubscriptions | groupedFilter: subscriptionSearch">
|
51
|
-
<td class="row-select"
|
52
|
-
|
53
|
-
<a href='/subscriptions/{{ subscription.id }}/info'>
|
51
|
+
<td class="row-select">
|
52
|
+
<a href='/subscriptions/{{ subscription.id }}/info' class="confined-text">
|
54
53
|
{{ name }}
|
55
54
|
</a>
|
56
55
|
</td>
|
56
|
+
<td bst-table-cell colspan="8" ></td>
|
57
57
|
</tr>
|
58
58
|
<tr bst-table-row ng-repeat-end ng-repeat="subscription in subscriptions" row-select="subscription">
|
59
59
|
<td bst-table-cell>{{ subscription | subscriptionAttachAmountFilter }}</td>
|
@@ -31,7 +31,7 @@ angular.module('Bastion.activation-keys').controller('NewActivationKeyController
|
|
31
31
|
}
|
32
32
|
|
33
33
|
$scope.activationKey = $scope.activationKey || new ActivationKey();
|
34
|
-
$scope.activationKey['
|
34
|
+
$scope.activationKey['unlimited_hosts'] = true;
|
35
35
|
|
36
36
|
$scope.panel = {loading: false};
|
37
37
|
$scope.organization = CurrentOrganization;
|
@@ -29,18 +29,18 @@
|
|
29
29
|
required/>
|
30
30
|
</div>
|
31
31
|
|
32
|
-
<div bst-form-group label="{{ '
|
33
|
-
<span translate>Unlimited
|
32
|
+
<div bst-form-group label="{{ 'Host Limit' | translate }}" field="max_hosts">
|
33
|
+
<span translate>Unlimited Hosts:</span>
|
34
34
|
<input type="checkbox"
|
35
35
|
name="limit"
|
36
|
-
ng-model="activationKey.
|
36
|
+
ng-model="activationKey.unlimited_hosts"/>
|
37
37
|
|
38
|
-
<div bst-form-group label="{{ 'Limit' | translate }}" ng-hide="activationKey.
|
39
|
-
<input id="
|
40
|
-
name="
|
38
|
+
<div bst-form-group label="{{ 'Limit' | translate }}" ng-hide="activationKey.unlimited_hosts">
|
39
|
+
<input id="max_hosts"
|
40
|
+
name="max_hosts"
|
41
41
|
class="form-control"
|
42
|
-
ng-model="activationKey.
|
43
|
-
ng-required="!activationKey.
|
42
|
+
ng-model="activationKey.max_hosts"
|
43
|
+
ng-required="!activationKey.unlimited_hosts"
|
44
44
|
type="number"
|
45
45
|
min="1"
|
46
46
|
max="2147483648"
|
@@ -10,10 +10,10 @@
|
|
10
10
|
angular.module('Bastion.capsule-content').config(['$stateProvider', '$urlRouterProvider', function ($stateProvider, $urlRouterProvider) {
|
11
11
|
|
12
12
|
// Catch the url to prevent the router to perform redirect.
|
13
|
-
$urlRouterProvider.when('/smart_proxies/:proxyId', function ($match, $stateParams) {
|
13
|
+
$urlRouterProvider.when('/smart_proxies/:proxyId', ['$match', '$stateParams', function ($match, $stateParams) {
|
14
14
|
$stateParams.pageName = 'smart_proxies/detail';
|
15
15
|
return true;
|
16
|
-
});
|
16
|
+
}]);
|
17
17
|
|
18
18
|
// Add rule to redirect links on the smart proxy detail page.
|
19
19
|
// Changing state doesn't work there since there's no <ui-view> element there
|
@@ -75,14 +75,6 @@ angular.module('Bastion.content-hosts').controller('ContentHostsController',
|
|
75
75
|
|
76
76
|
$scope.table = $scope.contentHostTable;
|
77
77
|
|
78
|
-
$scope.unregisterContentHost = function (contentHost) {
|
79
|
-
contentHost.$remove(function () {
|
80
|
-
$scope.removeRow(contentHost.id);
|
81
|
-
$scope.successMessages.push(translate('Content Host %s has been deleted.').replace('%s', contentHost.name));
|
82
|
-
$scope.transitionTo('content-hosts.index');
|
83
|
-
});
|
84
|
-
};
|
85
|
-
|
86
78
|
$scope.reloadSearch = function (search) {
|
87
79
|
$scope.table.search(search);
|
88
80
|
$state.go('content-hosts.index');
|
@@ -58,24 +58,27 @@ angular.module('Bastion.content-hosts').controller('ContentHostErrataController'
|
|
58
58
|
|
59
59
|
$scope.setupErrataOptions = function (host) {
|
60
60
|
var libraryString = translate("Library Synced Content"),
|
61
|
-
currentEnv
|
61
|
+
currentEnv,
|
62
62
|
previousEnv;
|
63
63
|
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
64
|
+
if (host.hasContent()) {
|
65
|
+
currentEnv = translate("Current Environment (%e/%cv)").replace("%e", host.content.lifecycle_environment.name).replace("%cv", host.content.content_view_name);
|
66
|
+
$scope.errataOptions = [{name: currentEnv, label: 'current', order: 3}];
|
67
|
+
|
68
|
+
if (!host.content['lifecycle_environment_library?']) {
|
69
|
+
Environment.get({id: host.content.lifecycle_environment.id}).$promise.then(function (env) {
|
70
|
+
previousEnv = translate("Previous Environment (%e/%cv)").replace('%e', env.prior.name).replace("%cv", host.content_view_name);
|
71
|
+
$scope.errataOptions.push({name: previousEnv,
|
72
|
+
label: 'prior', order: 2, 'content_view_id': host.content.content_view_id, 'environment_id': env.prior.id});
|
73
|
+
|
74
|
+
});
|
75
|
+
}
|
76
|
+
if (!host.content['content_view_default?']) {
|
77
|
+
Organization.get({id: host.organization_id}).$promise.then(function (org) {
|
78
|
+
$scope.errataOptions.push({name: libraryString, label: 'library', order: 1,
|
79
|
+
'content_view_id': org.default_content_view_id, 'environment_id': org.library_id});
|
80
|
+
});
|
81
|
+
}
|
79
82
|
}
|
80
83
|
};
|
81
84
|
|