From 4cc5bfbe4adffa1990b2d553860f929eceeff0ec Mon Sep 17 00:00:00 2001 From: Luke Heath Date: Fri, 4 Aug 2023 14:49:25 -0700 Subject: [PATCH] UI: Add missing call to new query path making function (#13162) Reapplies https://github.com/fleetdm/fleet/pull/13156/ --- changes/13154-fix-host-details-custom-query-route | 1 + .../pages/hosts/details/HostDetailsPage/HostDetailsPage.tsx | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 changes/13154-fix-host-details-custom-query-route diff --git a/changes/13154-fix-host-details-custom-query-route b/changes/13154-fix-host-details-custom-query-route new file mode 100644 index 0000000000..ad3ce32d6e --- /dev/null +++ b/changes/13154-fix-host-details-custom-query-route @@ -0,0 +1 @@ +* Fixed a bug that occurred when a user tries to create a custom query from the "query" action on a host's details page. diff --git a/frontend/pages/hosts/details/HostDetailsPage/HostDetailsPage.tsx b/frontend/pages/hosts/details/HostDetailsPage/HostDetailsPage.tsx index f121702357..788e6fceb3 100644 --- a/frontend/pages/hosts/details/HostDetailsPage/HostDetailsPage.tsx +++ b/frontend/pages/hosts/details/HostDetailsPage/HostDetailsPage.tsx @@ -486,7 +486,9 @@ const HostDetailsPage = ({ }; const onQueryHostCustom = () => { - router.push(PATHS.NEW_QUERY + TAGGED_TEMPLATES.queryByHostRoute(host?.id)); + router.push( + PATHS.NEW_QUERY() + TAGGED_TEMPLATES.queryByHostRoute(host?.id) + ); }; const onQueryHostSaved = (selectedQuery: ISchedulableQuery) => {