Description: Add plugin UI tabs with basic data editing, enable/disable and dynamic plugin switch. Fix loading. Fix small CSS issues.
React. Add customCollapse element. Make customToolbar customizable. Rework data flow in the component.
CLI. Put all the plugins to 'plugin' parser. Add wrappers for all main plugins. Clean up plugin args (remove get_dn, generic enable and disable)
https://pagure.io/389-ds-base/issue/50041
Reviewed by: ?
There is one known issue for 'Dynamic plugins' switch. After initial loading, it shows the wrong image. It is patternfly-react component's bug so I'll think about how we can fix it...
Or we do a workaround (after we'll have the whole UI in React, the problem will become invisible). Or we write our own switch component. Or we use just a radio switch 'on-off' here (probably I'll do this for now).
If you have any thhoughts, please, share.
I think this will break the replication agmt modal. The issue should be fixed in schema.js
rebased onto 96baab94ade68f3e4215b7b55bba042fa20a432a
Okay, I was a bit hasty :D
Rebased.
P.S. I was thinking to put the loading part to schema.js but I think it can lead to some race conditions because of the cockpit async behavior... Anyway, it is not a big overhead and we will refactor it soon enough to React.
Few comments....
[1] The accordion used in the plugin page for showing advanced options has a "color" background making it look like a button, and it's center aligned (but it should left aligned to the left), and it should look exactly like what is on the Server tab Configuration page.
[2] When you select a plugin, I think you could put the plugin name in the right window above the on/off toggle. I know its redundant but it I think it will look nicer.
[3] Remove the Dynamic plugins configuration option altogether. I think eventually with Williams work these will be dynamic by default anyway. Also this feature has been known to crash the server, so dynamic plug-ins (as of today) should not be advertised.
[4] All Plugins -> The table pagination box is not aligned with "per page". I feel that "per page" needs to be raised up
[5] Not sure if it was a setup issue, but when I first looked at these changes the div/box of the advanced plugin options had a background color (grey). But now the background is mysteriously white. So while I don't know why for a brief moment it had a nice grey background, it definitely looked better than just a white ground with a black line border. Like I said it could be my setup, but right now its white and looks harsh :-)
[6] I think the page is also a little compressed. A HR under "Plugins" looks better. I tried adding it, only using one column, but then the "spinner" gets out of alignment.
Here is just an example showing the HR in action:
+++ b/src/cockpit/389-console/src/plugins.jsx @@ -408,15 +408,9 @@ export class Plugins extends React.Component { removeNotificationAction={this.removeNotification} /> <Row className="clearfix"> - <Col sm={2}> + <Col sm={12}> <h2>Plugins</h2> - </Col> - <Col sm={10}> - <Spinner - className="ds-float-left ds-plugin-spinner" - loading={this.state.loading} - size="md" - /> + <hr /> </Col>
I couldn't find a way to add the spinner back and get it to be right of the "Plugins" text, it always pops up below it. Sorry ran out of time to work on it (end of the day for me), but I think you get the idea.
Few comments.... [1] The accordion used in the plugin page for showing advanced options has a "color" background making it look like a button, and it's center aligned (but it should left aligned to the left), and it should look exactly like what is on the Server tab Configuration page.
Yeah, I faced a very weird issue here... If I use 'Button' patternfly component - it has this 'buttonish' look. I didn't find the CSS that I should unset. If I use 'button' native component (which doesn't have the btn CSS classes - it starts to reload the page when I click on it (VERY WEIRD). I'll try to investigate more... But for now, it's the best I could achieve.
I was thinking about that too. I'll try to put it but the code will be ugly :) I'll have to use 'margin' CSS for that (moving the word higher) because of the tab-content layout.
Okay... It is a releaf.
I'll put some margin CSS there.
Hah, I was actually removing the grey background because I didn't like it. I'll put it back. We'll see, may be it was just a first look and it is actually good.
Sure. I'll check it.
Few comments.... [1] The accordion used in the plugin page for showing advanced options has a "color" background making it look like a button, and it's center aligned (but it should left aligned to the left), and it should look exactly like what is on the Server tab Configuration page. Yeah, I faced a very weird issue here... If I use 'Button' patternfly component - it has this 'buttonish' look. I didn't find the CSS that I should unset. If I use 'button' native component (which doesn't have the btn CSS classes - it starts to reload the page when I click on it (VERY WEIRD). I'll try to investigate more... But for now, it's the best I could achieve.
Can't you use the same CSS/JS I used for the other accordions?
[2] When you select a plugin, I think you could put the plugin name in the right window above the on/off toggle. I know its redundant but it I think it will look nicer. I was thinking about that too. I'll try to put it but the code will be ugly :)
I was thinking about that too. I'll try to put it but the code will be ugly :)
Why ugly? And why is adding a header <h2>{name}</h2> hard? I seriously don't like how difficiult it is to use React to do really simple things (I really think we should of held off on incorporating React for the first UI release, but it's too late now) :-(
<h2>{name}</h2>
It uses Jquery which we'll no longer use. All I need to do is to fix our 'ds-accordion' for this (so it overwrites the button CSS). And that's it (though to find the setting may not be easy, but it's there).
Why ugly? And why is adding a header {name} hard? I seriously don't like how difficiult it is to use React to do really simple things (I really think we should of held off on incorporating React for the first UI release, but it's too late now) :-(
Why ugly? And why is adding a header
React has nothing to do here. :) He only helps to build safe and fast things faster.
The issue is with the bootstrap layout (you can check the HTML element boxes with the browser's inspect tools - cursor)
The tab content is lower than 'Plugins' header. So if I want to put the plugin name header above the usual tab content I have to use 'margin' which is a bit ugly.
I'll rebase later today after all the reviewes and BZ work :)
Also in the plugin properties, the labels wrap "Plugin Description" Plugin initfunc", there should be enough room for this to fit without wrapping to two lines. You could even make it one column, instead of two, to definitely make sure there is enough room
rebased onto f2a66eb772ad5101d2dfacf08c977947011fb83f
rebased onto 322352cf224e214a21556b1fb68ecdae42a96bb6
rebased onto bef29b31f7f3a3eb8ec8aea184f2264973a1404b
The issues are fixed. Please, review.
P.S. the only thing that I didn't fix is [1] accordion - it's center aligned (but it should left aligned to the left). I have it left aligned already...
rebased onto 86f7b898d448cb2b3606ff42795f2c2231d14381
Few comments:
[1] The plugin name should not be on the same line as the "Plugins" header, it should be beneath it. and not as large as "Plugins" as well, maybe h3? [2] Trying to disable automember plugin throws error but I think its my env (so this can probably be ignored if it works for you) [3] The plugin edit page should still be compressed. The labels are not left aligned, and have large gaps to the left. Remember we are trying to get the forms to be consistent. Please see how the Server tab configuration settings (labels and inputs) are laid out.
Thanks!
Also in the "All Plugins" table, please change "Edit Entry" to "Edit Plugin"
rebased onto e4fbaeadafa2441534a8aea4978c8727ee2b82bc
Fixed. Please review
Looks good, one last request. Can you add a little vertical space between the accordion and the labels/inputs? It's a little too close together. Besides that LGTM ack!
rebased onto 00c3b7a94545d627bf8a334c1ddf206282078024
Good catch! Added the 'ds-accordion-panel' class.
Pull-Request has been merged by spichugi
389-ds-base is moving from Pagure to Github. This means that new issues and pull requests will be accepted only in 389-ds-base's github repository.
This pull request has been cloned to Github as issue and is available here: - https://github.com/389ds/389-ds-base/issues/3147
If you want to continue to work on the PR, please navigate to the github issue, download the patch from the attachments and file a new pull request.
Thank you for understanding. We apologize for all inconvenience.
Pull-Request has been closed by spichugi
Description: Add plugin UI tabs with basic data editing,
enable/disable and dynamic plugin switch.
Fix loading. Fix small CSS issues.
React. Add customCollapse element. Make customToolbar customizable.
Rework data flow in the component.
CLI. Put all the plugins to 'plugin' parser. Add wrappers for
all main plugins. Clean up plugin args (remove get_dn, generic enable and disable)
https://pagure.io/389-ds-base/issue/50041
Reviewed by: ?