diff --git a/frontend/src/lib/components/Forms/ModelForm.svelte b/frontend/src/lib/components/Forms/ModelForm.svelte index b3d18a1a0..458849090 100644 --- a/frontend/src/lib/components/Forms/ModelForm.svelte +++ b/frontend/src/lib/components/Forms/ModelForm.svelte @@ -1,30 +1,43 @@ + +{#if schema.shape.category} + +{/if} + + + + + + + + + + diff --git a/frontend/src/lib/components/Forms/ModelForm/AssetForm.svelte b/frontend/src/lib/components/Forms/ModelForm/AssetForm.svelte new file mode 100644 index 000000000..18c652005 --- /dev/null +++ b/frontend/src/lib/components/Forms/ModelForm/AssetForm.svelte @@ -0,0 +1,52 @@ + + + + + + diff --git a/frontend/src/lib/components/Forms/ModelForm/ComplianceAssessmentForm.svelte b/frontend/src/lib/components/Forms/ModelForm/ComplianceAssessmentForm.svelte new file mode 100644 index 000000000..5d3fd22ae --- /dev/null +++ b/frontend/src/lib/components/Forms/ModelForm/ComplianceAssessmentForm.svelte @@ -0,0 +1,132 @@ + + +{#if context === 'fromBaseline' && initialData.baseline} + +{/if} + + + + { + if (e.detail) { + await fetch(`/frameworks/${e.detail}`) + .then((r) => r.json()) + .then((r) => { + const implementation_groups = r['implementation_groups_definition'] || []; + model.selectOptions['selected_implementation_groups'] = implementation_groups.map( + (group) => ({ label: group.name, value: group.ref_id }) + ); + }); + } + }} +/> +{#if model.selectOptions['selected_implementation_groups'] && model.selectOptions['selected_implementation_groups'].length} + +{/if} + + + + + diff --git a/frontend/src/lib/components/Forms/ModelForm/EntityAssessmentForm.svelte b/frontend/src/lib/components/Forms/ModelForm/EntityAssessmentForm.svelte new file mode 100644 index 000000000..e4383a846 --- /dev/null +++ b/frontend/src/lib/components/Forms/ModelForm/EntityAssessmentForm.svelte @@ -0,0 +1,199 @@ + + + +{#if !data.compliance_assessment} + + { + if (e.detail) { + await fetch(`/frameworks/${e.detail}`) + .then((r) => r.json()) + .then((r) => { + const implementation_groups = r['implementation_groups_definition'] || []; + model.selectOptions['selected_implementation_groups'] = implementation_groups.map( + (group) => ({ label: group.name, value: group.ref_id }) + ); + }); + } + }} + /> + {#if model.selectOptions['selected_implementation_groups'] && model.selectOptions['selected_implementation_groups'].length} + + {/if} +{/if} + + + + + + + + + + + + + + + diff --git a/frontend/src/lib/components/Forms/ModelForm/EntityForm.svelte b/frontend/src/lib/components/Forms/ModelForm/EntityForm.svelte new file mode 100644 index 000000000..5a90d9541 --- /dev/null +++ b/frontend/src/lib/components/Forms/ModelForm/EntityForm.svelte @@ -0,0 +1,40 @@ + + + + + diff --git a/frontend/src/lib/components/Forms/ModelForm/EvidenceForm.svelte b/frontend/src/lib/components/Forms/ModelForm/EvidenceForm.svelte new file mode 100644 index 000000000..cf42cab3e --- /dev/null +++ b/frontend/src/lib/components/Forms/ModelForm/EvidenceForm.svelte @@ -0,0 +1,50 @@ + + + + + +{#if !(initialData.applied_controls || initialData.requirement_assessments)} + +{:else} + +{/if} + diff --git a/frontend/src/lib/components/Forms/ModelForm/FrameworkForm.svelte b/frontend/src/lib/components/Forms/ModelForm/FrameworkForm.svelte new file mode 100644 index 000000000..a327b1d57 --- /dev/null +++ b/frontend/src/lib/components/Forms/ModelForm/FrameworkForm.svelte @@ -0,0 +1,27 @@ + + + + diff --git a/frontend/src/lib/components/Forms/ModelForm/ProjectForm.svelte b/frontend/src/lib/components/Forms/ModelForm/ProjectForm.svelte new file mode 100644 index 000000000..e4d9c86bf --- /dev/null +++ b/frontend/src/lib/components/Forms/ModelForm/ProjectForm.svelte @@ -0,0 +1,40 @@ + + + + + diff --git a/frontend/src/lib/components/Forms/ModelForm/ReferenceControlForm.svelte b/frontend/src/lib/components/Forms/ModelForm/ReferenceControlForm.svelte new file mode 100644 index 000000000..0ec8dec7b --- /dev/null +++ b/frontend/src/lib/components/Forms/ModelForm/ReferenceControlForm.svelte @@ -0,0 +1,63 @@ + + + + + + + + diff --git a/frontend/src/lib/components/Forms/ModelForm/RepresentativeForm.svelte b/frontend/src/lib/components/Forms/ModelForm/RepresentativeForm.svelte new file mode 100644 index 000000000..fc2dcda95 --- /dev/null +++ b/frontend/src/lib/components/Forms/ModelForm/RepresentativeForm.svelte @@ -0,0 +1,62 @@ + + + +{#if !data.user} + +{/if} + + + + + diff --git a/frontend/src/lib/components/Forms/ModelForm/RequirementAssessmentForm.svelte b/frontend/src/lib/components/Forms/ModelForm/RequirementAssessmentForm.svelte new file mode 100644 index 000000000..567472744 --- /dev/null +++ b/frontend/src/lib/components/Forms/ModelForm/RequirementAssessmentForm.svelte @@ -0,0 +1,40 @@ + + + + + + + + diff --git a/frontend/src/lib/components/Forms/ModelForm/RiskAcceptanceForm.svelte b/frontend/src/lib/components/Forms/ModelForm/RiskAcceptanceForm.svelte new file mode 100644 index 000000000..d2b019da6 --- /dev/null +++ b/frontend/src/lib/components/Forms/ModelForm/RiskAcceptanceForm.svelte @@ -0,0 +1,72 @@ + + + +{#if object.id && $page.data.user.id === object.approver} + +{/if} + + + diff --git a/frontend/src/lib/components/Forms/ModelForm/RiskAssessmentForm.svelte b/frontend/src/lib/components/Forms/ModelForm/RiskAssessmentForm.svelte new file mode 100644 index 000000000..ec016e9f6 --- /dev/null +++ b/frontend/src/lib/components/Forms/ModelForm/RiskAssessmentForm.svelte @@ -0,0 +1,104 @@ + + + + +{#if !riskAssessmentDuplication} + + + + + + + +{/if} diff --git a/frontend/src/lib/components/Forms/ModelForm/RiskScenarioForm.svelte b/frontend/src/lib/components/Forms/ModelForm/RiskScenarioForm.svelte new file mode 100644 index 000000000..b89866439 --- /dev/null +++ b/frontend/src/lib/components/Forms/ModelForm/RiskScenarioForm.svelte @@ -0,0 +1,40 @@ + + + + diff --git a/frontend/src/lib/components/Forms/ModelForm/SolutionForm.svelte b/frontend/src/lib/components/Forms/ModelForm/SolutionForm.svelte new file mode 100644 index 000000000..d496dcca7 --- /dev/null +++ b/frontend/src/lib/components/Forms/ModelForm/SolutionForm.svelte @@ -0,0 +1,41 @@ + + + + + diff --git a/frontend/src/lib/components/Forms/ModelForm/SsoSettingForm.svelte b/frontend/src/lib/components/Forms/ModelForm/SsoSettingForm.svelte new file mode 100644 index 000000000..66779c374 --- /dev/null +++ b/frontend/src/lib/components/Forms/ModelForm/SsoSettingForm.svelte @@ -0,0 +1,301 @@ + + + + + + {#if data.provider !== 'saml'} + + {m.IdPConfiguration()} + + + + + {#if data.provider !== 'saml'} + + + {/if} + + + {/if} + {#if data.provider === 'saml'} + + {m.SAMLIdPConfiguration()} + + + Option 1: Fill the metadata url + + + + {m.or()} + + + Option 2: Fill the SSO URL, SLO URL and x509cert + + + + + + + + {m.SPConfiguration()} + + + + + + {m.advancedSettings()} + + + + + + + + + + + + + + + + + + + + + + + + + {/if} + diff --git a/frontend/src/lib/components/Forms/ModelForm/ThreatForm.svelte b/frontend/src/lib/components/Forms/ModelForm/ThreatForm.svelte new file mode 100644 index 000000000..8189b9646 --- /dev/null +++ b/frontend/src/lib/components/Forms/ModelForm/ThreatForm.svelte @@ -0,0 +1,46 @@ + + + + + + diff --git a/frontend/src/lib/components/Forms/ModelForm/UserForm.svelte b/frontend/src/lib/components/Forms/ModelForm/UserForm.svelte new file mode 100644 index 000000000..fa9f885fb --- /dev/null +++ b/frontend/src/lib/components/Forms/ModelForm/UserForm.svelte @@ -0,0 +1,53 @@ + + + +{#if shape.first_name && shape.last_name} + + +{/if} +{#if shape.user_groups} + +{/if} +{#if shape.is_active} + +{/if}
Option 1: Fill the metadata url
Option 2: Fill the SSO URL, SLO URL and x509cert