mirror of
https://github.com/nasa/openmct.git
synced 2025-02-20 17:33:23 +00:00
Making changes to implement display queue
This commit is contained in:
parent
b2a09599a0
commit
2ba6f18c59
@ -1,7 +1,8 @@
|
||||
<div ng-controller="MessageController"
|
||||
class="l-message"
|
||||
title="{{MessageSeverity}}"
|
||||
ng-class="{'message-severity-info': ngModel.severity===MessageSeverity.INFO,
|
||||
ng-class="{
|
||||
'message-severity-info': ngModel.severity===MessageSeverity.INFO,
|
||||
'message-severity-error': ngModel.severity===MessageSeverity.ERROR,
|
||||
'message-severity-alert': ngModel.severity===MessageSeverity.ALERT}">
|
||||
<div class="ui-symbol type-icon message-type"></div>
|
||||
|
@ -1,5 +1,8 @@
|
||||
<div ng-controller="BannerController" ng-show="active.notification"
|
||||
class="l-message-banner s-message-banner" ng-click="maximize(active.notification)">
|
||||
class="l-message-banner s-message-banner" ng-class="{
|
||||
'error': highest.severity===MessageSeverity.ERROR,
|
||||
'alert': highest.severity===MessageSeverity.ALERT }"
|
||||
ng-click="maximize(active.notification)">
|
||||
<span class="banner-elem label">
|
||||
{{active.notification.title}}
|
||||
</span>
|
||||
|
@ -1,8 +1,12 @@
|
||||
<span ng-show="notifications.length > 0" class="status block caution"
|
||||
<span ng-show="notifications.length > 0" class="status block"
|
||||
ng-class="{
|
||||
'error': highest.severity===MessageSeverity.ERROR,
|
||||
'alert': highest.severity===MessageSeverity.ALERT }"
|
||||
ng-controller="NotificationIndicatorController">
|
||||
<span class="ui-symbol status-indicator">!</span>
|
||||
<span class="ui-symbol status-indicator"></span>
|
||||
<span class="label">
|
||||
<a ng-click="showNotificationsList()">{{notifications.length}} Notifications</a>
|
||||
<a ng-click="showNotificationsList()">{{notifications.length}}
|
||||
Notifications {{highest.severity}}</a>
|
||||
</span>
|
||||
<span class="count">{{notifications.length}}</span>
|
||||
</span>
|
@ -28,6 +28,9 @@ define(
|
||||
|
||||
function NotificationIndicatorController($scope, notificationService, dialogService) {
|
||||
$scope.notifications = notificationService.notifications;
|
||||
$scope.highest = notificationService.highest;
|
||||
$scope.MessageSeverity = MessageSeverity;
|
||||
|
||||
$scope.showNotificationsList = function(){
|
||||
|
||||
var model = {
|
||||
|
@ -254,8 +254,8 @@ define(
|
||||
var index = this.notifications.indexOf(notification);
|
||||
if (index >= 0) {
|
||||
this.notifications.splice(index, 1);
|
||||
this.setActiveNotification(this.selectNextNotification());
|
||||
}
|
||||
this.setActiveNotification(this.selectNextNotification());
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -3,6 +3,7 @@
|
||||
<span class="label">
|
||||
<a ng-click="newSuccess()">Success</a> |
|
||||
<a ng-click="newError()">Error</a> |
|
||||
<a ng-click="newAlert()">Alert</a> |
|
||||
<a ng-click="newProgress()">Progress</a>
|
||||
</span>
|
||||
<span class="count">Notifications</span>
|
||||
|
@ -96,6 +96,21 @@ define(
|
||||
actions: getExampleActions()});
|
||||
};
|
||||
|
||||
$scope.newAlert = function(){
|
||||
|
||||
notificationService.notify({
|
||||
title: "Error notification " + messageCounter++ + "!",
|
||||
hint: "An error has occurred",
|
||||
severity: MessageSeverity.ALERT,
|
||||
primaryAction: {
|
||||
label: 'Retry',
|
||||
action: function() {
|
||||
console.log('Retry clicked');
|
||||
}
|
||||
},
|
||||
actions: getExampleActions()});
|
||||
};
|
||||
|
||||
$scope.newProgress = function(){
|
||||
|
||||
var notification = {
|
||||
|
Loading…
x
Reference in New Issue
Block a user