-
Notifications
You must be signed in to change notification settings - Fork 5
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
fix: refresh pages automatically when a slice or subscriber is added/deleted/edited #701
Conversation
Signed-off-by: gatici <gulsum.atici@canonical.com>
Signed-off-by: gatici <gulsum.atici@canonical.com>
Signed-off-by: gatici <gulsum.atici@canonical.com>
Signed-off-by: gatici <gulsum.atici@canonical.com>
Signed-off-by: gatici <gulsum.atici@canonical.com>
824ebbf
to
97f25f3
Compare
Signed-off-by: gatici <gulsum.atici@canonical.com>
Signed-off-by: gatici <gulsum.atici@canonical.com>
Signed-off-by: gatici <gulsum.atici@canonical.com>
…letion Signed-off-by: gatici <gulsum.atici@canonical.com>
Signed-off-by: gatici <gulsum.atici@canonical.com>
Signed-off-by: gatici <gulsum.atici@canonical.com>
Signed-off-by: gatici <gulsum.atici@canonical.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have a task to remove the useEffect because is not the correct approach. Why are you adding it?
I think this task is about avoid using useEffect where it is not necessary.
This code block is used in the authentication section which reacts on token and router changes and removing this approach produces undesirable consequences. I am exploring about it and it is out of this PR's scope. |
Signed-off-by: gatici <gulsum.atici@canonical.com>
The |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested it and I still have the problem with the very first NS and subscriber created. If I delete them and recreate them, it works fine. The problem is the first one ever.
We can double check tomorrow
As you said I had it once in my first test attempt: I attached a custom image, then I saw that subscribers appears upon delete. Then, it did not appear again. To simulate this behaviour, I reinstalled NMS charm several times and tested this feature using Firefox and Google Chrome. But it did not appear again. I really don't get the reason. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We double check and is working fine
Description
This is an UX improvement which refreshes the Subscriber and Network slices pages automatically when:
For network Slices:
useMutation
hook to handle adding, editing and deleting network slices.useState
to manage the states updates.For Subscribers:
useMutation
hook to handle the subscriber operations by invalidating the cache when the mutation completes successfully.useState
to manage the states updates.window.location.reload
to refresh the page when a subscribers is deleted.Fixes: https://warthogs.atlassian.net/jira/software/c/projects/TELCO/boards/1079?assignee=61ad6623c510bc006b359f98&selectedIssue=TELCO-1477
Checklist: