Skip to content

Commit

Permalink
✨ Convert assessment table to new table & begin assessment flow chang…
Browse files Browse the repository at this point in the history
…es (#1294)

- Update questionnaire TS model to match hub proposal

```
type Questionnaire struct {
	Resource
	Name         string
	Description  string
	Revision     uint
	Required     bool
	Sections     []Section
	Thresholds   Thresholds
	RiskMessages RiskMessages
}

type Assessment struct {
	Resource
	Application   *Ref
	Archetype     *Ref
	Questionnaire *Ref
	Sections      []Section
}

```
- Convert assessment table to use new table format
- No longer allow bulk assessment on assessment page top level toolbar
as this functionality is moving to Archetypes. Review & assessment
buttons moved to dropdown kebabs on the row level.
- Assessment Actions page with application level
questionnaires/assessments listed. TODO: [Add dynamic actions
button](#1299) based on
current assessment status
- Adds placeholder assessment modal when assessment action is triggered
from the assessment table row. TODO: [Add existing archetype
check](#1298)
- TODO: [View assessments page for existing
assessments](#1301) for
viewing existing assessments when clicking assess on an application that
already has an associated completed assessment
- TODO: [Convert assessment wizard
](#1306)
-TODO: Fix empty state initial render
#1311

Signed-off-by: ibolton336 <[email protected]>
  • Loading branch information
ibolton336 authored Aug 24, 2023
1 parent 8ce3163 commit c763fc3
Show file tree
Hide file tree
Showing 12 changed files with 1,487 additions and 703 deletions.
3 changes: 3 additions & 0 deletions client/public/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"analysisDetails": "Analysis details",
"analyze": "Analyze",
"assess": "Assess",
"accept": "Accept",
"back": "Back",
"cancel": "Cancel",
"checkDocumentation": "Check documentation",
Expand Down Expand Up @@ -110,6 +111,7 @@
"import": "Import {{what}}",
"leavePage": "Leave page",
"new": "New {{what}}",
"newAssessment": "New assessment",
"newApplication": "New application",
"newBusinessService": "New business service",
"newJobFunction": "New job function",
Expand Down Expand Up @@ -156,6 +158,7 @@
"noResultsFoundBody": "No results match the filter criteria. Remove all filters or clear all filters to show results.",
"noResultsFoundTitle": "No results found",
"overrideAssessmentConfirmation": "This application has already been assessed. Do you want to continue?",
"overrideArchetypeConfirmation": "The archetype for this application already has an assessment. Do you want to create a dedicated assessment for this application?",
"overrideReviewConfirmation": "This application has already been reviewed. Do you want to continue?",
"reasonForError": "The reported reason for the error:",
"reviewInstructions": "Use this section to provide your assessment of the possible migration/modernization plan and effort estimation.",
Expand Down
5 changes: 5 additions & 0 deletions client/src/app/Paths.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export enum Paths {
applicationsImports = "/applications/application-imports",
applicationsImportsDetails = "/applications/application-imports/:importId",
applicationsAssessment = "/applications/assessment/:assessmentId",
assessmentActions = "/applications/assessment-actions/:applicationId",
applicationsReview = "/applications/application/:applicationId/review",
applicationsAnalysis = "/applications/analysis",
controls = "/controls",
Expand Down Expand Up @@ -56,6 +57,10 @@ export interface AssessmentRoute {
assessmentId: string;
}

export interface AssessmentActionsRoute {
applicationId: string;
}

export interface ReviewRoute {
applicationId: string;
}
Expand Down
10 changes: 10 additions & 0 deletions client/src/app/Routes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ const AssessmentSettings = lazy(
const Questionnaire = lazy(
() => import("./pages/assessment-management/questionnaire/questionnaire-page")
);
const AssessmentActions = lazy(
() =>
import("./pages/applications/assessment-actions/assessment-actions-page")
);
export interface IRoute {
path: string;
comp: React.ComponentType<any>;
Expand All @@ -66,6 +70,12 @@ export const devRoutes: IRoute[] = [
comp: ApplicationAssessment,
exact: false,
},
{
path: Paths.assessmentActions,
comp: AssessmentActions,
exact: false,
},

{
path: Paths.applicationsReview,
comp: Reviews,
Expand Down
16 changes: 12 additions & 4 deletions client/src/app/api/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ export interface Application {
repository?: Repository;
binary?: string;
migrationWave: Ref | null;
assessments?: Questionnaire[];
}

export interface Review {
Expand Down Expand Up @@ -707,13 +708,19 @@ export type HubFile = {

export interface Questionnaire {
id: number;
required: boolean;
name: string;
description: string;
revision: number;
questions: number;
rating: string;
dateImported: string;
required: boolean;
system: boolean;
sections: Section[];
thresholds: Thresholds;
riskMessages: RiskMessages;
}

export interface RiskMessages {
green: string;
red: string;
Expand All @@ -728,18 +735,19 @@ export interface Section {
// TODO: Rename after removing pathfinder
export interface CustomYamlAssessmentQuestion {
answers: Answer[];
explanation: string;
explanation?: string;
formulation: string;
include_if_tags_present?: Tag[];
skip_if_tags_present?: Tag[];
}

export interface Answer {
choice: string;
mitigation: string;
rationale: string;
mitigation?: string;
rationale?: string;
risk: string;
autoanswer_if_tags_present?: Tag[];
autotag?: Tag[];
}
export interface Thresholds {
red: string;
Expand Down
Loading

0 comments on commit c763fc3

Please sign in to comment.