Cleanup #43375
closedmgr/dashboard: replace doc URL literals in TS code with
0%
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.
Updated by Lenz Grimmer about 4 years ago
- Translation missing: en.field_tag_list set to low-hanging-fruit, refactoring
- Tags deleted (
low-hanging-fruit)
Updated by Tiago Melo about 4 years ago
- Related to Cleanup #36565: mgr/dashboard: Extract documentation link to a component added
Updated by Tiago Melo over 3 years ago
- Status changed from New to In Progress
- Assignee set to Tiago Melo
Updated by Tiago Melo over 3 years ago
- Status changed from In Progress to Fix Under Review
- Pull request ID set to 36396
Updated by Tiago Melo over 3 years ago
I added some base code for this in https://github.com/ceph/ceph/pull/36396.
ATM you only have to modify 'doc.service.ts' downstream and you get new URLs for all doc links.
If we don't want to change existing files downstream, we could also read the value os Sections and base URL from a vendor file or from env file.
Updated by Lenz Grimmer over 3 years ago
- Status changed from Fix Under Review to Resolved
- Target version set to v16.0.0
Updated by Ernesto Puerta about 3 years ago
- Project changed from mgr to Dashboard
- Category changed from 132 to General