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
Cacti 1.0 Does not Support jQueryUI 1.12.x #186
Comments
Just so you are aware, this is a blocking issue for inclusion of cacti 1.0.x in Debian. Either you or I need to fix this if cacti is to be upgraded in Debian as it is unacceptable for Debian to use the embedded versions of the JavaScript libraries if they are available in Debian. Can you explain where (which group of cacti files) cacti is so heavily tied to the jQueryUI CSS, such that I may have a shot at working on this? |
Paul, Understand. jQueryUI choose to add many pseudo-classes in version 1.12. This broke all themes. It's more than a bug fix to remedy, but we will look into it. They should have made jQueryUI 1.12 a major version change. But unfortunately, they kept it a minor point release. |
@cigamit Could you point me at one location where I can see this in action in Cacti such that I can understand and potentially help? |
Paul, the updates would be in the four theme directories. The files that need the new pseudo-classes are /usr/share/cacti/site/include/themes/*/jquery-ui.css. |
@cigamit These files also come from jQueryUI. But I see these files are (heavily?) modified in Cacti. You'll probably find this an extremely annoying question, but would it be possible (I mostly mean technically) to put the cacti changes in a separate file and load that after the default jQueuryUI one, to overload the default? That way it is easier to upgrade the jQueryUI files (which in Debian wouldn't come from Cacti anyways). |
I suspect that they are actually not heavily edited, but that between jQueryUI 1.11 and jQueryUI 1.12 the themeroller CSS changed heavily. I agree with your point though. |
@cigamit would you accept patches that load main.css after all other style sheets and have the Cacti changes to the embedded style sheets defined in that main.css? Would that work as I expect it to work, i.e. that would overload the value in the earlier style sheet and thus enables Cacti to work with system jQueryUI? |
I am making this first change as a part of Issue #329 commit |
Also first step in resolving issue #186
@cigamit It this close to what you would have in mind for include/themes/classic/main.css? The current implementation only tries to mimic the behavior of the current jquery-ui.css, i.e. it contains the delta of that file since commti d825504. There are a couple of things I have to figure out:
|
@cigamit, it looks like the smoothness theme in 1.12 is already what you want for the modern theme in cacti. As far as I checked now, > 90% of the delta's introduced in cacti are already the default in jquery-ui 1.12 smoothness. |
Okay, first commit done. A few more to go to get everything straitened out. |
Cacti 1.x does not support jQueryUI 1.12.x. This is the first of likely a few commits to introduce jQueryUI 1.12.x into the core of Cacti.
Changed Classic to smoothness and fixed up other oddities. Should be all set now.
Should be fully implemented now. |
@cigamit, just checking. In the history of this bug, we discussed that the jquery-ui.css files would be taken from upstream and that all Cacti changes would be in the main.css files. In your commit f9a490e I do see that you changed the classic/jquery-ui.css file. I guess that is a change in the upstream file. If I am correct, can't that change be carried (by overloading) in the classic/main.css file? And much thanks for finally implementing this. |
Paul, Here is the process:
Note: Under the Classic theme there were a number of unused image files that were removed. There were like 2 per each of the other themes plus some other stuff that somehow got committed. I think that explains it all. |
@cigamit thanks for the explanation. The second note explained my question I guess. I now have a different question. In Debian I strip the jquery-ui code from Cacti and use the distribution version of jquery-ui (it is a separate package). With changes in Cacti files overloading the default I am perfectly happy, but I wonder what is going to happen (it probably already is happening with the Debian package of Cacti) with the Dark and Modern themes, as they have code that Debian doesn't know about. I don't have the answer (maybe there isn't a straight forward one), but maybe you have some thoughts? |
The autocomplete dropdown was not funcational and had the wrong styling.
Good point. That one is tricky. Debian needs to support custom themes. I would suggest that you leave things in their current develop places as Cacti will always be dependent, as well as other OSS packages, on the release of jQueryUI. Having jquery-ui.js somewhere else does not bother me too much, but the theme files should remain inside the Cacti distribution. A purist might say that if they are to be customized by users, they should belong in their own folder separate from Cacti. That point is well taken. We have the same issue with Plugins. You should take this up with the Debian team. JQueryUI breaks a lot of things in the minor point releases. For example, they introduced pseudo-classes between 1.11 and 1.12 and that was catastrophic to Cacti. It turned out to be less work than I thought making it compatible again. But I suspect this is going to happen again in the future. The last point, is that we are trying, though it may not appear so, to allow users to download and install Plugins, Packages, and Themes from the internet directly (github more specifically). It's on our to do list, but we are dysfunctional due to our day jobs. |
Remove width on the wrapping span. It's no longer required.
Then you'll be not too pleased to learn what I do in Debian. For example look at the tree of the classic theme:
|
And the location in for local changes compared to /usr/share on Debian is in /usr/local/share. But if Cacti would support that it would mean logic to see if the local admin added anything there and otherwise fall back to the default. The point for distribution like Debian is that all files except those under /etc/ are allowed (and typically automatically) updated upon package upgrade. |
I think we could squeak things into our config.php for locations of things like themes for sure. Let me give it some thought. |
We now have a common header function, so the number of places we would have to make changes is pretty low. |
Some other places you may find would have issues with that is again plugins and code which uses $config['base_path'] as the starting point for building a hard coded path. |
I guess the other option would to be to support the concept of theme-packs and then some relatively dynamic directory that holds the extracted theme files, for each of the users sessions. That temporary location would be pruned as sessions come and go. Theme packs could include exploits though. Paul, what do you think about this idea. That way, you could install/uninstall theme packs anywhere on the OS per path and store that path in the database. Again, it's a departure of the OS vendor controlling such things, but maybe that is best. |
@cigamit If it is optional than I am fine (on my users behalf) The user could opt to install the distributions version and stay with that, or install a theme package from anywhere on the Internet and use that. In the latter case, the risks are clearly higher for exploits than in the former. WordPress in Debian does similar thinks if I am correct (with plugins; not sure how/if this is supported by WordPress upstream). Some plugins are distributed by Debian and can be installed in the regular way. If the WordPress user/admin wants a newer version (or isn't admin on the system) he can install the plugins in the WordPress way. If this is then the only way, I don't really like it. |
This can not be supported at this time due to the magnitude of the changes between CSS set's from jQueryUI 1.11.4 and jQueryUI 1.12.x.
The text was updated successfully, but these errors were encountered: