-
Notifications
You must be signed in to change notification settings - Fork 18
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
Introduce Storage Connections management dialog #31
Conversation
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.
Please attach some screenshots of the dialog.
src/modals/storage-connections/StorageConnectionsDataProvider.js
Outdated
Show resolved
Hide resolved
src/modals/storage-connections/StorageConnectionsDataProvider.js
Outdated
Show resolved
Hide resolved
src/modals/storage-connections/StorageConnectionsDataProvider.js
Outdated
Show resolved
Hide resolved
Done 👍 |
src/modals/storage-connections/StorageConnectionsDataProvider.js
Outdated
Show resolved
Hide resolved
src/modals/storage-connections/StorageConnectionsDataProvider.js
Outdated
Show resolved
Hide resolved
src/modals/storage-connections/StorageConnectionsDataProvider.js
Outdated
Show resolved
Hide resolved
src/modals/storage-connections/StorageConnectionsDataProvider.js
Outdated
Show resolved
Hide resolved
src/modals/storage-connections/StorageConnectionsDataProvider.js
Outdated
Show resolved
Hide resolved
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.
At least the state mismatch between the modal and modal body needs to be resolved.
I would prefer the table to follow the newer model, but it isn't a show stopper at this point.
The fetchData
cross filtering is a bit awkward. Does the selectedDoamin
in addManageStorageConnectionsButton()
have reference to the relevant data center id already? If yes, pass that in and skip some of the lookups.
Finally, the callback structure / location needs a final concensus (@rszwajko, WDYT?).
src/modals/storage-connections/StorageConnectionsDataProvider.js
Outdated
Show resolved
Hide resolved
src/modals/storage-connections/StorageConnectionsDataProvider.js
Outdated
Show resolved
Hide resolved
|
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.
The changes a look good. A few more comment to address, but nothing I'd consider major.
To reply to your comment:
- Regarding moving to Table Composable - I have started to rewrite it and I understood that it would take me more time than I thought, especially for proofing the whole thing and making sure all the small logics are still working. So maybe leave it with the regular Table
Given the time constraints, it's ok to keep the table component the way it is.
- Got rid of all the lets in fetchData. Also, added dataCenterId to the EntityObject, sparing one fetch out of 4
The fetch code is looking much better. Good work!
- @sjd78 setShowAll - I need it in StorageConnectionsModal to trigger it after successful Create action - new connections are naturally created unattached, and if only attached connections are shown we will not see the newly created connection. But I added useEffect to StorageConnectionsModalBody to sync the two states.
Something with how those interplay is bugging me as being overly complex. I'm not sure how to unwind it so it only need to be in one place. But...since it seems to work, it is not a blocker.
- Callbacks, so we agree to leave them in StorageConnectionsModal? Then error and isShowAll are staying there?
Callbacks are ok where they are. In ovirt-web-ui, they would be redux calls, do stuff async and then push the results to the redux store and flow back down to the components to render. There are ways to do this without redux. A complex context object, or managing more state in the DataProvider making that the controlling component are two possibilities. Trade-offs as they are, the current way doesn't seem and better, or worse.
Same as with isShowAll
and error
.
In general, keeping state in one component and having the rest be controlled component makes things "simpler". The dependencies across components on state and effects I think gets the behavior you need at the cost of complexity. It seems to work, so it isn't a blocker for me.
src/modals/storage-connections/StorageConnectionsDataProvider.js
Outdated
Show resolved
Hide resolved
src/modals/storage-connections/StorageConnectionsDataProvider.js
Outdated
Show resolved
Hide resolved
@sjd78 @rszwajko @ahadas Also, now I see Radek also has some proposals that might be a good thing to implement. |
@mkemel Note I couldn't fully click through the dialog because it doesn't support FAKE_DATA and I don't have iscsi hardware. However, I managed to run it with my NFS domain after few hacks :) The user experience was mixed i.e. consider the screenshot below
|
@mkemel the ui-extensions build won't start before Tuesday, so you can continue working on that on Sunday. |
Please review my latest changes, there were some in DataProvider and other places. I think it looks better now |
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.
showAll
features needs some changes. Beside that OK for me.
caa5e4b
to
fe35a0b
Compare
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.
PR looks reasonable at this point. Can be merged once OST passes.
/ost |
Storage Connections management dialog is opened by clicking the Connections button in the Storage Domains table when iSCSI Storage Domain is selected. The dialog displays storage connections, attached to the domain, and also has a switch to show all the iSCSI connections. It allows 5 actions to be performed on the connections: 1. Add new connection 2. Edit connection 3. Remove connection 4. Attach connection to the domain 5. Detach connection from the domain Which provides UI for the existing storage connections API Live changes are not supported, thus the domain should be in maintenance mode to perform actions (4),(5), and also (2),(3) for attached connections.
Original OST passed https://github.com/oVirt/ovirt-engine-ui-extensions/actions/runs/2053199027 The only changes since then are a merge conflict on |
/ost |
1 similar comment
/ost |
Storage Connections management dialog is opened by clicking the
Connections button in the Storage Domains table when iSCSI Storage
Domain is selected.
The dialog displays storage connections, attached to the domain, and
also has a switch to show all the iSCSI connections. It allows 5
actions to be performed on the connections:
Which provides UI for the existing storage connections API
Live changes are not supported, thus the domain should be in
maintenance mode to perform actions (4),(5), and also (2),(3) for
attached connections
Bug: https://bugzilla.redhat.com/show_bug.cgi?id=977379
![Screenshot from 2022-02-15 14-24-01](https://user-images.githubusercontent.com/87977971/154064140-c1f8ee02-88b1-4931-a99b-d6cd84fc5b5b.png)
![Screenshot from 2022-02-15 14-25-37](https://user-images.githubusercontent.com/87977971/154064143-8ed3d261-8468-4ff3-8e45-52159e601d1a.png)
![Screenshot from 2022-02-15 14-26-03](https://user-images.githubusercontent.com/87977971/154064145-35dd3f9c-7aac-4ab7-9506-efebc157db7c.png)
![Screenshot from 2022-02-15 14-26-22](https://user-images.githubusercontent.com/87977971/154064149-71be4610-841a-47aa-bcef-7dd304a33a45.png)
![Screenshot from 2022-02-15 14-26-40](https://user-images.githubusercontent.com/87977971/154064150-298fc8e9-9f10-4c58-98d0-76a3c0061662.png)
.