Skip to content

Commit

Permalink
chore: run format
Browse files Browse the repository at this point in the history
  • Loading branch information
Mohamed-Hacene committed Dec 5, 2024
1 parent 1a39eb0 commit ddc753f
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 9 deletions.
2 changes: 1 addition & 1 deletion backend/ebios_rm/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class AttackPathViewSet(BaseModelViewSet):

class OperationalScenarioViewSet(BaseModelViewSet):
model = OperationalScenario

filterset_fields = [
"ebios_rm_study",
]
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,11 @@
<AutocompleteSelect
{form}
multiple
options={getOptions({ objects: model.foreignKeys['threats'],
options={getOptions({
objects: model.foreignKeys['threats'],
extra_fields: [['folder', 'str']],
label: 'auto'
})}
})}
field="threats"
cacheLock={cacheLocks['threats']}
bind:cachedValue={formDataCache['threats']}
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/lib/utils/crud.ts
Original file line number Diff line number Diff line change
Expand Up @@ -640,13 +640,13 @@ export const URL_MODEL_MAP: ModelMap = {
{ field: 'pertinence' }
]
},
'attack_paths': {
attack_paths: {
endpointUrl: 'ebios-rm/attack-paths',
name: 'attackpath',
localName: 'attackPath',
localNamePlural: 'attackPaths',
verboseName: 'Attack path',
verboseNamePlural: 'Attack paths',
verboseNamePlural: 'Attack paths'
},
'operational-scenarios': {
endpointUrl: 'ebios-rm/operational-scenarios',
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/lib/utils/schemas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ export const operationalScenarioSchema = z.object({
description: z.string(),
likelihood: z.number().optional().default(-1),
is_selected: z.boolean().optional().default(false),
justification: z.string().optional(),
justification: z.string().optional()
});

const SCHEMA_MAP: Record<string, AnyZodObject> = {
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/lib/utils/table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -556,6 +556,6 @@ export const listViewFields: ListViewFieldsConfig = {
},
'operational-scenarios': {
head: ['description', 'threats', 'likelihood'],
body: ['description', 'threats', 'likelihood'],
body: ['description', 'threats', 'likelihood']
}
};
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,16 @@
{ title: safeTranslate(m.ebiosWs3_3()), status: 'done', href: '#' }
],
ws4: [
{ title: safeTranslate(m.ebiosWs4_1()), status: 'to_do', href: `${$page.url.pathname}/workshop-four/operational-scenario?next=${$page.url.pathname}` },
{ title: safeTranslate(m.ebiosWs4_2()), status: 'to_do', href: `${$page.url.pathname}/workshop-four/operational-scenario?next=${$page.url.pathname}` }
{
title: safeTranslate(m.ebiosWs4_1()),
status: 'to_do',
href: `${$page.url.pathname}/workshop-four/operational-scenario?next=${$page.url.pathname}`
},
{
title: safeTranslate(m.ebiosWs4_2()),
status: 'to_do',
href: `${$page.url.pathname}/workshop-four/operational-scenario?next=${$page.url.pathname}`
}
],
ws5: [
{ title: safeTranslate(m.ebiosWs5_1()), status: 'done', href: '#' },
Expand Down

0 comments on commit ddc753f

Please sign in to comment.