import React from "react"; import { getPathWithQueryParams } from "utilities/url"; import CustomLink from "components/CustomLink"; import paths from "router/paths"; interface IRunScriptHelpTextProps { className?: string; isTechnician: boolean; canRunScripts: boolean; teamId?: number; } const RunScriptHelpText = ({ className, isTechnician, canRunScripts, teamId, }: IRunScriptHelpTextProps) => { const hostsUrl = getPathWithQueryParams(paths.MANAGE_HOSTS, { fleet_id: teamId, }); if (isTechnician) { return (
To run this script on a host, go to the{" "} page and select a host. Then, click Actions > Run script.
); } return (
To run this script on a host, go to the{" "} page and select a host. {canRunScripts && ( <>
To run the script across multiple hosts, add a policy automation on the{" "} {" "} page. )}
); }; export default RunScriptHelpText;