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

[Infra + Logs UI] Provide cross-app link functions #40494

Closed
jasonrhodes opened this issue Jul 8, 2019 · 5 comments
Closed

[Infra + Logs UI] Provide cross-app link functions #40494

jasonrhodes opened this issue Jul 8, 2019 · 5 comments
Assignees
Labels
Feature:Logs UI Logs UI feature Feature:Metrics UI Metrics UI feature Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services

Comments

@jasonrhodes
Copy link
Member

jasonrhodes commented Jul 8, 2019

To make linking between solutions easier/less brittle, we've decided to try an idea where each app provides its own "linking functions" that other apps will use when they want to link into an app.

A link function should do the following things:

  • Accept any number of typed arguments (e.g. a time range, a list of metrics, a trace ID, etc.)
  • Return an object with the following shape:
{
  status: "enabled" | "disabled"; // (others? if we only need two states we could switch to enabled: boolean;)
  href: string;
}
  • Be defined in x-pack/legacy/plugins/observability/public/link_functions/{your_app}/*
  • Be exported from x-pack/legacy/plugins/observability/public/index.ts
  • Handle license, permissions, feature controls, and enabled/disabled state internally
    • If this calculation requires core plugin services (e.g. uiCapabilities, current license info, etc), they need to be passed in (observability plugin is static only right now: maybe we should make it a "real" plugin so it can consume its own services?)
    • If the calculation determines that the link can't be generated, it should return the appropriate status (still need to determine how much information we need to give the caller about this, if there's a difference between invalid license or feature control disabled etc.)

Consider providing a shared React component that renders null if the passed in link function returns an invalid state, or calls children with the href value if the state is valid, to make it easier to hide invalid links?

@jasonrhodes jasonrhodes added Feature:Metrics UI Metrics UI feature Feature:Logs UI Logs UI feature Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services labels Jul 8, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/infra-logs-ui

@alvarolobato
Copy link

@sgrodzicki @jasonrhodes we found another bug on the linking between apps (#41568) I think this needs to be prioritized, in fact, I thought Jason was actively working on this, I must have miss-understood.
Moving this back to inbox for re-triage and know what the team thinks about re-prioritizing.

@jasonrhodes
Copy link
Member Author

@alvarolobato thanks, the work I did was to get to the point of being able to create this ticket to implement :) this is one of the highest priority tech-debt/internal improvements we have -- I was waiting for feature work to get off the ground before we pull this into grooming.

@sgrodzicki
Copy link

@jasonrhodes what's the current state of this?

@simianhacker
Copy link
Member

Re-open if this is still valid

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Logs UI Logs UI feature Feature:Metrics UI Metrics UI feature Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services
Projects
None yet
Development

No branches or pull requests

5 participants