-
Notifications
You must be signed in to change notification settings - Fork 34
Description
Describe the bug
Version: 2024.02.01
The workflow statistics page has two tables (Workflow steps performed, Current workflows) that are not being presented with data because the front end is making requests to a bad defined backend endpoint.
To Reproduce
Steps to reproduce the behavior:
- Login into DSpace as Admin
- Open browser network monitor
- Go to workflows statistics
- Inside network monitor will appear two requests with a 404 status code.
/server/api/config/workflowSteps/search/byDateRange
/server/api/config/workflowSteps/search/current
Expected behavior
The service that makes this request is this file and has a string that defines the endpoint to ask as "workflowSteps"
dspace-angular/src/app/core/statistics/workflow-step-statistics-data.service.ts
Lines 19 to 35 in 8ec5812
| export class WorkflowStepStatisticsDataService extends IdentifiableDataService<WorkflowStepStatistics> { | |
| protected linkPath = 'workflowSteps'; | |
| private searchData: SearchDataImpl<WorkflowStepStatistics>; | |
| constructor( | |
| protected requestService: RequestService, | |
| protected rdbService: RemoteDataBuildService, | |
| protected objectCache: ObjectCacheService, | |
| protected halService: HALEndpointService, | |
| ) { | |
| super('workflowSteps', requestService, rdbService, objectCache, halService); | |
| this.searchData = new SearchDataImpl(this.linkPath, requestService, rdbService, objectCache, halService, this.responseMsToLive); | |
| } | |
But the name of the endpoint seems to be defined here and says is "wfSteps"
https://github.com/4Science/DSpace/blob/56796f9453dfcc65628d7a9e7f13054367ca65cb/dspace-server-webapp/src/main/java/org/dspace/app/rest/model/WorkflowStepStatisticsRest.java#L23-L27
The frontend should use "wfSteps" to retrieve the statistics