Skip to content

Adds router to ShowMlModel

Eduardo Bonet requested to merge model_registry/show_model_tab_routes into master

What does this MR do and why?

Adds router to ShowMlModel

ShowMlModel has a tab syntax that switches between different views, this MR improves the UX by setting on the url which tab is open. Users can now open the page at a specific tab. There are no UI changes, the only thing that changes is the URL when selecting tabs.

How to set up and validate locally

  1. In rails console enable the experiment fully

    Feature.enable(:model_registry)
  2. In rails console, create a model and a few model versions

    p = Project.find_by(id: 1)
    Ml::FindOrCreateModelService.new(p, "model_1").execute
    Ml::FindOrCreateModelVersionService.new(p, { model_name: "model_1", version: "2.0.0" })
    5.times { |i| Ml::FindOrCreateModelVersionService.new(p, { model_name: "model_1", version: "1.0.#{i}" }).execute }
  3. Navigate to <gdk>/<project>/-/ml/models/1, switch between tabs and notice how the url changes between versions/detail/candidates. Note that some query params are also appended, this is a result of SearcheableList and will be improved in a follow up with the addition of search to the model version and candidate lists.

Edited by Eduardo Bonet

Merge request reports

Loading