Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
compendium-v2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
geant-swd
compendium-v2
Commits
dbf4eb40
Commit
dbf4eb40
authored
1 year ago
by
Saket Agrahari
Browse files
Options
Downloads
Patches
Plain Diff
security-control year restriction
parent
ede6d18c
No related branches found
No related tags found
No related merge requests found
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
compendium-frontend/src/pages/SNPStandardsSecurityControl.tsx
+7
-3
7 additions, 3 deletions
...endium-frontend/src/pages/SNPStandardsSecurityControl.tsx
compendium_v2/static/bundle.js
+2
-2
2 additions, 2 deletions
compendium_v2/static/bundle.js
with
9 additions
and
5 deletions
compendium-frontend/src/pages/SNPStandardsSecurityControl.tsx
+
7
−
3
View file @
dbf4eb40
...
...
@@ -15,20 +15,24 @@ function SNPStandardsSecurityControlsPage(): React.ReactElement {
const
{
filterSelection
,
setFilterSelection
}
=
useContext
(
FilterSelectionContext
);
const
{
data
:
fibreLightData
,
years
,
nrens
}
=
useData
<
SecurityControls
>
(
'
/api/standards-and-policies/security-controls
'
,
setFilterSelection
);
const
selectedData
=
(
fibreLightData
).
filter
(
data
=>
// reduce data to have only value above 2020 till the data is cleaned up
const
filteredYears
=
new
Set
([...
years
].
filter
(
year
=>
year
>=
2021
));
const
filteredFibreLightData
=
fibreLightData
.
filter
(
item
=>
filteredYears
.
has
(
item
.
year
));
const
selectedData
=
(
filteredFibreLightData
).
filter
(
data
=>
filterSelection
.
selectedYears
.
includes
(
data
.
year
)
&&
filterSelection
.
selectedNrens
.
includes
(
data
.
nren
)
);
const
toolDescriptionsDataLookup
=
createMatrixDataLookupForArrayColumnType
(
selectedData
,
'
security_control_descriptions
'
);
const
filterNode
=
<
Filter
filterOptions
=
{
{
availableYears
:
[...
y
ears
],
availableNrens
:
[...
nrens
.
values
()]
}
}
filterOptions
=
{
{
availableYears
:
[...
filteredY
ears
],
availableNrens
:
[...
nrens
.
values
()]
}
}
filterSelection
=
{
filterSelection
}
setFilterSelection
=
{
setFilterSelection
}
coloredYears
/>
const
showYears
=
[...
filterSelection
.
selectedYears
.
filter
(
year
=>
y
ears
.
has
(
year
))].
sort
();
const
showYears
=
[...
filterSelection
.
selectedYears
.
filter
(
year
=>
filteredY
ears
.
has
(
year
))].
sort
();
return
(
<
DataPage
title
=
"Security Controls Used by NRENs"
...
...
This diff is collapsed.
Click to expand it.
compendium_v2/static/bundle.js
+
2
−
2
View file @
dbf4eb40
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment