Fix display value for policy update interval (#2468)

This commit is contained in:
gillespi314 2021-10-11 10:13:10 -05:00 committed by GitHub
parent daa8a5d31a
commit 39da3fd84d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 4 deletions

View file

@ -0,0 +1 @@
* Change update interval displayed in policies page info banner from osquery_detail to osquery_policy

View file

@ -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;

View file

@ -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));
}