When creating a custom graph on a project activity page, it is possible to search for disabled metrics. It shouldn't be possible.
One of this technical solution
- api/metrics/search do not return disabled metrics (preferred solution)
- api/metrics/search mark as hidden disabled metrics. Cons: Mix of 2 different things: status and visibility. Moreover, if it is enabled again, how to make the difference between a hidden and a disabled metric
- api/metrics/search returns the status (ex: enabled: true)