-
Notifications
You must be signed in to change notification settings - Fork 971
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[frontend] Add page titles to Settings pages and convert to functional components #8160
[frontend] Add page titles to Settings pages and convert to functional components #8160
Conversation
10c779e
to
4f88181
Compare
8f8479a
to
cda8fe9
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## release/6.5.0 #8160 +/- ##
=================================================
- Coverage 64.97% 64.96% -0.01%
=================================================
Files 623 623
Lines 59496 59496
Branches 6577 6575 -2
=================================================
- Hits 38656 38651 -5
- Misses 20840 20845 +5 ☔ View full report in Codecov by Sentry. |
a16d044
to
14658ad
Compare
14658ad
to
4eea986
Compare
f8359b7
to
558e6c1
Compare
c3c5ef3
to
79df089
Compare
79df089
to
4166d20
Compare
110452d
to
f917015
Compare
d8b2642
to
7ad134d
Compare
19d08d1
to
5d9806d
Compare
b141aa5
to
3d1f751
Compare
orderAsc: params.orderAsc !== false, | ||
searchTerm: params.searchTerm ?? '', | ||
view: params.view ?? 'lines', | ||
sortBy: params.sortBy ?? 'name', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The value "name" doesn't exist in marking definitions, resulting as an error in pagination. The default value for a marking is "definition"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed default sortBy to 'definition'
return ( | ||
<div className={classes.container}> | ||
<AccessesMenu /> | ||
<Breadcrumbs elements={[{ label: t_i18n('Settings') }, { label: t_i18n('Security') }, { label: t_i18n('Sessions'), current: true }]} /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed margin padding to match the padding in the ListLines component which is used by the other Settings>Security components.
{t('minutes left')} /{' '} | ||
{Math.round(userSession.originalMaxAge / 60)} | ||
</div> | ||
const sortByNameCaseInsensitive = R.sortBy( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it's not adding to much work (or code) it will be amazing to remove Ramda and use pure JS in this component :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done :)
2221390
to
6df8edb
Compare
@SarahBocognano I believe all comments are resolved by the most recent commit. Thank you for your review! @VerboseCat Awesome thank you so much for your work ! I'm gonna approuve this PR, please just check the CI as it has to be green before merging, otherwise, everything is okay ! |
6df8edb
to
9255afc
Compare
Revert WIP conversion of Sectors test commit Fix paginationOptions issue for Groups, KillChainPhases, Roles Fix MarkingDefinitions, update KillChainPhases to reflect master Remove changes established in PR OpenCTI-Platform#7753 Add Malwares.tsx to removed changes Post-rebase cleanup Remove changes from PR 7753 Remove outdated changes to KillChainPhases Fix translations Align GroupLine design with master Fix typing on GroupLines; Remove variant from breadcrumbs
9255afc
to
58090f8
Compare
754c3f7
into
OpenCTI-Platform:release/6.5.0
…l components (#8160) Co-authored-by: Bonsai8863 <[email protected]> Co-authored-by: Adrien Servel <[email protected]>
Proposed changes
This PR is a follow-up to the the PR which introduced custom page titles (#7374). This PR converts several 'Settings' components from classes to functional and adds page titles. These components were not included in the original PR because they were class components and could not use the page title hook.
Impacted Pages
Related issues
Checklist
Further comments
This PR has a known issue, which has also been reported in a comment on (#7753). Every time a page renders, both the the custom page title setting function
useConnectedDocumentModifier.setTitle
and the default page title setting functionuseDocumentLangModifier
run and set the title. In some instances, the default page title is set after the custom page title is set. This results in the default page title being displayed. I was unable to find a cause or pattern for which components exhibit this bug.The following components from this PR are impacted: