Skip to content

Commit

Permalink
🐛 Add conditional tooltip and update template
Browse files Browse the repository at this point in the history
Signed-off-by: ibolton336 <ibolton@redhat.com>
  • Loading branch information
ibolton336 committed Dec 18, 2023
1 parent fa663da commit 0996493
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
21 changes: 21 additions & 0 deletions client/public/templates/questionnaire-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ sections:
- order: 1
text: What is the main technology in your application?
explanation: Identify the main framework or technology used in your application.
includeFor:
- category: Technology
tag: Java
answers:
- order: 1
text: Quarkus
Expand All @@ -17,6 +20,9 @@ sections:
applyTags:
- category: Technology
tag: Quarkus
autoAnswerFor:
- category: Technology
tag: Quarkus
- order: 2
text: Spring Boot
risk: green
Expand All @@ -25,6 +31,9 @@ sections:
applyTags:
- category: Technology
tag: Spring Boot
autoAnswerFor:
- category: Technology
tag: Spring Boot
- order: 3
text: Legacy Monolithic Application
risk: red
Expand All @@ -33,6 +42,9 @@ sections:
applyTags:
- category: Architecture
tag: Monolith
autoAnswerFor:
- category: Architecture
tag: Monolith
- order: 2
text: Does your application use a microservices architecture?
explanation: Assess if the application is built using a microservices architecture.
Expand All @@ -45,11 +57,17 @@ sections:
applyTags:
- category: Architecture
tag: Microservices
autoAnswerFor:
- category: Architecture
tag: Microservices
- order: 2
text: No
risk: yellow
rationale: Non-microservices architectures may face scalability issues.
mitigation: Assess the feasibility of transitioning to microservices.
autoAnswerFor:
- category: Architecture
tag: Monolith
- order: 3
text: Unknown
risk: unknown
Expand All @@ -59,6 +77,9 @@ sections:
- order: 3
text: Is your application's data storage cloud-optimized?
explanation: Evaluate if the data storage solution is optimized for cloud usage.
includeFor:
- category: Technology
tag: Java
answers:
- order: 1
text: Cloud-Native Storage Solution
Expand Down
6 changes: 4 additions & 2 deletions client/src/app/components/questions-table/questions-table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { useTranslation } from "react-i18next";
import spacing from "@patternfly/react-styles/css/utilities/Spacing/spacing";
import { Assessment, Question, Questionnaire } from "@app/api/models";
import { useLocalTableControls } from "@app/hooks/table-controls";
import { Label } from "@patternfly/react-core";
import { Label, Tooltip } from "@patternfly/react-core";
import { NoDataEmptyState } from "@app/components/NoDataEmptyState";
import AnswerTable from "@app/components/answer-table/answer-table";
import { AxiosError } from "axios";
Expand Down Expand Up @@ -113,7 +113,9 @@ const QuestionsTable: React.FC<{
>
{(!!question?.includeFor?.length ||
!!question?.excludeFor?.length) && (
<Label className={spacing.mrSm}>Conditional</Label>
<Tooltip content={"Question is conditionnally added"}>
<Label className={spacing.mrSm}>Conditional </Label>
</Tooltip>
)}
{question.text}
</Td>
Expand Down

0 comments on commit 0996493

Please sign in to comment.