katello 3.10.2 → 3.11.0.rc1
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/controllers/katello/api/registry/registry_proxies_controller.rb +16 -22
- data/app/controllers/katello/api/v2/content_uploads_controller.rb +4 -7
- data/app/controllers/katello/api/v2/content_view_puppet_modules_controller.rb +4 -5
- data/app/controllers/katello/api/v2/content_view_versions_controller.rb +4 -4
- data/app/controllers/katello/api/v2/content_views_controller.rb +3 -3
- data/app/controllers/katello/api/v2/docker_manifests_controller.rb +1 -1
- data/app/controllers/katello/api/v2/errata_controller.rb +2 -2
- data/app/controllers/katello/api/v2/hosts_bulk_actions_controller.rb +1 -3
- data/app/controllers/katello/api/v2/package_groups_controller.rb +3 -3
- data/app/controllers/katello/api/v2/repositories_controller.rb +5 -24
- data/app/controllers/katello/api/v2/repository_sets_controller.rb +1 -1
- data/app/controllers/katello/application_controller.rb +4 -4
- data/app/controllers/katello/concerns/api/v2/repository_content_controller.rb +1 -1
- data/app/controllers/katello/sync_management_controller.rb +1 -1
- data/app/helpers/katello/errata_mailer_helper.rb +1 -1
- data/app/helpers/katello/sync_management_helper.rb +1 -1
- data/app/lib/actions/candlepin/environment/add_content_to_environment.rb +18 -0
- data/app/lib/actions/katello/content_view_puppet_environment/clone.rb +1 -4
- data/app/lib/actions/katello/content_view_puppet_environment/clone_content_for_version.rb +20 -0
- data/app/lib/actions/katello/content_view_puppet_environment/create_for_version.rb +3 -2
- data/app/lib/actions/katello/content_view_version/incremental_update.rb +15 -16
- data/app/lib/actions/katello/host/hypervisors_update.rb +17 -6
- data/app/lib/actions/katello/organization/manifest_delete.rb +1 -3
- data/app/lib/actions/katello/organization/manifest_import.rb +1 -3
- data/app/lib/actions/katello/organization/manifest_refresh.rb +1 -3
- data/app/lib/actions/katello/provider/update.rb +1 -1
- data/app/lib/actions/katello/repository/check_matching_content.rb +8 -2
- data/app/lib/actions/katello/repository/clone_contents.rb +52 -0
- data/app/lib/actions/katello/repository/clone_to_environment.rb +1 -11
- data/app/lib/actions/katello/repository/clone_to_version.rb +19 -29
- data/app/lib/actions/katello/repository/create.rb +3 -4
- data/app/lib/actions/katello/repository/export.rb +1 -2
- data/app/lib/actions/katello/repository/import_upload.rb +7 -5
- data/app/lib/actions/katello/repository/purge_empty_content.rb +16 -0
- data/app/lib/actions/katello/repository/remove_content.rb +2 -2
- data/app/lib/actions/katello/repository/sync.rb +1 -1
- data/app/lib/actions/pulp/content_view_puppet_environment/copy_contents.rb +36 -0
- data/app/lib/actions/pulp/repository/copy_all_units.rb +27 -0
- data/app/lib/actions/pulp/repository/copy_units.rb +29 -0
- data/app/lib/actions/pulp/repository/refresh.rb +3 -7
- data/app/lib/actions/pulp/repository/regenerate_applicability.rb +5 -2
- data/app/lib/katello/concerns/renderer_extensions.rb +1 -1
- data/app/lib/katello/http_resource.rb +5 -1
- data/app/lib/katello/resources/candlepin/consumer.rb +9 -0
- data/app/lib/katello/resources/candlepin/content.rb +2 -3
- data/app/lib/katello/util/cdn_var_substitutor.rb +1 -2
- data/app/lib/katello/util/path_with_substitutions.rb +18 -1
- data/app/lib/katello/validators/content_view_puppet_module_validator.rb +2 -2
- data/app/lib/katello/validators/environment_docker_repositories_validator.rb +7 -5
- data/app/models/katello/concerns/hostgroup_extensions.rb +2 -7
- data/app/models/katello/concerns/organization_extensions.rb +11 -1
- data/app/models/katello/concerns/pulp_database_unit.rb +40 -24
- data/app/models/katello/concerns/redhat_extensions.rb +7 -3
- data/app/models/katello/content_view.rb +5 -7
- data/app/models/katello/content_view_docker_filter.rb +3 -3
- data/app/models/katello/content_view_puppet_environment.rb +1 -1
- data/app/models/katello/content_view_puppet_module.rb +2 -3
- data/app/models/katello/docker_meta_tag.rb +1 -1
- data/app/models/katello/docker_tag.rb +4 -6
- data/app/models/katello/erratum.rb +1 -1
- data/app/models/katello/glue/pulp/repo.rb +3 -0
- data/app/models/katello/glue/pulp/repos.rb +4 -0
- data/app/models/katello/host/info_provider.rb +2 -2
- data/app/models/katello/host/subscription_facet.rb +0 -1
- data/app/models/katello/module_stream.rb +10 -4
- data/app/models/katello/ostree_branch.rb +4 -2
- data/app/models/katello/package_group.rb +2 -2
- data/app/models/katello/ping.rb +1 -1
- data/app/models/katello/puppet_module.rb +3 -3
- data/app/models/katello/repository.rb +15 -2
- data/app/models/katello/root_repository.rb +10 -0
- data/app/models/katello/yum_metadata_file.rb +46 -0
- data/app/services/katello/abstract/pulp/content.rb +19 -0
- data/app/services/katello/applicable_content_helper.rb +5 -5
- data/app/services/katello/pulp/content.rb +17 -0
- data/app/services/katello/pulp/repository.rb +45 -15
- data/app/services/katello/pulp/repository/deb.rb +8 -0
- data/app/services/katello/pulp/repository/docker.rb +19 -0
- data/app/services/katello/pulp/repository/file.rb +10 -0
- data/app/services/katello/pulp/repository/ostree.rb +4 -0
- data/app/services/katello/pulp/repository/puppet.rb +10 -0
- data/app/services/katello/pulp/repository/yum.rb +73 -0
- data/app/services/katello/pulp/yum_metadata_file.rb +7 -0
- data/app/services/katello/repository_type.rb +5 -0
- data/app/views/dashboard/_errata_widget.html.erb +1 -1
- data/app/views/katello/api/v2/debs/base.json.rabl +2 -1
- data/app/views/katello/api/v2/docker_tags/_base.json.rabl +3 -3
- data/app/views/katello/api/v2/errata/show.json.rabl +2 -1
- data/app/views/katello/api/v2/file_units/base.json.rabl +2 -1
- data/app/views/katello/api/v2/module_streams/base.json.rabl +2 -1
- data/app/views/katello/api/v2/ostree_branches/show.json.rabl +3 -2
- data/app/views/katello/api/v2/package_groups/base.json.rabl +2 -1
- data/app/views/katello/api/v2/package_groups/show.json.rabl +1 -1
- data/app/views/katello/api/v2/packages/base.json.rabl +2 -1
- data/app/views/katello/api/v2/packages/show.json.rabl +1 -1
- data/app/views/katello/api/v2/puppet_modules/base.json.rabl +2 -1
- data/app/views/katello/api/v2/puppet_modules/show.json.rabl +1 -1
- data/app/views/katello/api/v2/repositories/base.json.rabl +1 -0
- data/app/views/katello/layouts/react.html.erb +3 -3
- data/db/migrate/20181219205642_create_yum_metadata_file.rb +20 -0
- data/db/migrate/20190107160723_units_uuid_to_backend_ident.rb +8 -0
- data/db/seeds.d/101-locations.rb +11 -13
- data/db/seeds.d/102-organizations.rb +5 -3
- data/db/seeds.d/111-upgrade_tasks.rb +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/bastion_katello.js +2 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/common/views/subscription-add-or-remove.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-subscriptions-modal.html +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-hosts.module.js +2 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-errata.html +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-events.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-info.html +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-provisioning-info.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/views/content-hosts.html +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/content-views.module.js +2 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/views/errata-filter-details.html +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/views/filter-repositories.html +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/views/filters.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/histories/views/content-view-history.html +20 -20
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-deb-repositories.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-docker-repositories.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-file-repositories.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-ostree-repositories.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-repositories.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-versions.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/content-view-version-content.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/views/content-view-version-errata.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/views/content-view-version-ostree-branches.html +2 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/views/content-views.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/dates/dates.module.js +50 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/details/views/environment-content-views.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/details/views/environment-details.html +0 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/details/views/environment-errata.html +2 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/details/views/environment-ostree.html +2 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/environments.module.js +2 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/details/views/erratum-info.html +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/errata.module.js +2 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/views/errata.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/ostree-branches/details/views/ostree-branch-info.html +3 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/bulk/views/products-bulk-sync-plan-modal.html +3 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-info.html +6 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-manage-ostree-branches.html +4 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/views/product-info.html +5 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/products.controller.js +7 -8
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/views/partials/product-table-sync-status.html +5 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/details/views/subscription-info.html +3 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/manifest/views/manifest-details.html +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/manifest/views/manifest-import-history.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/views/subscription-start-date.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/views/subscriptions.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/details/views/sync-plan-info.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/views/sync-plans.html +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/views/task-details.html +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/views/tasks-table.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/views/user-tasks-table.html +1 -1
- data/engines/bastion_katello/lib/bastion_katello/engine.rb +6 -1
- data/lib/katello/engine.rb +3 -3
- data/lib/katello/plugin.rb +3 -3
- data/lib/katello/repository_types/deb.rb +1 -0
- data/lib/katello/repository_types/yum.rb +1 -0
- data/lib/katello/tasks/reimport.rake +1 -0
- data/lib/katello/tasks/repository.rake +1 -1
- data/lib/katello/tasks/upgrades/3.11/import_yum_metadata_file.rake +12 -0
- data/lib/katello/version.rb +1 -1
- data/package.json +3 -1
- data/webpack/__mocks__/foremanReact/components/Pagination/PaginationWrapper.js +2 -0
- data/webpack/__mocks__/foremanReact/components/common/EmptyState.js +8 -0
- data/webpack/common_index.js +6 -0
- data/webpack/containers/Application/config.js +3 -3
- data/webpack/move_to_foreman/components/common/table/components/Table.js +3 -3
- data/webpack/move_to_foreman/components/common/table/components/Table.test.js +2 -0
- data/webpack/move_to_foreman/components/common/table/components/__snapshots__/Table.test.js.snap +1 -17
- data/webpack/redux/actions/RedHatRepositories/helpers.js +19 -10
- data/webpack/scenes/ModuleStreams/Details/Profiles/__tests__/ModuleStreamDetailProfiles.test.js +2 -0
- data/webpack/scenes/ModuleStreams/Details/Repositories/__tests__/ModuleStreamDetailRepositories.test.js +2 -0
- data/webpack/scenes/ModuleStreams/Details/__tests__/ModuleStreamDetails.test.js +2 -0
- data/webpack/scenes/ModuleStreams/__tests__/ModuleStreamPage.test.js +1 -0
- data/webpack/scenes/ModuleStreams/__tests__/ModuleStreamsTable.test.js +1 -0
- data/webpack/scenes/RedHatRepositories/helpers.js +3 -3
- data/webpack/scenes/Subscriptions/Details/__tests__/__snapshots__/SubscriptionDetailProductContent.test.js.snap +1 -0
- data/webpack/scenes/Subscriptions/Manifest/ManageManifestModal.js +1 -1
- data/webpack/scenes/Subscriptions/Manifest/__tests__/ManageManifestModal.test.js +1 -0
- data/webpack/scenes/Subscriptions/Manifest/__tests__/__snapshots__/ManageManifestModal.test.js.snap +1 -1
- data/webpack/scenes/Subscriptions/SubscriptionActions.js +10 -0
- data/webpack/scenes/Subscriptions/SubscriptionConstants.js +6 -0
- data/webpack/scenes/Subscriptions/SubscriptionReducer.js +16 -0
- data/webpack/scenes/Subscriptions/SubscriptionValidations.js +3 -3
- data/webpack/scenes/Subscriptions/SubscriptionsPage.js +28 -25
- data/webpack/scenes/Subscriptions/SubscriptionsSelectors.js +6 -0
- data/webpack/scenes/Subscriptions/UpstreamSubscriptions/UpstreamSubscriptionsPage.js +0 -1
- data/webpack/scenes/Subscriptions/UpstreamSubscriptions/__tests__/UpstreamSubscriptionsPage.test.js +1 -0
- data/webpack/scenes/Subscriptions/UpstreamSubscriptions/__tests__/__snapshots__/UpstreamSubscriptionsPage.test.js.snap +0 -1
- data/webpack/scenes/Subscriptions/__tests__/SubscriptionValidations.test.js +9 -4
- data/webpack/scenes/Subscriptions/__tests__/SubscriptionsActions.test.js +14 -0
- data/webpack/scenes/Subscriptions/__tests__/SubscriptionsPage.test.js +2 -0
- data/webpack/scenes/Subscriptions/__tests__/SubscriptionsReducer.test.js +24 -0
- data/webpack/scenes/Subscriptions/__tests__/SubscriptionsSelectors.test.js +6 -0
- data/webpack/scenes/Subscriptions/__tests__/__snapshots__/SubscriptionsActions.test.js.snap +24 -0
- data/webpack/scenes/Subscriptions/__tests__/__snapshots__/SubscriptionsPage.test.js.snap +1 -1
- data/webpack/scenes/Subscriptions/__tests__/__snapshots__/SubscriptionsReducer.test.js.snap +138 -0
- data/webpack/scenes/Subscriptions/__tests__/__snapshots__/SubscriptionsSelectors.test.js.snap +6 -0
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/EntitlementsInlineEditFormatter.js +8 -6
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/SubscriptionsTableHelpers.js +23 -11
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/EntitlementsInlineEditFormatter.test.js +14 -10
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/SubscriptionsTable.fixtures.js +105 -0
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/SubscriptionsTable.test.js +2 -0
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/SubscriptionsTableHelpers.test.js +44 -0
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/__snapshots__/EntitlementsInlineEditFormatter.test.js.snap +3 -3
- data/webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/__snapshots__/SubscriptionsTable.test.js.snap +2 -222
- data/webpack/scenes/Subscriptions/index.js +4 -0
- metadata +41 -44
- data/app/lib/actions/katello/content_view_puppet_environment/clone_content.rb +0 -32
- data/app/lib/actions/katello/repository/clone_deb_content.rb +0 -70
- data/app/lib/actions/katello/repository/clone_docker_content.rb +0 -26
- data/app/lib/actions/katello/repository/clone_file_content.rb +0 -17
- data/app/lib/actions/katello/repository/clone_ostree_content.rb +0 -17
- data/app/lib/actions/katello/repository/clone_yum_content.rb +0 -105
- data/app/lib/actions/katello/repository/clone_yum_metadata.rb +0 -36
- data/app/lib/actions/pulp/repository/copy_deb.rb +0 -15
- data/app/lib/actions/pulp/repository/copy_deb_component.rb +0 -11
- data/app/lib/actions/pulp/repository/copy_deb_release.rb +0 -11
- data/app/lib/actions/pulp/repository/copy_distribution.rb +0 -11
- data/app/lib/actions/pulp/repository/copy_docker_manifest.rb +0 -11
- data/app/lib/actions/pulp/repository/copy_docker_tag.rb +0 -11
- data/app/lib/actions/pulp/repository/copy_errata.rb +0 -15
- data/app/lib/actions/pulp/repository/copy_files.rb +0 -11
- data/app/lib/actions/pulp/repository/copy_module_default.rb +0 -11
- data/app/lib/actions/pulp/repository/copy_module_stream.rb +0 -11
- data/app/lib/actions/pulp/repository/copy_ostree_branch.rb +0 -11
- data/app/lib/actions/pulp/repository/copy_package_group.rb +0 -11
- data/app/lib/actions/pulp/repository/copy_puppet_module.rb +0 -15
- data/app/lib/actions/pulp/repository/copy_rpm.rb +0 -15
- data/app/lib/actions/pulp/repository/copy_srpm.rb +0 -16
- data/app/lib/actions/pulp/repository/copy_yum_metadata_file.rb +0 -11
- data/app/lib/actions/pulp/repository/purge_empty_errata.rb +0 -19
- data/app/lib/actions/pulp/repository/purge_empty_package_groups.rb +0 -24
- data/db/migrate/20190326145039_remove_version_date_from_ostree_branch.rb +0 -5
- data/lib/katello/tasks/upgrades/3.10/update_gpg_key_urls.rake +0 -32
- data/webpack/components/PaginationRow/PaginationRow.test.js +0 -25
- data/webpack/components/PaginationRow/__snapshots__/PaginationRow.test.js.snap +0 -35
- data/webpack/components/PaginationRow/index.js +0 -94
- data/webpack/move_to_foreman/components/common/EmptyState/index.js +0 -68
@@ -26,10 +26,6 @@ class SubscriptionsPage extends Component {
|
|
26
26
|
constructor(props) {
|
27
27
|
super(props);
|
28
28
|
|
29
|
-
this.state = {
|
30
|
-
disableDeleteButton: true,
|
31
|
-
showTaskModal: false,
|
32
|
-
};
|
33
29
|
this.uploadManifest = this.uploadManifest.bind(this);
|
34
30
|
this.deleteManifest = this.deleteManifest.bind(this);
|
35
31
|
this.refreshManifest = this.refreshManifest.bind(this);
|
@@ -42,7 +38,9 @@ class SubscriptionsPage extends Component {
|
|
42
38
|
}
|
43
39
|
|
44
40
|
componentDidUpdate(prevProps) {
|
45
|
-
const {
|
41
|
+
const {
|
42
|
+
tasks = [], organization, taskModalOpened, openTaskModal, closeTaskModal,
|
43
|
+
} = this.props;
|
46
44
|
const { tasks: prevTasks = [] } = prevProps;
|
47
45
|
const currentOrg = Number(orgId());
|
48
46
|
const numberOfTasks = tasks.length;
|
@@ -51,30 +49,23 @@ class SubscriptionsPage extends Component {
|
|
51
49
|
|
52
50
|
if (numberOfTasks > 0) {
|
53
51
|
if (currentOrg === task.input.organization.id) {
|
54
|
-
if (!
|
55
|
-
|
56
|
-
this.setState({
|
57
|
-
showTaskModal: true,
|
58
|
-
});
|
52
|
+
if (!taskModalOpened) {
|
53
|
+
openTaskModal();
|
59
54
|
}
|
60
55
|
}
|
61
56
|
|
62
57
|
if (numberOfPrevTasks === 0 || prevTasks[0].id !== task.id) {
|
63
58
|
if (currentOrg === task.input.organization.id) {
|
64
59
|
this.handleDoneTask(task);
|
65
|
-
} else if (
|
66
|
-
|
67
|
-
this.setState({
|
68
|
-
showTaskModal: false,
|
69
|
-
});
|
60
|
+
} else if (taskModalOpened) {
|
61
|
+
closeTaskModal();
|
70
62
|
}
|
71
63
|
}
|
72
64
|
}
|
73
65
|
|
74
66
|
if (numberOfTasks === 0) {
|
75
|
-
if (
|
76
|
-
|
77
|
-
this.setState({ showTaskModal: false });
|
67
|
+
if (taskModalOpened && !this.state.pollingATask) {
|
68
|
+
closeTaskModal();
|
78
69
|
}
|
79
70
|
}
|
80
71
|
|
@@ -133,8 +124,11 @@ class SubscriptionsPage extends Component {
|
|
133
124
|
}
|
134
125
|
|
135
126
|
manifestAction(callback, file = undefined) {
|
127
|
+
const { openTaskModal } = this.props;
|
128
|
+
|
129
|
+
openTaskModal();
|
130
|
+
|
136
131
|
this.setState({
|
137
|
-
showTaskModal: true,
|
138
132
|
pollingATask: true,
|
139
133
|
});
|
140
134
|
callback(file)
|
@@ -163,7 +157,9 @@ class SubscriptionsPage extends Component {
|
|
163
157
|
const {
|
164
158
|
manifestModalOpened, openManageManifestModal, closeManageManifestModal,
|
165
159
|
deleteModalOpened, openDeleteModal, closeDeleteModal,
|
160
|
+
deleteButtonDisabled, disableDeleteButton, enableDeleteButton,
|
166
161
|
searchQuery, updateSearchQuery,
|
162
|
+
taskModalOpened,
|
167
163
|
tasks = [], subscriptions, organization, subscriptionTableSettings,
|
168
164
|
} = this.props;
|
169
165
|
const { disconnected } = subscriptions;
|
@@ -192,9 +188,8 @@ class SubscriptionsPage extends Component {
|
|
192
188
|
closeDeleteModal();
|
193
189
|
};
|
194
190
|
|
195
|
-
const toggleDeleteButton =
|
196
|
-
|
197
|
-
};
|
191
|
+
const toggleDeleteButton = rowsSelected =>
|
192
|
+
(rowsSelected ? enableDeleteButton() : disableDeleteButton());
|
198
193
|
|
199
194
|
|
200
195
|
const csvParams = createSubscriptionParams({ search: searchQuery });
|
@@ -240,12 +235,12 @@ class SubscriptionsPage extends Component {
|
|
240
235
|
<Grid bsClass="container-fluid">
|
241
236
|
<Row>
|
242
237
|
<Col sm={12}>
|
243
|
-
<h1>{__('
|
238
|
+
<h1>{__('Subscriptions')}</h1>
|
244
239
|
|
245
240
|
<SubscriptionsToolbar
|
246
241
|
disableManifestActions={disableManifestActions}
|
247
242
|
disableManifestReason={this.getDisabledReason()}
|
248
|
-
disableDeleteButton={
|
243
|
+
disableDeleteButton={deleteButtonDisabled}
|
249
244
|
disableDeleteReason={this.getDisabledReason(true)}
|
250
245
|
disableAddButton={!manifestExists(organization)}
|
251
246
|
getAutoCompleteParams={getAutoCompleteParams}
|
@@ -285,7 +280,7 @@ class SubscriptionsPage extends Component {
|
|
285
280
|
bulkSearch={this.props.bulkSearch}
|
286
281
|
/>
|
287
282
|
<ModalProgressBar
|
288
|
-
show={
|
283
|
+
show={taskModalOpened}
|
289
284
|
container={document.getElementById('subscriptions-table')}
|
290
285
|
task={task}
|
291
286
|
/>
|
@@ -330,6 +325,12 @@ SubscriptionsPage.propTypes = {
|
|
330
325
|
deleteModalOpened: PropTypes.bool,
|
331
326
|
openDeleteModal: PropTypes.func.isRequired,
|
332
327
|
closeDeleteModal: PropTypes.func.isRequired,
|
328
|
+
taskModalOpened: PropTypes.bool,
|
329
|
+
openTaskModal: PropTypes.func.isRequired,
|
330
|
+
closeTaskModal: PropTypes.func.isRequired,
|
331
|
+
deleteButtonDisabled: PropTypes.bool,
|
332
|
+
disableDeleteButton: PropTypes.func.isRequired,
|
333
|
+
enableDeleteButton: PropTypes.func.isRequired,
|
333
334
|
};
|
334
335
|
|
335
336
|
SubscriptionsPage.defaultProps = {
|
@@ -340,6 +341,8 @@ SubscriptionsPage.defaultProps = {
|
|
340
341
|
searchQuery: '',
|
341
342
|
manifestModalOpened: false,
|
342
343
|
deleteModalOpened: false,
|
344
|
+
taskModalOpened: false,
|
345
|
+
deleteButtonDisabled: true,
|
343
346
|
};
|
344
347
|
|
345
348
|
export default SubscriptionsPage;
|
@@ -10,5 +10,11 @@ export const selectDeleteModalOpened = state =>
|
|
10
10
|
export const selectSearchQuery = state =>
|
11
11
|
selectSubscriptionsState(state).searchQuery;
|
12
12
|
|
13
|
+
export const selectTaskModalOpened = state =>
|
14
|
+
selectSubscriptionsState(state).taskModalOpened;
|
15
|
+
|
16
|
+
export const selectDeleteButtonDisabled = state =>
|
17
|
+
selectSubscriptionsState(state).deleteButtonDisabled;
|
18
|
+
|
13
19
|
export const selectSubscriptionsTasks = state =>
|
14
20
|
selectSubscriptionsState(state).tasks;
|
@@ -185,7 +185,6 @@ class UpstreamSubscriptionsPage extends Component {
|
|
185
185
|
header: __('There are no Subscription Allocations to display'),
|
186
186
|
description: __('Subscription Allocations allow you to export subscriptions from the Red Hat Customer Portal to ' +
|
187
187
|
'an on-premise subscription management application such as Red Hat Satellite.'),
|
188
|
-
docUrl: 'http://redhat.com',
|
189
188
|
action: {
|
190
189
|
title: __('Import a Manifest to Begin'),
|
191
190
|
url: '/subscriptions',
|
data/webpack/scenes/Subscriptions/UpstreamSubscriptions/__tests__/UpstreamSubscriptionsPage.test.js
CHANGED
@@ -7,6 +7,7 @@ import { loadUpstreamSubscriptions, saveUpstreamSubscriptions } from '../Upstrea
|
|
7
7
|
|
8
8
|
jest.mock('../../../../move_to_foreman/foreman_toast_notifications');
|
9
9
|
jest.mock('foremanReact/components/BreadcrumbBar');
|
10
|
+
jest.mock('foremanReact/components/Pagination/PaginationWrapper');
|
10
11
|
|
11
12
|
describe('upstream subscriptions page', () => {
|
12
13
|
let shallowWrapper;
|
@@ -146,7 +146,6 @@ exports[`upstream subscriptions page should render 1`] = `
|
|
146
146
|
"url": "/subscriptions",
|
147
147
|
},
|
148
148
|
"description": "Subscription Allocations allow you to export subscriptions from the Red Hat Customer Portal to an on-premise subscription management application such as Red Hat Satellite.",
|
149
|
-
"docUrl": "http://redhat.com",
|
150
149
|
"header": "There are no Subscription Allocations to display",
|
151
150
|
}
|
152
151
|
}
|
@@ -44,6 +44,11 @@ describe('validateQuantity', () => {
|
|
44
44
|
expect(validateQuantity(100))
|
45
45
|
.toEqual(validResult);
|
46
46
|
});
|
47
|
+
|
48
|
+
it('detects unlimited maxQuantity', () => {
|
49
|
+
expect(validateQuantity('500000', -1))
|
50
|
+
.toEqual(validResult);
|
51
|
+
});
|
47
52
|
});
|
48
53
|
|
49
54
|
describe('recordsValid', () => {
|
@@ -54,8 +59,8 @@ describe('recordsValid', () => {
|
|
54
59
|
/* eslint-disable object-curly-newline */
|
55
60
|
it('accepts valid array', () => {
|
56
61
|
const rows = [
|
57
|
-
{ quantity: 10, available: 10,
|
58
|
-
{ quantity: 10, available: 10,
|
62
|
+
{ quantity: 10, available: 10, upstreamAvailable: 100, upstream_pool_id: ' ' },
|
63
|
+
{ quantity: 10, available: 10, upstreamAvailable: -1 },
|
59
64
|
{ quantity: -1, available: -1 },
|
60
65
|
{ quantity: 10, available: 10, upstream_pool_id: ' ' },
|
61
66
|
];
|
@@ -66,8 +71,8 @@ describe('recordsValid', () => {
|
|
66
71
|
it('detects invalid record', () => {
|
67
72
|
/* eslint-disable object-curly-newline */
|
68
73
|
const rows = [
|
69
|
-
{ quantity: 10, available: 10,
|
70
|
-
{ quantity: 10, available: 10,
|
74
|
+
{ quantity: 10, available: 10, upstreamAvailable: 100, maxQuantity: 100, upstream_pool_id: ' ' },
|
75
|
+
{ quantity: 10, available: 10, upstreamAvailable: 0, maxQuantity: 5, upstream_pool_id: ' ' },
|
71
76
|
];
|
72
77
|
/* eslint-enable object-curly-newline */
|
73
78
|
expect(recordsValid(rows)).toBe(false);
|
@@ -27,6 +27,10 @@ import {
|
|
27
27
|
closeManageManifestModal,
|
28
28
|
openDeleteModal,
|
29
29
|
closeDeleteModal,
|
30
|
+
openTaskModal,
|
31
|
+
closeTaskModal,
|
32
|
+
disableDeleteButton,
|
33
|
+
enableDeleteButton,
|
30
34
|
} from '../SubscriptionActions';
|
31
35
|
|
32
36
|
const mockStore = configureMockStore([thunk]);
|
@@ -158,4 +162,14 @@ describe('subscription actions', () => {
|
|
158
162
|
describe('searchQuery', () => testActionSnapshotWithFixtures({
|
159
163
|
'it should update the search-query': () => updateSearchQuery('some-query'),
|
160
164
|
}));
|
165
|
+
|
166
|
+
describe('taskModal', () => testActionSnapshotWithFixtures({
|
167
|
+
'it should open task modal': () => openTaskModal(),
|
168
|
+
'it should close task modal': () => closeTaskModal(),
|
169
|
+
}));
|
170
|
+
|
171
|
+
describe('deleteButtonDisabled', () => testActionSnapshotWithFixtures({
|
172
|
+
'it should disable the delete button': () => disableDeleteButton(),
|
173
|
+
'it should enable the delete button': () => enableDeleteButton(),
|
174
|
+
}));
|
161
175
|
});
|
@@ -8,6 +8,8 @@ import { loadSetting } from '../../../move_to_foreman/Settings/SettingsActions';
|
|
8
8
|
import { createColumns, updateColumns } from '../../../scenes/Settings/Tables/TableActions';
|
9
9
|
|
10
10
|
jest.mock('../../../move_to_foreman/foreman_toast_notifications');
|
11
|
+
jest.mock('foremanReact/components/Pagination/PaginationWrapper', () => (<div>Pagination Mock</div>));
|
12
|
+
|
11
13
|
const loadTables = () => new Promise((resolve) => {
|
12
14
|
resolve();
|
13
15
|
});
|
@@ -21,6 +21,10 @@ import {
|
|
21
21
|
SUBSCRIPTIONS_CLOSE_MANIFEST_MODAL,
|
22
22
|
SUBSCRIPTIONS_OPEN_DELETE_MODAL,
|
23
23
|
SUBSCRIPTIONS_CLOSE_DELETE_MODAL,
|
24
|
+
SUBSCRIPTIONS_OPEN_TASK_MODAL,
|
25
|
+
SUBSCRIPTIONS_CLOSE_TASK_MODAL,
|
26
|
+
SUBSCRIPTIONS_DISABLE_DELETE_BUTTON,
|
27
|
+
SUBSCRIPTIONS_ENABLE_DELETE_BUTTON,
|
24
28
|
TASK_BULK_SEARCH_SUCCESS,
|
25
29
|
GET_TASK_SUCCESS,
|
26
30
|
RESET_TASKS,
|
@@ -139,6 +143,26 @@ const fixtures = {
|
|
139
143
|
type: SUBSCRIPTIONS_CLOSE_DELETE_MODAL,
|
140
144
|
},
|
141
145
|
},
|
146
|
+
'should handle SUBSCRIPTIONS_OPEN_TASK_MODAL': {
|
147
|
+
action: {
|
148
|
+
type: SUBSCRIPTIONS_OPEN_TASK_MODAL,
|
149
|
+
},
|
150
|
+
},
|
151
|
+
'should handle SUBSCRIPTIONS_CLOSE_TASK_MODAL': {
|
152
|
+
action: {
|
153
|
+
type: SUBSCRIPTIONS_CLOSE_TASK_MODAL,
|
154
|
+
},
|
155
|
+
},
|
156
|
+
'should handle SUBSCRIPTIONS_DISABLE_DELETE_BUTTON': {
|
157
|
+
action: {
|
158
|
+
type: SUBSCRIPTIONS_DISABLE_DELETE_BUTTON,
|
159
|
+
},
|
160
|
+
},
|
161
|
+
'should handle SUBSCRIPTIONS_ENABLE_DELETE_BUTTON': {
|
162
|
+
action: {
|
163
|
+
type: SUBSCRIPTIONS_ENABLE_DELETE_BUTTON,
|
164
|
+
},
|
165
|
+
},
|
142
166
|
'should handle GET_SETTING_SUCCESS with content_disconnected response': {
|
143
167
|
action: {
|
144
168
|
type: GET_SETTING_SUCCESS,
|
@@ -4,7 +4,9 @@ import {
|
|
4
4
|
selectSearchQuery,
|
5
5
|
selectManifestModalOpened,
|
6
6
|
selectDeleteModalOpened,
|
7
|
+
selectDeleteButtonDisabled,
|
7
8
|
selectSubscriptionsTasks,
|
9
|
+
selectTaskModalOpened,
|
8
10
|
} from '../SubscriptionsSelectors';
|
9
11
|
|
10
12
|
const state = {
|
@@ -13,6 +15,8 @@ const state = {
|
|
13
15
|
searchQuery: 'some-query',
|
14
16
|
manifestModalOpened: false,
|
15
17
|
deleteModalOpened: false,
|
18
|
+
taskModalOpened: false,
|
19
|
+
deleteButtonDisabled: true,
|
16
20
|
tasks: ['task1', 'task2'],
|
17
21
|
},
|
18
22
|
},
|
@@ -23,6 +27,8 @@ const fixtures = {
|
|
23
27
|
'should select search-query': () => selectSearchQuery(state),
|
24
28
|
'should select manifest-modal-opened': () => selectManifestModalOpened(state),
|
25
29
|
'should select delete-modal-opened': () => selectDeleteModalOpened(state),
|
30
|
+
'should select task-modal-opened': () => selectTaskModalOpened(state),
|
31
|
+
'should select delete-button-disabled': () => selectDeleteButtonDisabled(state),
|
26
32
|
'should select subscriptions tasks': () => selectSubscriptionsTasks(state),
|
27
33
|
};
|
28
34
|
|
@@ -1,5 +1,17 @@
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
2
2
|
|
3
|
+
exports[`subscription actions deleteButtonDisabled it should disable the delete button 1`] = `
|
4
|
+
Object {
|
5
|
+
"type": "SUBSCRIPTIONS_DISABLE_DELETE_BUTTON",
|
6
|
+
}
|
7
|
+
`;
|
8
|
+
|
9
|
+
exports[`subscription actions deleteButtonDisabled it should enable the delete button 1`] = `
|
10
|
+
Object {
|
11
|
+
"type": "SUBSCRIPTIONS_ENABLE_DELETE_BUTTON",
|
12
|
+
}
|
13
|
+
`;
|
14
|
+
|
3
15
|
exports[`subscription actions deleteModal it should close delete modal 1`] = `
|
4
16
|
Object {
|
5
17
|
"type": "SUBSCRIPTIONS_CLOSE_DELETE_MODAL",
|
@@ -30,3 +42,15 @@ Object {
|
|
30
42
|
"type": "SUBSCRIPTIONS_UPDATE_SEARCH_QUERY",
|
31
43
|
}
|
32
44
|
`;
|
45
|
+
|
46
|
+
exports[`subscription actions taskModal it should close task modal 1`] = `
|
47
|
+
Object {
|
48
|
+
"type": "SUBSCRIPTIONS_CLOSE_TASK_MODAL",
|
49
|
+
}
|
50
|
+
`;
|
51
|
+
|
52
|
+
exports[`subscription actions taskModal it should open task modal 1`] = `
|
53
|
+
Object {
|
54
|
+
"type": "SUBSCRIPTIONS_OPEN_TASK_MODAL",
|
55
|
+
}
|
56
|
+
`;
|
@@ -3,6 +3,7 @@
|
|
3
3
|
exports[`Subscriptions reducer should handle DELETE_SUBSCRIPTIONS_FAILURE 1`] = `
|
4
4
|
Object {
|
5
5
|
"availableQuantities": null,
|
6
|
+
"deleteButtonDisabled": true,
|
6
7
|
"deleteModalOpened": false,
|
7
8
|
"itemCount": 0,
|
8
9
|
"loading": false,
|
@@ -16,6 +17,7 @@ Object {
|
|
16
17
|
"searchQuery": "",
|
17
18
|
"selectedTableColumns": Array [],
|
18
19
|
"tableColumns": Array [],
|
20
|
+
"taskModalOpened": false,
|
19
21
|
"tasks": Array [],
|
20
22
|
}
|
21
23
|
`;
|
@@ -23,6 +25,7 @@ Object {
|
|
23
25
|
exports[`Subscriptions reducer should handle DELETE_SUBSCRIPTIONS_REQUEST 1`] = `
|
24
26
|
Object {
|
25
27
|
"availableQuantities": null,
|
28
|
+
"deleteButtonDisabled": true,
|
26
29
|
"deleteModalOpened": false,
|
27
30
|
"itemCount": 0,
|
28
31
|
"loading": true,
|
@@ -36,6 +39,7 @@ Object {
|
|
36
39
|
"searchQuery": "",
|
37
40
|
"selectedTableColumns": Array [],
|
38
41
|
"tableColumns": Array [],
|
42
|
+
"taskModalOpened": false,
|
39
43
|
"tasks": Array [],
|
40
44
|
}
|
41
45
|
`;
|
@@ -43,6 +47,7 @@ Object {
|
|
43
47
|
exports[`Subscriptions reducer should handle DELETE_SUBSCRIPTIONS_SUCCESS 1`] = `
|
44
48
|
Object {
|
45
49
|
"availableQuantities": null,
|
50
|
+
"deleteButtonDisabled": true,
|
46
51
|
"deleteModalOpened": false,
|
47
52
|
"itemCount": 0,
|
48
53
|
"loading": false,
|
@@ -56,6 +61,7 @@ Object {
|
|
56
61
|
"searchQuery": "",
|
57
62
|
"selectedTableColumns": Array [],
|
58
63
|
"tableColumns": Array [],
|
64
|
+
"taskModalOpened": false,
|
59
65
|
"tasks": Array [],
|
60
66
|
}
|
61
67
|
`;
|
@@ -63,6 +69,7 @@ Object {
|
|
63
69
|
exports[`Subscriptions reducer should handle GET_SETTING_SUCCESS with content_disconnected response 1`] = `
|
64
70
|
Object {
|
65
71
|
"availableQuantities": null,
|
72
|
+
"deleteButtonDisabled": true,
|
66
73
|
"deleteModalOpened": false,
|
67
74
|
"disconnected": "some-value",
|
68
75
|
"itemCount": 0,
|
@@ -77,6 +84,7 @@ Object {
|
|
77
84
|
"searchQuery": "",
|
78
85
|
"selectedTableColumns": Array [],
|
79
86
|
"tableColumns": Array [],
|
87
|
+
"taskModalOpened": false,
|
80
88
|
"tasks": Array [],
|
81
89
|
}
|
82
90
|
`;
|
@@ -84,6 +92,7 @@ Object {
|
|
84
92
|
exports[`Subscriptions reducer should handle GET_SETTING_SUCCESS without content_disconnected response 1`] = `
|
85
93
|
Object {
|
86
94
|
"availableQuantities": null,
|
95
|
+
"deleteButtonDisabled": true,
|
87
96
|
"deleteModalOpened": false,
|
88
97
|
"itemCount": 0,
|
89
98
|
"loading": true,
|
@@ -97,6 +106,7 @@ Object {
|
|
97
106
|
"searchQuery": "",
|
98
107
|
"selectedTableColumns": Array [],
|
99
108
|
"tableColumns": Array [],
|
109
|
+
"taskModalOpened": false,
|
100
110
|
"tasks": Array [],
|
101
111
|
}
|
102
112
|
`;
|
@@ -104,6 +114,7 @@ Object {
|
|
104
114
|
exports[`Subscriptions reducer should handle GET_TASK_SUCCESS 1`] = `
|
105
115
|
Object {
|
106
116
|
"availableQuantities": null,
|
117
|
+
"deleteButtonDisabled": true,
|
107
118
|
"deleteModalOpened": false,
|
108
119
|
"itemCount": 0,
|
109
120
|
"loading": true,
|
@@ -117,6 +128,7 @@ Object {
|
|
117
128
|
"searchQuery": "",
|
118
129
|
"selectedTableColumns": Array [],
|
119
130
|
"tableColumns": Array [],
|
131
|
+
"taskModalOpened": false,
|
120
132
|
"tasks": Array [],
|
121
133
|
}
|
122
134
|
`;
|
@@ -124,6 +136,7 @@ Object {
|
|
124
136
|
exports[`Subscriptions reducer should handle RESET_TASKS 1`] = `
|
125
137
|
Object {
|
126
138
|
"availableQuantities": null,
|
139
|
+
"deleteButtonDisabled": true,
|
127
140
|
"deleteModalOpened": false,
|
128
141
|
"itemCount": 0,
|
129
142
|
"loading": true,
|
@@ -137,6 +150,7 @@ Object {
|
|
137
150
|
"searchQuery": "",
|
138
151
|
"selectedTableColumns": Array [],
|
139
152
|
"tableColumns": Array [],
|
153
|
+
"taskModalOpened": false,
|
140
154
|
"tasks": Array [],
|
141
155
|
}
|
142
156
|
`;
|
@@ -144,6 +158,7 @@ Object {
|
|
144
158
|
exports[`Subscriptions reducer should handle SUBSCRIPTIONS_CLOSE_DELETE_MODAL 1`] = `
|
145
159
|
Object {
|
146
160
|
"availableQuantities": null,
|
161
|
+
"deleteButtonDisabled": true,
|
147
162
|
"deleteModalOpened": false,
|
148
163
|
"itemCount": 0,
|
149
164
|
"loading": true,
|
@@ -157,6 +172,7 @@ Object {
|
|
157
172
|
"searchQuery": "",
|
158
173
|
"selectedTableColumns": Array [],
|
159
174
|
"tableColumns": Array [],
|
175
|
+
"taskModalOpened": false,
|
160
176
|
"tasks": Array [],
|
161
177
|
}
|
162
178
|
`;
|
@@ -164,6 +180,7 @@ Object {
|
|
164
180
|
exports[`Subscriptions reducer should handle SUBSCRIPTIONS_CLOSE_MANIFEST_MODAL 1`] = `
|
165
181
|
Object {
|
166
182
|
"availableQuantities": null,
|
183
|
+
"deleteButtonDisabled": true,
|
167
184
|
"deleteModalOpened": false,
|
168
185
|
"itemCount": 0,
|
169
186
|
"loading": true,
|
@@ -177,6 +194,29 @@ Object {
|
|
177
194
|
"searchQuery": "",
|
178
195
|
"selectedTableColumns": Array [],
|
179
196
|
"tableColumns": Array [],
|
197
|
+
"taskModalOpened": false,
|
198
|
+
"tasks": Array [],
|
199
|
+
}
|
200
|
+
`;
|
201
|
+
|
202
|
+
exports[`Subscriptions reducer should handle SUBSCRIPTIONS_CLOSE_TASK_MODAL 1`] = `
|
203
|
+
Object {
|
204
|
+
"availableQuantities": null,
|
205
|
+
"deleteButtonDisabled": true,
|
206
|
+
"deleteModalOpened": false,
|
207
|
+
"itemCount": 0,
|
208
|
+
"loading": true,
|
209
|
+
"manifestModalOpened": false,
|
210
|
+
"pagination": Object {
|
211
|
+
"page": 0,
|
212
|
+
"perPage": 20,
|
213
|
+
},
|
214
|
+
"quantitiesLoading": false,
|
215
|
+
"results": Array [],
|
216
|
+
"searchQuery": "",
|
217
|
+
"selectedTableColumns": Array [],
|
218
|
+
"tableColumns": Array [],
|
219
|
+
"taskModalOpened": false,
|
180
220
|
"tasks": Array [],
|
181
221
|
}
|
182
222
|
`;
|
@@ -184,6 +224,7 @@ Object {
|
|
184
224
|
exports[`Subscriptions reducer should handle SUBSCRIPTIONS_COLUMNS_REQUEST 1`] = `
|
185
225
|
Object {
|
186
226
|
"availableQuantities": null,
|
227
|
+
"deleteButtonDisabled": true,
|
187
228
|
"deleteModalOpened": false,
|
188
229
|
"itemCount": 0,
|
189
230
|
"loading": true,
|
@@ -201,6 +242,51 @@ Object {
|
|
201
242
|
"col2",
|
202
243
|
"col3",
|
203
244
|
],
|
245
|
+
"taskModalOpened": false,
|
246
|
+
"tasks": Array [],
|
247
|
+
}
|
248
|
+
`;
|
249
|
+
|
250
|
+
exports[`Subscriptions reducer should handle SUBSCRIPTIONS_DISABLE_DELETE_BUTTON 1`] = `
|
251
|
+
Object {
|
252
|
+
"availableQuantities": null,
|
253
|
+
"deleteButtonDisabled": true,
|
254
|
+
"deleteModalOpened": false,
|
255
|
+
"itemCount": 0,
|
256
|
+
"loading": true,
|
257
|
+
"manifestModalOpened": false,
|
258
|
+
"pagination": Object {
|
259
|
+
"page": 0,
|
260
|
+
"perPage": 20,
|
261
|
+
},
|
262
|
+
"quantitiesLoading": false,
|
263
|
+
"results": Array [],
|
264
|
+
"searchQuery": "",
|
265
|
+
"selectedTableColumns": Array [],
|
266
|
+
"tableColumns": Array [],
|
267
|
+
"taskModalOpened": false,
|
268
|
+
"tasks": Array [],
|
269
|
+
}
|
270
|
+
`;
|
271
|
+
|
272
|
+
exports[`Subscriptions reducer should handle SUBSCRIPTIONS_ENABLE_DELETE_BUTTON 1`] = `
|
273
|
+
Object {
|
274
|
+
"availableQuantities": null,
|
275
|
+
"deleteButtonDisabled": false,
|
276
|
+
"deleteModalOpened": false,
|
277
|
+
"itemCount": 0,
|
278
|
+
"loading": true,
|
279
|
+
"manifestModalOpened": false,
|
280
|
+
"pagination": Object {
|
281
|
+
"page": 0,
|
282
|
+
"perPage": 20,
|
283
|
+
},
|
284
|
+
"quantitiesLoading": false,
|
285
|
+
"results": Array [],
|
286
|
+
"searchQuery": "",
|
287
|
+
"selectedTableColumns": Array [],
|
288
|
+
"tableColumns": Array [],
|
289
|
+
"taskModalOpened": false,
|
204
290
|
"tasks": Array [],
|
205
291
|
}
|
206
292
|
`;
|
@@ -208,6 +294,7 @@ Object {
|
|
208
294
|
exports[`Subscriptions reducer should handle SUBSCRIPTIONS_FAILURE 1`] = `
|
209
295
|
Object {
|
210
296
|
"availableQuantities": null,
|
297
|
+
"deleteButtonDisabled": true,
|
211
298
|
"deleteModalOpened": false,
|
212
299
|
"itemCount": 0,
|
213
300
|
"loading": false,
|
@@ -221,6 +308,7 @@ Object {
|
|
221
308
|
"searchQuery": "",
|
222
309
|
"selectedTableColumns": Array [],
|
223
310
|
"tableColumns": Array [],
|
311
|
+
"taskModalOpened": false,
|
224
312
|
"tasks": Array [],
|
225
313
|
}
|
226
314
|
`;
|
@@ -228,6 +316,7 @@ Object {
|
|
228
316
|
exports[`Subscriptions reducer should handle SUBSCRIPTIONS_OPEN_DELETE_MODAL 1`] = `
|
229
317
|
Object {
|
230
318
|
"availableQuantities": null,
|
319
|
+
"deleteButtonDisabled": true,
|
231
320
|
"deleteModalOpened": true,
|
232
321
|
"itemCount": 0,
|
233
322
|
"loading": true,
|
@@ -241,6 +330,7 @@ Object {
|
|
241
330
|
"searchQuery": "",
|
242
331
|
"selectedTableColumns": Array [],
|
243
332
|
"tableColumns": Array [],
|
333
|
+
"taskModalOpened": false,
|
244
334
|
"tasks": Array [],
|
245
335
|
}
|
246
336
|
`;
|
@@ -248,6 +338,7 @@ Object {
|
|
248
338
|
exports[`Subscriptions reducer should handle SUBSCRIPTIONS_OPEN_MANIFEST_MODAL 1`] = `
|
249
339
|
Object {
|
250
340
|
"availableQuantities": null,
|
341
|
+
"deleteButtonDisabled": true,
|
251
342
|
"deleteModalOpened": false,
|
252
343
|
"itemCount": 0,
|
253
344
|
"loading": true,
|
@@ -261,6 +352,29 @@ Object {
|
|
261
352
|
"searchQuery": "",
|
262
353
|
"selectedTableColumns": Array [],
|
263
354
|
"tableColumns": Array [],
|
355
|
+
"taskModalOpened": false,
|
356
|
+
"tasks": Array [],
|
357
|
+
}
|
358
|
+
`;
|
359
|
+
|
360
|
+
exports[`Subscriptions reducer should handle SUBSCRIPTIONS_OPEN_TASK_MODAL 1`] = `
|
361
|
+
Object {
|
362
|
+
"availableQuantities": null,
|
363
|
+
"deleteButtonDisabled": true,
|
364
|
+
"deleteModalOpened": false,
|
365
|
+
"itemCount": 0,
|
366
|
+
"loading": true,
|
367
|
+
"manifestModalOpened": false,
|
368
|
+
"pagination": Object {
|
369
|
+
"page": 0,
|
370
|
+
"perPage": 20,
|
371
|
+
},
|
372
|
+
"quantitiesLoading": false,
|
373
|
+
"results": Array [],
|
374
|
+
"searchQuery": "",
|
375
|
+
"selectedTableColumns": Array [],
|
376
|
+
"tableColumns": Array [],
|
377
|
+
"taskModalOpened": true,
|
264
378
|
"tasks": Array [],
|
265
379
|
}
|
266
380
|
`;
|
@@ -268,6 +382,7 @@ Object {
|
|
268
382
|
exports[`Subscriptions reducer should handle SUBSCRIPTIONS_QUANTITIES_FAILURE 1`] = `
|
269
383
|
Object {
|
270
384
|
"availableQuantities": Object {},
|
385
|
+
"deleteButtonDisabled": true,
|
271
386
|
"deleteModalOpened": false,
|
272
387
|
"itemCount": 0,
|
273
388
|
"loading": true,
|
@@ -281,6 +396,7 @@ Object {
|
|
281
396
|
"searchQuery": "",
|
282
397
|
"selectedTableColumns": Array [],
|
283
398
|
"tableColumns": Array [],
|
399
|
+
"taskModalOpened": false,
|
284
400
|
"tasks": Array [],
|
285
401
|
}
|
286
402
|
`;
|
@@ -288,6 +404,7 @@ Object {
|
|
288
404
|
exports[`Subscriptions reducer should handle SUBSCRIPTIONS_QUANTITIES_REQUEST 1`] = `
|
289
405
|
Object {
|
290
406
|
"availableQuantities": null,
|
407
|
+
"deleteButtonDisabled": true,
|
291
408
|
"deleteModalOpened": false,
|
292
409
|
"itemCount": 0,
|
293
410
|
"loading": true,
|
@@ -301,6 +418,7 @@ Object {
|
|
301
418
|
"searchQuery": "",
|
302
419
|
"selectedTableColumns": Array [],
|
303
420
|
"tableColumns": Array [],
|
421
|
+
"taskModalOpened": false,
|
304
422
|
"tasks": Array [],
|
305
423
|
}
|
306
424
|
`;
|
@@ -308,6 +426,7 @@ Object {
|
|
308
426
|
exports[`Subscriptions reducer should handle SUBSCRIPTIONS_QUANTITIES_SUCCESS 1`] = `
|
309
427
|
Object {
|
310
428
|
"availableQuantities": "some-quantities-data",
|
429
|
+
"deleteButtonDisabled": true,
|
311
430
|
"deleteModalOpened": false,
|
312
431
|
"itemCount": 0,
|
313
432
|
"loading": true,
|
@@ -321,6 +440,7 @@ Object {
|
|
321
440
|
"searchQuery": "",
|
322
441
|
"selectedTableColumns": Array [],
|
323
442
|
"tableColumns": Array [],
|
443
|
+
"taskModalOpened": false,
|
324
444
|
"tasks": Array [],
|
325
445
|
}
|
326
446
|
`;
|
@@ -328,6 +448,7 @@ Object {
|
|
328
448
|
exports[`Subscriptions reducer should handle SUBSCRIPTIONS_REQUEST 1`] = `
|
329
449
|
Object {
|
330
450
|
"availableQuantities": null,
|
451
|
+
"deleteButtonDisabled": true,
|
331
452
|
"deleteModalOpened": false,
|
332
453
|
"itemCount": 0,
|
333
454
|
"loading": true,
|
@@ -341,6 +462,7 @@ Object {
|
|
341
462
|
"searchQuery": "",
|
342
463
|
"selectedTableColumns": Array [],
|
343
464
|
"tableColumns": Array [],
|
465
|
+
"taskModalOpened": false,
|
344
466
|
"tasks": Array [],
|
345
467
|
}
|
346
468
|
`;
|
@@ -348,6 +470,7 @@ Object {
|
|
348
470
|
exports[`Subscriptions reducer should handle SUBSCRIPTIONS_SUCCESS 1`] = `
|
349
471
|
Object {
|
350
472
|
"availableQuantities": null,
|
473
|
+
"deleteButtonDisabled": true,
|
351
474
|
"deleteModalOpened": false,
|
352
475
|
"itemCount": 20,
|
353
476
|
"loading": false,
|
@@ -363,6 +486,7 @@ Object {
|
|
363
486
|
"searchQuery": "",
|
364
487
|
"selectedTableColumns": Array [],
|
365
488
|
"tableColumns": Array [],
|
489
|
+
"taskModalOpened": false,
|
366
490
|
"tasks": Array [],
|
367
491
|
}
|
368
492
|
`;
|
@@ -370,6 +494,7 @@ Object {
|
|
370
494
|
exports[`Subscriptions reducer should handle SUBSCRIPTIONS_UPDATE_SEARCH_QUERY 1`] = `
|
371
495
|
Object {
|
372
496
|
"availableQuantities": null,
|
497
|
+
"deleteButtonDisabled": true,
|
373
498
|
"deleteModalOpened": false,
|
374
499
|
"itemCount": 0,
|
375
500
|
"loading": true,
|
@@ -383,6 +508,7 @@ Object {
|
|
383
508
|
"searchQuery": "some-query",
|
384
509
|
"selectedTableColumns": Array [],
|
385
510
|
"tableColumns": Array [],
|
511
|
+
"taskModalOpened": false,
|
386
512
|
"tasks": Array [],
|
387
513
|
}
|
388
514
|
`;
|
@@ -390,6 +516,7 @@ Object {
|
|
390
516
|
exports[`Subscriptions reducer should handle TASK_BULK_SEARCH_SUCCESS 1`] = `
|
391
517
|
Object {
|
392
518
|
"availableQuantities": null,
|
519
|
+
"deleteButtonDisabled": true,
|
393
520
|
"deleteModalOpened": false,
|
394
521
|
"itemCount": 0,
|
395
522
|
"loading": true,
|
@@ -403,6 +530,7 @@ Object {
|
|
403
530
|
"searchQuery": "",
|
404
531
|
"selectedTableColumns": Array [],
|
405
532
|
"tableColumns": Array [],
|
533
|
+
"taskModalOpened": false,
|
406
534
|
"tasks": Array [],
|
407
535
|
}
|
408
536
|
`;
|
@@ -410,6 +538,7 @@ Object {
|
|
410
538
|
exports[`Subscriptions reducer should handle UPDATE_QUANTITY_FAILURE 1`] = `
|
411
539
|
Object {
|
412
540
|
"availableQuantities": null,
|
541
|
+
"deleteButtonDisabled": true,
|
413
542
|
"deleteModalOpened": false,
|
414
543
|
"itemCount": 0,
|
415
544
|
"loading": false,
|
@@ -423,6 +552,7 @@ Object {
|
|
423
552
|
"searchQuery": "",
|
424
553
|
"selectedTableColumns": Array [],
|
425
554
|
"tableColumns": Array [],
|
555
|
+
"taskModalOpened": false,
|
426
556
|
"tasks": Array [],
|
427
557
|
}
|
428
558
|
`;
|
@@ -430,6 +560,7 @@ Object {
|
|
430
560
|
exports[`Subscriptions reducer should handle UPDATE_QUANTITY_REQUEST 1`] = `
|
431
561
|
Object {
|
432
562
|
"availableQuantities": null,
|
563
|
+
"deleteButtonDisabled": true,
|
433
564
|
"deleteModalOpened": false,
|
434
565
|
"itemCount": 0,
|
435
566
|
"loading": true,
|
@@ -443,6 +574,7 @@ Object {
|
|
443
574
|
"searchQuery": "",
|
444
575
|
"selectedTableColumns": Array [],
|
445
576
|
"tableColumns": Array [],
|
577
|
+
"taskModalOpened": false,
|
446
578
|
"tasks": Array [],
|
447
579
|
}
|
448
580
|
`;
|
@@ -450,6 +582,7 @@ Object {
|
|
450
582
|
exports[`Subscriptions reducer should handle UPDATE_QUANTITY_SUCCESS 1`] = `
|
451
583
|
Object {
|
452
584
|
"availableQuantities": null,
|
585
|
+
"deleteButtonDisabled": true,
|
453
586
|
"deleteModalOpened": false,
|
454
587
|
"itemCount": 0,
|
455
588
|
"loading": false,
|
@@ -463,6 +596,7 @@ Object {
|
|
463
596
|
"searchQuery": "",
|
464
597
|
"selectedTableColumns": Array [],
|
465
598
|
"tableColumns": Array [],
|
599
|
+
"taskModalOpened": false,
|
466
600
|
"tasks": Array [],
|
467
601
|
}
|
468
602
|
`;
|
@@ -470,6 +604,7 @@ Object {
|
|
470
604
|
exports[`Subscriptions reducer should handle UPDATE_SUBSCRIPTION_COLUMNS 1`] = `
|
471
605
|
Object {
|
472
606
|
"availableQuantities": null,
|
607
|
+
"deleteButtonDisabled": true,
|
473
608
|
"deleteModalOpened": false,
|
474
609
|
"itemCount": 0,
|
475
610
|
"loading": true,
|
@@ -486,6 +621,7 @@ Object {
|
|
486
621
|
"col2",
|
487
622
|
],
|
488
623
|
"tableColumns": Array [],
|
624
|
+
"taskModalOpened": false,
|
489
625
|
"tasks": Array [],
|
490
626
|
}
|
491
627
|
`;
|
@@ -493,6 +629,7 @@ Object {
|
|
493
629
|
exports[`Subscriptions reducer should return the initial state 1`] = `
|
494
630
|
Object {
|
495
631
|
"availableQuantities": null,
|
632
|
+
"deleteButtonDisabled": true,
|
496
633
|
"deleteModalOpened": false,
|
497
634
|
"itemCount": 0,
|
498
635
|
"loading": true,
|
@@ -506,6 +643,7 @@ Object {
|
|
506
643
|
"searchQuery": "",
|
507
644
|
"selectedTableColumns": Array [],
|
508
645
|
"tableColumns": Array [],
|
646
|
+
"taskModalOpened": false,
|
509
647
|
"tasks": Array [],
|
510
648
|
}
|
511
649
|
`;
|