opsmill / infrahub

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

feature: Support more Attribute Kinds in the schema #151

Closed dgarros closed 1 year ago

dgarros commented 1 year ago

Component

Frontend UI, API Server / GraphQL

Describe the Feature Request

In order to build a great user experience, the more information Infrahub has about the data it's manipulating the better. In that spirit, this feature request propose to extend the schema to support more attribute kinds in addition to the current one.

As a first step the goal is to support them in the schema even if the frontend or the backend aren't representing them differently than a string or an integer for now. Also the kind of an attribute will indicate homw to integrate it in some aspect of the UI, for example some fields like Password or AreaText won't be represented in a list view by default

The table below describe the list of attributes to support, with their associated behavior

Kind Description Has Filter Behave like Display in List View
ID Yes Yes
Text Standard Text, replace String Yes String Yes
Number Standard Number, replace Integer Yes Integer Yes
TextArea Long form Text that can span multiple lines No String No
DateTime Yes String Yes
Email Yes String Yes
Password No String No
URL Yes String Yes
File Yes String Yes
MacAddress Yes String Yes
Color Yes String Yes
Bandwidth Yes Integer Yes
IPHost Yes String Yes
IPNetwork Yes String Yes
Checkbox Yes Boolean Yes
List No -- Yes
Any No -- No
String Yes -- Yes
Integer Yes -- Yes
Boolean Yes -- Yes

Describe the Use Case

Provide a better user experience with better UI components and a better validation in the backend by supporting more Attribute Kinds

Additional Information

No response

dgarros commented 1 year ago

Done in #129