argoproj / argo-workflows

Workflow Engine for Kubernetes
https://argo-workflows.readthedocs.io/
Apache License 2.0
14.82k stars 3.17k forks source link

ui: Common filters buttons #11112

Open or-shachar opened 1 year ago

or-shachar commented 1 year ago

Summary

I think we should add onfigurable quick-filter buttons at the top of the workflow history view. Something like: MOCK
Picture1

Use Cases

Problem

Suggested solution:

Maybe as part of the configmap I can provide something like this:

navColor: lightslategray # maybe this should be moved to `web` as well
web:
   navColor: lightslategray
   common_filters:
        - name: "TEST BACKEND"
          filter: "label=deploy/type=backend&label=deploy/env=test"
        - name: "TEST INFRA"
          filter: "label=deploy/type=infra&label=deploy/env=stage"
        - name: "STAGE BACKEND"
          filter: "label=deploy/type=backend&label=deploy/env=stage"
        - name: "STAGE INFRA"
          filter: "label=deploy/type=infra&label=deploy/env=stage"

Message from the maintainers:

Love this enhancement proposal? Give it a 👍. We prioritise the proposals with the most 👍.

terrytangyuan commented 1 year ago

This should be achievable via https://github.com/argoproj/argo-workflows/pull/10808.

or-shachar commented 1 year ago

@terrytangyuan - Awesome!

@rbreeze - looks amazing!

Excuse my frontend ignorance, but will this make the link open up in a new tab / reload the page?

          ...this.state.links.map(link => ({
              title: link.name,
              iconClassName: 'fa fa-external-link',
              action: () => (window.location.href = link.url)

If so - maybe we should add another type of link that simply changes the filter on the current view without reloading the page?

WDYT?

terrytangyuan commented 1 year ago

I think it opens up a new tab. cc @rbreeze @jiachengxu who contributed this for feedback.

moonyoungCHAE commented 11 months ago

If a way of filtering without reloading the page is added by config map, it will be convenient because the filters set by the user on the UI will be maintained. However, I think it could cause confusion if the filtering button is located at the same level as the existing reload button. So it would be better to use the existed way to redirect url.

agilgur5 commented 11 months ago

If so - maybe we should add another type of link that simply changes the filter on the current view without reloading the page?

that could be done as a field on the links spec. e.g. newTab: true or something