Windows Azure Pack 관리 포털 확장에 알림을 표시하는 방법
적용 대상: Windows Azure Pack
알림은 사용자가 직접 시작한 작업을 기반으로 하지 않는 이벤트를 사용자에게 경고하는 기본 방법입니다. 사용자가 작업을 시작한 경우 진행률 작업을 대신 사용합니다. 자세한 내용은 Windows Azure Pack 관리 포털 확장에서 작업 진행률을 표시하는 방법을 참조하세요. 알림은 간단한 한 줄 정보 메시지이거나 더 복잡할 수 있습니다. 예를 들어 사용자가 볼 수 있는 세부 정보 텍스트가 있는 단추 동작이 있습니다.
정보 메시지 알림을 표시하려면
다음 코드를 사용하여 정보 메시지를 표시합니다.
Shell.UI.Notifications.add("Hello World!", Shell.UI.InteractionSeverity.information);
사용자 지정 단추 작업 알림을 표시하려면
다음 코드를 사용하여 세부 정보 텍스트 알림이 포함된 사용자 지정 단추 작업을 표시합니다.
var notification = new global.Shell.UI.Notifications.Notification(errorMessage, Shell.UI.Notifications.Severity.error), actions = [ Shell.UI.Notifications.Buttons.retry(function() { performOperation(item, context); }), Shell.UI.Notifications.Buttons.cancel($.noop) ]; notification.setDetailsText(response.ErrorMessage); notification.setActions(actions); Shell.UI.Notifications.add(notification);