From a8b2a75dab7d96910a2e506a0982a1551937ab82 Mon Sep 17 00:00:00 2001 From: Beto Muniz Date: Wed, 7 Aug 2024 18:08:13 -0300 Subject: [PATCH] GOps: Setup FullStory in the IRM configuration tracker (#90442) * GOps: Setup support FullStory in the IRM configuration tracker * fix: improve fs-unmask class application * fix: remove extrtag as requested in PR review * fix: revert extratag removed since it affects UI alignment * fix: wrap text with trans component as betterer ask * fix: update extraction --- .betterer.results | 3 --- .../components/ConfigCard.tsx | 27 +++++++++++-------- .../components/Essentials.tsx | 23 ++++++++++------ .../components/ProgressBar.tsx | 4 +-- public/locales/en-US/grafana.json | 1 + public/locales/pseudo-LOCALE/grafana.json | 1 + 6 files changed, 35 insertions(+), 24 deletions(-) diff --git a/.betterer.results b/.betterer.results index 63f14419f75..68d2a6b0b03 100644 --- a/.betterer.results +++ b/.betterer.results @@ -4435,9 +4435,6 @@ exports[`better eslint`] = { [0, 0, 0, "Do not use any type assertions.", "0"], [0, 0, 0, "Do not use any type assertions.", "1"] ], - "public/app/features/gops/configuration-tracker/components/ConfigCard.tsx:5381": [ - [0, 0, 0, "No untranslated strings. Wrap text with ", "0"] - ], "public/app/features/gops/configuration-tracker/components/ConfigureIRM.tsx:5381": [ [0, 0, 0, "No untranslated strings. Wrap text with ", "0"], [0, 0, 0, "No untranslated strings. Wrap text with ", "1"] diff --git a/public/app/features/gops/configuration-tracker/components/ConfigCard.tsx b/public/app/features/gops/configuration-tracker/components/ConfigCard.tsx index f4f4986e2ea..12a4a50ff5e 100644 --- a/public/app/features/gops/configuration-tracker/components/ConfigCard.tsx +++ b/public/app/features/gops/configuration-tracker/components/ConfigCard.tsx @@ -3,6 +3,7 @@ import { css } from '@emotion/css'; import { GrafanaTheme2 } from '@grafana/data'; import { Button, Icon, LoadingPlaceholder, Stack, useStyles2 } from '@grafana/ui'; +import { Trans } from '@grafana/ui/src/utils/i18n'; import { IrmCardConfiguration } from './ConfigureIRM'; import { ProgressBar, StepsStatus } from './ProgressBar'; @@ -20,17 +21,21 @@ export function ConfigCard({ config, handleActionClick, isLoading = false }: Con
- - {config.title} - {config.titleIcon && } - {/* Only show check icon when not loading */} - {config.isDone && !isLoading && } - - {config.stepsDone && config.totalStepsToDo && !isLoading && ( - - - complete +
+ + {config.title} + {config.titleIcon && } + {/* Only show check icon when not loading */} + {config.isDone && !isLoading && } +
+ {config.stepsDone && config.totalStepsToDo && !isLoading && ( +
+ + + complete + +
)}
@@ -42,7 +47,7 @@ export function ConfigCard({ config, handleActionClick, isLoading = false }: Con
- diff --git a/public/app/features/gops/configuration-tracker/components/Essentials.tsx b/public/app/features/gops/configuration-tracker/components/Essentials.tsx index 0b4cddbcda9..a55b1c699b2 100644 --- a/public/app/features/gops/configuration-tracker/components/Essentials.tsx +++ b/public/app/features/gops/configuration-tracker/components/Essentials.tsx @@ -48,9 +48,13 @@ function Section({ section }: SectionProps) { const styles = useStyles2(getStyles); return (
- {section.title} + + {section.title} + - {section.description} + + {section.description} + {section.steps.map((step, index) => ( @@ -61,9 +65,9 @@ function Section({ section }: SectionProps) { } function DoneIcon({ done }: { done: boolean }) { return done ? ( - + ) : ( - + ); } interface StepProps { @@ -75,7 +79,9 @@ function Step({ step }: StepProps) { {step.done !== undefined && } - {step.title} + + {step.title} + @@ -108,7 +114,7 @@ function OpenLinkButton(props: LinkButtonProps) { : ''; const urlToGo = done ? urlToGoWhenDone : urlToGoWhenNotDone; return ( - + {done ? (labelOnDone ?? label) : label} ); @@ -144,11 +150,12 @@ function StepButton({ return ( + {options?.map((option) => ( { onClickOption?.(option.value); }} @@ -157,7 +164,7 @@ function StepButton({ } > - diff --git a/public/app/features/gops/configuration-tracker/components/ProgressBar.tsx b/public/app/features/gops/configuration-tracker/components/ProgressBar.tsx index fc9f4d8636b..46009dbf528 100644 --- a/public/app/features/gops/configuration-tracker/components/ProgressBar.tsx +++ b/public/app/features/gops/configuration-tracker/components/ProgressBar.tsx @@ -16,9 +16,9 @@ export function ProgressBar({ stepsDone, totalStepsToDo }: { stepsDone: number; } export function StepsStatus({ stepsDone, totalStepsToDo }: { stepsDone: number; totalStepsToDo: number }) { return ( -
+ {stepsDone} of {totalStepsToDo} -
+ ); } diff --git a/public/locales/en-US/grafana.json b/public/locales/en-US/grafana.json index ebb53e1ea5b..74e4296fc69 100644 --- a/public/locales/en-US/grafana.json +++ b/public/locales/en-US/grafana.json @@ -325,6 +325,7 @@ }, "save": "Save" }, + "complete": "complete", "connections": { "connect-data": { "category-header-label": "Data sources", diff --git a/public/locales/pseudo-LOCALE/grafana.json b/public/locales/pseudo-LOCALE/grafana.json index a721e58ce1f..70255535804 100644 --- a/public/locales/pseudo-LOCALE/grafana.json +++ b/public/locales/pseudo-LOCALE/grafana.json @@ -325,6 +325,7 @@ }, "save": "Ŝävę" }, + "complete": "čőmpľęŧę", "connections": { "connect-data": { "category-header-label": "Đäŧä şőūřčęş",