Skip to content

Angular 21#236

Open
mohammadsalem wants to merge 62 commits into
masterfrom
angular-21
Open

Angular 21#236
mohammadsalem wants to merge 62 commits into
masterfrom
angular-21

Conversation

@mohammadsalem

Copy link
Copy Markdown
Collaborator

Upgrade to Angular 21 and remove old unsupported dependencies.

@alanorth

Copy link
Copy Markdown
Member

Thanks @mohammadsalem. I tested this by copying the openrxv_esData_7 volume from production and everything works as far as I can see. There is a minor issue with the dashboard panels flickering in black, which is especially visible in Firefox, but I guess that's an Angular issue?

Next I tried a full re-index, which takes about eight hours unfortunately, and I ran into a few issues. The harvest was successful, but when committing the index I got a timeout:

[Nest] 1  - 01/21/2026, 12:39:03 PM   DEBUG [HarvesterService] Starting Harvest ares
[Nest] 1  - 01/21/2026, 12:39:04 PM   DEBUG [HarvesterService] ares: Delete temp
[Nest] 1  - 01/21/2026, 12:39:04 PM   DEBUG [HarvesterService] ares: Create temp
[Nest] 1  - 01/21/2026, 12:39:08 PM   DEBUG [DSpace7 harvester] Starting Harvest => 153814
[Nest] 1  - 01/21/2026, 12:39:14 PM   DEBUG [DSpace7 harvester] Starting Harvest => 13932
[Nest] 1  - 01/21/2026, 12:39:18 PM   DEBUG [DSpace7 harvester] Starting Harvest => 6463
[Nest] 1  - 01/22/2026, 6:43:05 AM   DEBUG [HarvesterService] reindex function is called
[Nest] 1  - 01/22/2026, 6:43:05 AM   DEBUG [HarvesterService] updateAliases final to temp
[Nest] 1  - 01/22/2026, 6:43:05 AM   DEBUG [HarvesterService] Delete final
[Nest] 1  - 01/22/2026, 6:43:05 AM   DEBUG [HarvesterService] Create final
[Nest] 1  - 01/22/2026, 6:43:36 AM     LOG [HarvesterService] TimeoutError: Request timed out
[Nest] 1  - 01/22/2026, 6:43:36 AM   DEBUG [HarvesterService] Reindex to final
[Nest] 1  - 01/22/2026, 6:43:36 AM   DEBUG [HarvesterService] updateAliases temp to final
[Nest] 1  - 01/22/2026, 6:43:36 AM   DEBUG [HarvesterService] Delete temp
[Nest] 1  - 01/22/2026, 6:43:36 AM   DEBUG [HarvesterService] Create temp
[Nest] 1  - 01/22/2026, 6:43:36 AM   DEBUG [HarvesterService] Indexing finished

And then there are only 101,000 items on the dashboard, instead of ~173,000. Not sure if that is just a one-time bug, but I'd need to do a full re-harvest to test I think.

Second, I consistently see an issue that may be related to above. Filters don't work, and exports say "something when wrong". In the backend logs I see this a few times:

Error: ResponseError: search_phase_execution_exception
        Root causes:
                query_shard_exception: No mapping found for [issue_date] in order to sort on
    at ElasticService.get (/backend/dist/shared/services/elastic/elastic.service.js:252:19)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async ExportController.ExportData (/backend/dist/export/export.controller.js:36:50)
    at async /backend/node_modules/@nestjs/core/router/router-execution-context.js:46:28
    at async /backend/node_modules/@nestjs/core/router/router-proxy.js:9:17

@mohammadsalem

Copy link
Copy Markdown
Collaborator Author

Thank @alanorth!
The flickering is actually the result of replacing the plugin that was doing the panels block when loading with Spinners, which has a darker background that makes it more noticeable, I'll either reduce it the darkness or just make it transparent.

The indexing issue I'm not sure about it, this upgrade should not affect the indexing as it was mainly on the frontend.
The error is most probably connected to the indexing problem. Sometimes this can happen when the index mapping in Elasticsearch is automatically created instead of defining it manually for each field, I'm not sure what happens but usually a re-index will fix it..

@mohammadsalem

Copy link
Copy Markdown
Collaborator Author
  • Allow bulk delete values mapping

  • Angular upgrade to v21

  • Migrate to standalone components

  • Migrate to inject function

  • Migrate to lazyload routes

  • Frontend NodeJs upgrade to v24

  • Replace the following libraries that are not maintained anymore:

    • agm, agm/snazzy-info-window: replaced with the official Angular Google maps.
    • ngx-scroll-to: replaced with functions.
    • angular-inviewport: replaced with functions
    • material-extended/mde: replaced with angular cdk overlay
    • nouislider: replaced with material range slider
    • html2canvas: replaced with html2canvas-pro
    • ngx-loading: replaced with ngx-spinner
  • Admin dashboard design advanced functionalities:

    • Each chart/counter have a JSON field were a filter query can be added, this will pre-filter the data specifically for the chart/counter.
    • Charts can be previewed live with real data while configuring.
    • Charts can have multiple dimensions by selecting the field, limit and order
    • Charts can specify the metric, all Elasticsearch metrics can be selected. If the selected metric requires another field like sum, the form will ask to specify the metric field.
    • Bars chart have 2 additional configs:
      • Bars direction (horizontal/vertical)
      • Stacking (plain/grouped/stacked)
    • Line chart have one additional config for the type (line/area)
    • World map have one additional config for the type (normal/map with pies)
    • New chart Sunburst is added.
    • Charts that will render the defined dimensions differently:
      • Pie: the first dimension will be shown, any additional dimensions will be presented as drilldown
      • Bar with plain stacking: the first dimension will be shown, any additional dimensions will be presented as drilldown
      • Bar with grouped/stacked stacking: the first two dimensions will be shown, any additional dimensions will be presented as drilldown
      • Line: the first dimension will be shown, any additional dimensions will be ignored
      • Word cloud: the first dimension will be shown, any additional dimensions will be presented as drilldown
      • Sunburst: all dimensions will be shown
      • World map with normal map type: the first dimension will be shown, any additional dimensions will be ignored
      • World map with map with pies map type: the first dimension will be shown, the second dimension will be used to draw the pies over countries, any additional dimensions will be ignored
      • Google map: the first dimension will be shown, any additional dimensions will be ignored
      • List: dimensions will be presented as nested lists, expanding one will display the next dimension
    • The behaviour of click the chart to filter works only one the last dimension, meaning if the chart has one dimension it will work normally, but if the chart has multiple dimensions and the drilldown is available, then it will prioritize the drill down and click to filter will work only for the last drilled dimension
    • Grid:
      • It is possible to resize components within the row by dragging in between the components. The minimum width of a component is 3 columns, each row can have up to 4 components.
      • It is possible to re-arrange components within the same row.
    • These components were deleted (PackedBubble, PackedBubbleSplit, SimiCircle and Wheel), as they were not used nor functioning properly.
  • Bug fixes:

    • Allow creating dashboard without the main items list
    • Allow creating main list without images or links
    • Better capture Elasticsearch index available fields
    • Better handling for rendering charts in view (sometimes the chart title is not visible)

Note: there is no auto migration script to convert the old dashboard configs to the new one. The old structure will not work and the dashboard will not render. To fix it all counters must be edited and saved (so they take the new structure) and the charts should be edited filling the missing configs and saved. Then finally saving the dashboard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants