Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpenAIRE-EUDAT-DMP-service-pilot
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
135
Issues
135
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dmp
OpenAIRE-EUDAT-DMP-service-pilot
Commits
0eff4ed6
Commit
0eff4ed6
authored
Jan 16, 2020
by
George Kalampokis
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/Development' into Development
parents
ae84be58
0596f758
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
5 deletions
+28
-5
dmp-backend/web/src/main/java/eu/eudat/controllers/DMPs.java
dmp-backend/web/src/main/java/eu/eudat/controllers/DMPs.java
+7
-3
dmp-backend/web/src/main/java/eu/eudat/logic/managers/DataManagementPlanManager.java
...va/eu/eudat/logic/managers/DataManagementPlanManager.java
+4
-1
dmp-frontend/src/app/ui/dmp/overview/dmp-overview.component.ts
...rontend/src/app/ui/dmp/overview/dmp-overview.component.ts
+14
-1
dmp-frontend/src/assets/i18n/en.json
dmp-frontend/src/assets/i18n/en.json
+3
-0
No files found.
dmp-backend/web/src/main/java/eu/eudat/controllers/DMPs.java
View file @
0eff4ed6
...
...
@@ -118,9 +118,13 @@ public class DMPs extends BaseController {
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
{
"/overview/{id}"
})
public
@ResponseBody
ResponseEntity
getOverviewSingle
(
@PathVariable
String
id
,
Principal
principal
)
throws
IllegalAccessException
,
InstantiationException
{
DataManagementPlanOverviewModel
dataManagementPlan
=
this
.
dataManagementPlanManager
.
getOverviewSingle
(
id
,
principal
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
new
ResponseItem
<
DataManagementPlanOverviewModel
>().
status
(
ApiMessageCode
.
NO_MESSAGE
).
payload
(
dataManagementPlan
));
ResponseEntity
getOverviewSingle
(
@PathVariable
String
id
,
Principal
principal
)
{
try
{
DataManagementPlanOverviewModel
dataManagementPlan
=
this
.
dataManagementPlanManager
.
getOverviewSingle
(
id
,
principal
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
new
ResponseItem
<
DataManagementPlanOverviewModel
>().
status
(
ApiMessageCode
.
NO_MESSAGE
).
payload
(
dataManagementPlan
));
}
catch
(
Exception
e
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
NOT_FOUND
).
body
(
new
ResponseItem
<
DataManagementPlanOverviewModel
>().
status
(
ApiMessageCode
.
ERROR_MESSAGE
));
}
}
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
{
"/public/{id}"
})
...
...
dmp-backend/web/src/main/java/eu/eudat/logic/managers/DataManagementPlanManager.java
View file @
0eff4ed6
...
...
@@ -362,8 +362,11 @@ public class DataManagementPlanManager {
return
dataManagementPlan
;
}
public
DataManagementPlanOverviewModel
getOverviewSingle
(
String
id
,
Principal
principal
)
throws
InstantiationException
,
IllegalAccess
Exception
{
public
DataManagementPlanOverviewModel
getOverviewSingle
(
String
id
,
Principal
principal
)
throws
Exception
{
DMP
dataManagementPlanEntity
=
databaseRepository
.
getDmpDao
().
find
(
UUID
.
fromString
(
id
));
if
(
dataManagementPlanEntity
.
getStatus
()
==
DMP
.
DMPStatus
.
DELETED
.
getValue
())
{
throw
new
Exception
(
"DMP is deleted."
);
}
if
(
dataManagementPlanEntity
.
getUsers
()
.
stream
().
filter
(
userInfo
->
userInfo
.
getUser
().
getId
()
==
principal
.
getId
())
.
collect
(
Collectors
.
toList
()).
size
()
==
0
)
...
...
dmp-frontend/src/app/ui/dmp/overview/dmp-overview.component.ts
View file @
0eff4ed6
...
...
@@ -69,7 +69,11 @@ export class DmpOverviewComponent extends BaseComponent implements OnInit {
breadCrumbs
.
push
({
parentComponentName
:
null
,
label
:
this
.
language
.
instant
(
'
NAV-BAR.MY-DMPS
'
),
url
:
"
/plans
"
});
breadCrumbs
.
push
({
parentComponentName
:
'
DmpListingComponent
'
,
label
:
this
.
dmp
.
label
,
url
:
'
/plans/overview/
'
+
this
.
dmp
.
id
});
this
.
breadCrumbs
=
observableOf
(
breadCrumbs
);
})
},
(
error
:
any
)
=>
{
if
(
error
.
status
===
404
)
{
return
this
.
onFetchingDeletedCallbackError
(
'
/plans/
'
);
}
});
}
else
if
(
publicId
!=
null
)
{
this
.
isNew
=
false
;
...
...
@@ -84,11 +88,20 @@ export class DmpOverviewComponent extends BaseComponent implements OnInit {
breadCrumbs
.
push
({
parentComponentName
:
null
,
label
:
this
.
language
.
instant
(
'
NAV-BAR.PUBLIC-DMPS
'
),
url
:
"
/explore-plans
"
});
breadCrumbs
.
push
({
parentComponentName
:
'
DmpListingComponent
'
,
label
:
this
.
dmp
.
label
,
url
:
'
/plans/publicOverview/
'
+
this
.
dmp
.
id
});
this
.
breadCrumbs
=
observableOf
(
breadCrumbs
);
},
(
error
:
any
)
=>
{
if
(
error
.
status
===
404
)
{
return
this
.
onFetchingDeletedCallbackError
(
'
/plans/
'
);
}
});
}
});
}
onFetchingDeletedCallbackError
(
redirectRoot
:
string
)
{
this
.
uiNotificationService
.
snackBarNotification
(
this
.
language
.
instant
(
'
DMP-OVERVIEW.ERROR.DELETED-DMP
'
),
SnackBarNotificationLevel
.
Error
);
this
.
router
.
navigate
([
redirectRoot
]);
}
setIsUserOwner
()
{
if
(
this
.
dmp
)
{
const
principal
:
Principal
=
this
.
authentication
.
current
();
...
...
dmp-frontend/src/assets/i18n/en.json
View file @
0eff4ed6
...
...
@@ -503,6 +503,9 @@
"LEVEL-OF-ACCESS"
:
"Level of Access"
,
"INVOLVED-DATASETS"
:
"Involved Dataset Descriptions"
,
"TEMPLATES-INVOLVED"
:
"Dataset Description Templates Involved"
},
"ERROR"
:
{
"DELETED-DMP"
:
"The requested DMP is deleted"
}
},
"DATASET-LISTING"
:
{
...
...
Write
Preview
Markdown
is supported
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