Removes hardcoded path to svg
What does this MR do and why?
Path to empty state was hardcoded, and is leading to 404 (eg https://gitlab.com/gitlab-org/gitlab/-/ml/experiments). This is being fixed by passing the image path from the backend.
How to set up and validate locally
Reproducing is weird since the old version still works in local branch, it only breaks in production. So at best we can test that it continues working:
-
Enable the feature flag
echo "Feature.enable(:ml_experiment_tracking)" | bundle exec rails c
-
Go to a project, click on 'Package & Registries > Model Experiments'. Verify that the svg for the empty state is loading.
-
Create an experiment:
user_id = 1 # if you are using root project_id = 20 # not necessarily 20, but the project you are using for testing exp = Ml::Experiment.create!(name: 'Gitlab Experiment', user_id: user_id, project_id: project_id)
-
Refresh
Model experiments
page, and click on the experiment. Verify that the empty svg is loaded on this page as well
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.