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

UI: Add new columns in the "View Connections by kytos/mef_eline" #594

Open
viniarck opened this issue Dec 17, 2024 · 4 comments
Open

UI: Add new columns in the "View Connections by kytos/mef_eline" #594

viniarck opened this issue Dec 17, 2024 · 4 comments
Assignees
Labels
enhancement New feature or request epic_ui UI improvements

Comments

@viniarck
Copy link
Member

viniarck commented Dec 17, 2024

Initially requested by @RenataFrez on kytos-ng/kytos#482

The "View Connections by kytos/mef_eline" could have two new columns to help identify the EVCs path behavior:

  1. Column with the "dynamic_backup_path" tag value for all the EVCs.
  2. Column showing if an EVC has fixed paths or not.
@italovalcy
Copy link

so if I understood correctly, the idea would be to have three new columns with a yes/no value? one for "has dynamic path", another for "has primary path" and another for "has backup path"?

@viniarck
Copy link
Member Author

@italovalcy, that would make sense considering all the flexibility that's supported. But now, thinking more about its UX/UI this is starting to feel like too many booleans. Maybe we should reconsider and in the backend provide two new attrs primary_path_kind: "dynamic|static", secondary_path_kind: "dynamic|static", and then when the EVC is created or updated the path type gets updated accordingly. Just an idea, definitely needs to be refined.

@italovalcy
Copy link

@italovalcy, that would make sense considering all the flexibility that's supported. But now, thinking more about its UX/UI this is starting to feel like too many booleans. Maybe we should reconsider and in the backend provide two new attrs primary_path_kind: "dynamic|static", secondary_path_kind: "dynamic|static", and then when the EVC is created or updated the path type gets updated accordingly. Just an idea, definitely needs to be refined.

Another option would be to have one column named "Path" on the UI with string words like "dynamic" if the EVC has dynamic_backup_path=True, and also having "static_primary" if len(primary_path)!=0 and also having "static_backup" if len(backup_path)!=0. This way we could leverage the existing textual filters to search for one or multiple of those conditions.

@viniarck
Copy link
Member Author

Great idea @italovalcy, it's a good compromise, incremental and it wouldn't be too much for the FE to consolidate, filter and display. Plus, we also avoid having to deal with migrations to backfill in the DB (new values if we were to add new attrs) for now. To summarize what you proposed:

Add a new column Path: its contents should be a sorted string with commas to be filterable.

  • a) If dynamic_backup_path === true, then include "dynamic"
  • b) If primary_path.length != 0 then include "static_primary"
  • c) If backup_path.lenngth != 0 then include "static_backup"

Example with primary_path set and dynamic_backup_path=true: "dynamic,static_backup"

and then in the filter input it can use a .includes(input_text) or have an exact string comparison, would just a .includes suffice as most of the current ones are? Also, will this need to be persisted in local storage or not? Let's refine that part for whoever will implement this. Thanks, Italo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request epic_ui UI improvements
Projects
None yet
Development

No branches or pull requests

3 participants