Skip to content

Commit

Permalink
chore: Run formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
nas-tabchiche committed Apr 29, 2024
1 parent aaac73b commit af4f9b3
Show file tree
Hide file tree
Showing 4 changed files with 149 additions and 149 deletions.
4 changes: 2 additions & 2 deletions frontend/src/lib/utils/table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,11 @@ export const listViewFields = {
body: ['ref_id', 'name', 'description', 'framework'],
meta: ['id', 'urn']
},
"stored-libraries": {
'stored-libraries': {
head: ['ref', 'name', 'description', 'language', 'overview'],
body: ['ref_id', 'name', 'description', 'locale', 'overview']
},
"loaded-libraries": {
'loaded-libraries': {
head: ['ref', 'name', 'description', 'language', 'overview'],
body: ['ref_id', 'name', 'description', 'locale', 'overview']
}
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/routes/(app)/libraries/[id=urn]/+server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import { error, type NumericRange } from '@sveltejs/kit';
import type { RequestHandler } from './$types';

export const GET: RequestHandler = async ({ fetch, url, params }) => {
const isLoaded = url.searchParams.has("loaded");
const URLModel = isLoaded ? "loaded-libraries" : "stored-libraries";
const isLoaded = url.searchParams.has('loaded');
const URLModel = isLoaded ? 'loaded-libraries' : 'stored-libraries';
const endpoint = `${BASE_API_URL}/${URLModel}/${params.id}/`;

const res = await fetch(endpoint);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { error, type NumericRange } from '@sveltejs/kit';
import type { RequestHandler } from './$types';

export const GET: RequestHandler = async ({ fetch, params, url }) => {
const URLModel = url.searchParams.has("loaded") ? "loaded-libraries" : "stored-libraries";
const URLModel = url.searchParams.has('loaded') ? 'loaded-libraries' : 'stored-libraries';
const endpoint = `${BASE_API_URL}/${URLModel}/${params.id}/tree`;

const res = await fetch(endpoint);
Expand Down
288 changes: 144 additions & 144 deletions frontend/tests/utils/test-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,165 +24,165 @@ export default {
analyst: {
name: 'Analyst',
perms: [
"add_project",
"view_project",
"change_project",
"delete_project",
"add_riskassessment",
"view_riskassessment",
"change_riskassessment",
"delete_riskassessment",
"add_appliedcontrol",
"view_appliedcontrol",
"change_appliedcontrol",
"delete_appliedcontrol",
"add_policy",
"view_policy",
"change_policy",
"delete_policy",
"add_riskscenario",
"view_riskscenario",
"change_riskscenario",
"delete_riskscenario",
"add_riskacceptance",
"view_riskacceptance",
"change_riskacceptance",
"delete_riskacceptance",
"add_complianceassessment",
"view_complianceassessment",
"change_complianceassessment",
"delete_complianceassessment",
"view_requirementassessment",
"change_requirementassessment",
"add_evidence",
"view_evidence",
"change_evidence",
"delete_evidence",
"add_asset",
"view_asset",
"change_asset",
"delete_asset",
"add_threat",
"view_threat",
"change_threat",
"delete_threat",
"view_referencecontrol",
"view_folder",
"view_usergroup",
"view_riskmatrix",
"view_requirementnode",
"view_framework",
"view_loadedlibrary",
"view_user",
'add_project',
'view_project',
'change_project',
'delete_project',
'add_riskassessment',
'view_riskassessment',
'change_riskassessment',
'delete_riskassessment',
'add_appliedcontrol',
'view_appliedcontrol',
'change_appliedcontrol',
'delete_appliedcontrol',
'add_policy',
'view_policy',
'change_policy',
'delete_policy',
'add_riskscenario',
'view_riskscenario',
'change_riskscenario',
'delete_riskscenario',
'add_riskacceptance',
'view_riskacceptance',
'change_riskacceptance',
'delete_riskacceptance',
'add_complianceassessment',
'view_complianceassessment',
'change_complianceassessment',
'delete_complianceassessment',
'view_requirementassessment',
'change_requirementassessment',
'add_evidence',
'view_evidence',
'change_evidence',
'delete_evidence',
'add_asset',
'view_asset',
'change_asset',
'delete_asset',
'add_threat',
'view_threat',
'change_threat',
'delete_threat',
'view_referencecontrol',
'view_folder',
'view_usergroup',
'view_riskmatrix',
'view_requirementnode',
'view_framework',
'view_loadedlibrary',
'view_user'
]
},
reader: {
name: 'Reader',
perms: [
"view_project",
"view_riskassessment",
"view_appliedcontrol",
"view_policy",
"view_riskscenario",
"view_riskacceptance",
"view_asset",
"view_threat",
"view_referencecontrol",
"view_folder",
"view_usergroup",
"view_riskmatrix",
"view_complianceassessment",
"view_requirementassessment",
"view_requirementnode",
"view_evidence",
"view_framework",
"view_loadedlibrary",
"view_user",
'view_project',
'view_riskassessment',
'view_appliedcontrol',
'view_policy',
'view_riskscenario',
'view_riskacceptance',
'view_asset',
'view_threat',
'view_referencecontrol',
'view_folder',
'view_usergroup',
'view_riskmatrix',
'view_complianceassessment',
'view_requirementassessment',
'view_requirementnode',
'view_evidence',
'view_framework',
'view_loadedlibrary',
'view_user'
]
},
domainManager: {
name: 'Domain manager',
perms: [
"change_usergroup",
"view_usergroup",
"add_project",
"change_project",
"delete_project",
"view_project",
"add_riskassessment",
"view_riskassessment",
"change_riskassessment",
"delete_riskassessment",
"add_appliedcontrol",
"view_appliedcontrol",
"change_appliedcontrol",
"delete_appliedcontrol",
"add_policy",
"view_policy",
"change_policy",
"delete_policy",
"add_riskscenario",
"view_riskscenario",
"change_riskscenario",
"delete_riskscenario",
"add_riskacceptance",
"view_riskacceptance",
"change_riskacceptance",
"delete_riskacceptance",
"add_asset",
"view_asset",
"change_asset",
"delete_asset",
"add_threat",
"view_threat",
"change_threat",
"delete_threat",
"view_referencecontrol",
"view_folder",
"change_folder",
"add_riskmatrix",
"view_riskmatrix",
"change_riskmatrix",
"delete_riskmatrix",
"add_complianceassessment",
"view_complianceassessment",
"change_complianceassessment",
"delete_complianceassessment",
"view_requirementassessment",
"change_requirementassessment",
"add_evidence",
"view_evidence",
"change_evidence",
"delete_evidence",
"view_requirementnode",
"view_framework",
"view_loadedlibrary",
"view_user",
'change_usergroup',
'view_usergroup',
'add_project',
'change_project',
'delete_project',
'view_project',
'add_riskassessment',
'view_riskassessment',
'change_riskassessment',
'delete_riskassessment',
'add_appliedcontrol',
'view_appliedcontrol',
'change_appliedcontrol',
'delete_appliedcontrol',
'add_policy',
'view_policy',
'change_policy',
'delete_policy',
'add_riskscenario',
'view_riskscenario',
'change_riskscenario',
'delete_riskscenario',
'add_riskacceptance',
'view_riskacceptance',
'change_riskacceptance',
'delete_riskacceptance',
'add_asset',
'view_asset',
'change_asset',
'delete_asset',
'add_threat',
'view_threat',
'change_threat',
'delete_threat',
'view_referencecontrol',
'view_folder',
'change_folder',
'add_riskmatrix',
'view_riskmatrix',
'change_riskmatrix',
'delete_riskmatrix',
'add_complianceassessment',
'view_complianceassessment',
'change_complianceassessment',
'delete_complianceassessment',
'view_requirementassessment',
'change_requirementassessment',
'add_evidence',
'view_evidence',
'change_evidence',
'delete_evidence',
'view_requirementnode',
'view_framework',
'view_loadedlibrary',
'view_user'
]
},
approver: {
name: 'Approver',
perms: [
"view_project",
"view_riskassessment",
"view_appliedcontrol",
"view_policy",
"view_riskscenario",
"view_riskacceptance",
"approve_riskacceptance",
"view_asset",
"view_threat",
"view_referencecontrol",
"view_folder",
"view_usergroup",
"view_riskmatrix",
"view_complianceassessment",
"view_requirementassessment",
"view_requirementnode",
"view_evidence",
"view_framework",
"view_loadedlibrary",
"view_user",
'view_project',
'view_riskassessment',
'view_appliedcontrol',
'view_policy',
'view_riskscenario',
'view_riskacceptance',
'approve_riskacceptance',
'view_asset',
'view_threat',
'view_referencecontrol',
'view_folder',
'view_usergroup',
'view_riskmatrix',
'view_complianceassessment',
'view_requirementassessment',
'view_requirementnode',
'view_evidence',
'view_framework',
'view_loadedlibrary',
'view_user'
]
}
},
Expand Down

0 comments on commit af4f9b3

Please sign in to comment.