);
} else {
@@ -83,7 +72,7 @@ export const conditionalDropdownError = (newFormValues, dropdownItems) => {
className="pf-u-font-size-sm pf-v5-u-danger-color-100"
style={{ width: '200px' }}
>
- Stale warning must be before culling
+ Stale warning must be before deletion
);
} else if (formValue < newFormValues['conventional_staleness_delta']) {
@@ -110,7 +99,7 @@ export const conditionalDropdownError = (newFormValues, dropdownItems) => {
className="pf-u-font-size-sm pf-v5-u-danger-color-100"
style={{ width: '200px' }}
>
- Culling must be after staleness
+ Deletion must be after staleness
);
} else if (formValue < newFormValues['conventional_staleness_delta']) {
@@ -119,7 +108,7 @@ export const conditionalDropdownError = (newFormValues, dropdownItems) => {
className="pf-u-font-size-sm pf-v5-u-danger-color-100"
style={{ width: '200px' }}
>
- Culling must be after stale warning
+ Deletion must be after stale warning
);
} else {
@@ -143,7 +132,7 @@ export const conditionalDropdownError = (newFormValues, dropdownItems) => {
className="pf-u-font-size-sm pf-v5-u-danger-color-100"
style={{ width: '200px' }}
>
- Staleness must be before culling
+ Staleness must be before deletion
);
} else {
@@ -161,7 +150,7 @@ export const conditionalDropdownError = (newFormValues, dropdownItems) => {
className="pf-u-font-size-sm pf-v5-u-danger-color-100 "
style={{ width: '200px' }}
>
- Stale warning must be before culling
+ Stale warning must be before deletion
);
} else if (formValue < newFormValues['immutable_staleness_delta']) {
@@ -188,7 +177,7 @@ export const conditionalDropdownError = (newFormValues, dropdownItems) => {
className="pf-u-font-size-sm pf-v5-u-danger-color-100"
style={{ width: '200px' }}
>
- Culling must be after staleness
+ Deletion must be after staleness
);
} else if (formValue < newFormValues['immutable_staleness_delta']) {
@@ -197,7 +186,7 @@ export const conditionalDropdownError = (newFormValues, dropdownItems) => {
className="pf-u-font-size-sm pf-v5-u-danger-color-100"
style={{ width: '200px' }}
>
- Culling must be after stale warning
+ Deletion must be after stale warning
);
} else {
@@ -206,31 +195,48 @@ export const conditionalDropdownError = (newFormValues, dropdownItems) => {
}
};
-export const HostStalenessResetDefaultPopover = () => {
+export const HostStalenessResetDefaultPopover = ({ activeTabKey }) => {
return (
Orginization level setting
- }
+ headerContent={Default settings}
position="left"
bodyContent={
-
-
- - Systems are marked as stale after 1 day since last check-in.
-
-
- - Systems are marked as stale warning after 14 days since last
- check-in.
-
+ activeTabKey ? (
+
+
+ - Systems are marked as stale after 2 day since last check-in.
+
+
+ - Systems are marked as stale warning after 120 days since last
+ check-in.
+
-
- - Systems are culled after 30 days since last check-in.
-
-
+
+ - Systems are culled after 2 years since last check-in.
+
+
+ ) : (
+
+
+ - Systems are marked as stale after 1 day since last check-in.
+
+
+ - Systems are marked as stale warning after 14 days since last
+ check-in.
+
+
+
+ - Systems are culled after 30 days since last check-in.
+
+
+ )
}
>
{
hasAutoWidth
position="top"
bodyContent={
-
+
Configure the number of days it will take for your systems to be
marked as stale, stale warning, and be cullled.
@@ -263,7 +269,9 @@ export const InventoryHostStalenessPopover = () => {
direction={{ default: 'column' }}
spaceItems={{ default: 'spaceItemsNone' }}
>
- By default:
+
+ Default for Conventional systems (RPM-DNF):
+
- Systems are marked as stale after 1 day since last check-in.
@@ -277,7 +285,27 @@ export const InventoryHostStalenessPopover = () => {
- Systems are culled after 30 days since last check-in.
-
+
+
+ Default for Immutable systems (OSTree):
+
+
+
+ - Systems are marked as stale after 2 day since last check-in.
+
+
+
+ - Systems are marked as stale warning after 120 days since last
+ check-in.
+
+
+ - Systems are culled after 2 years since last check-in.
+
+
+
}
>
{
? 'immutable_staleness_delta'
: 'conventional_staleness_delta',
},
- {
- name: 'Never',
- value: 'Never',
- apiKey: activeTabKey
- ? 'immutable_staleness_delta'
- : 'conventional_staleness_delta',
- },
];
};
@@ -423,17 +444,10 @@ export const systemStalenessWarningItems = (activeTabKey) => {
? 'immutable_stale_warning_delta'
: 'conventional_stale_warning_delta',
},
- {
- name: 'Never',
- value: 'Never',
- apiKey: activeTabKey
- ? 'immutable_stale_warning_delta'
- : 'conventional_stale_warning_delta',
- },
];
};
-export const systemCullingItems = (activeTabKey) => {
+export const systemDeletionItems = (activeTabKey) => {
return [
{
name: '14 days',
@@ -441,7 +455,7 @@ export const systemCullingItems = (activeTabKey) => {
apiKey: activeTabKey
? 'immutable_culling_delta'
: 'conventional_culling_delta',
- title: 'System culling',
+ title: 'System deletion',
modalMessage:
'This is the time at which your system will be deleted from your inventory. Once your system is culled, it will have to be re-registered to be added back to your inventory.',
},
@@ -495,8 +509,15 @@ export const systemCullingItems = (activeTabKey) => {
: 'conventional_culling_delta',
},
{
- name: 'Never',
- value: 'Never',
+ name: '1 year',
+ value: 365,
+ apiKey: activeTabKey
+ ? 'immutable_culling_delta'
+ : 'conventional_culling_delta',
+ },
+ {
+ name: '2 years',
+ value: 730,
apiKey: activeTabKey
? 'immutable_culling_delta'
: 'conventional_culling_delta',
@@ -507,8 +528,7 @@ export const systemCullingItems = (activeTabKey) => {
export const formValidation = async (newFormValues, setIsFormValid) => {
for (let i = 0; i < hostStalenessApiKeys.length; i++) {
const apiKey = hostStalenessApiKeys[i];
- let formValue =
- newFormValues[apiKey] === 'Never' ? maxSafeInt : newFormValues[apiKey];
+ let formValue = newFormValues[apiKey];
if (
apiKey === 'conventional_staleness_delta' &&
@@ -542,3 +562,7 @@ export const formValidation = async (newFormValues, setIsFormValid) => {
}
}
};
+
+HostStalenessResetDefaultPopover.propTypes = {
+ activeTabKey: PropTypes.number,
+};
diff --git a/src/routes/InventoryHostStaleness.js b/src/routes/InventoryHostStaleness.js
index 450ad61d7..99c63ff74 100644
--- a/src/routes/InventoryHostStaleness.js
+++ b/src/routes/InventoryHostStaleness.js
@@ -26,14 +26,15 @@ const HostStaleness = () => {
useEffect(() => {
chrome?.updateDocumentTitle?.(
- 'Staleness and Culling - System Configuration - Inventory | Red Hat Insights'
+ 'Staleness and Deletion - System Configuration - Inventory | Red Hat Insights'
);
- }, [chrome]);
+ chrome.hideGlobalFilter(true);
+ }, []);
return (
-
+
{canReadHostStaleness ? (