foreman_leapp 0.1.9 → 0.1.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ee8943c7e2677970cc48b11a4d1f627c5c2ce86c9c7b02ce43823151ddbd607f
4
- data.tar.gz: a46b06e6eea756d1ac3f63307ece144765aec4ad894eccccd61ad91171d75c98
3
+ metadata.gz: b1891f98edb810793eaf892578ca6a2fdafe87be017e1e3ee370ebbd008baaeb
4
+ data.tar.gz: 3a618bb3303b275113dc3ddaae440971f6f17939d274e4d0263c66424d5511b8
5
5
  SHA512:
6
- metadata.gz: 72bf0a4eba618fdb1ea19617d8affec8370fd4daa9e411135b46d6cf380c8b6eaa7449ee7b73f944b9842b9c8283b41690fa4e06ef42d7c64086b9dc19153910
7
- data.tar.gz: fa82cfb2dd2e03e2e153b50d3edc069eb1d029111bac7e580de65dbe8bc0fe34a9c470a61e67eec5b892d7f269fc87fb38db811be68718c0f85bb93ccd23b3b3
6
+ metadata.gz: 652a75504d5ccfb8b20580043c02335547d0ab1d763f936329558499d9e4bdfe1958c6fc091c76fc8c55a77babeb8b2beb89c655afc8c5ae33f48cf4494a0372
7
+ data.tar.gz: 05b6c03d647d507262bb8f7847c87da4cb97facc0ea20d139fd90e788e37bc51664de0bd56d5bba0f89c0731e40eff8f02daadf0beba2dc890a6a2fced63e44e
@@ -21,7 +21,7 @@ module ForemanLeapp
21
21
 
22
22
  initializer 'foreman_leapp.register_plugin', before: :finisher_hook do |_app|
23
23
  Foreman::Plugin.register :foreman_leapp do
24
- requires_foreman '>= 2.1'
24
+ requires_foreman '>= 3.2'
25
25
 
26
26
  apipie_documented_controllers ["#{ForemanLeapp::Engine.root}/app/controllers/api/v2/*.rb"]
27
27
  extend_template_helpers ForemanLeapp::TemplateHelper
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ForemanLeapp
4
- VERSION = '0.1.9'
4
+ VERSION = '0.1.10'
5
5
  end
@@ -0,0 +1,2 @@
1
+ const Pagination = () => jest.fn();
2
+ export default Pagination;
@@ -57,9 +57,9 @@ export const idsForInvocationFromReports = reports =>
57
57
  idsForInvocationFromEntries(flattenEntries(reports));
58
58
 
59
59
  export const entriesPage = (entries, pagination) => {
60
- const offset = (pagination.page - 1) * pagination.perPage;
60
+ const offset = (pagination.page - 1) * pagination.per_page;
61
61
 
62
- return entries.slice(offset, offset + pagination.perPage);
62
+ return entries.slice(offset, offset + pagination.per_page);
63
63
  };
64
64
 
65
65
  export const filterEntries = (attribute, value, entries) => {
@@ -131,31 +131,7 @@ Array [
131
131
  ]
132
132
  `;
133
133
 
134
- exports[`PreupgradeReportsHelpers should return entries page 1`] = `
135
- Array [
136
- Object {
137
- "flags": Array [],
138
- "hostname": "foo.example.com",
139
- "id": 45,
140
- "severity": "low",
141
- "title": "Not enough credits",
142
- },
143
- Object {
144
- "flags": Array [],
145
- "hostname": "foo.example.com",
146
- "id": 46,
147
- "severity": "medium",
148
- "title": "SELinux is turned off",
149
- },
150
- Object {
151
- "flags": Array [],
152
- "hostname": "foo.example.com",
153
- "id": 47,
154
- "severity": "medium",
155
- "title": "Root password is too short",
156
- },
157
- ]
158
- `;
134
+ exports[`PreupgradeReportsHelpers should return entries page 1`] = `Array []`;
159
135
 
160
136
  exports[`PreupgradeReportsHelpers should return fixable entries 1`] = `
161
137
  Array [
@@ -59,23 +59,9 @@ exports[`PreupgradeReportsList should render 1`] = `
59
59
  key="3"
60
60
  toggleSelected={[Function]}
61
61
  />
62
- <PaginationWrapper
63
- dropdownButtonId="preupgrade-report-entries-pagination-dropdown"
62
+ <Pagination
64
63
  itemCount={4}
65
64
  onChange={[Function]}
66
- pagination={
67
- Object {
68
- "page": 1,
69
- "perPage": 20,
70
- "perPageOptions": Array [
71
- 5,
72
- 10,
73
- 20,
74
- 30,
75
- 50,
76
- ],
77
- }
78
- }
79
65
  viewType="list"
80
66
  />
81
67
  </ListView>
@@ -140,23 +126,9 @@ exports[`PreupgradeReportsList should render when working 1`] = `
140
126
  key="3"
141
127
  toggleSelected={[Function]}
142
128
  />
143
- <PaginationWrapper
144
- dropdownButtonId="preupgrade-report-entries-pagination-dropdown"
129
+ <Pagination
145
130
  itemCount={4}
146
131
  onChange={[Function]}
147
- pagination={
148
- Object {
149
- "page": 1,
150
- "perPage": 20,
151
- "perPageOptions": Array [
152
- 5,
153
- 10,
154
- 20,
155
- 30,
156
- 50,
157
- ],
158
- }
159
- }
160
132
  viewType="list"
161
133
  />
162
134
  </ListView>
@@ -2,7 +2,7 @@ import React, { useState } from 'react';
2
2
  import { ListView } from 'patternfly-react';
3
3
  import PropTypes from 'prop-types';
4
4
 
5
- import Pagination from 'foremanReact/components/Pagination/PaginationWrapper';
5
+ import Pagination from 'foremanReact/components/Pagination';
6
6
  import { useForemanSettings } from 'foremanReact/Root/Context/ForemanContext';
7
7
 
8
8
  import PreupgradeReportEntry from './components/PreupgradeReportEntry';
@@ -22,7 +22,7 @@ const PreupgradeReportsList = ({
22
22
  const { perPage, perPageOptions } = useForemanSettings();
23
23
  const [pagination, setPagination] = useState({
24
24
  page: 1,
25
- perPage,
25
+ per_page: perPage,
26
26
  perPageOptions,
27
27
  });
28
28
 
@@ -44,9 +44,7 @@ const PreupgradeReportsList = ({
44
44
  <Pagination
45
45
  viewType="list"
46
46
  itemCount={allEntries.length}
47
- pagination={pagination}
48
47
  onChange={newPage => setPagination({ ...pagination, ...newPage })}
49
- dropdownButtonId="preupgrade-report-entries-pagination-dropdown"
50
48
  />
51
49
  </ListView>
52
50
  );
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman_leapp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9
4
+ version: 0.1.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Foreman Leapp team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-12-09 00:00:00.000000000 Z
11
+ date: 2022-04-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: foreman_remote_execution
@@ -114,7 +114,7 @@ files:
114
114
  - test/unit/helpers/job_helper_test.rb
115
115
  - webpack/__mocks__/foremanReact/Root/Context/ForemanContext.js
116
116
  - webpack/__mocks__/foremanReact/common/I18n.js
117
- - webpack/__mocks__/foremanReact/components/Pagination/PaginationWrapper.js
117
+ - webpack/__mocks__/foremanReact/components/Pagination.js
118
118
  - webpack/__mocks__/foremanReact/components/common/EmptyState.js
119
119
  - webpack/__mocks__/foremanReact/components/common/MessageBox.js
120
120
  - webpack/components/PreupgradeReports/PreupgradeReports.js
@@ -198,7 +198,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
198
198
  - !ruby/object:Gem::Version
199
199
  version: '0'
200
200
  requirements: []
201
- rubygems_version: 3.1.6
201
+ rubygems_version: 3.3.7
202
202
  signing_key:
203
203
  specification_version: 4
204
204
  summary: A Foreman plugin for Leapp utility.
@@ -1,2 +0,0 @@
1
- const PaginationWrapper = () => jest.fn();
2
- export default PaginationWrapper;