Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ESSNTL-5612): Update Staleness & Deletion Keys + Route Protection #2114

Merged
merged 4 commits into from
Dec 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion src/Routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { getSearchParams } from './constants';
import RenderWrapper from './Utilities/Wrapper';
import useFeatureFlag from './Utilities/useFeatureFlag';
import { Bullseye, Spinner } from '@patternfly/react-core';
import LostPage from './components/LostPage';
import AsyncComponent from '@redhat-cloud-services/frontend-components/AsyncComponent';
import ErrorState from '@redhat-cloud-services/frontend-components/ErrorState';
import { inventoryHasEdgeSystems } from './Utilities/edge';
Expand Down Expand Up @@ -52,6 +53,9 @@ export const Routes = () => {
const edgeParityInventoryListEnabled = useFeatureFlag(
'edgeParity.inventory-list'
);

const stalenessAndDeletionEnabled = useFeatureFlag('hbi.custom-staleness');

useEffect(() => {
try {
(async () => {
Expand Down Expand Up @@ -103,7 +107,11 @@ export const Routes = () => {
},
{
path: '/staleness-and-deletion',
element: <InventoryHostStaleness />,
element: stalenessAndDeletionEnabled ? (
<InventoryHostStaleness />
) : (
<LostPage />
),
},
]);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ import { instance } from '@redhat-cloud-services/frontend-components-utilities/i
describe('Table Renders', () => {
const mock = new MockAdapter(instance);
const stalenessData = {
conventional_staleness_delta: 86400,
conventional_stale_warning_delta: 604800,
conventional_culling_delta: 1209600,
immutable_staleness_delta: 172800,
immutable_stale_warning_delta: 1290600,
immutable_culling_delta: 15552000,
conventional_time_to_stale: 86400,
conventional_time_to_stale_warning: 604800,
conventional_time_to_delete: 1209600,
immutable_time_to_stale: 172800,
immutable_time_to_stale_warning: 1290600,
immutable_time_to_delete: 15552000,
id: 'system_default',
};

Expand Down
Loading