katello 3.7.1.1 → 3.8.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.

Files changed (187) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +8 -7
  3. data/app/assets/javascripts/katello/common/index.js +0 -1
  4. data/app/assets/javascripts/katello/sync_management/index.js +0 -1
  5. data/app/controllers/katello/api/registry/registry_proxies_controller.rb +477 -0
  6. data/app/controllers/katello/api/rhsm/candlepin_proxies_controller.rb +1 -1
  7. data/app/controllers/katello/api/v2/activation_keys_controller.rb +2 -2
  8. data/app/controllers/katello/api/v2/api_controller.rb +3 -1
  9. data/app/controllers/katello/api/v2/content_credentials_controller.rb +1 -1
  10. data/app/controllers/katello/api/v2/content_view_filter_rules_controller.rb +1 -1
  11. data/app/controllers/katello/api/v2/content_view_versions_controller.rb +15 -1
  12. data/app/controllers/katello/api/v2/environments_controller.rb +5 -2
  13. data/app/controllers/katello/api/v2/errata_controller.rb +48 -34
  14. data/app/controllers/katello/api/v2/gpg_keys_controller.rb +1 -1
  15. data/app/controllers/katello/api/v2/host_collections_controller.rb +1 -1
  16. data/app/controllers/katello/api/v2/host_packages_controller.rb +5 -1
  17. data/app/controllers/katello/api/v2/organizations_controller.rb +1 -1
  18. data/app/controllers/katello/api/v2/packages_controller.rb +33 -22
  19. data/app/controllers/katello/api/v2/products_controller.rb +1 -1
  20. data/app/controllers/katello/api/v2/repositories_controller.rb +6 -5
  21. data/app/controllers/katello/api/v2/repository_sets_controller.rb +1 -10
  22. data/app/controllers/katello/api/v2/sync_plans_controller.rb +1 -1
  23. data/app/controllers/katello/concerns/api/v2/repository_content_controller.rb +20 -12
  24. data/app/controllers/katello/remote_execution_controller.rb +6 -6
  25. data/app/helpers/katello/hosts_and_hostgroups_helper.rb +9 -37
  26. data/app/lib/actions/katello/content_view/promote.rb +6 -2
  27. data/app/lib/actions/katello/content_view_version/after_promote_hook.rb +11 -0
  28. data/app/lib/actions/katello/content_view_version/before_promote_hook.rb +11 -0
  29. data/app/lib/actions/katello/host/remove_subscriptions.rb +1 -1
  30. data/app/lib/actions/pulp/consumer/abstract_content_action.rb +0 -12
  31. data/app/lib/actions/pulp/consumer/content_install.rb +1 -1
  32. data/app/lib/actions/pulp/consumer/content_uninstall.rb +1 -1
  33. data/app/lib/actions/pulp/consumer/content_update.rb +1 -1
  34. data/app/lib/katello/resources/registry.rb +40 -0
  35. data/app/lib/katello/util/package.rb +9 -4
  36. data/app/models/katello/concerns/subscription_facet_host_extensions.rb +1 -1
  37. data/app/models/katello/content_view.rb +4 -12
  38. data/app/models/katello/content_view_version.rb +26 -0
  39. data/app/models/katello/glue/candlepin/owner.rb +8 -0
  40. data/app/models/katello/glue/candlepin/pool.rb +11 -11
  41. data/app/models/katello/glue/candlepin/repository.rb +1 -1
  42. data/app/models/katello/glue/pulp/repos.rb +1 -0
  43. data/app/models/katello/host/content_facet.rb +1 -2
  44. data/app/models/katello/kt_environment.rb +6 -0
  45. data/app/models/katello/product_content.rb +1 -4
  46. data/app/models/katello/repository.rb +2 -0
  47. data/app/models/katello/rpm.rb +118 -14
  48. data/app/services/katello/puppet_class_importer_extensions.rb +17 -20
  49. data/app/services/katello/ui_notifications/pulp/proxy_disk_space.rb +1 -3
  50. data/app/views/katello/api/v2/common/copy.json.rabl +3 -0
  51. data/app/views/katello/api/v2/environments/show.json.rabl +1 -1
  52. data/app/views/katello/api/v2/repositories/base.json.rabl +1 -0
  53. data/app/views/katello/api/v2/repositories/show.json.rabl +4 -2
  54. data/app/views/overrides/activation_keys/_host_environment_select.html.erb +3 -2
  55. data/config/katello.yaml +89 -0
  56. data/config/routes.rb +0 -1
  57. data/config/routes/api/registry.rb +29 -0
  58. data/config/routes/api/v2.rb +1 -1
  59. data/db/migrate/20180612163403_add_foreign_key_to_hypervisor_id.rb +0 -3
  60. data/db/migrate/20180614184822_add_unauthenticated_pull.rb +9 -0
  61. data/db/migrate/20180618195941_add_description_to_repository.rb +5 -0
  62. data/db/seeds.d/75-job_templates.rb +2 -5
  63. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-repository-sets-modal.controller.js +3 -4
  64. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-subscriptions-modal.controller.js +1 -4
  65. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-subscriptions-modal.html +1 -1
  66. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-host-register.controller.js +1 -1
  67. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-packages-installed.controller.js +1 -1
  68. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-add-subscriptions.controller.js +1 -1
  69. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/content-views.routes.js +1 -0
  70. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/content-view-version.controller.js +32 -18
  71. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/views/content-view-version-details.html +1 -1
  72. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/views/content-view-version-docker.html +2 -0
  73. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/details/views/environment-details.html +32 -23
  74. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-info.html +6 -0
  75. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/new/views/new-repository.html +8 -0
  76. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/discovery/discovery.controller.js +1 -1
  77. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/discovery/views/discovery-create.html +1 -1
  78. data/engines/bastion_katello/app/assets/stylesheets/bastion_katello/bastion_katello.scss +0 -5
  79. data/lib/katello/engine.rb +1 -0
  80. data/lib/katello/permission_creator.rb +2 -0
  81. data/lib/katello/permissions/registry_permissions.rb +20 -0
  82. data/lib/katello/plugin.rb +1 -0
  83. data/lib/katello/tasks/clean_backend_objects.rake +3 -12
  84. data/lib/katello/version.rb +1 -1
  85. data/package.json +7 -10
  86. data/webpack/components/Search/Search.test.js +1 -3
  87. data/webpack/containers/Application/config.js +2 -9
  88. data/webpack/containers/Application/index.js +2 -4
  89. data/webpack/mockRequest.js +3 -3
  90. data/webpack/move_to_foreman/common/helpers.js +8 -45
  91. data/webpack/move_to_foreman/components/common/{EmptyState → emptyState}/index.js +3 -16
  92. data/webpack/move_to_foreman/components/common/table/components/Table.js +1 -1
  93. data/webpack/move_to_foreman/components/common/table/components/__snapshots__/CollapseSubscriptionGroupButton.test.js.snap +2 -2
  94. data/webpack/move_to_foreman/components/common/table/components/__snapshots__/TableSelectionCell.test.js.snap +1 -1
  95. data/webpack/move_to_foreman/components/common/table/components/__snapshots__/TableSelectionHeaderCell.test.js.snap +1 -1
  96. data/webpack/move_to_pf/LoadingState/LoadingState.js +14 -27
  97. data/webpack/move_to_pf/LoadingState/LoadingState.test.js +4 -8
  98. data/webpack/move_to_pf/react-bootstrap-select/index.js +1 -12
  99. data/webpack/redux/actions/RedHatRepositories/enabled.js +1 -0
  100. data/webpack/redux/actions/RedHatRepositories/helpers.js +5 -5
  101. data/webpack/redux/actions/RedHatRepositories/sets.js +1 -1
  102. data/webpack/redux/consts.js +0 -6
  103. data/webpack/redux/reducers/index.js +0 -2
  104. data/webpack/scenes/RedHatRepositories/components/EnabledRepository.js +23 -14
  105. data/webpack/scenes/RedHatRepositories/components/RepositorySetRepository.js +1 -1
  106. data/webpack/scenes/RedHatRepositories/components/SearchBar.js +0 -1
  107. data/webpack/scenes/RedHatRepositories/components/__tests__/__snapshots__/RecommendedRepositorySetsToggler.test.js.snap +1 -3
  108. data/webpack/scenes/RedHatRepositories/index.js +3 -7
  109. data/webpack/scenes/RedHatRepositories/index.scss +0 -1
  110. data/webpack/scenes/Subscriptions/Details/SubscriptionDetailActions.js +8 -3
  111. data/webpack/scenes/Subscriptions/Details/SubscriptionDetailReducer.js +1 -30
  112. data/webpack/scenes/Subscriptions/Details/SubscriptionDetails.js +28 -111
  113. data/webpack/scenes/Subscriptions/Details/__tests__/SubscriptionDetailReducer.test.js +1 -3
  114. data/webpack/scenes/Subscriptions/Details/__tests__/SubscriptionDetails.test.js +1 -6
  115. data/webpack/scenes/Subscriptions/Details/__tests__/__snapshots__/SubscriptionDetails.test.js.snap +424 -519
  116. data/webpack/scenes/Subscriptions/Details/__tests__/subscriptionDetails.fixtures.js +4 -7
  117. data/webpack/scenes/Subscriptions/Details/index.js +3 -5
  118. data/webpack/scenes/Subscriptions/Manifest/ManageManifestModal.js +34 -78
  119. data/webpack/scenes/Subscriptions/Manifest/ManifestActions.js +24 -5
  120. data/webpack/scenes/Subscriptions/Manifest/ManifestHistoryReducer.js +1 -9
  121. data/webpack/scenes/Subscriptions/Manifest/__tests__/ManageManifestModal.test.js +0 -3
  122. data/webpack/scenes/Subscriptions/Manifest/__tests__/ManifestActions.test.js +8 -20
  123. data/webpack/scenes/Subscriptions/Manifest/__tests__/ManifestHistoryReducer.test.js +1 -3
  124. data/webpack/scenes/Subscriptions/Manifest/__tests__/__snapshots__/ManageManifestModal.test.js.snap +7 -34
  125. data/webpack/scenes/Subscriptions/Manifest/__tests__/manifest.fixtures.js +16 -9
  126. data/webpack/scenes/Subscriptions/Manifest/index.js +0 -1
  127. data/webpack/scenes/Subscriptions/SubscriptionActions.js +26 -5
  128. data/webpack/scenes/Subscriptions/SubscriptionConstants.js +0 -1
  129. data/webpack/scenes/Subscriptions/SubscriptionHelpers.js +0 -3
  130. data/webpack/scenes/Subscriptions/SubscriptionReducer.js +4 -11
  131. data/webpack/scenes/Subscriptions/SubscriptionsPage.js +36 -31
  132. data/webpack/scenes/Subscriptions/UpstreamSubscriptions/UpstreamSubscriptionsActions.js +12 -3
  133. data/webpack/scenes/Subscriptions/UpstreamSubscriptions/UpstreamSubscriptionsPage.js +27 -57
  134. data/webpack/scenes/Subscriptions/UpstreamSubscriptions/UpstreamSubscriptionsReducer.js +3 -2
  135. data/webpack/scenes/Subscriptions/UpstreamSubscriptions/UpstreamSubscriptionsTableSchema.js +5 -10
  136. data/webpack/scenes/Subscriptions/UpstreamSubscriptions/__tests__/UpstreamSubscriptionsActions.test.js +5 -10
  137. data/webpack/scenes/Subscriptions/UpstreamSubscriptions/__tests__/UpstreamSubscriptionsPage.test.js +4 -49
  138. data/webpack/scenes/Subscriptions/UpstreamSubscriptions/__tests__/UpstreamSubscriptionsReducer.test.js +3 -8
  139. data/webpack/scenes/Subscriptions/UpstreamSubscriptions/__tests__/__snapshots__/UpstreamSubscriptionsPage.test.js.snap +11 -21
  140. data/webpack/scenes/Subscriptions/UpstreamSubscriptions/__tests__/upstreamSubscriptions.fixtures.js +8 -5
  141. data/webpack/scenes/Subscriptions/__tests__/SubscriptionsPage.test.js +0 -2
  142. data/webpack/scenes/Subscriptions/__tests__/SubscriptionsReducer.test.js +3 -9
  143. data/webpack/scenes/Subscriptions/__tests__/__snapshots__/SubscriptionsPage.test.js.snap +2 -14
  144. data/webpack/scenes/Subscriptions/__tests__/subscriptions.fixtures.js +17 -11
  145. data/webpack/scenes/Subscriptions/components/SubscriptionsTable/EntitlementsInlineEditFormatter.js +5 -8
  146. data/webpack/scenes/Subscriptions/components/SubscriptionsTable/SubscriptionsTable.js +58 -45
  147. data/webpack/scenes/Subscriptions/components/SubscriptionsTable/SubscriptionsTableHelpers.js +4 -11
  148. data/webpack/scenes/Subscriptions/components/SubscriptionsTable/SubscriptionsTableSchema.js +2 -2
  149. data/webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/SubscriptionsTable.test.js +3 -16
  150. data/webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/__snapshots__/SubscriptionsTable.test.js.snap +365 -392
  151. data/webpack/scenes/Subscriptions/index.js +0 -1
  152. data/webpack/services/api/fixtures.js +353 -0
  153. data/webpack/services/api/index.js +1 -17
  154. data/webpack/test_setup.js +0 -2
  155. metadata +16 -37
  156. data/config/katello.yml +0 -59
  157. data/webpack/__mocks__/foremanReact/components/BreadcrumbBar.js +0 -3
  158. data/webpack/__mocks__/foremanReact/redux.js +0 -3
  159. data/webpack/__mocks__/foremanReact/redux/actions/toasts.js +0 -8
  160. data/webpack/components/SelectOrg/SelectOrg.scss +0 -3
  161. data/webpack/components/SelectOrg/SelectOrgAction.js +0 -41
  162. data/webpack/components/SelectOrg/SelectOrgReducer.js +0 -33
  163. data/webpack/components/SelectOrg/SetOrganization.js +0 -116
  164. data/webpack/components/WithOrganization/withOrganization.js +0 -28
  165. data/webpack/global_test_setup.js +0 -6
  166. data/webpack/helpers/caret.js +0 -6
  167. data/webpack/move_to_pf/Select/Select.js +0 -40
  168. data/webpack/scenes/Products/ProductActions.js +0 -24
  169. data/webpack/scenes/Products/ProductConstants.js +0 -3
  170. data/webpack/scenes/Products/__tests__/ProductActions.test.js +0 -40
  171. data/webpack/scenes/Products/__tests__/products.fixtures.js +0 -90
  172. data/webpack/scenes/RedHatRepositories/components/EnabledRepositoryContent.js +0 -34
  173. data/webpack/scenes/RedHatRepositories/components/__tests__/EnabledRepository.test.js +0 -36
  174. data/webpack/scenes/RedHatRepositories/components/__tests__/EnabledRepositoryContent.test.js +0 -27
  175. data/webpack/scenes/RedHatRepositories/components/__tests__/__snapshots__/EnabledRepository.test.js.snap +0 -25
  176. data/webpack/scenes/RedHatRepositories/components/__tests__/__snapshots__/EnabledRepositoryContent.test.js.snap +0 -47
  177. data/webpack/scenes/Subscriptions/Details/SubscriptionDetailEnabledProducts.js +0 -54
  178. data/webpack/scenes/Subscriptions/Details/SubscriptionDetailProduct.js +0 -29
  179. data/webpack/scenes/Subscriptions/Details/SubscriptionDetails.scss +0 -9
  180. data/webpack/scenes/Subscriptions/Details/__tests__/SubscriptionDetailEnabledProducts.test.js +0 -18
  181. data/webpack/scenes/Subscriptions/Details/__tests__/SubscriptionDetailProduct.test.js +0 -13
  182. data/webpack/scenes/Subscriptions/Details/__tests__/__snapshots__/SubscriptionDetailEnabledProducts.test.js.snap +0 -45
  183. data/webpack/scenes/Subscriptions/Details/__tests__/__snapshots__/SubscriptionDetailProduct.test.js.snap +0 -67
  184. data/webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/EntitlementsInlineEditFormatter.test.js +0 -110
  185. data/webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/__snapshots__/EntitlementsInlineEditFormatter.test.js.snap +0 -228
  186. data/webpack/scenes/Tasks/helpers.js +0 -52
  187. data/webpack/services/api/testHelpers.js +0 -28
@@ -97,9 +97,9 @@ export const createSubscriptionsTableSchema = (
97
97
  },
98
98
  cell: {
99
99
  formatters: [
100
- (value, { rowData }) => (
100
+ cell => (
101
101
  <td>
102
- <Icon type="fa" name={rowData.virt_who ? 'check' : 'minus'} />
102
+ <Icon type="fa" name={cell.virt_who ? 'check' : 'minus'} />
103
103
  </td>
104
104
  ),
105
105
  ],
@@ -1,13 +1,11 @@
1
1
  import React from 'react';
2
- import { render, mount } from 'enzyme';
2
+ import { render } from 'enzyme';
3
3
  import toJson from 'enzyme-to-json';
4
4
  import { MemoryRouter } from 'react-router-dom';
5
5
  import SubscriptionsTable from '../SubscriptionsTable';
6
6
  import { successState, loadingState, emptyState } from '../../../__tests__/subscriptions.fixtures';
7
7
  import { loadSubscriptions, updateQuantity } from '../../../SubscriptionActions';
8
8
 
9
- jest.mock('../../../../../move_to_foreman/foreman_toast_notifications');
10
- jest.useFakeTimers();
11
9
  describe('subscriptions table', () => {
12
10
  it('should render a table', async () => {
13
11
  // Wrapping SubscriptionTable in MemoryRouter here since it contains
@@ -22,23 +20,16 @@ describe('subscriptions table', () => {
22
20
  onSubscriptionDeleteModalClose={() => { }}
23
21
  onDeleteSubscriptions={() => {}}
24
22
  toggleDeleteButton={() => {}}
25
- emptyState={{}}
26
23
  />
27
24
  </MemoryRouter>);
28
25
  expect(toJson(page)).toMatchSnapshot();
29
26
  });
27
+ /* eslint-enable react/jsx-indent */
30
28
 
31
29
  it('should render an empty state', async () => {
32
- const emptyStateData = {
33
- header: __('Yay empty state'),
34
- description: __('There is nothing to see here'),
35
- };
36
-
37
- /* eslint-disable react/jsx-indent */
38
30
  const page = render(<MemoryRouter>
39
31
  <SubscriptionsTable
40
32
  subscriptions={emptyState}
41
- emptyState={emptyStateData}
42
33
  loadSubscriptions={loadSubscriptions}
43
34
  updateQuantity={updateQuantity}
44
35
  subscriptionDeleteModalOpen={false}
@@ -49,10 +40,9 @@ describe('subscriptions table', () => {
49
40
  </MemoryRouter>);
50
41
  expect(toJson(page)).toMatchSnapshot();
51
42
  });
52
- /* eslint-enable react/jsx-indent */
53
43
 
54
44
  it('should render a loading state', async () => {
55
- const page = mount(<SubscriptionsTable
45
+ const page = render(<SubscriptionsTable
56
46
  subscriptions={loadingState}
57
47
  loadSubscriptions={loadSubscriptions}
58
48
  updateQuantity={updateQuantity}
@@ -60,10 +50,7 @@ describe('subscriptions table', () => {
60
50
  onSubscriptionDeleteModalClose={() => { }}
61
51
  onDeleteSubscriptions={() => {}}
62
52
  toggleDeleteButton={() => {}}
63
- emptyState={{}}
64
53
  />);
65
- jest.runAllTimers();
66
- page.update();
67
54
  expect(toJson(page)).toMatchSnapshot();
68
55
  });
69
56
  });
@@ -1,457 +1,430 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
3
  exports[`subscriptions table should render a loading state 1`] = `
4
- <SubscriptionsTable
5
- emptyState={Object {}}
6
- loadSubscriptions={[Function]}
7
- onDeleteSubscriptions={[Function]}
8
- onSubscriptionDeleteModalClose={[Function]}
9
- subscriptionDeleteModalOpen={false}
10
- subscriptions={
11
- Object {
12
- "availableQuantities": null,
13
- "itemCount": 0,
14
- "loading": true,
15
- "pagination": Object {
16
- "page": 0,
17
- "perPage": 20,
18
- },
19
- "quantitiesLoading": false,
20
- "results": Array [],
21
- "tasks": Array [],
22
- }
23
- }
24
- task={
25
- Object {
26
- "humanized": Object {},
27
- }
28
- }
29
- toggleDeleteButton={[Function]}
30
- updateQuantity={[Function]}
4
+ <div
5
+ class="loading-state"
31
6
  >
32
- <LoadingState
33
- loading={true}
34
- loadingText="Loading"
35
- timeout={300}
36
- >
37
- <div
38
- className="loading-state"
39
- >
40
- <Spinner
41
- className=""
42
- inline={false}
43
- inverse={false}
44
- loading={true}
45
- size="lg"
46
- >
47
- <div
48
- className="spinner spinner-lg"
49
- />
50
- </Spinner>
51
- <p>
52
- Loading
53
- </p>
54
- </div>
55
- </LoadingState>
56
- </SubscriptionsTable>
7
+ <div
8
+ class="spinner spinner-lg"
9
+ />
10
+ <p>
11
+ Loading
12
+ </p>
13
+ </div>
57
14
  `;
58
15
 
59
16
  exports[`subscriptions table should render a table 1`] = `
60
- <div>
61
- <table
62
- class="table table-striped table-bordered table-hover pf-table-inline-edit table-fixed"
63
- >
64
- <thead>
65
- <tr
66
- class=""
67
- >
68
- <th
69
- aria-label="Select all rows"
70
- class="table-view-pf-select"
71
- >
72
- <label
73
- class="control-label sr-only"
74
- for="selectAll"
75
- >
76
- Select all rows
77
- </label>
78
- <input
79
- id="selectAll"
80
- type="checkbox"
81
- />
82
- </th>
83
- <th
84
- class=""
85
- >
86
- Name
87
- </th>
88
- <th
89
- class=""
90
- >
91
- SKU
92
- </th>
93
- <th
94
- class=""
95
- >
96
- Contract
97
- </th>
98
- <th
99
- class=""
100
- >
101
- Start Date
102
- </th>
103
- <th
104
- class=""
105
- >
106
- End Date
107
- </th>
108
- <th
109
- class=""
110
- >
111
- Requires Virt-Who
112
- </th>
113
- <th
114
- class=""
115
- >
116
- Consumed
117
- </th>
118
- <th
17
+ Array [
18
+ <div />,
19
+ <div>
20
+ <table
21
+ class="table table-striped table-bordered table-hover pf-table-inline-edit table-fixed"
22
+ >
23
+ <thead>
24
+ <tr
119
25
  class=""
120
26
  >
121
- Entitlements
122
- </th>
123
- </tr>
124
- </thead>
125
- <tbody>
126
- <tr
127
- class=""
128
- >
129
- <td
130
- class="table-view-pf-select"
131
- >
132
- <label
133
- class="control-label sr-only"
134
- for="select0"
27
+ <th
28
+ aria-label="Select all rows"
29
+ class="table-view-pf-select"
135
30
  >
136
- Select row
137
- </label>
138
- <input
139
- id="select0"
140
- type="checkbox"
141
- />
142
- </td>
143
- <td>
144
- <a
145
- href="/subscriptions/3/"
31
+ <label
32
+ class="control-label sr-only"
33
+ for="selectAll"
34
+ >
35
+ Select all rows
36
+ </label>
37
+ <input
38
+ id="selectAll"
39
+ type="checkbox"
40
+ />
41
+ </th>
42
+ <th
43
+ class=""
146
44
  >
147
- zoo
148
- </a>
149
- </td>
150
- <td
151
- class=""
152
- >
153
- 853987721546
154
- </td>
155
- <td
156
- class=""
157
- />
158
- <td
159
- class=""
160
- >
161
- 2017-09-21 16:18:44 -0400
162
- </td>
163
- <td
164
- class=""
165
- >
166
- 2047-09-14 15:18:44 -0500
167
- </td>
168
- <td>
169
- <span
170
- aria-hidden="true"
171
- class="fa fa-minus"
172
- />
173
- </td>
174
- <td
45
+ Name
46
+ </th>
47
+ <th
48
+ class=""
49
+ >
50
+ SKU
51
+ </th>
52
+ <th
53
+ class=""
54
+ >
55
+ Contract
56
+ </th>
57
+ <th
58
+ class=""
59
+ >
60
+ Start Date
61
+ </th>
62
+ <th
63
+ class=""
64
+ >
65
+ End Date
66
+ </th>
67
+ <th
68
+ class=""
69
+ >
70
+ Requires Virt-Who
71
+ </th>
72
+ <th
73
+ class=""
74
+ >
75
+ Consumed
76
+ </th>
77
+ <th
78
+ class=""
79
+ >
80
+ Entitlements
81
+ </th>
82
+ </tr>
83
+ </thead>
84
+ <tbody>
85
+ <tr
175
86
  class=""
176
87
  >
177
- 1
178
- </td>
179
- <td>
180
- Unlimited
181
- </td>
182
- </tr>
183
- <tr
184
- class=""
185
- >
186
- <td
187
- class="table-view-pf-select"
188
- >
189
- <label
190
- class="control-label sr-only"
191
- for="select1"
88
+ <td
89
+ class="table-view-pf-select"
90
+ >
91
+ <label
92
+ class="control-label sr-only"
93
+ for="select0"
94
+ >
95
+ Select row
96
+ </label>
97
+ <input
98
+ id="select0"
99
+ type="checkbox"
100
+ />
101
+ </td>
102
+ <td>
103
+ <a
104
+ href="/subscriptions/3/"
105
+ >
106
+ zoo
107
+ </a>
108
+ </td>
109
+ <td
110
+ class=""
192
111
  >
193
- Select row
194
- </label>
195
- <input
196
- id="select1"
197
- type="checkbox"
112
+ 853987721546
113
+ </td>
114
+ <td
115
+ class=""
198
116
  />
199
- </td>
200
- <td>
201
- <a
202
- href="/subscriptions/4/"
117
+ <td
118
+ class=""
203
119
  >
204
- hsdfhsdh
205
- </a>
206
- </td>
207
- <td
208
- class=""
209
- >
210
- 947637693017
211
- </td>
212
- <td
213
- class=""
214
- />
215
- <td
216
- class=""
217
- >
218
- 2017-09-25 17:54:36 -0400
219
- </td>
220
- <td
120
+ 2017-09-21 16:18:44 -0400
121
+ </td>
122
+ <td
123
+ class=""
124
+ >
125
+ 2047-09-14 15:18:44 -0500
126
+ </td>
127
+ <td>
128
+ <span
129
+ aria-hidden="true"
130
+ class="fa fa-minus"
131
+ />
132
+ </td>
133
+ <td
134
+ class=""
135
+ >
136
+ 1
137
+ </td>
138
+ <td>
139
+ Unlimited
140
+ </td>
141
+ </tr>
142
+ <tr
221
143
  class=""
222
144
  >
223
- 2047-09-18 16:54:36 -0500
224
- </td>
225
- <td>
226
- <span
227
- aria-hidden="true"
228
- class="fa fa-minus"
145
+ <td
146
+ class="table-view-pf-select"
147
+ >
148
+ <label
149
+ class="control-label sr-only"
150
+ for="select1"
151
+ >
152
+ Select row
153
+ </label>
154
+ <input
155
+ id="select1"
156
+ type="checkbox"
157
+ />
158
+ </td>
159
+ <td>
160
+ <a
161
+ href="/subscriptions/4/"
162
+ >
163
+ hsdfhsdh
164
+ </a>
165
+ </td>
166
+ <td
167
+ class=""
168
+ >
169
+ 947637693017
170
+ </td>
171
+ <td
172
+ class=""
229
173
  />
230
- </td>
231
- <td
232
- class=""
233
- >
234
- 0
235
- </td>
236
- <td>
237
- Unlimited
238
- </td>
239
- </tr>
240
- </tbody>
241
- </table>
242
- <form
243
- class="content-view-pf-pagination table-view-pf-pagination clearfix"
244
- >
245
- <div
246
- class="form-group"
174
+ <td
175
+ class=""
176
+ >
177
+ 2017-09-25 17:54:36 -0400
178
+ </td>
179
+ <td
180
+ class=""
181
+ >
182
+ 2047-09-18 16:54:36 -0500
183
+ </td>
184
+ <td>
185
+ <span
186
+ aria-hidden="true"
187
+ class="fa fa-minus"
188
+ />
189
+ </td>
190
+ <td
191
+ class=""
192
+ >
193
+ 0
194
+ </td>
195
+ <td>
196
+ Unlimited
197
+ </td>
198
+ </tr>
199
+ </tbody>
200
+ </table>
201
+ <form
202
+ class="content-view-pf-pagination table-view-pf-pagination clearfix"
247
203
  >
248
204
  <div
249
- class="dropup pagination-pf-pagesize btn-group"
205
+ class="form-group"
250
206
  >
251
- <button
252
- aria-expanded="false"
253
- aria-haspopup="true"
254
- class="dropdown-toggle btn btn-default"
255
- id="pagination-row-dropdown"
256
- role="button"
257
- type="button"
207
+ <div
208
+ class="dropup pagination-pf-pagesize btn-group"
258
209
  >
259
- 2
210
+ <button
211
+ aria-expanded="false"
212
+ aria-haspopup="true"
213
+ class="dropdown-toggle btn btn-default"
214
+ id="pagination-row-dropdown"
215
+ role="button"
216
+ type="button"
217
+ >
218
+ 2
219
+ <span
220
+ class="caret"
221
+ />
222
+ </button>
223
+ <ul
224
+ aria-labelledby="pagination-row-dropdown"
225
+ class="dropdown-menu"
226
+ role="menu"
227
+ >
228
+ <li
229
+ class=""
230
+ role="presentation"
231
+ >
232
+ <a
233
+ href="#"
234
+ role="menuitem"
235
+ tabindex="-1"
236
+ >
237
+ 5
238
+ </a>
239
+ </li>
240
+ <li
241
+ class=""
242
+ role="presentation"
243
+ >
244
+ <a
245
+ href="#"
246
+ role="menuitem"
247
+ tabindex="-1"
248
+ >
249
+ 10
250
+ </a>
251
+ </li>
252
+ <li
253
+ class=""
254
+ role="presentation"
255
+ >
256
+ <a
257
+ href="#"
258
+ role="menuitem"
259
+ tabindex="-1"
260
+ >
261
+ 15
262
+ </a>
263
+ </li>
264
+ <li
265
+ class=""
266
+ role="presentation"
267
+ >
268
+ <a
269
+ href="#"
270
+ role="menuitem"
271
+ tabindex="-1"
272
+ >
273
+ 25
274
+ </a>
275
+ </li>
276
+ <li
277
+ class=""
278
+ role="presentation"
279
+ >
280
+ <a
281
+ href="#"
282
+ role="menuitem"
283
+ tabindex="-1"
284
+ >
285
+ 50
286
+ </a>
287
+ </li>
288
+ </ul>
289
+ </div>
290
+ <span>
291
+ per page
292
+ </span>
293
+ </div>
294
+ <div
295
+ class="form-group"
296
+ >
297
+ <span>
260
298
  <span
261
- class="caret"
262
- />
263
- </button>
299
+ class="pagination-pf-items-current"
300
+ >
301
+ 1-2
302
+ </span>
303
+  of 
304
+ <span
305
+ class="pagination-pf-items-total"
306
+ >
307
+ 81
308
+ </span>
309
+ </span>
264
310
  <ul
265
- aria-labelledby="pagination-row-dropdown"
266
- class="dropdown-menu"
267
- role="menu"
311
+ class="pagination pagination-pf-back"
268
312
  >
269
313
  <li
270
- class=""
271
- role="presentation"
314
+ class="disabled"
272
315
  >
273
316
  <a
274
317
  href="#"
275
- role="menuitem"
276
- tabindex="-1"
318
+ title="First Page"
277
319
  >
278
- 5
320
+ <span
321
+ aria-hidden="true"
322
+ class="fa fa-angle-double-left i"
323
+ />
279
324
  </a>
280
325
  </li>
281
326
  <li
282
- class=""
283
- role="presentation"
327
+ class="disabled"
284
328
  >
285
329
  <a
286
330
  href="#"
287
- role="menuitem"
288
- tabindex="-1"
331
+ title="Previous Page"
289
332
  >
290
- 10
333
+ <span
334
+ aria-hidden="true"
335
+ class="fa fa-angle-left i"
336
+ />
291
337
  </a>
292
338
  </li>
293
- <li
294
- class=""
295
- role="presentation"
339
+ </ul>
340
+ <label
341
+ class="sr-only control-label"
342
+ >
343
+ Current Page
344
+ </label>
345
+ <input
346
+ class="pagination-pf-page form-control"
347
+ type="text"
348
+ value="1"
349
+ />
350
+ <span>
351
+  of 
352
+ <span
353
+ class="pagination-pf-pages"
296
354
  >
297
- <a
298
- href="#"
299
- role="menuitem"
300
- tabindex="-1"
301
- >
302
- 15
303
- </a>
304
- </li>
355
+ 41
356
+ </span>
357
+ </span>
358
+ <ul
359
+ class="pagination pagination-pf-forward"
360
+ >
305
361
  <li
306
362
  class=""
307
- role="presentation"
308
363
  >
309
364
  <a
310
365
  href="#"
311
- role="menuitem"
312
- tabindex="-1"
366
+ title="Next Page"
313
367
  >
314
- 25
368
+ <span
369
+ aria-hidden="true"
370
+ class="fa fa-angle-right i"
371
+ />
315
372
  </a>
316
373
  </li>
317
374
  <li
318
375
  class=""
319
- role="presentation"
320
376
  >
321
377
  <a
322
378
  href="#"
323
- role="menuitem"
324
- tabindex="-1"
379
+ title="Last Page"
325
380
  >
326
- 50
381
+ <span
382
+ aria-hidden="true"
383
+ class="fa fa-angle-double-right i"
384
+ />
327
385
  </a>
328
386
  </li>
329
387
  </ul>
330
388
  </div>
331
- <span>
332
- per page
333
- </span>
334
- </div>
335
- <div
336
- class="form-group"
337
- >
338
- <span>
339
- <span
340
- class="pagination-pf-items-current"
341
- >
342
- 1-2
343
- </span>
344
-  of 
345
- <span
346
- class="pagination-pf-items-total"
347
- >
348
- 81
349
- </span>
350
- </span>
351
- <ul
352
- class="pagination pagination-pf-back"
353
- >
354
- <li
355
- class="disabled"
356
- >
357
- <a
358
- href="#"
359
- title="First Page"
360
- >
361
- <span
362
- aria-hidden="true"
363
- class="fa fa-angle-double-left i"
364
- />
365
- </a>
366
- </li>
367
- <li
368
- class="disabled"
369
- >
370
- <a
371
- href="#"
372
- title="Previous Page"
373
- >
374
- <span
375
- aria-hidden="true"
376
- class="fa fa-angle-left i"
377
- />
378
- </a>
379
- </li>
380
- </ul>
381
- <label
382
- class="sr-only control-label"
383
- >
384
- Current Page
385
- </label>
386
- <input
387
- class="pagination-pf-page form-control"
388
- type="text"
389
- value="1"
390
- />
391
- <span>
392
-  of 
393
- <span
394
- class="pagination-pf-pages"
395
- >
396
- 41
397
- </span>
398
- </span>
399
- <ul
400
- class="pagination pagination-pf-forward"
401
- >
402
- <li
403
- class=""
404
- >
405
- <a
406
- href="#"
407
- title="Next Page"
408
- >
409
- <span
410
- aria-hidden="true"
411
- class="fa fa-angle-right i"
412
- />
413
- </a>
414
- </li>
415
- <li
416
- class=""
417
- >
418
- <a
419
- href="#"
420
- title="Last Page"
421
- >
422
- <span
423
- aria-hidden="true"
424
- class="fa fa-angle-double-right i"
425
- />
426
- </a>
427
- </li>
428
- </ul>
429
- </div>
430
- </form>
431
- </div>
389
+ </form>
390
+ </div>,
391
+ ]
432
392
  `;
433
393
 
434
394
  exports[`subscriptions table should render an empty state 1`] = `
435
- <div
436
- class="blank-slate-pf"
437
- >
395
+ Array [
396
+ <div />,
438
397
  <div
439
- class="blank-slate-pf-icon"
440
- >
441
- <span
442
- aria-hidden="true"
443
- class="pficon pficon-add-circle-o"
444
- />
445
- </div>
446
- <h4
447
- class="h1 blank-slate-pf-title"
448
- >
449
- Yay empty state
450
- </h4>
451
- <p
452
- class="blank-slate-pf-info"
398
+ class="blank-slate-pf"
453
399
  >
454
- There is nothing to see here
455
- </p>
456
- </div>
400
+ <div
401
+ class="blank-slate-pf-icon"
402
+ >
403
+ <span
404
+ aria-hidden="true"
405
+ class="pficon pficon-add-circle-o"
406
+ />
407
+ </div>
408
+ <h4
409
+ class="h1 blank-slate-pf-title"
410
+ >
411
+ There are no Subscriptions to display
412
+ </h4>
413
+ <p
414
+ class="blank-slate-pf-info"
415
+ >
416
+ Add Subscriptions to this Allocation to manage your Entitlements.
417
+ </p>
418
+ <div
419
+ class="blank-slate-pf-main-action"
420
+ >
421
+ <a
422
+ class="btn btn-lg btn-primary"
423
+ href="subscriptions/add"
424
+ >
425
+ Add Subscriptions
426
+ </a>
427
+ </div>
428
+ </div>,
429
+ ]
457
430
  `;