Shows a text messsage on screen. See https://roomos.cisco.com/xapi/Command.UserInterface.Message.Alert.Display for details.
If text is specifed, duration is set to 10 s.
Hide the text message
Enable/disable debugging. This will print out any ui events in console.log
Closes the currently open panel. See https://roomos.cisco.com/xapi/Command.UserInterface.Extensions.Panel.Close
Opens a panel. See https://roomos.cisco.com/xapi/Command.UserInterface.Extensions.Panel.Open.
If not specified, then first page is opened
Removes the given panel (panel can be a panel, an action button or a web app). See https://roomos.cisco.com/xapi/Command.UserInterface.Extensions.Panel.Remove
Saves a panel (can be a ui panel, ann action button or a web app) Any existing element with the same id will be replaced See https://roomos.cisco.com/xapi/Command.UserInterface.Extensions.Panel.Save
Promps users with a multiple choice dialog. When user selects an option, an event is generated.
Note: You can use the options
parameter to enter options more conveniently.
Also, you can add an optional callback for when the user chooses an option. This is similar to using ui(...).onPromptResponse(...)
Example:
const options = ['Under 18', 'Over 18', 'Dinosaur'];
ui.prompt({
Title: 'Age Check',
Text: 'How old are you?',
FeedbackId: 'age-check',
}, options, idx => console.log('You chose:' + options[idx]));
See https://roomos.cisco.com/xapi/Command.UserInterface.Message.Prompt.Display for details.
Transforms (linearly) a value btw two range systems.
Typically useful for sliders, eg you are converting values from a ui slider (0,255) to a volume setting (0-100)
const v = scale(
{ min: 0, max: 255 },
{ min: 0, max: 100 },
128
); // => 50
The range you are converting from
The range you are converting to
The value you are converting
Shows an input dialog that prompts users for text. An event is genereated when user submits the dialog. See https://roomos.cisco.com/xapi/Command.UserInterface.Message.TextInput.Display for details
Optional callback when user submits text
Shows a single-line text dialog at a chosen location on screen. See https://roomos.cisco.com/xapi/Command.UserInterface.Message.TextLine.Display
Hides any text line currently showing. See https://roomos.cisco.com/xapi/Command.UserInterface.Message.TextLine.Clear/
Close any currently open web view.
Open a web view on main screen. See https://roomos.cisco.com/xapi/Command.UserInterface.WebView.Display for details.
The URL you want to open
Shown while page is loading
Generated using TypeDoc
Static convenience ui functions