From 7af97579fe7ce41bfab8af77dccbff39eee95c35 Mon Sep 17 00:00:00 2001 From: Martavis Parker <47053705+martavis@users.noreply.github.com> Date: Wed, 23 Jun 2021 15:19:01 -0700 Subject: [PATCH] Frontend of usage statistics (#1177) * #454 added usage stats disclaimer to setup confirmation * #454 added new section to settings for usage stats * #454 fixed vulnerability for hrefs * removed jsx file * #454 added logic to checkbox * #454 created modal to preview usage stats; cleanup * fixed tests and linting --- frontend/components/buttons/Button/Button.tsx | 2 +- .../ConfirmationPage/ConfirmationPage.tsx | 6 +- .../ConfirmationPage/_styles.scss | 8 + .../RegistrationForm/RegistrationForm.jsx | 2 +- .../RegistrationForm.tests.jsx | 2 +- .../admin/AppConfigForm/AppConfigForm.jsx | 580 ++++++++++-------- .../forms/admin/AppConfigForm/_styles.scss | 27 +- frontend/fleet/helpers.ts | 30 + frontend/interfaces/config.ts | 2 + .../AgentOptionsPage/AgentOptionsPage.tsx | 2 +- .../components/EmptyTeams/EmptyTeams.tsx | 2 +- .../components/UserForm/UserForm.tsx | 4 +- frontend/styles/global/_global.scss | 24 + frontend/styles/var/colors.scss | 4 + go.sum | 118 ++++ 15 files changed, 559 insertions(+), 254 deletions(-) diff --git a/frontend/components/buttons/Button/Button.tsx b/frontend/components/buttons/Button/Button.tsx index 5ba27aa9da..54d286cf35 100644 --- a/frontend/components/buttons/Button/Button.tsx +++ b/frontend/components/buttons/Button/Button.tsx @@ -14,7 +14,7 @@ interface IButtonProps { tabIndex?: number; type?: "button" | "submit" | "reset"; title?: string; - variant?: string; + variant?: string; // default, brand, inverse, alert, disabled } // eslint-disable-next-line @typescript-eslint/no-empty-interface diff --git a/frontend/components/forms/RegistrationForm/ConfirmationPage/ConfirmationPage.tsx b/frontend/components/forms/RegistrationForm/ConfirmationPage/ConfirmationPage.tsx index 3b571efda8..76a638e5da 100644 --- a/frontend/components/forms/RegistrationForm/ConfirmationPage/ConfirmationPage.tsx +++ b/frontend/components/forms/RegistrationForm/ConfirmationPage/ConfirmationPage.tsx @@ -101,7 +101,11 @@ const ConfirmationPage = ({ {importOsqueryConfig()} - +
+ Fleet Device Management Inc. periodically collects anonymous information + about your instance. Sending usage statistics from your Fleet instance + is optional and can be disabled in settings. +
An example JSON payload sent to Fleet Device Management Inc.
+ +