Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
F
FDO Manager WebUI
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
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
Code review analytics
Issue 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
fdo
FDO Manager WebUI
Commits
dfb0dac4
Verified
Commit
dfb0dac4
authored
6 months ago
by
Timm Fitschen
Browse files
Options
Downloads
Patches
Plain Diff
ENH: add handle system download proxy
parent
35954de5
No related branches found
Branches containing commit
No related tags found
1 merge request
!7
Revert "MAINT: Ignore venv and package-lock.json"
Pipeline
#56497
passed
6 months ago
Stage: test
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Dockerfile
+2
-0
2 additions, 0 deletions
Dockerfile
pages/fdo/show/[prefix]/[suffix].tsx
+19
-11
19 additions, 11 deletions
pages/fdo/show/[prefix]/[suffix].tsx
src/constants.js
+1
-0
1 addition, 0 deletions
src/constants.js
with
22 additions
and
11 deletions
Dockerfile
+
2
−
0
View file @
dfb0dac4
...
...
@@ -27,7 +27,9 @@ ENV PORT 3000
ARG
NEXT_PUBLIC_API_URL
ARG
KEY_CLOAK_CLIENT_SECRET
ARG
NEXT_PUBLIC_HANDLE_SYSTEM_BASE_URI
ARG
NEXT_PUBLIC_HANDLE_SYSTEM_DOWNLOAD_PROXY
ENV
NEXT_PUBLIC_HANDLE_SYSTEM_DOWNLOAD_PROXY=${NEXT_PUBLIC_HANDLE_SYSTEM_DOWNLOAD_PROXY}
ENV
NEXT_PUBLIC_HANDLE_SYSTEM_BASE_URI=${NEXT_PUBLIC_HANDLE_SYSTEM_BASE_URI}
ENV
NEXT_PUBLIC_API_URL=${NEXT_PUBLIC_API_URL:-"https://manager.testbed.pid.gwdg.de/api/v1"}
ENV
KEY_CLOAK_CLIENT_SECRET=${KEY_CLOAK_CLIENT_SECRET}
...
...
This diff is collapsed.
Click to expand it.
pages/fdo/show/[prefix]/[suffix].tsx
+
19
−
11
View file @
dfb0dac4
...
...
@@ -29,16 +29,16 @@ import ReportIcon from '@mui/icons-material/Report'
import
{
JsonView
,
darkStyles
,
defaultStyles
}
from
'
react-json-view-lite
'
;
import
{
styled
,
ThemeProvider
}
from
'
@mui/material/styles
'
import
Details
from
'
../../../../src/components/fdos/details
'
import
{
FDO_COMMUNITY_TYPE_EVEBS
as
EVEBS
,
FDO_COMMUNITY_MD_PROFILE_EDC
as
EDC
,
FDO_COMMUNITY_MD_PROFILE_AAS
as
AAS
,
HANDLE_SYSTEM_BASE_URI
as
HS_BASE_URI
}
from
'
../../../../src/constants
'
import
{
FDO_COMMUNITY_TYPE_EVEBS
as
EVEBS
,
FDO_COMMUNITY_MD_PROFILE_EDC
as
EDC
,
FDO_COMMUNITY_MD_PROFILE_AAS
as
AAS
,
HANDLE_SYSTEM_BASE_URI
as
HS_BASE_URI
,
HANDLE_SYSTEM_DOWNLOAD_PROXY
as
HS_PROXY
}
from
'
../../../../src/constants
'
import
'
react-json-view-lite/dist/index.css
'
;
const
resolvePid
=
(
pid
:
string
)
=>
`
${
HS_BASE_URI
}
/
${
pid
}
`
const
getFdoDetails
=
(
data
:
object
)
=>
{
console
.
log
(
data
)
if
(
!
data
)
return
undefined
if
(
!
data
)
return
{};
const
fdoDetails
=
{
pid
:
data
[
"
pid
"
],
isFdo
:
data
[
"
isFdo
"
],
typePid
:
data
[
"
fdoType
"
],
profilePid
:
data
[
"
fdoProfile
"
],
...
...
@@ -83,11 +83,11 @@ const getEvebsDetails = (typePid, repository, metadataRecord) => {
]
}
const
EvebsDetails
=
({
typePid
,
repository
,
metadataPid
})
=>
{
const
EvebsDetails
=
({
pid
,
typePid
,
repository
,
metadataPid
})
=>
{
const
apiUrl
=
useApiUrl
()
const
t
=
useTranslate
()
const
{
data
,
isLoading
,
isError
,
error
}
=
useCustom
({
url
:
`
${
HS_
BASE_URI
}
/
${
metadataPid
}
?locatt=payloadIndex:0`
,
url
:
`
${
HS_
PROXY
}
/
${
metadataPid
}
?locatt=payloadIndex:0`
,
method
:
'
get
'
,
errorNotification
:
()
=>
false
,
queryOptions
:
{
...
...
@@ -104,10 +104,16 @@ const EvebsDetails = ({typePid, repository, metadataPid}) => {
});
const
metadata
=
data
?.
data
;
var
description
=
undefined
var
displayName
=
metadata
?.
displayName
if
(
displayName
)
{
displayName
=
displayName
[
0
].
text
}
if
(
isError
)
{
displayName
=
pid
}
else
if
(
metadata
?.
description
)
{
description
=
metadata
?.
description
[
0
].
text
}
console
.
log
(
isLoading
,
data
,
repository
,
typePid
,
metadata
);
return
isLoading
||
metadataRecord
.
isLoading
?
<
Item
>
loading json
</
Item
>
:
(
...
...
@@ -118,12 +124,14 @@ const EvebsDetails = ({typePid, repository, metadataPid}) => {
<
Details
rows
=
{
getEvebsDetails
(
typePid
,
repository
,
metadataRecord
.
data
.
data
)
}
></
Details
>
</
Box
>
</
Item
>
<
Item
>
<
Box
>
<
Typography
variant
=
"h6"
gutterBottom
>
Metadata (JSON)
</
Typography
>
<
JsonView
data
=
{
metadata
}
shouldExpandNode
=
{
lvl
=>
lvl
<
3
}
style
=
{
defaultStyles
}
/>
</
Box
>
</
Item
>
{
metadata
&&
<
Item
>
<
Box
>
<
Typography
variant
=
"h6"
gutterBottom
>
Metadata (JSON)
</
Typography
>
<
JsonView
data
=
{
metadata
}
shouldExpandNode
=
{
lvl
=>
lvl
<
3
}
style
=
{
defaultStyles
}
/>
</
Box
>
</
Item
>
}
</>
)
}
...
...
This diff is collapsed.
Click to expand it.
src/constants.js
+
1
−
0
View file @
dfb0dac4
...
...
@@ -5,3 +5,4 @@ export const FDO_COMMUNITY_TYPE_EVEBS = process.env.NEXT_PUBLIC_FDO_COMMUNITY_TY
export
const
FDO_COMMUNITY_MD_PROFILE_AAS
=
process
.
env
.
NEXT_PUBLIC_FDO_COMMUNITY_MD_PROFILE_AAS
||
"
21.T11966/49321f913c960ec3c943
"
export
const
FDO_COMMUNITY_MD_PROFILE_EDC
=
process
.
env
.
NEXT_PUBLIC_FDO_COMMUNITY_MD_PROFILE_EDC
||
"
21.T11966/3f1cfd3bb60bee84c22b
"
export
const
HANDLE_SYSTEM_BASE_URI
=
process
.
env
.
NEXT_PUBLIC_HANDLE_SYSTEM_BASE_URI
||
"
https://hdl.handle.net
"
export
const
HANDLE_SYSTEM_DOWNLOAD_PROXY
=
process
.
env
.
NEXT_PUBLIC_HANDLE_SYSTEM_DOWNLOAD_PROXY
||
HANDLE_SYSTEM_BASE_URI
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