Closed h9k closed 9 years ago
Be kind posting a screenshot! I am planning to release an update tonight, 13.04.
Waiting for more details. Update 13.04 is about to be pushed.
Sorry for not making it on time. Here is the screenshot
This is link is coming from Custom Links module, right?
You can switch to Webmin using Alt+W hotkey
How did you get Open Webmin
? What is the URL there, on that link?
Actually in order to open Webmin in the new tab, all you need to do is to set custom link with full URL, like https://localhost:10000
. In case you set it like /
, yes you will get what you get and it's obvious.
So just use full location.href
and it will work. Not an issue! Closing.
It is not a custom link, this is a built-in feature of Cloudmin. The "Link to Webmin" opens Webmin in a new tab and works fine. The "Open Webmin" also opens Webmin in a new tab, but in already logged in state. It works via javascript. This is an example:
<li>
<a target="page" class="navigation_module_trigger" data-href="../servers/link.cgi/1577302730283920/"><i class="fa fa-fw fa-external-link"></i> <span>Open Webmin</span></a>
</li>
I don't have this link?! How do you login?
Can you go to Custom Links
and see if it's defined there?
It's not in custom links. I go there this way: Cloudmin tab -> List managed systems -> then click on a managed system (or actually select one from the dropdown in the left pane) -> links should appear like in my screenshot, related to the selected managed system.
Oh, I forgot, the managed system must have Webmin installed and be registered with Cloudmin probably, so that the link displays there.
any news on this? :)
:) OK. Can you control what link is set there or it's hardcoded? Are you sure it's not from custom links? Do you use custom links? I don't see this link and can not reproduce it. I need more detailed info on how did you make it appear!? I don't have it showing in Cloudmin?
What is the link's URL and what is the selector? Can you open dev tool and debug this link and attaching the screenshot.
:) OK. Can you control what link is set there or it's hardcoded? Are you sure it's not from custom links? Do you use custom links? I don't see this link and can not reproduce it. I need more detailed info on how did you make it appear!? I don't have it showing in Cloudmin?
What is the link's URL and what is the selector? Can you open dev tool and debug this link and attaching the screenshot.
That link appears automatically if the managed system has Webmin installed and it is configured in Cloudmin. So basically, if a managed system (be it kvm, xen, openvz, or even physical, whatever) has Webmin installed on it, in Cloudmin you have to configure access to the Webmin. When adding a managed system to Cloudmin, it will ask you if it has Webmin and you can provide details. On an existing system, I am not so sure where you can add the information. I guess under "Change password" or "Edit system", see my original screenshot at the top left.
In the Authentic theme, the link is like this:
<li>
<a target="page" class="navigation_module_trigger" data-href="../servers/link.cgi/1577312345683920/"><i class="fa fa-fw fa-external-link"></i> <span>Open Webmin</span></a>
</li>
In the Virtualmin Framed theme, the link is like this:
<div class="leftlink"><a href="../servers/link.cgi/1577312345683920/" target="_blank">Open Webmin</a></div>
As you can see, for some reason in the Authentic theme that links gets the target "page", whereas in the Virtualmin Framed theme it gets target _blank, which is correct behavior.
Alright, now it's very clear. I am at vacation right now and don't have access to my debug server. I will try making a fix while I'm here if I can and provide you with the fix which I'll add to the next release in the end of the month, as I remember there were some other reported bugs for Cloudmin.
Thanks for clearing that up.
Alright! I have fixed it before as I just found and commented this out as that was causing some issues in other parts of the theme. Now it seems alright and should add target blank attribute to the link! Please be kind testing with updated default.min.js
.
Hmmm somehow the theme is broken now, just see the loaders. But don't have time to test further, will try again in 12 hours.
This is very unlikely. Clear cache please and try again.
I cleared cache and reloaded everything, unfortunately the link has still target="page"
Ahh. Ok. I missed that Webmin devs provided a trigger for links that should be opened in new page. It should have been done using server-side. Added couple of strings to .lib file. Please upload and test:
https://rostovtsev.ru/pub/src/authentic/13.05-patches/issue182/authentic-lib.cgi
Working now, right??
Nope. Strangely, now target is _blank, but somehow the browser ignores it and still opens in the right frame. Tested with Chrome and Firefox
Ahh..Ok, I got it. This one should work. Please test:
https://rostovtsev.ru/pub/src/authentic/13.05-patches/issue182/1/authentic-lib.cgi
Unfortunately, now when I click on the link nothing happens :(
Can you please make a screenshot of it debugging in browser's console?
Uncaught Error: Syntax error, unrecognized expression: ../servers/link.cgi/1378123456781040/
ga.error @ jquery.min.js?1305:2
ga.tokenize @ jquery.min.js?1305:2
ga.select @ jquery.min.js?1305:2
ga @ jquery.min.js?1305:2
n.fn.extend.find @ jquery.min.js?1305:2
n.fn.init @ jquery.min.js?1305:2
n @ jquery.min.js?1305:2
(anonymous function) @ default.min.js?1305:6
There are ticks next to (anonymous function) @ default.min.js?1305:6
what is on the inside? There should be the function name?
It has started happening after I made a fix for you can you please update your JS again with working (check with other guys) and try again?
https://rostovtsev.ru/pub/src/authentic/13.05-patches/issue191/default.min.js
Tried with Firebug this time, it just says this: Error: Syntax error, unrecognized expression: ../servers/link.cgi/1371234567891012/ I also tried updating the default.min.js with the one you provided, but the same error happens.
Funny. The link really doesn't work. But it shouldn't return any issue on javascript part.. ok. I will do my best to fix it by next release, 13.10 very soon. Please stay in touch after installing updated version. Clear browsers cache, test it and in case it still doesn't work, just let me know here again!
Can you please again send me the link of how it looks now, like you did, example:
<li>
<a target="page" class="navigation_module_trigger" data-href="../servers/link.cgi/1577312345683920/"><i class="fa fa-fw fa-external-link"></i> <span>Open Webmin</span></a>
</li>
Ahh. Nevermind, I got it.
Installed 13.10. Unfortunatelly it is still not fixed. The good thing is, a new tab is actually opened, the bad thing is that the link changes to the hostname without the :10000 port, resulting in a 403 forbidden error. The way this works in the Virtualmin Framed theme is that it opens the Webmin of the managed system in the new tab, already logged in, using the cloudmin system's hostname, not the managed one. Now I actually see that https://cloudmin.blabla.tld:10000/servers/link.cgi/1234561234567890/ is being opened, but then it redirects to the hostname. Maybe you need to pass something on in post or something? No idea...
Only port is missing in opened URL? How the link looks now and how it should be?
..and what should be opened? URL you specified looks good!?
In Authentic the link looks like this
<li class="navigation_external">
<a href="../servers/link.cgi/1234567890123456/" target="_blank"><i class="fa fa-fw fa-external-link"></i> <span>Open Webmin</span></a>
</li>
In the Virtualmin Framed theme it looks like this
<div class="leftlink"><a target="_blank" href="../servers/link.cgi/1234567890123456/">Open Webmin</a></div>
So the link looks fine. If I click on it in the Virtualmin Framed theme, it opens fine. If I click on it in the Authentic theme it opens the new tab, but then the url gets a 302 redirection from https://cloudmin.myhost.tld:10000/servers/link.cgi/1234567890123456/ to https://blabla.myhost.tld. Could not say what the problem could be, as the links are identical...
Can you hover on that link (in left menu), click right with your mouse and choose to Copy link address
in both themes and then compare them. Are they the same?
Yes, they are identical
Can you please also paste the way links look like after they are opened in tab, both in default theme and Authentic Theme?
After they open they look like that: Virtualmin Framed: https://cloudmin.mydomain.tld:10000/servers/link.cgi/1234567890123456/ Authentic: https://virtualhost.mydomain.tld/
Ok, I finally got it. I reproduced the bug completely and made it go away. It will be fixed in version 14 in couple of days. Let me know how it works for you after so many tries. ;) Clear cache if you face an issue (shouldn't be necessary really).
Here is the little preview that shows of how version 14 makes it work. It replaces ../servers/link.cgi/
with full URL and makes it open as you expect.
Tested in Chrome and Firefox.
Take a look:
yaaaay, it works now! :)
Ouhhh! Finally!! :open_mouth:
Actually, there is another problem now... it only shows the Webmin tab and only the Webmin Servers Index and System and Server status in the menu, that's it... but that system also has Virtualmin Pro on it, it should show all of that... :|
You mean another problem like not opening ../servers/link.cgi/...
links?
No sure I understand? Clear cache and restart Webmin... I tested it on both Virtualmin+Cloudmin GPL/Pro. All was fine.
Did that, did not help. That's all I see when opening Webmin from Cloudmin...
Please create separate issue for that. When I tested it, I also saw Cloudmin there. Where is yours?
Why you never told me about this bug before? Cause link didn't open it? What is configuration on that user? Does it show in default theme?
In the old Virtualmin Framed theme, when clicking on the "Open Webmin" link in the left pane in Cloudmin, the Webmin of the selected server would open in a new tab. But with authentic-theme it opens in the same window, which looks a little bit odd with two sidebars, plus it results in layout problems. Is it possible to make it open in a new tab?