How to Show a Confirmation in a Windows Azure Pack Management Portal Extension
Published: March 12, 2015
Applies To: Windows Azure Pack
Confirmations are used when the user is required to make a choice and cannot continue interacting with the management portal until they do. Typically they are used with delete operations.
Note |
|---|
Confirmations are modal operations for the whole management portal—until the user makes a decision, the whole page is blocked. |
To Display a Delete Confirmation
Use the following code to display a deletion confirmation request:
var deleteConfirmation = new shell.UI.Notifications.Confirmation("Are you sure?"); // Note you could have multiple options – setActions takes an array deleteConfirmation.setActions([shell.UI.Notifications.Buttons.ok(function() { performDelete(item); })]); Shell.UI.Notifications.add(deleteConfirmation);
Show:
