Closed HeriLFIU closed 5 months ago
Just fixed two issues I found this morning:
approved list
section was based on the entire object
this meant that whenever one section changed (such as active
), it would count as a completely different object
and add it to the approved list
, even though it referred to the same switch, interface, or link
. To solve this I made the approved list
section based on id
, so you should no longer be able to add the exact same element twice.status reason
section was just a list
, and it looked a bit out of place. Because of this I turned it into a string
.Great PR. If I can suggest something, it would be to add comments to each function, especially those that have Regex.
@viniarck I made all of the changes you had mentioned. I also tested it all out and it seems to be working fine without any issue.
@rmotitsuki Ill try and follow some examples and add more comments. I also saw some unique javascript comments being used in some other code, ill try and utilize them as well.
@rmotitsuki I added the comments.
@viniarck I tested it out and the search function seems to be working properly now.
Hi @HeriLFIU excellent work you have done implementing this feature! It is indeed very useful for our operation!! @viniarck thanks/congrats for the support reviewing and contributing with this feature as well.
Trying to contribute with you guys have done, I have a few commends/suggestions below:
Hello @italovalcy,
port_name
to the menu.@italovalcy @viniarck It took me a while, but everything seems to be working fine now.
I don't know if this should be documented but I added a new way to include UI components within the Menu Bar via events.
To explain it in detail:
You create some data that will be sent via an event to the Menu Bar, as seen below.
You then emit this info via the includeMenuBar
event, as seen below.
Lastly, whenever you click on the corresponding button within the Menu Bar, it will emit another event, the one you had set as nameCall
within your data. You can then add a listener to receive it and do something with it, such as display the new component.
I think this abstracts away a lot of complexity and whenever someone wants to add a new option to the Menu Bar, they can just emit the info from within their component an register a listener to receive something back.
I changed nameCall
to eventName
since it made more sense
@viniarck I resolved the issue with the selected filter. Since I wasn't using structuredClone
for the selected list elements, it was treating it as the same object while filtering and deleting everything within it.
I fixed the issue with the components and removed what I had added for separate components.
It was a bit difficult due to the constraints of the v-hotkey package, but I was able to dynamically generate hotkeys based on the number of components within the menu bar.
I also cleaned up the code and removed some now unnecessary things, such as the close and maximize button, since the Status Menu will be kept in the Menu Bar.
It is ordered from top to bottom within the Menu Bar, so the Users should be able to press ctrl+shift+"componentNumber"
, to quickly access that element.
For example:
If the wanna access the map settings, it'll be the first element within the Menu Bar, so it's ctrl+shift+1
.
If the wanna access the map Status Menu, it'll be the second element within the Menu Bar, so it's ctrl+shift+2
.
@viniarck I resolved the issue with the selected filter. Since I wasn't using
structuredClone
for the selected list elements, it was treating it as the same object while filtering and deleting everything within it.
- I fixed the issue with the components and removed what I had added for separate components.
- It was a bit difficult due to the constraints of the v-hotkey package, but I was able to dynamically generate hotkeys based on the number of components within the nav-bar.
- I also cleaned up the code and removed some now unnecessary things, such as the close and maximize button, since the Status Menu will be kept in the Menu Bar.
Nice @HeriLFIU. Great process and solution. I noticed another unexpected side effect though:
It looks like the k-status-menu
is always showing up maximized (when http://localhost:8181/ is opened), where we used to have the initial mapbox-settings
focused and the topology was displayed. Can you double check if this is also happening for you locally?
If you can also update the changelog with ctrl+shift+2
instead of ctrl+shift+s
.
@viniarck It should be working now, I forgot to add the APP.vue within the first commit that added the Status Menu to the Menu Bar. I also updated the changelog.
@italovalcy @viniarck
I just finished reading through and committing all of the changes. I also tested them out and found one small error while showing the info panel. From what I understand its trying to access some metadata called tag_ranges
from the interfaces but it's undefined.
@viniarck Thank the lord, I was trying to find the simplest way to squish everything down into 2 commits, and I read about a method called git interactive rebase. Luckily, since I had all of my commits to the change log separate from everything else. I was just able to do an interactive rebase, push all of the changelog commits to the back, and then squash all of the other commits up at the front into one.
I also removed the commented method.
Let's ship it.
Closes kytos-ng/topology#125
Summary
The status menu UI was added. It allows the user to see the status of switches, links, and interfaces. They can filter by name and different parameters such as status, reason, and enabled.
They can also store table elements in a separate list. When clicking on the Add/Remove button, the element will be added to the approved list. You can view all elements added to the approved list by clicking on the approved button. This allows users to store and organize data within the UI itself.
Data from this table is also saved within local storage, so you can refresh the page and keep all of your filters/data saved.
Users will also be able to click on switches within the table to access their corresponding data.
This new menu can be accessed by pressing
ctrl + shift + s
.Local Tests
A combination of all parameters were used all at once to ensure functionality.
To test the new local storage functionality the page was refreshed and the data stayed the same.
Quality of Life Changes
QoL changes for the mef-eline EVC table will be available through a separate PR.