katello 3.5.0.rc1 → 3.5.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/javascripts/katello/containers/container.js +6 -6
- data/app/assets/javascripts/katello/hosts/host_and_hostgroup_edit.js +2 -1
- data/app/assets/javascripts/katello/sync_management/sync_management.js +8 -6
- data/app/controllers/katello/api/v2/activation_keys_controller.rb +23 -16
- data/app/controllers/katello/api/v2/api_controller.rb +7 -2
- data/app/controllers/katello/api/v2/capsule_content_controller.rb +10 -2
- data/app/controllers/katello/api/v2/content_uploads_controller.rb +5 -5
- data/app/controllers/katello/api/v2/content_view_components_controller.rb +9 -9
- data/app/controllers/katello/api/v2/content_view_filter_rules_controller.rb +14 -16
- data/app/controllers/katello/api/v2/content_view_filters_controller.rb +8 -8
- data/app/controllers/katello/api/v2/content_view_puppet_modules_controller.rb +7 -7
- data/app/controllers/katello/api/v2/content_view_versions_controller.rb +12 -12
- data/app/controllers/katello/api/v2/content_views_controller.rb +5 -5
- data/app/controllers/katello/api/v2/errata_controller.rb +2 -2
- data/app/controllers/katello/api/v2/gpg_keys_controller.rb +2 -2
- data/app/controllers/katello/api/v2/host_collections_controller.rb +7 -7
- data/app/controllers/katello/api/v2/host_errata_controller.rb +4 -4
- data/app/controllers/katello/api/v2/host_packages_controller.rb +5 -5
- data/app/controllers/katello/api/v2/host_subscriptions_controller.rb +9 -4
- data/app/controllers/katello/api/v2/host_tracer_controller.rb +1 -1
- data/app/controllers/katello/api/v2/hosts_bulk_actions_controller.rb +9 -1
- data/app/controllers/katello/api/v2/organizations_controller.rb +17 -3
- data/app/controllers/katello/api/v2/packages_controller.rb +2 -2
- data/app/controllers/katello/api/v2/products_controller.rb +3 -3
- data/app/controllers/katello/api/v2/repositories_controller.rb +11 -11
- data/app/controllers/katello/api/v2/repository_sets_controller.rb +1 -10
- data/app/controllers/katello/concerns/api/v2/hosts_controller_extensions.rb +1 -1
- data/app/controllers/katello/concerns/api/v2/repository_content_controller.rb +3 -3
- data/app/helpers/katello/providers_helper.rb +4 -1
- data/app/lib/actions/candlepin/abstract.rb +1 -0
- data/app/lib/actions/katello/host/hypervisors_update.rb +1 -0
- data/app/lib/actions/katello/host/update_release_version.rb +29 -0
- data/app/lib/actions/katello/product/create.rb +3 -6
- data/app/lib/actions/katello/product/reindex_subscriptions.rb +1 -1
- data/app/lib/actions/katello/repository/scheduled_sync.rb +15 -0
- data/app/lib/actions/katello/repository/upload_files.rb +4 -0
- data/app/lib/actions/middleware/keep_session_id.rb +29 -0
- data/app/lib/katello/resources/candlepin.rb +22 -5
- data/app/lib/katello/validators/hostgroup_kickstart_repository_validator.rb +30 -0
- data/app/models/katello/activation_key.rb +3 -33
- data/app/models/katello/candlepin/product_content.rb +1 -14
- data/app/models/katello/concerns/content_facet_host_extensions.rb +5 -1
- data/app/models/katello/concerns/content_view_filter_rule_common.rb +13 -0
- data/app/models/katello/concerns/hostgroup_extensions.rb +1 -0
- data/app/models/katello/concerns/subscription_facet_host_extensions.rb +2 -1
- data/app/models/katello/content_view_docker_filter_rule.rb +2 -1
- data/app/models/katello/content_view_erratum_filter_rule.rb +2 -1
- data/app/models/katello/content_view_package_filter_rule.rb +2 -1
- data/app/models/katello/content_view_package_group_filter_rule.rb +2 -1
- data/app/models/katello/erratum.rb +4 -5
- data/app/models/katello/glue/candlepin/owner.rb +32 -0
- data/app/models/katello/glue/pulp/repos.rb +1 -1
- data/app/models/katello/host/subscription_facet.rb +16 -0
- data/app/models/katello/repository.rb +2 -2
- data/app/models/katello/subscription.rb +4 -1
- data/app/models/katello/subscription_status.rb +8 -4
- data/app/presenters/katello/product_content_presenter.rb +7 -2
- data/app/services/katello/candlepin/consumer.rb +0 -28
- data/app/services/katello/product_content_finder.rb +37 -0
- data/app/views/foreman/smart_proxies/_content_sync.html.erb +0 -2
- data/app/views/katello/api/v2/activation_keys/base.json.rabl +34 -0
- data/app/views/katello/api/v2/activation_keys/index.json.rabl +4 -1
- data/app/views/katello/api/v2/activation_keys/product_content.json.rabl +3 -3
- data/app/views/katello/api/v2/activation_keys/show.json.rabl +2 -38
- data/app/views/katello/api/v2/common/releases.json.rabl +7 -0
- data/config/routes/api/v2.rb +1 -0
- data/config/routes/overrides.rb +1 -0
- data/db/migrate/20171010170443_add_index_to_katello_content_facet_errata.rb +5 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/activation-key.factory.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/activation-key-add-host-collections.controller.js +8 -8
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/activation-key-add-subscriptions.controller.js +5 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/activation-key-copy.controller.js +3 -6
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/activation-key-details.controller.js +7 -10
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/activation-key-host-collections.controller.js +7 -6
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/activation-key-repository-sets.controller.js +5 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/activation-key-subscriptions.controller.js +5 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/views/activation-key-host-collections-table.html +1 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/capsule-content/capsule-content.controller.js +7 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/capsule-content/capsule-content.factory.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/capsules/capsule.factory.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/common/api-error-handler.service.js +6 -16
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-environment-modal.controller.js +4 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-errata-modal.controller.js +5 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-host-collections-modal.controller.js +5 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-packages-modal.controller.js +5 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-release-version-modal.controller.js +62 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-repository-sets-modal.controller.js +4 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-subscriptions-modal.controller.js +4 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-release-version-modal.html +56 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-subscriptions-modal.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-host-modal-helper.service.js +11 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-hosts.controller.js +10 -9
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-packages.controller.js +6 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-traces.controller.js +0 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-add-host-collections.controller.js +3 -6
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-add-subscriptions.controller.js +5 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-base-subscriptions.controller.js +5 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-details-info.controller.js +0 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-details.controller.js +8 -9
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-host-collections.controller.js +10 -8
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-repository-sets.controller.js +5 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-subscriptions.controller.js +5 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-repository-sets.html +0 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/views/content-hosts.html +6 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/content-view.factory.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/deletion/content-view-deletion.controller.js +3 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/deletion/content-view-version-deletion-confirm.controller.js +5 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/components/content-view-component.factory.js +3 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-details.controller.js +6 -6
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-promotion.controller.js +5 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-publish.controller.js +3 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-versions.controller.js +6 -6
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/available-errata-filter.controller.js +5 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/available-package-group-filter.controller.js +5 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/date-type-errata-filter.controller.js +11 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/docker-tag-filter.controller.js +6 -6
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/edit-filter.controller.js +4 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/errata-filter-list.controller.js +5 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/filter-repositories.controller.js +6 -6
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/filter.factory.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/filters.controller.js +4 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/new-filter.controller.js +3 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/package-filter.controller.js +6 -6
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/package-group-list-filter.controller.js +5 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/rule.factory.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/histories/content-view-history.factory.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/puppet-modules/content-view-puppet-module-versions.controller.js +5 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/puppet-modules/content-view-puppet-module.factory.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/puppet-modules/content-view-puppet-modules.controller.js +5 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/content-view-version.factory.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/docker-manifests/docker-manifest.factory.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/docker-tags/details/docker-tag-details.controller.js +0 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/docker-tags/details/views/docker-tag-details.html +0 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/docker-tags/docker-tags.factory.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/details/environment.controller.js +5 -7
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/environment.factory.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/new-environment.controller.js +3 -6
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/views/new-environment.html +0 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/apply-errata.controller.js +9 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/details/erratum-content-hosts.controller.js +0 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/erratum.factory.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/views/apply-errata-confirm.html +0 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/files/details/file.controller.js +0 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/files/file.factory.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/gpg-keys/details/gpg-key-details-info.controller.js +6 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/gpg-keys/details/gpg-key-details.controller.js +4 -6
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/gpg-keys/gpg-key.factory.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/gpg-keys/new/new-gpg-key.controller.js +6 -9
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/host-collections/details/host-collection-add-hosts.controller.js +3 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/host-collections/details/host-collection-copy.controller.js +3 -6
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/host-collections/details/host-collection-details.controller.js +13 -22
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/host-collections/details/host-collection-hosts.controller.js +6 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/host-collections/details/views/host-collection-info.html +3 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/host-collections/host-collection.factory.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/hosts/host-bulk-action.factory.js +2 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/hosts/host-erratum.factory.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/hosts/host-package.factory.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/hosts/host-subscription.factory.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/hosts/host-traces.factory.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/hosts/host.factory.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/organizations/organization.factory.js +7 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/ostree-branches/ostree-branch.factory.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/package-groups/package-group.factory.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/packages/package.factory.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/bulk/product-bulk-action.factory.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/bulk/products-bulk-advanced-sync-modal.controller.js +5 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/bulk/products-bulk-sync-plan-modal.controller.js +6 -6
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/product-details-info.controller.js +5 -8
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/product-details.controller.js +6 -6
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/product-repositories.controller.js +15 -14
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details-advanced-sync.controller.js +6 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details-info.controller.js +9 -9
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details-manage-content.controller.js +5 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details.controller.js +7 -7
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-advanced-sync.html +0 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-info.html +0 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-manage-docker-manifests.html +0 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-manage-files.html +0 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-manage-ostree-branches.html +0 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-manage-packages.html +0 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-manage-puppet-modules.html +0 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/new/new-repository.controller.js +5 -8
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/new/views/new-repository.html +0 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/repository.factory.js +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/views/product-repositories.html +0 -20
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/views/product-info.html +0 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/discovery/discovery-create.controller.js +4 -6
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/discovery/discovery.controller.js +5 -8
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/discovery/views/discovery-base.html +0 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/new/product-form.controller.js +3 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/product.factory.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/products.controller.js +7 -7
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/puppet-modules/details/puppet-module.controller.js +0 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/puppet-modules/puppet-module.factory.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/repository-sets/repository-set.factory.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/settings/setting.factory.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/details/subscription-details.controller.js +0 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/details/views/subscription-details.html +0 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/manifest/manifest-import.controller.js +9 -9
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/manifest/views/manifest-import.html +0 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/subscriptions.factory.js +4 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/details/sync-plan-add-products.controller.js +6 -8
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/details/sync-plan-details-info.controller.js +5 -6
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/details/sync-plan-details.controller.js +5 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/details/sync-plan-products.controller.js +8 -8
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/details/views/sync-plan-info.html +0 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/details/views/sync-plan-products.html +0 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/new/new-sync-plan.controller.js +4 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/sync-plan.factory.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/task.factory.js +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/tasks.module.js +3 -3
- data/lib/katello/permission_creator.rb +3 -2
- data/lib/katello/permissions/host_permissions.rb +1 -0
- data/lib/katello/permissions/organization_permissions.rb +1 -0
- data/lib/katello/tasks/clean_installed_packages.rake +20 -3
- data/lib/katello/version.rb +1 -1
- metadata +17 -6
@@ -57,18 +57,18 @@ angular.module('Bastion.host-collections').controller('HostCollectionAddHostsCon
|
|
57
57
|
$scope.isAdding = true;
|
58
58
|
HostCollection.addHosts({id: $scope.hostCollection.id, 'host_ids': selected}, function (data) {
|
59
59
|
angular.forEach(data.displayMessages.success, function (success) {
|
60
|
-
|
60
|
+
Notification.setSuccessMessage(success);
|
61
61
|
});
|
62
62
|
|
63
63
|
angular.forEach(data.displayMessages.error, function (error) {
|
64
|
-
|
64
|
+
Notification.setErrorMessage(error);
|
65
65
|
});
|
66
66
|
|
67
67
|
$scope.isAdding = false;
|
68
68
|
contentNutupane.refresh();
|
69
69
|
$scope.refreshHostCollection();
|
70
70
|
}, function (response) {
|
71
|
-
|
71
|
+
Notification.setErrorMessage(response.data.displayMessage);
|
72
72
|
$scope.isAdding = false;
|
73
73
|
});
|
74
74
|
};
|
@@ -8,15 +8,12 @@
|
|
8
8
|
* @description
|
9
9
|
* For copying a host collection.
|
10
10
|
*/
|
11
|
-
function HostCollectionCopyController($scope, HostCollection) {
|
12
|
-
$scope.successMessages = [];
|
13
|
-
$scope.errorMessages = [];
|
14
|
-
|
11
|
+
function HostCollectionCopyController($scope, Notification, HostCollection) {
|
15
12
|
$scope.copy = function (newName) {
|
16
13
|
HostCollection.copy({id: $scope.$stateParams.hostCollectionId, 'host_collection': {name: newName}}, function (response) {
|
17
14
|
$scope.transitionTo('host-collection.info', {hostCollectionId: response.id});
|
18
15
|
}, function (response) {
|
19
|
-
|
16
|
+
Notification.setErrorMessage(response.data.displayMessage);
|
20
17
|
});
|
21
18
|
};
|
22
19
|
}
|
@@ -25,6 +22,6 @@
|
|
25
22
|
.module('Bastion.host-collections')
|
26
23
|
.controller('HostCollectionCopyController', HostCollectionCopyController);
|
27
24
|
|
28
|
-
HostCollectionCopyController.$inject = ['$scope', 'HostCollection'];
|
25
|
+
HostCollectionCopyController.$inject = ['$scope', 'Notification', 'HostCollection'];
|
29
26
|
|
30
27
|
})();
|
@@ -9,17 +9,15 @@
|
|
9
9
|
* @requires Host
|
10
10
|
* @requires ContentHostsModalHelper
|
11
11
|
* @requires HostCollection
|
12
|
+
* @requires Notification
|
12
13
|
* @requires ApiErrorHandler
|
13
14
|
*
|
14
15
|
* @description
|
15
16
|
* Provides the functionality for the host collection details action pane.
|
16
17
|
*/
|
17
18
|
angular.module('Bastion.host-collections').controller('HostCollectionDetailsController',
|
18
|
-
['$scope', '$state', '$q', 'translate', 'Host', 'ContentHostsModalHelper', 'HostCollection', 'ApiErrorHandler',
|
19
|
-
function ($scope, $state, $q, translate, Host, ContentHostsModalHelper, HostCollection, ApiErrorHandler) {
|
20
|
-
$scope.successMessages = [];
|
21
|
-
$scope.errorMessages = [];
|
22
|
-
|
19
|
+
['$scope', '$state', '$q', 'translate', 'Host', 'ContentHostsModalHelper', 'HostCollection', 'Notification', 'ApiErrorHandler',
|
20
|
+
function ($scope, $state, $q, translate, Host, ContentHostsModalHelper, HostCollection, Notification, ApiErrorHandler) {
|
23
21
|
$scope.panel = {
|
24
22
|
error: false,
|
25
23
|
loading: true
|
@@ -38,21 +36,14 @@ angular.module('Bastion.host-collections').controller('HostCollectionDetailsCont
|
|
38
36
|
});
|
39
37
|
|
40
38
|
$scope.getHostIds = function() {
|
41
|
-
return
|
39
|
+
return {
|
40
|
+
included: {
|
41
|
+
search: 'host_collection_id = %s'.replace('%s', $scope.$stateParams.hostCollectionId)
|
42
|
+
}
|
43
|
+
};
|
42
44
|
};
|
43
45
|
|
44
|
-
|
45
|
-
$scope.selected = {
|
46
|
-
included: {
|
47
|
-
ids: _.map(response.results, 'id')
|
48
|
-
},
|
49
|
-
excluded: {
|
50
|
-
ids: []
|
51
|
-
}};
|
52
|
-
ContentHostsModalHelper.resolveFunc = $scope.getHostIds;}, function (response) {
|
53
|
-
$scope.panel.loading = false;
|
54
|
-
ApiErrorHandler.handleGETRequestErrors(response, $scope);
|
55
|
-
});
|
46
|
+
ContentHostsModalHelper.resolveFunc = $scope.getHostIds;
|
56
47
|
|
57
48
|
$scope.refreshHostCollection = function () {
|
58
49
|
$scope.hostCollection.$get().then(function (hostCollection) {
|
@@ -87,11 +78,11 @@ angular.module('Bastion.host-collections').controller('HostCollectionDetailsCont
|
|
87
78
|
|
88
79
|
hostCollection.$update(function (response) {
|
89
80
|
deferred.resolve(response);
|
90
|
-
|
81
|
+
Notification.setSuccessMessage(translate('Host Collection updated'));
|
91
82
|
$scope.table.replaceRow(response);
|
92
83
|
}, function (response) {
|
93
84
|
deferred.reject(response);
|
94
|
-
|
85
|
+
Notification.setErrorMessage(translate("An error occurred saving the Host Collection: ") + response.data.displayMessage);
|
95
86
|
});
|
96
87
|
return deferred.promise;
|
97
88
|
};
|
@@ -99,9 +90,9 @@ angular.module('Bastion.host-collections').controller('HostCollectionDetailsCont
|
|
99
90
|
$scope.removeHostCollection = function (hostCollection) {
|
100
91
|
hostCollection.$delete(function () {
|
101
92
|
$scope.transitionTo('host-collections');
|
102
|
-
|
93
|
+
Notification.setSuccessMessage(translate('Host Collection removed.'));
|
103
94
|
}, function (response) {
|
104
|
-
|
95
|
+
Notification.setErrorMessage(translate("An error occurred removing the Host Collection: ") + response.data.displayMessage);
|
105
96
|
});
|
106
97
|
};
|
107
98
|
|
@@ -4,6 +4,7 @@
|
|
4
4
|
*
|
5
5
|
* @requires $scope
|
6
6
|
* @requires $location
|
7
|
+
* @requires Notification
|
7
8
|
* @requires translate
|
8
9
|
* @requires Nutupane
|
9
10
|
* @requires CurrentOrganization
|
@@ -14,8 +15,8 @@
|
|
14
15
|
* Provides the functionality for the host collection details action pane.
|
15
16
|
*/
|
16
17
|
angular.module('Bastion.host-collections').controller('HostCollectionHostsController',
|
17
|
-
['$scope', '$location', 'translate', 'Nutupane', 'CurrentOrganization', 'Host', 'HostCollection',
|
18
|
-
function ($scope, $location, translate, Nutupane, CurrentOrganization, Host, HostCollection) {
|
18
|
+
['$scope', '$location', 'Notification', 'translate', 'Nutupane', 'CurrentOrganization', 'Host', 'HostCollection',
|
19
|
+
function ($scope, $location, Notification, translate, Nutupane, CurrentOrganization, Host, HostCollection) {
|
19
20
|
var params, nutupaneParams;
|
20
21
|
|
21
22
|
params = {
|
@@ -57,18 +58,18 @@ angular.module('Bastion.host-collections').controller('HostCollectionHostsContro
|
|
57
58
|
$scope.contentNutupane.refresh();
|
58
59
|
|
59
60
|
angular.forEach(data.displayMessages.success, function (success) {
|
60
|
-
|
61
|
+
Notification.setSuccessMessage(success);
|
61
62
|
});
|
62
63
|
|
63
64
|
angular.forEach(data.displayMessages.error, function (error) {
|
64
|
-
|
65
|
+
Notification.setErrorMessage(error);
|
65
66
|
});
|
66
67
|
$scope.refreshHostCollection();
|
67
68
|
|
68
69
|
$scope.isRemoving = false;
|
69
70
|
}, function (response) {
|
70
71
|
$scope.isRemoving = false;
|
71
|
-
|
72
|
+
Notification.setErrorMessage(translate("An error occurred removing the content hosts.") + response.data.displayMessage);
|
72
73
|
});
|
73
74
|
};
|
74
75
|
|
@@ -7,13 +7,13 @@
|
|
7
7
|
<dl class="dl-horizontal dl-horizontal-left">
|
8
8
|
<dt translate>Name</dt>
|
9
9
|
<dd bst-edit-text="hostCollection.name"
|
10
|
-
readonly="denied('
|
10
|
+
readonly="denied('edit_host_collections', hostCollection)"
|
11
11
|
on-save="save(hostCollection)">
|
12
12
|
</dd>
|
13
13
|
|
14
14
|
<dt translate>Description</dt>
|
15
15
|
<dd bst-edit-textarea="hostCollection.description"
|
16
|
-
readonly="denied('
|
16
|
+
readonly="denied('edit_host_collections', hostCollection)"
|
17
17
|
on-save="save(hostCollection)">
|
18
18
|
</dd>
|
19
19
|
|
@@ -29,7 +29,7 @@
|
|
29
29
|
|
30
30
|
<dt translate>Content Host Limit</dt>
|
31
31
|
<dd bst-edit-custom="hostCollection.max_hosts"
|
32
|
-
readonly="denied('
|
32
|
+
readonly="denied('edit_host_collections', hostCollection)"
|
33
33
|
formatter="unlimitedFilter"
|
34
34
|
formatter-options="hostCollection.unlimited_hosts"
|
35
35
|
on-save="save(hostCollection)">
|
@@ -10,7 +10,7 @@
|
|
10
10
|
angular.module('Bastion.host-collections').factory('HostCollection',
|
11
11
|
['BastionResource', function (BastionResource) {
|
12
12
|
|
13
|
-
return BastionResource('
|
13
|
+
return BastionResource('katello/api/v2/host_collections/:id/:action', {id: '@id'}, {
|
14
14
|
get: {method: 'GET', params: {fields: 'full'}},
|
15
15
|
update: {method: 'PUT'},
|
16
16
|
copy: {method: 'POST', params: {action: 'copy'}},
|
@@ -10,7 +10,7 @@
|
|
10
10
|
angular.module('Bastion.hosts').factory('HostBulkAction',
|
11
11
|
['BastionResource', function (BastionResource) {
|
12
12
|
|
13
|
-
return BastionResource('
|
13
|
+
return BastionResource('api/v2/hosts/bulk/:action', {}, {
|
14
14
|
addHostCollections: {method: 'PUT', params: {action: 'add_host_collections'}},
|
15
15
|
removeHostCollections: {method: 'PUT', params: {action: 'remove_host_collections'}},
|
16
16
|
updateRepositorySets: {method: 'PUT', params: {action: 'content_overrides'}},
|
@@ -23,6 +23,7 @@ angular.module('Bastion.hosts').factory('HostBulkAction',
|
|
23
23
|
autoAttach: {method: 'PUT', params: {action: 'auto_attach'}},
|
24
24
|
destroyHosts: {method: 'PUT', params: {action: 'destroy'}},
|
25
25
|
environmentContentView: {method: 'PUT', params: {action: 'environment_content_view'}},
|
26
|
+
releaseVersion: {method: 'PUT', params: {action: 'release_version'}},
|
26
27
|
availableIncrementalUpdates: {method: 'POST', isArray: true, params: {action: 'available_incremental_updates'}}
|
27
28
|
});
|
28
29
|
|
data/engines/bastion_katello/app/assets/javascripts/bastion_katello/hosts/host-erratum.factory.js
CHANGED
@@ -10,7 +10,7 @@
|
|
10
10
|
angular.module('Bastion.hosts').factory('HostErratum',
|
11
11
|
['BastionResource', function (BastionResource) {
|
12
12
|
|
13
|
-
return BastionResource('
|
13
|
+
return BastionResource('api/v2/hosts/:id/errata/:errata_id/:action', {id: '@id'}, {
|
14
14
|
get: {method: 'GET', isArray: false, transformResponse: function (data) {
|
15
15
|
data = angular.fromJson(data);
|
16
16
|
angular.forEach(data.results, function (errata) {
|
data/engines/bastion_katello/app/assets/javascripts/bastion_katello/hosts/host-package.factory.js
CHANGED
@@ -10,7 +10,7 @@
|
|
10
10
|
angular.module('Bastion.hosts').factory('HostPackage',
|
11
11
|
['BastionResource', function (BastionResource) {
|
12
12
|
|
13
|
-
return BastionResource('
|
13
|
+
return BastionResource('api/v2/hosts/:id/packages/:action', {id: '@id'}, {
|
14
14
|
get: {method: 'GET', isArray: false},
|
15
15
|
remove: {method: 'PUT', params: {action: 'remove'}},
|
16
16
|
install: {method: 'PUT', params: {action: 'install'}},
|
@@ -10,7 +10,7 @@
|
|
10
10
|
angular.module('Bastion.hosts').factory('HostSubscription',
|
11
11
|
['BastionResource', function (BastionResource) {
|
12
12
|
|
13
|
-
return BastionResource('
|
13
|
+
return BastionResource('api/v2/hosts/:id/subscriptions/:action/', {id: '@id'}, {
|
14
14
|
events: {method: 'GET', params: {action: 'events'}},
|
15
15
|
autoAttach: {method: 'PUT', params: {action: 'auto_attach'}},
|
16
16
|
removeSubscriptions: {method: 'put', isArray: false, params: {action: 'remove_subscriptions'}},
|
data/engines/bastion_katello/app/assets/javascripts/bastion_katello/hosts/host-traces.factory.js
CHANGED
@@ -10,7 +10,7 @@
|
|
10
10
|
angular.module('Bastion.hosts').factory('HostTraces',
|
11
11
|
['BastionResource', function (BastionResource) {
|
12
12
|
|
13
|
-
return BastionResource('
|
13
|
+
return BastionResource('api/v2/hosts/:id/traces/:action', {id: '@id'}, {
|
14
14
|
get: {method: 'GET', isArray: false}
|
15
15
|
});
|
16
16
|
|
@@ -9,7 +9,7 @@
|
|
9
9
|
*/
|
10
10
|
angular.module('Bastion.hosts').factory('Host',
|
11
11
|
['BastionResource', function (BastionResource) {
|
12
|
-
var resource = BastionResource('
|
12
|
+
var resource = BastionResource('api/v2/hosts/:id/:action', {id: '@id'}, {
|
13
13
|
postIndex: {method: 'POST', params: {action: 'post_index'}},
|
14
14
|
update: {method: 'PUT'},
|
15
15
|
updateHostCollections: {method: 'PUT', params: {action: 'host_collections'}},
|
@@ -11,19 +11,21 @@
|
|
11
11
|
angular.module('Bastion.organizations').factory('Organization',
|
12
12
|
['BastionResource', 'CurrentOrganization', function (BastionResource, CurrentOrganization) {
|
13
13
|
|
14
|
-
return BastionResource('
|
14
|
+
return BastionResource('katello/api/v2/organizations/:id/:action',
|
15
15
|
{id: '@id'},
|
16
16
|
{
|
17
17
|
update: { method: 'PUT' },
|
18
|
+
releaseVersions: {method: 'GET', params: {action: 'releases'}},
|
19
|
+
|
18
20
|
select: {
|
19
21
|
method: 'GET',
|
20
|
-
url: '
|
22
|
+
url: 'organizations/:label/select'
|
21
23
|
},
|
22
24
|
repoDiscover: { method: 'POST', params: {action: 'repo_discover'}},
|
23
25
|
cancelRepoDiscover: {method: 'POST', params: {action: 'cancel_repo_discover'}},
|
24
26
|
paths: {
|
25
27
|
method: 'GET',
|
26
|
-
url: '
|
28
|
+
url: 'katello/api/v2/organizations/:id/environments/paths',
|
27
29
|
isArray: true,
|
28
30
|
transformResponse: function (data) {
|
29
31
|
return angular.fromJson(data).results;
|
@@ -31,7 +33,7 @@ angular.module('Bastion.organizations').factory('Organization',
|
|
31
33
|
},
|
32
34
|
readableEnvironments: {
|
33
35
|
method: 'GET',
|
34
|
-
url: '
|
36
|
+
url: 'katello/api/v2/organizations/:id/environments/paths',
|
35
37
|
isArray: true,
|
36
38
|
transformResponse: function (data) {
|
37
39
|
// transform [{environments : [{id, name, permissions: {readable : true}}]}]
|
@@ -46,7 +48,7 @@ angular.module('Bastion.organizations').factory('Organization',
|
|
46
48
|
},
|
47
49
|
redhatProvider: {
|
48
50
|
method: 'GET',
|
49
|
-
url: '
|
51
|
+
url: 'katello/api/v2/organizations/:organization_id/redhat_provider',
|
50
52
|
params: {'organization_id': CurrentOrganization}
|
51
53
|
}
|
52
54
|
}
|
@@ -9,7 +9,7 @@
|
|
9
9
|
* Provides a BastionResource for interacting with Ostree Branches
|
10
10
|
*/
|
11
11
|
function OstreeBranch(BastionResource) {
|
12
|
-
return BastionResource('
|
12
|
+
return BastionResource('katello/api/v2/ostree_branches/:id',
|
13
13
|
{'id': '@id'},
|
14
14
|
{
|
15
15
|
autocomplete: {method: 'GET', isArray: true, params: {id: 'auto_complete_search'}}
|
@@ -9,7 +9,7 @@
|
|
9
9
|
* Provides a BastionResource for interacting with Package Groups
|
10
10
|
*/
|
11
11
|
function PackageGroup(BastionResource) {
|
12
|
-
return BastionResource('
|
12
|
+
return BastionResource('katello/api/v2/package_groups/:id',
|
13
13
|
{'id': '@id'},
|
14
14
|
{
|
15
15
|
autocomplete: {method: 'GET', isArray: true, params: {id: 'auto_complete_search'}}
|
data/engines/bastion_katello/app/assets/javascripts/bastion_katello/packages/package.factory.js
CHANGED
@@ -10,7 +10,7 @@
|
|
10
10
|
angular.module('Bastion.packages').factory('Package',
|
11
11
|
['BastionResource', 'CurrentOrganization', function (BastionResource) {
|
12
12
|
|
13
|
-
return BastionResource('
|
13
|
+
return BastionResource('katello/api/v2/packages/:id',
|
14
14
|
{'id': '@id'},
|
15
15
|
{
|
16
16
|
'autocomplete': {method: 'GET', isArray: true, params: {id: 'auto_complete_search'}},
|
@@ -10,7 +10,7 @@
|
|
10
10
|
angular.module('Bastion.products').factory('ProductBulkAction',
|
11
11
|
['BastionResource', function (BastionResource) {
|
12
12
|
|
13
|
-
return BastionResource('
|
13
|
+
return BastionResource('katello/api/v2/products/bulk/:action', {}, {
|
14
14
|
removeProducts: {method: 'PUT', params: {action: 'destroy'}},
|
15
15
|
syncProducts: {method: 'PUT', params: {action: 'sync'}},
|
16
16
|
updateProductSyncPlan: {method: 'PUT', params: {action: 'sync_plan'}}
|
@@ -8,7 +8,7 @@
|
|
8
8
|
* @requires translate
|
9
9
|
* @requires ProductBulkAction
|
10
10
|
* @requires CurrentOrganization
|
11
|
-
* @requires
|
11
|
+
* @requires Notification
|
12
12
|
* @requires $uibModalInstance
|
13
13
|
* @requires bulkParams
|
14
14
|
*
|
@@ -16,8 +16,8 @@
|
|
16
16
|
* A controller for providing bulk action functionality to the products page.
|
17
17
|
*/
|
18
18
|
angular.module('Bastion.products').controller('ProductsBulkAdvancedSyncModalController',
|
19
|
-
['$scope', '$state', '$sce', 'translate', 'ProductBulkAction', 'CurrentOrganization', '
|
20
|
-
function ($scope, $state, $sce, translate, ProductBulkAction, CurrentOrganization,
|
19
|
+
['$scope', '$state', '$sce', 'translate', 'ProductBulkAction', 'CurrentOrganization', 'Notification', '$uibModalInstance', 'bulkParams',
|
20
|
+
function ($scope, $state, $sce, translate, ProductBulkAction, CurrentOrganization, Notification, $uibModalInstance, bulkParams) {
|
21
21
|
var success, error;
|
22
22
|
|
23
23
|
success = function (task) {
|
@@ -27,12 +27,12 @@ angular.module('Bastion.products').controller('ProductsBulkAdvancedSyncModalCont
|
|
27
27
|
message = translate("Product syncs has been initiated in the background. " +
|
28
28
|
"Click %s to monitor the progress.");
|
29
29
|
|
30
|
-
|
30
|
+
Notification.setRenderedSuccessMessage(message.replace('%s', taskLink));
|
31
31
|
};
|
32
32
|
|
33
33
|
error = function (response) {
|
34
34
|
angular.forEach(response.data.errors, function(message) {
|
35
|
-
|
35
|
+
Notification.setErrorMessage(translate("An error occurred initiating the sync: " ) + message);
|
36
36
|
});
|
37
37
|
};
|
38
38
|
|
@@ -9,7 +9,7 @@
|
|
9
9
|
* @requires ProductBulkAction
|
10
10
|
* @requires SyncPlan
|
11
11
|
* @requires CurrentOrganization
|
12
|
-
* @requires
|
12
|
+
* @requires Notification
|
13
13
|
* @requires $uibModalInstance
|
14
14
|
* @requires bulkParams
|
15
15
|
*
|
@@ -17,8 +17,8 @@
|
|
17
17
|
* A controller for providing bulk action functionality to the products page.
|
18
18
|
*/
|
19
19
|
angular.module('Bastion.products').controller('ProductsBulkSyncPlanModalController',
|
20
|
-
['$scope', '$state', 'translate', 'Nutupane', 'ProductBulkAction', 'SyncPlan', 'CurrentOrganization', '
|
21
|
-
function ($scope, $state, translate, Nutupane, ProductBulkAction, SyncPlan, CurrentOrganization,
|
20
|
+
['$scope', '$state', 'translate', 'Nutupane', 'ProductBulkAction', 'SyncPlan', 'CurrentOrganization', 'Notification', '$uibModalInstance', 'bulkParams',
|
21
|
+
function ($scope, $state, translate, Nutupane, ProductBulkAction, SyncPlan, CurrentOrganization, Notification, $uibModalInstance, bulkParams) {
|
22
22
|
var success, error, nutupane, params;
|
23
23
|
|
24
24
|
params = {
|
@@ -37,11 +37,11 @@ angular.module('Bastion.products').controller('ProductsBulkSyncPlanModalControll
|
|
37
37
|
|
38
38
|
success = function (response) {
|
39
39
|
angular.forEach(response.displayMessages.success, function(message) {
|
40
|
-
|
40
|
+
Notification.setSuccessMessage(message);
|
41
41
|
});
|
42
42
|
|
43
43
|
angular.forEach(response.displayMessages.error, function(message) {
|
44
|
-
|
44
|
+
Notification.setErrorMessage(message);
|
45
45
|
});
|
46
46
|
|
47
47
|
nutupane.invalidate();
|
@@ -49,7 +49,7 @@ angular.module('Bastion.products').controller('ProductsBulkSyncPlanModalControll
|
|
49
49
|
|
50
50
|
error = function (response) {
|
51
51
|
angular.forEach(response.data.errors, function(message) {
|
52
|
-
|
52
|
+
Notification.setErrorMessage(translate("An error occurred updating the sync plan: " ) + message);
|
53
53
|
});
|
54
54
|
};
|
55
55
|
|
@@ -9,17 +9,14 @@
|
|
9
9
|
* @requires SyncPlan
|
10
10
|
* @requires GPGKey
|
11
11
|
* @requires MenuExpander
|
12
|
+
* @requires Notification
|
12
13
|
*
|
13
14
|
* @description
|
14
15
|
* Provides the functionality for the product details action pane.
|
15
16
|
*/
|
16
17
|
angular.module('Bastion.products').controller('ProductDetailsInfoController',
|
17
|
-
['$scope', '$state', '$q', 'translate', 'Product', 'SyncPlan', 'GPGKey', 'MenuExpander',
|
18
|
-
function ($scope, $state, $q, translate, Product, SyncPlan, GPGKey, MenuExpander) {
|
19
|
-
|
20
|
-
$scope.successMessages = [];
|
21
|
-
$scope.errorMessages = [];
|
22
|
-
|
18
|
+
['$scope', '$state', '$q', 'translate', 'Product', 'SyncPlan', 'GPGKey', 'MenuExpander', 'Notification',
|
19
|
+
function ($scope, $state, $q, translate, Product, SyncPlan, GPGKey, MenuExpander, Notification) {
|
23
20
|
$scope.menuExpander = MenuExpander;
|
24
21
|
$scope.page = $scope.page || {loading: false};
|
25
22
|
|
@@ -49,11 +46,11 @@ angular.module('Bastion.products').controller('ProductDetailsInfoController',
|
|
49
46
|
|
50
47
|
product.$update(function (response) {
|
51
48
|
deferred.resolve(response);
|
52
|
-
|
49
|
+
Notification.setSuccessMessage(translate('Product Saved'));
|
53
50
|
}, function (response) {
|
54
51
|
deferred.reject(response);
|
55
52
|
angular.forEach(response.data.errors, function (errorMessage) {
|
56
|
-
|
53
|
+
Notification.setErrorMessage(translate("An error occurred saving the Product: ") + errorMessage);
|
57
54
|
});
|
58
55
|
});
|
59
56
|
|