Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Provider Detail view with Yaml and Alerts #2723

Merged
merged 14 commits into from
Sep 13, 2022
Merged

Conversation

joshri
Copy link
Contributor

@joshri joshri commented Sep 8, 2022

Closes #2566
Closes #2567
Closes #2568

  • Providers in the NotificationsTable are now clickable links to the new ProviderPage page
  • This page fetches the individual provider with useGetObject, and passes it down to the new ProviderDetail containing YamlView and AlertsTable tabs.
  • The new AlertsTable takes the Alerts from an individual provider using the new useListAlerts as rows. This hook grabs all Alerts and filters them by providerRef to grab the correct ones for the table.
  • Added Alert as an extension of FluxObject.
  • Fixed a styling bug that's probably been in YamlView for a while - a 5px blank spot was reserved on the right side of the view, likely for a scrollbar. I removed horizontal scrolling on the view (it already pre-wraps), and extended the header all the way across.

The Events tab is impossible at the moment due to the flux notification-controller not recording kubernetes events. There is a remaining issue in the notification epic for a special display where no notifications are visible, and I believe that there were plans to add alert yaml on hover but I don't see an issue for it.

Clickable providers:

image

Alerts Table:

image

Provider yaml:

image

@joshri joshri added the area/ui Issues that require front-end work label Sep 8, 2022
Copy link
Contributor

@ozamosi ozamosi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please add ProviderDetail and NotificationsTable to index.ts too?

api/core/types.proto Show resolved Hide resolved
ui/lib/objects.ts Show resolved Hide resolved
<ul className="event-sources">
{a?.eventSources?.map((obj: CrossNamespaceObjectRef) => (
<li className="event-sources" key={obj.name}>
{obj.kind}: {obj.name}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this not (also, I wrote more in the other comment) have a namespace?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can definitely have namespace - how do you feel about:
{obj.kind}: {obj.name}, {obj.namespace}
Was it supposed to be namespace instead of name? Trying to follow the original design:
image

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the comma could be confusing - looks a bit like it's doing some kind of {kind}: {objs.filter(o => o.kind == kind).map(o => o.name).join(', ')}.

I think I would do {obj.kind}: {obj.namespace}/{obj.name}

I almost said "because that's how it's usually displayed" and then I realised that it's not (if you run flux get all -A you get the {obj.kind}/{obj.name} in one column, and namespace in another one, and if you run kubectl port-forward --help then you'll see that you can also use {obj.kind}/{obj.name}) - but I can't think of anything better that's still somewhat faithful to the original design.

@opudrovs
Copy link
Contributor

opudrovs commented Sep 12, 2022

As I said, I see it for the Alerts table. If it's not a general filtering issue, it must be related to this PR:

Screenshot 2022-09-12 at 21 51 05

@joshri
Copy link
Contributor Author

joshri commented Sep 12, 2022

It absolutely was related to this PR - good spot. Had the wrong value in the filterConfig function for event severity!! Fixed.

image

@opudrovs
Copy link
Contributor

opudrovs commented Sep 12, 2022

@joshri could you please rebase on main so that I could test search in the events table? Search is supposed to be working in this table, correct?

@joshri joshri force-pushed the 2568-provider-detail branch 2 times, most recently from bebd062 to aaee372 Compare September 13, 2022 13:14
@joshri joshri merged commit c714521 into main Sep 13, 2022
@joshri joshri deleted the 2568-provider-detail branch September 13, 2022 17:57
This was referenced Sep 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ui Issues that require front-end work
Projects
None yet
3 participants