Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Notifications project
web-portal
Commits
61ba7eb0
Commit
61ba7eb0
authored
Dec 21, 2021
by
Emmanuel Ormancey
Committed by
Carina Antunes
Jan 17, 2022
Browse files
audit final
parent
aeab74cd
Pipeline
#3455710
skipped with stages
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/admin/components/AuditDisplay.jsx
View file @
61ba7eb0
...
...
@@ -11,6 +11,27 @@ import JSONTree from 'react-json-tree';
const
AuditDisplay
=
({
showSnackbar
,
loadingAudit
,
getAudit
,
auditData
})
=>
{
const
[
searchId
,
setSearchId
]
=
useState
(
''
);
const
theme
=
{
scheme
:
'
monokai
'
,
author
:
'
wimer hazenberg (http://www.monokai.nl)
'
,
base00
:
'
#272822
'
,
base01
:
'
#383830
'
,
base02
:
'
#49483e
'
,
base03
:
'
#75715e
'
,
base04
:
'
#a59f85
'
,
base05
:
'
#f8f8f2
'
,
base06
:
'
#f5f4f1
'
,
base07
:
'
#f9f8f5
'
,
base08
:
'
#f92672
'
,
base09
:
'
#fd971f
'
,
base0A
:
'
#f4bf75
'
,
base0B
:
'
#a6e22e
'
,
base0C
:
'
#a1efe4
'
,
base0D
:
'
#66d9ef
'
,
base0E
:
'
#ae81ff
'
,
base0F
:
'
#cc6633
'
,
};
async
function
loadAudit
(
prefix
)
{
const
response
=
await
getAudit
(
prefix
,
searchId
);
if
(
response
.
error
)
{
...
...
@@ -60,7 +81,10 @@ const AuditDisplay = ({showSnackbar, loadingAudit, getAudit, auditData}) => {
<
JSONTree
data
=
{
auditData
}
hideRoot
=
{
true
}
theme
=
{
theme
}
invertTheme
=
{
true
}
shouldExpandNode
=
{
(
keyPath
,
data
,
level
)
=>
{
if
(
keyPath
.
includes
(
'
target_users
'
))
return
false
;
return
true
;
}
}
/>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment