-
Notifications
You must be signed in to change notification settings - Fork 14
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
Make Insight login work with websocket URLs #66
Conversation
Conflicting PR. Removed from build OMERO-insight-push#138. See the console output for more details.
|
@@ -546,7 +546,7 @@ private void initialize(String userName, String hostName) | |||
serverName = i.next(); | |||
if (k == n) { | |||
value = servers.get(serverName); | |||
if (value != null) { | |||
if (value != null && value.length() > 0) { |
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.
CommonsLangUtils.isNotBlank
can be handy for this kind of thing.
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.
Not sure, thought we want to gradually get rid off external apache/google dependencies?
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.
Where the JDK now offers an equivalent method, sure. For our heavyweight full-application JARs I wasn't aware of a broader push but I may have missed something? I'd have thought they were worth it for readability and reusing others' work but happy to go in the other direction if that's what's been decided. Certainly not a blocker for this PR anyway.
Initial functional testing looking promising. Can't see any data on IDR next but also can't via 4064 so maybe expected. |
Works fine to me too, for idr had to play around with selecting/unselecting users/groups to view the data. I couldn't find the insight logs (OS X, the menu option doesn't load anything). I wanted to check the error message was informative when using an incorrect URL, but that's unrelated to this PR. |
That's a good point. The |
Sorry, there's actually way more to it. The server editor / dialog still has the two cells (one for hostname and one for the port); unbelievable complex to remove that. |
I suppose it would be too optimistic to let the port number imply the protocol? |
The problem is just the UI, this server list/editor is a monster (re complexity) :-/ |
- A URL can now be entered as hostname - Port can now be empty (default is set in the java gateway)
This PR got much bigger than I intended initially, now also:
|
@dominikl Can you remove the exclude comment from #66 (comment) |
Argh, sorry, yes forgot about the exclude in the comment above; removed now. |
This certainly allows to have the same server name with different port. |
Yes, but the addition of the port manually is adding a burden on each and every insight user - no user now will be able to ignore the port, it will never be prepopulated, do I get it right ? Thus, the user will have to know it is "colon 4064" |
No, if it's the default port (which probably is the case for the vast majority of the users) you don't have to enter a port, ie |
@@ -214,12 +204,20 @@ public void actionPerformed(ActionEvent e) | |||
removeButton.setEnabled(!this.servers.isEmpty()); | |||
addButton.addActionListener(new ActionListener() { | |||
public void actionPerformed(ActionEvent e) { | |||
String add = JOptionPane.showInputDialog(ServerEditor.this, "", "Add new server", | |||
String add = JOptionPane.showInputDialog(ServerEditor.this, | |||
"Enter hostname or IP address (:port as needed)\n(e.g. test.openmicroscopy.org or 192.168.0.1:1234", |
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 port example should be indicated when the hostname is changed. It will probably be missed when the IP is used
See above - some servers have ports listed, some not. This is probably because I had the list of servers "from old insight" and all these have ports explicitly listed. But, when I entered a new server (nightshade) I have not listed the port with a colon. But, the port number was not automatically added either. This could be explained in the dialog above, where it just says "Enter a new server or use existing one" - not very informatinve actually. |
Discussed with @dominikl - the solution might be to put the info in the first dialog, There is space for it and maybe it can be formatted as well.
|
That is much better, couple of further suggestions:
|
Had to fix some more issues, hence some more tests needs to be taken:
That's additionally to the previous tests of the actual PR, which are:
Note: |
- Handle case that no config doesn't exists yet - Take default values from container.xml - Handle case that config is set to not editable
src/main/java/org/openmicroscopy/shoola/util/ui/login/ScreenLoginDialog.java
Outdated
Show resolved
Hide resolved
All works as expected here. Also tested import using websocket into the pub-omero server, went fine. Ready to merge FMPOV |
Breaking UI change so this needs to go in for 5.6 |
@pwalczysko The import guide will need to be adjusted to indicate how to change the port. |
With this PR:
Test
Connect to IDR next via websocket URL
wss://[OMERO SERVER]/omero-ws
(this again depends on ome/omero-blitz#66 ) . Connect to another server using usual hostname and port.Note
There's actually one caveat: This PR slightly changes the appearance of the server list dialog: There are no separate fields any longer for hostname and port. If a port other than default port is used, one has to add it with a

:
after the hostname. Will probably need updating various help and training docs /cc @pwalczysko .