Ok with your permission can I use your existing code of Ui2 ( I found it on the internet ) and use the new feature in Ui3 using the file ui3-local-overrides.js to add this functionally myself I know its a lot of code modification to make it work but i am sure I can do it.
Of course, that's what open-source licenses are all about. Go right ahead.
The secret sauce is the
currentServer.SetRemoteServer
function. Takes 4 string arguments.- First argument is a unique ID string which you make up to go with each server in your server list. 1-16 characters, alphanumeric, may contain spaces. This is used as a prefix for all the settings keys that UI3 will save in local storage, so that each server you connect to can have its own unique settings.
- Second argument is the base URL of the BI server you want UI3 to connect to, e.g.
http://192.168.0.3:81/
- Third argument is the user name required by that BI server.
- Fourth argument is the password required by that BI server.
Also there are some browser security issues you may need to deal with. Things like not allowing unencrypted
http
connections if you loaded the page from an https
origin. And if you load the UI3 webpage from an internet IP, you can't connect UI3 to a local IP -- the browser will complain and prevent the connection.Lastly, I warn you if you connect to too many servers with different unique ID strings, you'll fill up your local storage allocation for the origin you loaded UI3.htm from. (5 MB limit imposed by most browsers) If that happens you'll start getting errors complaining about exceeding the quota. You can clear local storage via the code
localStorage.clear()
or by using the reset.htm page that is included with UI3.