LoginDialog
You can use tm1web/api/session/LoginDialog
to display or destroy a login
dialog box.
Example
var dialog = new LoginDialog({
onLogin: function(sessionInfo) {
console.log(sessionInfo);
},
tm1Server: "Planning Sample",
adminHost: "localhost"
});
dialog.show();
Construction
The LoginDialog
module accepts several parameters for construction.
- onLogin
- Type: Function
An example of this object is:
{
tm1SessionId : "JcFxniSEzsJZVlQQhYDLDQ",
sessionToken : "baa4ff9a-ddfb-41d1-9c71-f0add92325fd",
adminHost : "localhost",
tm1Server : "Planning Sample",
username : "Admin"
}
This object has the same format as the response from the login
method of
tm1web/api/session/session
.
- adminHost
- Type: String (optional)
- tm1Server
- Type: String (optional)
- adminHostVisible
- Type: Boolean (optional)
- tm1ServersVisible
- Type: Boolean (optional)
The adminHost
, tm1Server
, adminHostVisible
,
and tm1ServersVisible
properties can be configured with the set method.
For example:
loginDialog.set("adminHost", "Planning Sample");
Methods
- show()
- Displays the login dialog box.
- destroy()
- Destroys the login dialog box.
For more information, see Dojo documentation for dijit._WidgetBase (https://dojotoolkit.org/reference-guide/1.10/dijit/_WidgetBase.html).