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 +4 -4
- data/lib/foreman_leapp/engine.rb +1 -1
- data/lib/foreman_leapp/version.rb +1 -1
- data/webpack/__mocks__/foremanReact/components/Pagination.js +2 -0
- data/webpack/components/PreupgradeReports/PreupgradeReportsHelpers.js +2 -2
- data/webpack/components/PreupgradeReports/__tests__/__snapshots__/PreupgradeReportsHelpers.test.js.snap +1 -25
- data/webpack/components/PreupgradeReportsList/__tests__/__snapshots__/PreupgradeReportsList.test.js.snap +2 -30
- data/webpack/components/PreupgradeReportsList/index.js +2 -4
- metadata +4 -4
- data/webpack/__mocks__/foremanReact/components/Pagination/PaginationWrapper.js +0 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b1891f98edb810793eaf892578ca6a2fdafe87be017e1e3ee370ebbd008baaeb
|
|
4
|
+
data.tar.gz: 3a618bb3303b275113dc3ddaae440971f6f17939d274e4d0263c66424d5511b8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 652a75504d5ccfb8b20580043c02335547d0ab1d763f936329558499d9e4bdfe1958c6fc091c76fc8c55a77babeb8b2beb89c655afc8c5ae33f48cf4494a0372
|
|
7
|
+
data.tar.gz: 05b6c03d647d507262bb8f7847c87da4cb97facc0ea20d139fd90e788e37bc51664de0bd56d5bba0f89c0731e40eff8f02daadf0beba2dc890a6a2fced63e44e
|
data/lib/foreman_leapp/engine.rb
CHANGED
|
@@ -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
|
|
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
|
|
@@ -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.
|
|
60
|
+
const offset = (pagination.page - 1) * pagination.per_page;
|
|
61
61
|
|
|
62
|
-
return entries.slice(offset, offset + pagination.
|
|
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
|
-
<
|
|
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
|
-
<
|
|
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
|
|
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.
|
|
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:
|
|
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
|
|
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.
|
|
201
|
+
rubygems_version: 3.3.7
|
|
202
202
|
signing_key:
|
|
203
203
|
specification_version: 4
|
|
204
204
|
summary: A Foreman plugin for Leapp utility.
|