console icon indicating copy to clipboard operation
console copied to clipboard

x-descriptor for map and boolean pointer (UI Markers)

Open Milind21 opened this issue 3 years ago • 10 comments

Is there any x-descriptor to show the maps in the UI and boolean pointer as switch? Existing text and other descriptor doesn't seem to work. The ALM annotations have the map field but it is not getting rendered in the UI

Milind21 avatar Mar 09 '22 08:03 Milind21

cc @tlwu2013 @TheRealJon

spadgett avatar Mar 17 '22 17:03 spadgett

Hi, Any update regarding the issue of x-descriptors.

Milind21 avatar Apr 04 '22 04:04 Milind21

For the boolean switch, does this work for you?

https://github.com/openshift/console/blob/master/frontend/packages/operator-lifecycle-manager/src/components/descriptors/reference/reference.md#4-booleanswitch

I don't believe there is a way to show maps, so that would be a new enhancement.

spadgett avatar Apr 20 '22 16:04 spadgett

Boolean switch seems to work for bool variables. However, pointers to data types like bool and string don't seem to work in similar fashion. ex. boolean switch doesn't show the desired output for *bool.

Milind21 avatar Apr 21 '22 04:04 Milind21

Console deals with the resource JSON, which doesn't have pointers. I'm assuming if the pointer is nil the JSON property is left out, and this breaks the switch? Or is it another problem?

spadgett avatar Apr 21 '22 12:04 spadgett

This behaviour is also seen in case of string pointers which are being properly populated. So I'm assuming, we have to pass values explicitly? There is a map field - Labels which gets rendered in the UI by default. How is this done? Maybe we can leverage this to print other map structures? MicrosoftTeams-image

Milind21 avatar Apr 22 '22 03:04 Milind21

Hi, @Milind21. I'm a little confused because JSON and YAML don't have the concept of pointers. Are you using a Golang API?

spadgett avatar Apr 25 '22 19:04 spadgett

Yes, we are using golang and we had variables of type pointer which is now getting rendered. However, can you please open enhancement for map issue or let me know how to open that issue

Milind21 avatar May 14 '22 08:05 Milind21

HI, @spadgett, Can you please tell about the roadmap on when we might have support for rendering map on the UI.

Veritasosrb avatar May 18 '22 08:05 Veritasosrb

Issues go stale after 90d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle stale. Stale issues rot after an additional 30d of inactivity and eventually close. Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle stale

openshift-bot avatar Aug 17 '22 01:08 openshift-bot

Stale issues rot after 30d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle rotten. Rotten issues close after an additional 30d of inactivity. Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle rotten /remove-lifecycle stale

openshift-bot avatar Sep 16 '22 08:09 openshift-bot

Rotten issues close after 30d of inactivity.

Reopen the issue by commenting /reopen. Mark the issue as fresh by commenting /remove-lifecycle rotten. Exclude this issue from closing again by commenting /lifecycle frozen.

/close

openshift-bot avatar Oct 17 '22 00:10 openshift-bot

@openshift-bot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity.

Reopen the issue by commenting /reopen. Mark the issue as fresh by commenting /remove-lifecycle rotten. Exclude this issue from closing again by commenting /lifecycle frozen.

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

openshift-ci[bot] avatar Oct 17 '22 00:10 openshift-ci[bot]