fleet/frontend/pages/hosts/details/cards/AgentOptions/AgentOptions.tsx
Martavis Parker 384c987389
Removed all traces of Redux from the app! (#5287)
* clean up routes and useless components

* component clean up

* removed redux from routes

* rename file

* moved useDeepEffect hook with others

* removed redux, fleet, app_constants dirs; added types to utilities

* style cleanup

* typo fix

* removed unused ts-ignore comments

* removed redux packages!!!

* formatting

* fixed typing for simple search function

* updated frontend readme
2022-04-22 09:45:35 -07:00

42 lines
1.3 KiB
TypeScript

import React from "react";
import { secondsToHms } from "utilities/helpers";
interface IAgentOptionsProps {
osqueryData: { [key: string]: any };
wrapFleetHelper: (helperFn: (value: any) => string, value: string) => string;
}
const AgentOptions = ({
osqueryData,
wrapFleetHelper,
}: IAgentOptionsProps): JSX.Element => {
return (
<div className="section osquery col-50">
<p className="section__header">Agent options</p>
<div className="info-grid">
<div className="info-grid__block">
<span className="info-grid__header">Config TLS refresh</span>
<span className="info-grid__data">
{wrapFleetHelper(secondsToHms, osqueryData.config_tls_refresh)}
</span>
</div>
<div className="info-grid__block">
<span className="info-grid__header">Logger TLS period</span>
<span className="info-grid__data">
{wrapFleetHelper(secondsToHms, osqueryData.logger_tls_period)}
</span>
</div>
<div className="info-grid__block">
<span className="info-grid__header">Distributed interval</span>
<span className="info-grid__data">
{wrapFleetHelper(secondsToHms, osqueryData.distributed_interval)}
</span>
</div>
</div>
</div>
);
};
export default AgentOptions;