mirror of
https://github.com/fleetdm/fleet
synced 2026-05-23 17:08:53 +00:00
Fix display value for policy update interval (#2468)
This commit is contained in:
parent
daa8a5d31a
commit
39da3fd84d
3 changed files with 6 additions and 4 deletions
1
changes/2460-osquery-policy-update-interval
Normal file
1
changes/2460-osquery-policy-update-interval
Normal file
|
|
@ -0,0 +1 @@
|
|||
* Change update interval displayed in policies page info banner from osquery_detail to osquery_policy
|
||||
|
|
@ -95,6 +95,7 @@ export interface IConfig {
|
|||
host_expiry_window: number;
|
||||
agent_options: string;
|
||||
osquery_detail: number;
|
||||
osquery_policy: number;
|
||||
tier: string;
|
||||
organization: string;
|
||||
device_count: number;
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ import TeamsDropdown from "./components/TeamsDropdown";
|
|||
const baseClass = "manage-policies-page";
|
||||
|
||||
const DOCS_LINK =
|
||||
"https://fleetdm.com/docs/deploying/configuration#osquery_detail_update_interval";
|
||||
"https://fleetdm.com/docs/deploying/configuration#osquery-policy-update-interval";
|
||||
|
||||
const renderInheritedPoliciesButtonText = (
|
||||
showPolicies: boolean,
|
||||
|
|
@ -106,7 +106,7 @@ const ManagePolicyPage = (managePoliciesPageProps: {
|
|||
const [showRemovePoliciesModal, setShowRemovePoliciesModal] = useState(false);
|
||||
const [showInheritedPolicies, setShowInheritedPolicies] = useState(false);
|
||||
const [updateInterval, setUpdateInterval] = useState<string>(
|
||||
"osquery detail update interval"
|
||||
"osquery policy update interval"
|
||||
);
|
||||
// ===== local state
|
||||
|
||||
|
|
@ -302,10 +302,10 @@ const ManagePolicyPage = (managePoliciesPageProps: {
|
|||
selectedTeamId,
|
||||
]);
|
||||
|
||||
// Pull osquery detail update interval value from config, reformat, and set as updateInterval.
|
||||
// Pull osquery policy update interval value from config, reformat, and set as updateInterval.
|
||||
useEffect(() => {
|
||||
if (config) {
|
||||
const { osquery_detail: interval } = config;
|
||||
const { osquery_policy: interval } = config;
|
||||
interval &&
|
||||
setUpdateInterval(secondsToHms(inMilliseconds(interval) / 1000));
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue