+
-
<%= mount_search_bar if searchable? %>
<%= yield(:search_bar) %>
@@ -25,7 +25,7 @@
+
diff --git a/app/views/layouts/base.html.erb b/app/views/layouts/base.html.erb
index 7099e4d458f..1b94dd0d260 100644
--- a/app/views/layouts/base.html.erb
+++ b/app/views/layouts/base.html.erb
@@ -62,7 +62,7 @@
<% end %>
<%= yield %>
<%= yield(:content) %>
diff --git a/package.json b/package.json
index 7ae5676471f..32b85f021a8 100644
--- a/package.json
+++ b/package.json
@@ -21,6 +21,13 @@
},
"dependencies": {
"@module-federation/utilities": "^1.7.0",
+ "@patternfly/patternfly": "^5.1.0",
+ "@patternfly/react-charts": "^7.3.0",
+ "@patternfly/react-core": "^5.1.1",
+ "@patternfly/react-icons": "^5.1.1",
+ "@patternfly/react-styles": "^5.1.1",
+ "@patternfly/react-table": "^5.1.1",
+ "@patternfly/react-tokens": "^5.1.1",
"@theforeman/vendor": "^13.1.0",
"graphql-tag": "^2.11.0",
"intl": "~1.2.5",
@@ -57,7 +64,7 @@
"style-loader": "^1.3.0",
"stylelint": "^9.3.0",
"stylelint-config-standard": "^18.0.0",
- "tabbable": "~5.2.0",
+ "tabbable": "^6.2.0",
"victory-core": "~36.8.6",
"victory-pie": "~36.8.6",
"webpack": "^5.75.0",
diff --git a/test/integration/audit_js_test.rb b/test/integration/audit_js_test.rb
index 4afb4b55061..a94ac5d0267 100644
--- a/test/integration/audit_js_test.rb
+++ b/test/integration/audit_js_test.rb
@@ -15,7 +15,7 @@ class AuditJSTest < IntegrationTestWithJavascript
test "Check per page settings in context" do
Setting['entries_per_page'] = 8
visit audits_path
- per_page = page.find('.pf-c-pagination')['data-per-page']
+ per_page = page.find('.pf-v5-c-pagination')['data-per-page']
assert_equal per_page, '8'
end
end
diff --git a/test/integration/breadcrumbs_switcher_test.rb b/test/integration/breadcrumbs_switcher_test.rb
index 083692fd898..6d403368080 100644
--- a/test/integration/breadcrumbs_switcher_test.rb
+++ b/test/integration/breadcrumbs_switcher_test.rb
@@ -19,7 +19,7 @@ class BreadcrumbsSwitcherTest < IntegrationTestWithJavascript
click_button 'open breadcrumb switcher'
fill_in('Filter breadcrumb items', :with => 'three')
wait_for_ajax
- page.assert_selector('.pf-c-menu__item-main', count: 1)
- page.assert_selector('.pf-c-menu__item-main', text: 'three')
+ page.assert_selector('.pf-v5-c-menu__item-main', count: 1)
+ page.assert_selector('.pf-v5-c-menu__item-main', text: 'three')
end
end
diff --git a/test/integration/compute_profile_js_test.rb b/test/integration/compute_profile_js_test.rb
index 68751da4d80..e1e130f8f0f 100644
--- a/test/integration/compute_profile_js_test.rb
+++ b/test/integration/compute_profile_js_test.rb
@@ -37,7 +37,7 @@ class ComputeProfileJSTest < IntegrationTestWithJavascript
# amazon123 exists in fixture compute_attributes.yml
click_link("amazon123 (eu-west-1-EC2)")
- assert page.has_selector?('.pf-c-page__main-breadcrumb .active', :text => compute_profiles(:one).name), "#{compute_profiles(:one).name} was expected in the breadcrumb active, but was not found"
+ assert page.has_selector?('.pf-v5-c-page__main-breadcrumb .active', :text => compute_profiles(:one).name), "#{compute_profiles(:one).name} was expected in the breadcrumb active, but was not found"
selected_profile = find("#s2id_compute_attribute_compute_profile_id .select2-chosen").text
assert_equal compute_profiles(:one).name, selected_profile
diff --git a/test/integration/config_report_js_test.rb b/test/integration/config_report_js_test.rb
index 52102db3c4a..57570bd225c 100644
--- a/test/integration/config_report_js_test.rb
+++ b/test/integration/config_report_js_test.rb
@@ -23,7 +23,7 @@ class ConfigReportJSTest < IntegrationTestWithJavascript
report
visit config_reports_path
click_link(report.host.name)
- has_selector?(".foreman-search-bar .pf-c-text-input-group__text-input", text: "host = #{report.host.name}", wait: 3)
- assert_equal "host = #{report.host.name}", find('.foreman-search-bar .pf-c-text-input-group__text-input').value
+ has_selector?(".foreman-search-bar .pf-v5-c-text-input-group__text-input", text: "host = #{report.host.name}", wait: 3)
+ assert_equal "host = #{report.host.name}", find('.foreman-search-bar .pf-v5-c-text-input-group__text-input').value
end
end
diff --git a/test/integration/fact_value_js_test.rb b/test/integration/fact_value_js_test.rb
index 93248546008..0b8f690d743 100644
--- a/test/integration/fact_value_js_test.rb
+++ b/test/integration/fact_value_js_test.rb
@@ -14,19 +14,19 @@ def setup
within(:xpath, "//tr[contains(.,'#{@fact_name.name}')]") do
click_link(@host.fqdn)
end
- has_selector?(".foreman-search-bar .pf-c-text-input-group__text-input", text: "host = #{@host.fqdn}", wait: 3)
- assert_equal "host = #{@host.fqdn}", find('.foreman-search-bar .pf-c-text-input-group__text-input').value
+ has_selector?(".foreman-search-bar .pf-v5-c-text-input-group__text-input", text: "host = #{@host.fqdn}", wait: 3)
+ assert_equal "host = #{@host.fqdn}", find('.foreman-search-bar .pf-v5-c-text-input-group__text-input').value
end
test "fact_name fact links" do
visit fact_values_path
find(:xpath, "//tr[contains(.,'#{@fact_name.name}')]//td[2]//a").click
- has_selector?(".foreman-search-bar .pf-c-text-input-group__text-input", text: "name = #{@fact_name.name}", wait: 3)
- assert_equal "name = #{@fact_name.name}", find('.foreman-search-bar .pf-c-text-input-group__text-input').value
+ has_selector?(".foreman-search-bar .pf-v5-c-text-input-group__text-input", text: "name = #{@fact_name.name}", wait: 3)
+ assert_equal "name = #{@fact_name.name}", find('.foreman-search-bar .pf-v5-c-text-input-group__text-input').value
end
test "value fact links" do
visit fact_values_path
click_link(@value.value)
- has_selector?(".foreman-search-bar .pf-c-text-input-group__text-input", text: "facts.#{@fact_name.name} = \"#{@value.value}\"", wait: 3)
- assert_equal "facts.#{@fact_name.name} = \"#{@value.value}\"", find('.foreman-search-bar .pf-c-text-input-group__text-input').value
+ has_selector?(".foreman-search-bar .pf-v5-c-text-input-group__text-input", text: "facts.#{@fact_name.name} = \"#{@value.value}\"", wait: 3)
+ assert_equal "facts.#{@fact_name.name} = \"#{@value.value}\"", find('.foreman-search-bar .pf-v5-c-text-input-group__text-input').value
end
end
diff --git a/test/integration/host_js_test.rb b/test/integration/host_js_test.rb
index ba17e7264e4..1cb3c177fb8 100644
--- a/test/integration/host_js_test.rb
+++ b/test/integration/host_js_test.rb
@@ -77,7 +77,7 @@ class HostJSTest < IntegrationTestWithJavascript
test "assert breadcrumbs" do
visit current_hosts_path
click_link @host.fqdn
- find('.pf-c-breadcrumb__item', :text => @host.fqdn)
+ find('.pf-v5-c-breadcrumb__item', :text => @host.fqdn)
end
test "switch between hosts" do
@@ -112,7 +112,7 @@ class HostJSTest < IntegrationTestWithJavascript
visit host_details_page_path(host)
find('#hostdetails-kebab').click
click_button 'Delete'
- find('button.pf-c-button.pf-m-danger').click # the red delete button, not the menu item
+ find('button.pf-v5-c-button.pf-m-danger').click # the red delete button, not the menu item
assert_current_path current_hosts_path
assert_raises(ActiveRecord::RecordNotFound) do
Host.find(host.id)
diff --git a/test/integration/model_js_test.rb b/test/integration/model_js_test.rb
index 7f075465863..5493092f430 100644
--- a/test/integration/model_js_test.rb
+++ b/test/integration/model_js_test.rb
@@ -3,7 +3,7 @@
class ModelIntegrationTest < IntegrationTestWithJavascript
test "create new page" do
visit models_path
- click_on "Create new", class: 'pf-c-button'
+ click_on "Create new", class: 'pf-v5-c-button'
assert_current_path new_model_path
fill_in "model_name", :with => "IBM 123"
fill_in "model_hardware_model", :with => "IBMabcde"
diff --git a/test/integration/notifications_drawer_test.rb b/test/integration/notifications_drawer_test.rb
index 3fbd84cc199..55465bbbf73 100644
--- a/test/integration/notifications_drawer_test.rb
+++ b/test/integration/notifications_drawer_test.rb
@@ -47,7 +47,7 @@ def notifications_open_and_close_flow
def navigate_somewhere_with_turbolinks
# check the outside click with turbolinks
- page.find('a.pf-c-masthead__brand').click
+ page.find('a.pf-v5-c-masthead__brand').click
# wait for loader to dissapear
page.has_no_selector?('div.spinner')
end
diff --git a/test/integration/operatingsystem_js_test.rb b/test/integration/operatingsystem_js_test.rb
index db2fae68a30..b7714db25f1 100644
--- a/test/integration/operatingsystem_js_test.rb
+++ b/test/integration/operatingsystem_js_test.rb
@@ -19,8 +19,8 @@ class OperatingsystemJSTest < IntegrationTestWithJavascript
actions.find("ul > li > a.delete").click
confirm_modal = page.find("#app-confirm-modal")
- assert_equal "Confirm", confirm_modal.find(".pf-c-modal-box__title-text").text
- assert_equal "Delete #{os.title}?", confirm_modal.find(".pf-c-modal-box__body").text
+ assert_equal "Confirm", confirm_modal.find(".pf-v5-c-modal-box__title-text").text
+ assert_equal "Delete #{os.title}?", confirm_modal.find(".pf-v5-c-modal-box__body").text
confirm_button = confirm_modal.find("footer > button:nth-child(1)")
assert_equal "Confirm", confirm_button.text
diff --git a/test/integration/search_bar_js_test.rb b/test/integration/search_bar_js_test.rb
index 8e83641b31b..a09d8664769 100644
--- a/test/integration/search_bar_js_test.rb
+++ b/test/integration/search_bar_js_test.rb
@@ -6,6 +6,6 @@ class SearchBarTest < IntegrationTestWithJavascript
work_around_selenium_file_detector_bug
# needs to be interactive element
find('table thead').find('a', text: 'Name').send_keys("/")
- assert_includes(page.evaluate_script("document.activeElement.classList"), "pf-c-text-input-group__text-input")
+ assert_includes(page.evaluate_script("document.activeElement.classList"), "pf-v5-c-text-input-group__text-input")
end
end
diff --git a/test/integration_test_helper.rb b/test/integration_test_helper.rb
index 33011320219..490aa4f09e6 100644
--- a/test/integration_test_helper.rb
+++ b/test/integration_test_helper.rb
@@ -111,7 +111,7 @@ def assert_breadcrumb_text(text)
def assert_new_button(index_path, new_link_text, new_path)
visit index_path
- click_link(new_link_text, :class => /^((?!pf-c-nav__link).)*$/)
+ click_link(new_link_text, :class => /^((?!pf-v5-c-nav__link).)*$/)
assert_current_path new_path
end
@@ -267,11 +267,11 @@ def refute_available_organization_menu(organization)
def refute_available_organization_dropdown(organization)
within('#location-dropdown') do
- find('.pf-c-context-selector__toggle').click
- within('.pf-c-context-selector__menu>div>ul', visible: :all) do
+ find('.pf-v5-c-context-selector__toggle').click
+ within('.pf-v5-c-context-selector__menu>div>ul', visible: :all) do
assert page.has_no_link?(organization)
end
- find('.pf-c-context-selector__toggle').click
+ find('.pf-v5-c-context-selector__toggle').click
end
end
@@ -298,7 +298,7 @@ def select_organization(organization)
def select_organization_dropdown(organization)
within('#organization-dropdown') do
- find('.pf-c-context-selector__toggle').click
+ find('.pf-v5-c-context-selector__toggle').click
find("button.organization_menuitem", text: organization).click
end
end
@@ -306,13 +306,13 @@ def select_organization_dropdown(organization)
def select_organization_menu(organization)
within('.organization-menu') do
first('button').click
- find("li.pf-c-nav__item", text: organization).click
+ find("li.pf-v5-c-nav__item", text: organization).click
end
end
def select_location_dropdown(location)
within('#location-dropdown') do
- find('.pf-c-context-selector__toggle').click
+ find('.pf-v5-c-context-selector__toggle').click
find("button.location_menuitem", text: location).click
end
end
diff --git a/webpack/assets/javascripts/hosts/tableCheckboxes.js b/webpack/assets/javascripts/hosts/tableCheckboxes.js
index 5e1a1df6c85..6ff09bbaa31 100644
--- a/webpack/assets/javascripts/hosts/tableCheckboxes.js
+++ b/webpack/assets/javascripts/hosts/tableCheckboxes.js
@@ -263,7 +263,7 @@ export function buildRedirect(url) {
function paginationMetaData() {
const { total, perPage } = document.getElementsByClassName(
- 'pf-c-pagination'
+ 'pf-v5-c-pagination'
)[0].dataset;
return { total: Number(total), perPage: Number(perPage) };
}
diff --git a/webpack/assets/javascripts/react_app/common/variables.scss b/webpack/assets/javascripts/react_app/common/variables.scss
index f7485b1fc2b..405920bd3e9 100644
--- a/webpack/assets/javascripts/react_app/common/variables.scss
+++ b/webpack/assets/javascripts/react_app/common/variables.scss
@@ -1,3 +1,3 @@
@import '~@theforeman/vendor/scss/variables.scss';
-$header-max-width: calc(#{$pf-global--breakpoint--lg} + 70px); //TODO move into @theforeman/vendor/scss/variables
+$header-max-width: calc(#{$pf-v5-global--breakpoint--lg} + 70px); //TODO move into @theforeman/vendor/scss/variables
diff --git a/webpack/assets/javascripts/react_app/components/ChartBox/ChartBox.css b/webpack/assets/javascripts/react_app/components/ChartBox/ChartBox.css
index 681c11a1b4b..eee3273dbbb 100644
--- a/webpack/assets/javascripts/react_app/components/ChartBox/ChartBox.css
+++ b/webpack/assets/javascripts/react_app/components/ChartBox/ChartBox.css
@@ -3,6 +3,6 @@
cursor: pointer;
}
}
-.chart-box-modal .pf-c-modal-box__body {
+.chart-box-modal .pf-v5-c-modal-box__body {
text-align: center;
}
diff --git a/webpack/assets/javascripts/react_app/components/ChartBox/__snapshots__/ChartBox.test.js.snap b/webpack/assets/javascripts/react_app/components/ChartBox/__snapshots__/ChartBox.test.js.snap
index 47128c7fa02..0fffa21452a 100644
--- a/webpack/assets/javascripts/react_app/components/ChartBox/__snapshots__/ChartBox.test.js.snap
+++ b/webpack/assets/javascripts/react_app/components/ChartBox/__snapshots__/ChartBox.test.js.snap
@@ -50,6 +50,7 @@ exports[`ChartBox error 1`] = `
onClose={[Function]}
ouiaId="chart-2-modal"
ouiaSafe={true}
+ position="default"
showClose={true}
title="some title"
titleIconVariant={null}
@@ -125,6 +126,7 @@ exports[`ChartBox pending 1`] = `
onClose={[Function]}
ouiaId="chart-2-modal"
ouiaSafe={true}
+ position="default"
showClose={true}
title="some title"
titleIconVariant={null}
@@ -212,6 +214,7 @@ exports[`ChartBox resolved 1`] = `
onClose={[Function]}
ouiaId="chart-2-modal"
ouiaSafe={true}
+ position="default"
showClose={true}
title="some title"
titleIconVariant={null}
diff --git a/webpack/assets/javascripts/react_app/components/ColumnSelector/ColumnSelector.js b/webpack/assets/javascripts/react_app/components/ColumnSelector/ColumnSelector.js
index 3fa87496f63..9a9946dbdc5 100644
--- a/webpack/assets/javascripts/react_app/components/ColumnSelector/ColumnSelector.js
+++ b/webpack/assets/javascripts/react_app/components/ColumnSelector/ColumnSelector.js
@@ -143,8 +143,8 @@ const ColumnSelector = props => {
};
return (
-
-
+
+
);
diff --git a/webpack/assets/javascripts/react_app/components/HostsIndex/BulkActions/buildHosts/BulkBuildHostModal.js b/webpack/assets/javascripts/react_app/components/HostsIndex/BulkActions/buildHosts/BulkBuildHostModal.js
index 1c02884c859..99f973ba8f4 100644
--- a/webpack/assets/javascripts/react_app/components/HostsIndex/BulkActions/buildHosts/BulkBuildHostModal.js
+++ b/webpack/assets/javascripts/react_app/components/HostsIndex/BulkActions/buildHosts/BulkBuildHostModal.js
@@ -123,7 +123,7 @@ const BulkBuildHostModal = ({
handleBuildRadioSelected(checked)}
+ onChange={(_event, checked) => handleBuildRadioSelected(checked)}
label={__('Build')}
id="build-host-radio"
ouiaId="build-host-radio"
@@ -134,7 +134,7 @@ const BulkBuildHostModal = ({
name="reboot-now"
isChecked={rebootChecked}
isDisabled={!buildRadioChecked}
- onChange={setRebootChecked}
+ onChange={(_event, val) => setRebootChecked(val)}
ouiaId="build-reboot-checkbox"
/>
}
@@ -142,7 +142,7 @@ const BulkBuildHostModal = ({
handleBuildRadioSelected(!checked)}
+ onChange={(_event, checked) => handleBuildRadioSelected(!checked)}
label={__('Rebuild provisioning configuration only')}
id="rebuild-host-radio"
ouiaId="rebuild-host-radio"
diff --git a/webpack/assets/javascripts/react_app/components/HostsIndex/BulkActions/bulkDeleteModal.scss b/webpack/assets/javascripts/react_app/components/HostsIndex/BulkActions/bulkDeleteModal.scss
index 2bea7a5a854..9d62669e433 100644
--- a/webpack/assets/javascripts/react_app/components/HostsIndex/BulkActions/bulkDeleteModal.scss
+++ b/webpack/assets/javascripts/react_app/components/HostsIndex/BulkActions/bulkDeleteModal.scss
@@ -1,6 +1,6 @@
#bulk-delete-hosts-modal {
min-height: 21rem;
- .pf-c-check label {
+ .pf-v5-c-check label {
font-size: 14px;
position: relative;
top: 2px;
diff --git a/webpack/assets/javascripts/react_app/components/HostsIndex/BulkActions/reassignHostGroup/BulkReassignHostgroupModal.js b/webpack/assets/javascripts/react_app/components/HostsIndex/BulkActions/reassignHostGroup/BulkReassignHostgroupModal.js
index 1faa23613bf..44e96c6362f 100644
--- a/webpack/assets/javascripts/react_app/components/HostsIndex/BulkActions/reassignHostGroup/BulkReassignHostgroupModal.js
+++ b/webpack/assets/javascripts/react_app/components/HostsIndex/BulkActions/reassignHostGroup/BulkReassignHostgroupModal.js
@@ -2,13 +2,8 @@ import React, { useState, useEffect } from 'react';
import PropTypes from 'prop-types';
import { useDispatch, useSelector } from 'react-redux';
import { FormattedMessage } from 'react-intl';
-import {
- Modal,
- Button,
- TextContent,
- Text,
- SelectOption,
-} from '@patternfly/react-core';
+import { Modal, Button, TextContent, Text } from '@patternfly/react-core';
+import { SelectOption } from '@patternfly/react-core/deprecated';
import { addToast } from '../../../ToastsList/slice';
import { translate as __ } from '../../../../common/I18n';
import { failedHostsToastParams } from '../helpers';
diff --git a/webpack/assets/javascripts/react_app/components/HostsIndex/BulkActions/reassignHostGroup/HostGroupSelect.js b/webpack/assets/javascripts/react_app/components/HostsIndex/BulkActions/reassignHostGroup/HostGroupSelect.js
index 94f2c726f35..e9833c7672d 100644
--- a/webpack/assets/javascripts/react_app/components/HostsIndex/BulkActions/reassignHostGroup/HostGroupSelect.js
+++ b/webpack/assets/javascripts/react_app/components/HostsIndex/BulkActions/reassignHostGroup/HostGroupSelect.js
@@ -1,5 +1,5 @@
import React from 'react';
-import { Select, SelectVariant } from '@patternfly/react-core';
+import { Select, SelectVariant } from '@patternfly/react-core/deprecated';
import PropTypes from 'prop-types';
import { translate as __ } from '../../../../common/I18n';
diff --git a/webpack/assets/javascripts/react_app/components/HostsIndex/Columns/components/HostPowerStatus.js b/webpack/assets/javascripts/react_app/components/HostsIndex/Columns/components/HostPowerStatus.js
index 2ae66884dc3..70e8a26cb71 100644
--- a/webpack/assets/javascripts/react_app/components/HostsIndex/Columns/components/HostPowerStatus.js
+++ b/webpack/assets/javascripts/react_app/components/HostsIndex/Columns/components/HostPowerStatus.js
@@ -29,8 +29,8 @@ const HostPowerStatus = ({ hostName }) => {
const tooltipText = state === 'na' ? `${title} - ${statusText}` : title;
let powerIcon = ;
const moveItALittleUp = { position: 'relative', top: '-0.1em' };
- const green = 'var(--pf-global--palette--green-300)';
- const disabledGray = 'var(--pf-global--disabled-color--200)';
+ const green = 'var(--pf-v5-global--palette--green-300)';
+ const disabledGray = 'var(--pf-v5-global--disabled-color--200)';
switch (state) {
case 'on':
powerIcon = (
diff --git a/webpack/assets/javascripts/react_app/components/HostsIndex/RowSelectTd.js b/webpack/assets/javascripts/react_app/components/HostsIndex/RowSelectTd.js
index 2bd64346dd1..304b96106a0 100644
--- a/webpack/assets/javascripts/react_app/components/HostsIndex/RowSelectTd.js
+++ b/webpack/assets/javascripts/react_app/components/HostsIndex/RowSelectTd.js
@@ -15,7 +15,7 @@ export const RowSelectTd = ({
selectOne(isSelecting, rowData[idColumnName], rowData);
},
isSelected: isSelected(rowData[idColumnName]),
- disable: false,
+ isDisabled: false,
}}
/>
);
diff --git a/webpack/assets/javascripts/react_app/components/HostsIndex/index.js b/webpack/assets/javascripts/react_app/components/HostsIndex/index.js
index 73f7de2482d..8387d3050ed 100644
--- a/webpack/assets/javascripts/react_app/components/HostsIndex/index.js
+++ b/webpack/assets/javascripts/react_app/components/HostsIndex/index.js
@@ -5,10 +5,7 @@ import { Tr, Td, ActionsColumn } from '@patternfly/react-table';
import {
ToolbarItem,
Divider,
- Dropdown,
- DropdownItem,
MenuItem,
- KebabToggle,
Flex,
FlexItem,
Button,
@@ -17,6 +14,11 @@ import {
TextContent,
Text,
} from '@patternfly/react-core';
+import {
+ Dropdown,
+ DropdownItem,
+ KebabToggle,
+} from '@patternfly/react-core/deprecated';
import { UndoIcon } from '@patternfly/react-icons';
import { useForemanModal } from '../ForemanModal/ForemanModalHooks';
import { addModal } from '../ForemanModal/ForemanModalActions';
@@ -302,7 +304,7 @@ const HostsIndex = () => {
setLegacyUIKebabOpen(val)}
/>
}
isOpen={legacyUIKebabOpen}
@@ -408,7 +410,7 @@ const HostsIndex = () => {
{results?.map((result, rowIndex) => {
const rowActions = getActions(result);
return (
-
+
{ }
{columnNamesKeys.map(k => (
diff --git a/webpack/assets/javascripts/react_app/components/HostsIndex/index.scss b/webpack/assets/javascripts/react_app/components/HostsIndex/index.scss
index 08a9029bac8..56c3881ae7c 100644
--- a/webpack/assets/javascripts/react_app/components/HostsIndex/index.scss
+++ b/webpack/assets/javascripts/react_app/components/HostsIndex/index.scss
@@ -1,15 +1,15 @@
-#legacy-ui-kebab ul.pf-c-dropdown__menu {
+#legacy-ui-kebab ul.pf-v5-c-dropdown__menu {
padding-left: 0;
li {
display: unset;
a {
font-size: 16px;
- color: var(--pf-c-dropdown__menu-item--Color);
+ color: var(--pf-v5-c-dropdown__menu-item--Color);
font-weight: 300;
}
}
}
-#header-text .pf-l-flex {
+#header-text .pf-v5-l-flex {
align-items: center;
}
diff --git a/webpack/assets/javascripts/react_app/components/Layout/Layout.js b/webpack/assets/javascripts/react_app/components/Layout/Layout.js
index a740ad334a7..70f582efcad 100644
--- a/webpack/assets/javascripts/react_app/components/Layout/Layout.js
+++ b/webpack/assets/javascripts/react_app/components/Layout/Layout.js
@@ -1,6 +1,12 @@
import React from 'react';
-import { Page, PageSidebar, Flex, FlexItem } from '@patternfly/react-core';
+import {
+ Page,
+ PageSidebar,
+ Flex,
+ FlexItem,
+ PageSidebarBody,
+} from '@patternfly/react-core';
import { layoutPropTypes, layoutDefaultProps } from './LayoutHelper';
import { InstanceBanner } from './components/InstanceBanner';
import Header from './components/Toolbar/Header';
@@ -51,17 +57,16 @@ const Layout = ({
}
id="foreman-page"
sidebar={
-
+
- }
- />
+
+
}
>
{children}
diff --git a/webpack/assets/javascripts/react_app/components/Layout/NavigationSearch.js b/webpack/assets/javascripts/react_app/components/Layout/NavigationSearch.js
index 322f7fb0a64..8555db37729 100644
--- a/webpack/assets/javascripts/react_app/components/Layout/NavigationSearch.js
+++ b/webpack/assets/javascripts/react_app/components/Layout/NavigationSearch.js
@@ -173,11 +173,13 @@ export const NavigationSearch = ({ items, clickAndNavigate }) => {
{
+ onChange(newValue);
+ }}
onClear={onClear}
ref={searchInputRef}
id="navigation-search"
- onSearch={(_, event) => {
+ onSearch={(event, _) => {
const firstItem = navItems.find(option =>
option.toLowerCase().includes(value.toLowerCase())
);
diff --git a/webpack/assets/javascripts/react_app/components/Layout/__tests__/NavigationSearch.test.js b/webpack/assets/javascripts/react_app/components/Layout/__tests__/NavigationSearch.test.js
index 180ecfb1d24..95abfdde8eb 100644
--- a/webpack/assets/javascripts/react_app/components/Layout/__tests__/NavigationSearch.test.js
+++ b/webpack/assets/javascripts/react_app/components/Layout/__tests__/NavigationSearch.test.js
@@ -25,7 +25,7 @@ describe('NavigationSearch', () => {
getByRole,
getByLabelText,
} = render(
-
+
{}} />
);
diff --git a/webpack/assets/javascripts/react_app/components/Layout/components/ImpersonateIcon/ImpersonateIcon.scss b/webpack/assets/javascripts/react_app/components/Layout/components/ImpersonateIcon/ImpersonateIcon.scss
index fee44434dbc..bdb9133d3fb 100644
--- a/webpack/assets/javascripts/react_app/components/Layout/components/ImpersonateIcon/ImpersonateIcon.scss
+++ b/webpack/assets/javascripts/react_app/components/Layout/components/ImpersonateIcon/ImpersonateIcon.scss
@@ -21,7 +21,7 @@
animation: blink normal 1s infinite ease-in-out; /* Opera and prob css3 final iteration */
}
-.pf-c-masthead {
+.pf-v5-c-masthead {
.nav-item-iconic .blink-image {
color: $color-pf-gold-200;
}
diff --git a/webpack/assets/javascripts/react_app/components/Layout/components/ImpersonateIcon/__snapshots__/ImpersonateIcon.test.js.snap b/webpack/assets/javascripts/react_app/components/Layout/components/ImpersonateIcon/__snapshots__/ImpersonateIcon.test.js.snap
index b2728a11db2..65094c0cded 100644
--- a/webpack/assets/javascripts/react_app/components/Layout/components/ImpersonateIcon/__snapshots__/ImpersonateIcon.test.js.snap
+++ b/webpack/assets/javascripts/react_app/components/Layout/components/ImpersonateIcon/__snapshots__/ImpersonateIcon.test.js.snap
@@ -12,9 +12,6 @@ exports[`ImpersonateIcon should render 1`] = `
>
diff --git a/webpack/assets/javascripts/react_app/components/Layout/components/InstanceBanner.js b/webpack/assets/javascripts/react_app/components/Layout/components/InstanceBanner.js
index 6c759b0e1b0..c0c9e67a520 100644
--- a/webpack/assets/javascripts/react_app/components/Layout/components/InstanceBanner.js
+++ b/webpack/assets/javascripts/react_app/components/Layout/components/InstanceBanner.js
@@ -42,7 +42,7 @@ export const InstanceBanner = ({ data }) => {
instance && (
{
setSearchValue(event.target.value);
};
- const selectedIcon = ;
+ const selectedIcon = (
+
+
+
+ );
const anyIcon =
taxonomyType === 'organization' ? (
@@ -80,7 +82,7 @@ const TaxonomyDropdown = ({ taxonomyType, currentTaxonomy, taxonomies }) => {
-
+
diff --git a/webpack/assets/javascripts/react_app/components/Layout/components/Toolbar/HeaderToolbar.js b/webpack/assets/javascripts/react_app/components/Layout/components/Toolbar/HeaderToolbar.js
index 0f1674cf025..6e7f0eb3684 100644
--- a/webpack/assets/javascripts/react_app/components/Layout/components/Toolbar/HeaderToolbar.js
+++ b/webpack/assets/javascripts/react_app/components/Layout/components/Toolbar/HeaderToolbar.js
@@ -36,7 +36,7 @@ const HeaderToolbar = ({
isLoading={isLoading}
/>
-
+
diff --git a/webpack/assets/javascripts/react_app/components/Layout/components/Toolbar/HeaderToolbar.scss b/webpack/assets/javascripts/react_app/components/Layout/components/Toolbar/HeaderToolbar.scss
index dc4d10290fd..71f36eb99cc 100644
--- a/webpack/assets/javascripts/react_app/components/Layout/components/Toolbar/HeaderToolbar.scss
+++ b/webpack/assets/javascripts/react_app/components/Layout/components/Toolbar/HeaderToolbar.scss
@@ -11,20 +11,20 @@
}
}
-.pf-c-toolbar#data-toolbar {
+.pf-v5-c-toolbar#data-toolbar {
// Override for unupdated plugins that use unupdated foreman CSS
display: grid;
justify-content: normal;
}
-.pf-c-masthead__brand {
+.pf-v5-c-masthead__brand {
padding-right: 15px;
&:hover {
text-decoration: none;
}
- .pf-c-brand {
+ .pf-v5-c-brand {
height: 34px;
}
diff --git a/webpack/assets/javascripts/react_app/components/Layout/components/Toolbar/UserDropdowns.js b/webpack/assets/javascripts/react_app/components/Layout/components/Toolbar/UserDropdowns.js
index 6e405f11256..52abb5bd172 100644
--- a/webpack/assets/javascripts/react_app/components/Layout/components/Toolbar/UserDropdowns.js
+++ b/webpack/assets/javascripts/react_app/components/Layout/components/Toolbar/UserDropdowns.js
@@ -5,7 +5,7 @@ import {
DropdownToggle,
DropdownItem,
DropdownSeparator,
-} from '@patternfly/react-core';
+} from '@patternfly/react-core/deprecated';
import { UserAltIcon } from '@patternfly/react-icons';
import { userPropType } from '../../LayoutHelper';
@@ -49,7 +49,9 @@ const UserDropdowns = ({ user, notificationUrl, instanceTitle, ...props }) => {
toggle={
+ onDropdownToggle(newUserDropdownOpen)
+ }
>
{userInfo.name}
diff --git a/webpack/assets/javascripts/react_app/components/Layout/components/Toolbar/__snapshots__/HeaderToolbar.test.js.snap b/webpack/assets/javascripts/react_app/components/Layout/components/Toolbar/__snapshots__/HeaderToolbar.test.js.snap
index cba23cba620..ee8548b0b19 100644
--- a/webpack/assets/javascripts/react_app/components/Layout/components/Toolbar/__snapshots__/HeaderToolbar.test.js.snap
+++ b/webpack/assets/javascripts/react_app/components/Layout/components/Toolbar/__snapshots__/HeaderToolbar.test.js.snap
@@ -47,7 +47,7 @@ exports[`HeaderToolbar rendering render HeaderToolbar 1`] = `
/>
G L
diff --git a/webpack/assets/javascripts/react_app/components/Layout/layout.scss b/webpack/assets/javascripts/react_app/components/Layout/layout.scss
index 050b9cc57e7..57140e5972f 100644
--- a/webpack/assets/javascripts/react_app/components/Layout/layout.scss
+++ b/webpack/assets/javascripts/react_app/components/Layout/layout.scss
@@ -12,7 +12,7 @@
.collapsed-nav {
#react-app-root {
- main.pf-c-page__main {
+ main.pf-v5-c-page__main {
padding-left: 0;
}
}
@@ -22,7 +22,7 @@
}
#page-sidebar {
- .pf-c-nav__item.hidden-nav-lg {
+ .pf-v5-c-nav__item.hidden-nav-lg {
display: none;
@media (max-width: $header-max-width) {
@@ -31,7 +31,7 @@
}
}
-.pf-c-nav {
+.pf-v5-c-nav {
.nav-title-icon {
word-break: break-word;
overflow-wrap: break-word;
@@ -44,77 +44,77 @@
.nav-title {
pointer-events: none;
}
- .pf-c-nav__item .pf-c-nav__item.pf-m-expandable .pf-c-nav__list::before {
+ .pf-v5-c-nav__item .pf-v5-c-nav__item.pf-m-expandable .pf-v5-c-nav__list::before {
border: 0;
}
- .pf-c-nav__item.pf-m-expandable::before {
- z-index: var(--pf-c-page__sidebar--ZIndex);
+ .pf-v5-c-nav__item.pf-m-expandable::before {
+ z-index: var(--pf-v5-c-page__sidebar--ZIndex);
}
- .pf-c-nav__item .pf-c-nav__item.pf-m-expandable::before {
+ .pf-v5-c-nav__item .pf-v5-c-nav__item.pf-m-expandable::before {
// in small screens, the expandable items have css to add a second border
border-bottom: none;
}
- .pf-m-expandable>.pf-c-nav__link{
+ .pf-m-expandable>.pf-v5-c-nav__link{
text-align: left;
}
.navigation-search-menu {
- .pf-c-menu__item {
+ .pf-v5-c-menu__item {
padding: 5px;
- .pf-c-menu__item-description {
+ .pf-v5-c-menu__item-description {
word-break: break-word;
}
}
min-width: 0;
margin: 0;
- --pf-c-menu__list-item--hover--BackgroundColor: var(
- --pf-global--BackgroundColor--200
+ --pf-v5-c-menu__list-item--hover--BackgroundColor: var(
+ --pf-v5-global--BackgroundColor--200
);
- --pf-c-menu--BackgroundColor: var(--pf-global--BackgroundColor--100);
- --pf-c-menu__list-item--Color: var(--pf-global--Color--100);
- --pf-c-menu__list-item--BackgroundColor: transparent;
- --pf-c-menu__list-item--hover--BackgroundColor: var(
- --pf-global--BackgroundColor--200
+ --pf-v5-c-menu--BackgroundColor: var(--pf-v5-global--BackgroundColor--100);
+ --pf-v5-c-menu__list-item--Color: var(--pf-v5-global--Color--100);
+ --pf-v5-c-menu__list-item--BackgroundColor: transparent;
+ --pf-v5-c-menu__list-item--hover--BackgroundColor: var(
+ --pf-v5-global--BackgroundColor--200
);
- --pf-c-menu__list-item--focus-within--Color: var(--pf-global--palette--blue-400);
- --pf-c-menu__list-item--focus-within--BackgroundColor: var(
- --pf-global--BackgroundColor--200
+ --pf-v5-c-menu__list-item--focus-within--Color: var(--pf-v5-global--palette--blue-400);
+ --pf-v5-c-menu__list-item--focus-within--BackgroundColor: var(
+ --pf-v5-global--BackgroundColor--200
);
- --pf-c-menu__item-description--Color: var(--pf-global--Color--200);
- --pf-c-menu__list-item--hover--Color: unset;
+ --pf-v5-c-menu__item-description--Color: var(--pf-v5-global--Color--200);
+ --pf-v5-c-menu__list-item--hover--Color: unset;
}
#navigation-search {
- width:calc(#{var(--pf-c-page__sidebar--Width)} - 10px);
+ width:calc(#{var(--pf-v5-c-page__sidebar--Width)} - 10px);
margin-left: 5px;
- .pf-c-button.pf-m-control {
+ .pf-v5-c-button.pf-m-control {
display: none;
}
}
}
-.pf-c-page {
- --pf-c-page--BackgroundColor: var(--pf-global--BackgroundColor--100);
+.pf-v5-c-page {
+ --pf-v5-c-page--BackgroundColor: var(--pf-v5-global--BackgroundColor--100);
}
-.pf-c-page .pf-c-masthead {
+.pf-v5-c-page .pf-v5-c-masthead {
background-repeat: no-repeat;
background-size: cover;
- .pf-c-toolbar__item {
- .pf-c-context-selector__menu {
+ .pf-v5-c-toolbar__item {
+ .pf-v5-c-context-selector__menu {
top: auto;
}
- .pf-c-context-selector {
+ .pf-v5-c-context-selector {
&.pf-m-expanded,
&:hover {
background: rgba(255, 255, 255, 0.24);
}
}
- .pf-c-context-selector__toggle::before {
+ .pf-v5-c-context-selector__toggle::before {
border-width: 0;
}
}
diff --git a/webpack/assets/javascripts/react_app/components/Loading/Loading.js b/webpack/assets/javascripts/react_app/components/Loading/Loading.js
index a66d45028ab..2552f880987 100644
--- a/webpack/assets/javascripts/react_app/components/Loading/Loading.js
+++ b/webpack/assets/javascripts/react_app/components/Loading/Loading.js
@@ -6,6 +6,8 @@ import {
EmptyState,
EmptyStateIcon,
Spinner,
+ EmptyStateHeader,
+ EmptyStateFooter,
} from '@patternfly/react-core';
import { translate as __ } from '../../common/I18n';
@@ -17,12 +19,14 @@ const Loading = ({ textSize, iconSize, showText }) => {
return (
-
- {showText && (
-
- {__('Loading')}
-
- )}
+ } />
+
+ {showText && (
+
+ {__('Loading')}
+
+ )}
+
);
diff --git a/webpack/assets/javascripts/react_app/components/PF4/Bookmarks/BookmarkItems.js b/webpack/assets/javascripts/react_app/components/PF4/Bookmarks/BookmarkItems.js
index 722cfd37155..fb5dd3d55ab 100644
--- a/webpack/assets/javascripts/react_app/components/PF4/Bookmarks/BookmarkItems.js
+++ b/webpack/assets/javascripts/react_app/components/PF4/Bookmarks/BookmarkItems.js
@@ -1,11 +1,11 @@
import React from 'react';
import { PlusIcon } from '@patternfly/react-icons';
+import { Spinner } from '@patternfly/react-core';
import {
DropdownItem,
DropdownGroup,
DropdownSeparator,
- Spinner,
-} from '@patternfly/react-core';
+} from '@patternfly/react-core/deprecated';
import { sprintf, translate as __ } from '../../../common/I18n';
import { STATUS } from '../../../constants';
import DocumentationUrl from '../DocumentationLink';
diff --git a/webpack/assets/javascripts/react_app/components/PF4/Bookmarks/Bookmarks.js b/webpack/assets/javascripts/react_app/components/PF4/Bookmarks/Bookmarks.js
index b720da01563..b7ac2a79957 100644
--- a/webpack/assets/javascripts/react_app/components/PF4/Bookmarks/Bookmarks.js
+++ b/webpack/assets/javascripts/react_app/components/PF4/Bookmarks/Bookmarks.js
@@ -1,6 +1,6 @@
import React, { useState } from 'react';
import PropTypes from 'prop-types';
-import { Dropdown, DropdownToggle } from '@patternfly/react-core';
+import { Dropdown, DropdownToggle } from '@patternfly/react-core/deprecated';
import { OutlinedBookmarkIcon } from '@patternfly/react-icons';
import BookmarkModal from '../../BookmarkForm/SearchModal';
import { STATUS } from '../../../constants';
@@ -79,7 +79,7 @@ const Bookmarks = ({
onSelect={() => setIsDropdownOpen(false)}
toggle={
onToggle(isOpen)}
title={__('Bookmarks')}
aria-label="bookmarks dropdown toggle"
ouiaId="bookmarks-dropdown-toggle"
diff --git a/webpack/assets/javascripts/react_app/components/PF4/Bookmarks/bookmarks.scss b/webpack/assets/javascripts/react_app/components/PF4/Bookmarks/bookmarks.scss
index b41b45aad74..b25bbb2285d 100644
--- a/webpack/assets/javascripts/react_app/components/PF4/Bookmarks/bookmarks.scss
+++ b/webpack/assets/javascripts/react_app/components/PF4/Bookmarks/bookmarks.scss
@@ -11,14 +11,14 @@
white-space: normal;
}
-@media only screen and (min-width: $pf-global--breakpoint--xl) {
+@media only screen and (min-width: $pf-v5-global--breakpoint--xl) {
.bookmarks-dropdown-item.adapt-long-bookmark {
width: 600px;
white-space: normal;
}
}
-@media only screen and (min-width: $pf-global--breakpoint--2xl) {
+@media only screen and (min-width: $pf-v5-global--breakpoint--2xl) {
.bookmarks-dropdown-item.adapt-long-bookmark {
width: 700px;
white-space: normal;
diff --git a/webpack/assets/javascripts/react_app/components/PF4/BreadcrumbSwitcher/breadcrumb-switcher.scss b/webpack/assets/javascripts/react_app/components/PF4/BreadcrumbSwitcher/breadcrumb-switcher.scss
index f9502833b57..a7f5cb862f1 100644
--- a/webpack/assets/javascripts/react_app/components/PF4/BreadcrumbSwitcher/breadcrumb-switcher.scss
+++ b/webpack/assets/javascripts/react_app/components/PF4/BreadcrumbSwitcher/breadcrumb-switcher.scss
@@ -1,15 +1,15 @@
.pf4-breadcrumb-switcher-popover {
- .pf-c-pagination,
- .pf-c-pagination.pf-m-bottom .pf-c-options-menu,
- .pf-c-pagination.pf-m-bottom .pf-c-pagination__nav,
- .pf-c-menu__list,
- .pf-c-menu__list-item{
+ .pf-v5-c-pagination,
+ .pf-v5-c-pagination.pf-m-bottom .pf-v5-c-options-menu,
+ .pf-v5-c-pagination.pf-m-bottom .pf-v5-c-pagination__nav,
+ .pf-v5-c-menu__list,
+ .pf-v5-c-menu__list-item{
visibility: unset;
}
- .pf-c-menu__footer {
+ .pf-v5-c-menu__footer {
padding: 0;
- .pf-c-pagination {
+ .pf-v5-c-pagination {
padding: 0;
justify-content: center;
}
diff --git a/webpack/assets/javascripts/react_app/components/PF4/BreadcrumbSwitcher/index.js b/webpack/assets/javascripts/react_app/components/PF4/BreadcrumbSwitcher/index.js
index b5cfdbf5329..d336934efad 100644
--- a/webpack/assets/javascripts/react_app/components/PF4/BreadcrumbSwitcher/index.js
+++ b/webpack/assets/javascripts/react_app/components/PF4/BreadcrumbSwitcher/index.js
@@ -9,10 +9,11 @@ import {
MenuContent,
MenuFooter,
MenuList,
- MenuInput,
+ MenuSearch,
MenuItem,
Tooltip,
Spinner,
+ MenuSearchInput,
} from '@patternfly/react-core';
import { ExchangeAltIcon } from '@patternfly/react-icons';
import { translate as __ } from '../../../common/I18n';
@@ -123,17 +124,19 @@ const BreadcrumbSwitcher = ({
bodyContent={