opsmill / infrahub

Infrahub - A new approach to Infrastructure Management
https://opsmill.com/
GNU Affero General Public License v3.0
148 stars 7 forks source link

bug: Not able to add Profile into a Group (as members) #3681

Closed BeArchiTek closed 5 days ago

BeArchiTek commented 2 weeks ago

Component

Frontend UI

Current Behavior

When adding members into a group via the UI, it’s impossible to choose Profiles models

Expected Behavior

Be able to. Hose profiles objects as group members

Steps to Reproduce

With demo schema and data

Additional Information

No response

bilalabbad commented 2 weeks ago

Hey! Thanks for the report. I tested this on the develop branch and confirmed that we can add a profile to a group.

However, the name is misleading. For example, with demo data, ProfileInfraInterfaceL3's name appears as InfraInterfaceL3. In the select options, we only display the name, not the kind.

Do you consider this a bug fix or a false positive?

dgarros commented 2 weeks ago

@bilalabbad this sounds like a bug, ProfileInfraInterfaceL3 should appear in the list as well as InfraInterfaceL3. how is the frontend determining the list of possible options here ?

bilalabbad commented 2 weeks ago

ProfileInfraInterfaceL3 does appear in the list. But its name is not explicit.

  1. when you query /api/schema/ProfileInfraInterfaceL3 on demo data, you get the follow response:

    {
    "id": null,
    "state": "present",
    "name": "InfraInterfaceL3",
    "namespace": "Profile",
    "description": "Profile for InfraInterfaceL3",
    "label": "Infrainterfacel3",
    "kind": "ProfileInfraInterfaceL3",
    ....,
  2. On the frontend, we use schema's name or label to display the select's options text.

    image
  3. You can select any options and add it to the group. The only issue is that option's label are confusing

BeArchiTek commented 2 weeks ago

Shouldn’t we use the kind instead of just name and label ?