Project

General

Profile

Actions

Cleanup #43375

closed

mgr/dashboard: replace doc URL literals in TS code with

Added by Ernesto Puerta over 4 years ago. Updated about 3 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
General
Target version:
% Done:

0%

Tags:
Backport:
nautilus
Reviewed:
Affected Versions:
Pull request ID:

Description

This comes from the need to update upstream doc URLs to downstream ones. Being these literals scattered across the front-end code makes them harder to find/update/fix them.

The immediate fix would be to move these strings to a shared constants file (e.g.: shared/constants/app.constants like DocUrls static class), but given upstream URLs use Javascript template literals for pointing to the proper release (e.g.: `http://docs.ceph.com/docs/${releaseName}/mgr/dashboard/`), that doesn't work when the interpolated variable does not exists (now that variable is calculated live from back-end provided version). IMHO this could be easily fixed by using explicit version name in the same constant file (we cannot avoid the need of manually hardcoding the mapping between ceph versions and release names at least once).

As a result of this refactor, dashboard components (DashboardHelp, RGW, NFS, iSCSI, Grafana) would only need to point to a valid Ceph-Dashboard docs anchor ("#enabling-the-object-gateway-management-frontend", "#configuring-nfs-ganesha-in-the-dashboard", "#enabling-iscsi-management", ...).

PG Calculator link should also be extracted.

Additionally, it could be interesting to explore how to better link, integrate (and maintain) dashboard with Ceph documentation (by connecting dashboard components to Ceph docs structure, and provide help with context-sensitive or index-based searches). AFAIK most tools to integrate this into web applications are proprietary ones.


Related issues 1 (0 open1 closed)

Related to Dashboard - Cleanup #36565: mgr/dashboard: Extract documentation link to a componentResolvedTiago Melo

Actions
Actions

Also available in: Atom PDF