Project

General

Profile

Cleanup #43375

Updated by Ernesto Puerta almost 4 years ago

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.

Back