Skip to content

Commit

Permalink
dashboard: set correct default setting for telemetry
Browse files Browse the repository at this point in the history
Fixes #8344

`Enable Service Ping` seems to be set to `false` by defaut until
the UI is re-loaded. This fixes it by also adding the retrieval
logic into `useEffect` thereby calling it everytime, even during
initial render.

Signed-off-by: Tarun Pothulapati <[email protected]>
  • Loading branch information
Pothulapati committed Feb 24, 2022
1 parent aa52b3e commit 7829016
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion components/dashboard/src/admin/Settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,11 @@ export default function Settings() {
(async () => {
const data = await getGitpodService().server.adminGetTelemetryData();
setTelemetryData(data)

const setting = await getGitpodService().server.adminGetSettings();
setAdminSettings(setting)
})();
});
}, []);

if (!user || !user?.rolesOrPermissions?.includes('admin')) {
return <Redirect to="/"/>
Expand Down

0 comments on commit 7829016

Please sign in to comment.