diff --git a/src/SmartComponents/Advisories/Advisories.js b/src/SmartComponents/Advisories/Advisories.js index 6144d2fb..3fa37b18 100644 --- a/src/SmartComponents/Advisories/Advisories.js +++ b/src/SmartComponents/Advisories/Advisories.js @@ -26,7 +26,6 @@ import { intl } from '../../Utilities/IntlProvider'; import { clearNotifications } from '@redhat-cloud-services/frontend-components-notifications/redux'; import AdvisoriesStatusReport from '../../PresentationalComponents/StatusReports/AdvisoriesStatusReport'; import { useChrome } from '@redhat-cloud-services/frontend-components/useChrome'; -import { DEFAULT_PATCH_TITLE } from '../../Utilities/constants'; import { useNavigate, useSearchParams } from 'react-router-dom'; const Advisories = () => { @@ -35,7 +34,7 @@ const Advisories = () => { const chrome = useChrome(); useEffect(()=>{ - chrome.updateDocumentTitle(`${intl.formatMessage(messages.titlesAdvisories)}${DEFAULT_PATCH_TITLE}`); + chrome.updateDocumentTitle(`Advisories - Content | RHEL`, true); }, [chrome]); const dispatch = useDispatch(); diff --git a/src/SmartComponents/AdvisoryDetail/AdvisoryDetail.js b/src/SmartComponents/AdvisoryDetail/AdvisoryDetail.js index 56f8b252..f264381f 100644 --- a/src/SmartComponents/AdvisoryDetail/AdvisoryDetail.js +++ b/src/SmartComponents/AdvisoryDetail/AdvisoryDetail.js @@ -12,7 +12,6 @@ import { intl } from '../../Utilities/IntlProvider'; import AdvisorySystems from '../AdvisorySystems/AdvisorySystems'; import { clearNotifications } from '@redhat-cloud-services/frontend-components-notifications/redux'; import { useChrome } from '@redhat-cloud-services/frontend-components/useChrome'; -import { DEFAULT_PATCH_TITLE } from '../../Utilities/constants'; const AdvisoryDetail = () => { const dispatch = useDispatch(); @@ -21,8 +20,7 @@ const AdvisoryDetail = () => { useEffect(()=>{ advisoryName && - chrome.updateDocumentTitle(`${advisoryName} - - ${intl.formatMessage(messages.titlesAdvisories)} ${DEFAULT_PATCH_TITLE}`); + chrome.updateDocumentTitle(`${advisoryName} - Advisories - Content | RHEL`, true); }, [chrome, advisoryName]); const advisoryDetails = useSelector( diff --git a/src/SmartComponents/PackageDetail/PackageDetail.js b/src/SmartComponents/PackageDetail/PackageDetail.js index 78586577..9a11bd73 100644 --- a/src/SmartComponents/PackageDetail/PackageDetail.js +++ b/src/SmartComponents/PackageDetail/PackageDetail.js @@ -13,7 +13,6 @@ import { intl } from '../../Utilities/IntlProvider'; import { clearNotifications } from '@redhat-cloud-services/frontend-components-notifications/redux'; import ErrorHandler from '../../PresentationalComponents/Snippets/ErrorHandler'; import { useChrome } from '@redhat-cloud-services/frontend-components/useChrome'; -import { DEFAULT_PATCH_TITLE } from '../../Utilities/constants'; const PackageDetail = () => { const dispatch = useDispatch(); @@ -21,8 +20,7 @@ const PackageDetail = () => { const chrome = useChrome(); useEffect(()=>{ - packageName && chrome.updateDocumentTitle(`${packageName} - ${intl.formatMessage(messages.titlesPackages)} - ${DEFAULT_PATCH_TITLE}`); + packageName && chrome.updateDocumentTitle(`${packageName} - Packages - Content | RHEL`, true); }, [chrome, packageName]); const packageDetails = useSelector( diff --git a/src/SmartComponents/Packages/Packages.js b/src/SmartComponents/Packages/Packages.js index 53e08dbf..5b1f1a95 100644 --- a/src/SmartComponents/Packages/Packages.js +++ b/src/SmartComponents/Packages/Packages.js @@ -9,7 +9,7 @@ import TableView from '../../PresentationalComponents/TableView/TableView'; import { packagesColumns } from '../../PresentationalComponents/TableView/TableViewAssets'; import { changePackagesListParams, fetchPackagesAction } from '../../store/Actions/Actions'; import { exportPackagesCSV, exportPackagesJSON } from '../../Utilities/api'; -import { DEFAULT_PATCH_TITLE, packagesListDefaultFilters } from '../../Utilities/constants'; +import { packagesListDefaultFilters } from '../../Utilities/constants'; import { createPackagesRows } from '../../Utilities/DataMappers'; import { createSortBy, decodeQueryparams, encodeURLParams } from '../../Utilities/Helpers'; import { useOnExport, usePerPageSelect, @@ -23,7 +23,7 @@ const Packages = () => { const [firstMount, setFirstMount] = React.useState(true); const chrome = useChrome(); useEffect(()=>{ - chrome.updateDocumentTitle(`${intl.formatMessage(messages.titlesPackages)} ${DEFAULT_PATCH_TITLE}`); + chrome.updateDocumentTitle(`Packages - Content | RHEL`, true); }, [chrome]); const [searchParams, setSearchParams] = useSearchParams(); diff --git a/src/SmartComponents/PatchSet/PatchSet.js b/src/SmartComponents/PatchSet/PatchSet.js index 8ff9f249..5ce8e9a8 100644 --- a/src/SmartComponents/PatchSet/PatchSet.js +++ b/src/SmartComponents/PatchSet/PatchSet.js @@ -24,7 +24,7 @@ import { patchSetRowActions, CustomActionsToggle } from './PatchSetAssets'; import PatchSetWizard from '../PatchSetWizard/PatchSetWizard'; -import { DEFAULT_PATCH_TITLE, patchSetDeleteNotifications } from '../../Utilities/constants'; +import { patchSetDeleteNotifications } from '../../Utilities/constants'; import { usePermissionsWithContext } from '@redhat-cloud-services/frontend-components-utilities/RBACHook'; import { OutlinedQuestionCircleIcon } from '@patternfly/react-icons'; import { Icon, Popover } from '@patternfly/react-core'; @@ -36,7 +36,7 @@ const PatchSet = () => { const IS_SELECTION_ENABLED = false; const chrome = useChrome(); useEffect(()=>{ - chrome.updateDocumentTitle(`${intl.formatMessage(messages.titlesTemplate)} ${DEFAULT_PATCH_TITLE}`); + chrome.updateDocumentTitle(`Templates - Patch | RHEL`, true); }, [chrome]); const dispatch = useDispatch(); diff --git a/src/SmartComponents/PatchSetDetail/PatchSetDetail.js b/src/SmartComponents/PatchSetDetail/PatchSetDetail.js index a1df8895..f5f01e42 100644 --- a/src/SmartComponents/PatchSetDetail/PatchSetDetail.js +++ b/src/SmartComponents/PatchSetDetail/PatchSetDetail.js @@ -33,7 +33,7 @@ import { import DeleteSetModal from '../Modals/DeleteSetModal'; import { deletePatchSet, fetchPatchSetSystems } from '../../Utilities/api'; import { addNotification } from '@redhat-cloud-services/frontend-components-notifications/redux'; -import { DEFAULT_PATCH_TITLE, patchSetDeleteNotifications } from '../../Utilities/constants'; +import { patchSetDeleteNotifications } from '../../Utilities/constants'; import ErrorHandler from '../../PresentationalComponents/Snippets/ErrorHandler'; import { arrayFromObj, @@ -132,8 +132,7 @@ const PatchSetDetail = () => { const patchSetName = templateDetails.data.attributes.name; useEffect(() => { - patchSetName && chrome.updateDocumentTitle(`${patchSetName} - ${intl.formatMessage(messages.titlesTemplate)} - ${DEFAULT_PATCH_TITLE}`); + patchSetName && chrome.updateDocumentTitle(`${patchSetName} - Templates - Patch | RHEL`, true); }, [chrome, patchSetName]); const onSelect = useOnSelect( diff --git a/src/SmartComponents/SystemDetail/InventoryDetail.js b/src/SmartComponents/SystemDetail/InventoryDetail.js index a8feff57..f714dc70 100644 --- a/src/SmartComponents/SystemDetail/InventoryDetail.js +++ b/src/SmartComponents/SystemDetail/InventoryDetail.js @@ -16,7 +16,6 @@ import { usePatchSetState } from '../../Utilities/hooks'; import { useParams } from 'react-router-dom'; import SystemDetail from './SystemDetail'; import { useChrome } from '@redhat-cloud-services/frontend-components/useChrome'; -import { DEFAULT_PATCH_TITLE } from '../../Utilities/constants'; import { InsightsLink } from '@redhat-cloud-services/frontend-components/InsightsLink'; import { usePermissionsWithContext } from '@redhat-cloud-services/frontend-components-utilities/RBACHook'; @@ -51,8 +50,7 @@ const InventoryDetail = () => { const chrome = useChrome(); useEffect(() => { - displayName && chrome.updateDocumentTitle(`${displayName} - ${intl.formatMessage(messages.titlesSystems)} - ${DEFAULT_PATCH_TITLE}`); + displayName && chrome.updateDocumentTitle(`${displayName} - Systems - Patch | RHEL`, true); }, [chrome, displayName]); const { hasAccess: hasTemplateAccess } = usePermissionsWithContext([ diff --git a/src/SmartComponents/Systems/SystemsPage.js b/src/SmartComponents/Systems/SystemsPage.js index 7dad5de4..cc1cde7b 100644 --- a/src/SmartComponents/Systems/SystemsPage.js +++ b/src/SmartComponents/Systems/SystemsPage.js @@ -1,7 +1,6 @@ import React, { useEffect } from 'react'; import messages from '../../Messages'; import Header from '../../PresentationalComponents/Header/Header'; -import { DEFAULT_PATCH_TITLE } from '../../Utilities/constants'; import { intl } from '../../Utilities/IntlProvider'; import { useChrome } from '@redhat-cloud-services/frontend-components/useChrome'; @@ -10,7 +9,7 @@ import SystemsMainContent from './SystemsMainContent'; const SystemsPage = () => { const chrome = useChrome(); useEffect(()=>{ - chrome.updateDocumentTitle(`${intl.formatMessage(messages.titlesSystems)}${DEFAULT_PATCH_TITLE}`); + chrome.updateDocumentTitle(`Systems - Patch | RHEL`, true); }, [chrome, intl]); return ( diff --git a/src/Utilities/constants.js b/src/Utilities/constants.js index 940afa4e..32daa6e3 100644 --- a/src/Utilities/constants.js +++ b/src/Utilities/constants.js @@ -8,7 +8,6 @@ import { subtractDate } from './Helpers'; export const STATUS_REJECTED = 'rejected'; export const STATUS_LOADING = 'loading'; export const STATUS_RESOLVED = 'resolved'; -export const DEFAULT_PATCH_TITLE = ` - Patch | Red Hat Insights`; export const defaultCompoundSortValues = { operating_system: {