mirror of
https://github.com/nasa/openmct.git
synced 2025-06-17 06:38:17 +00:00
Making changes to implement display queue
This commit is contained in:
@ -1,7 +1,8 @@
|
|||||||
<div ng-controller="MessageController"
|
<div ng-controller="MessageController"
|
||||||
class="l-message"
|
class="l-message"
|
||||||
title="{{MessageSeverity}}"
|
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-error': ngModel.severity===MessageSeverity.ERROR,
|
||||||
'message-severity-alert': ngModel.severity===MessageSeverity.ALERT}">
|
'message-severity-alert': ngModel.severity===MessageSeverity.ALERT}">
|
||||||
<div class="ui-symbol type-icon message-type"></div>
|
<div class="ui-symbol type-icon message-type"></div>
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
<div ng-controller="BannerController" ng-show="active.notification"
|
<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">
|
<span class="banner-elem label">
|
||||||
{{active.notification.title}}
|
{{active.notification.title}}
|
||||||
</span>
|
</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">
|
ng-controller="NotificationIndicatorController">
|
||||||
<span class="ui-symbol status-indicator">!</span>
|
<span class="ui-symbol status-indicator"></span>
|
||||||
<span class="label">
|
<span class="label">
|
||||||
<a ng-click="showNotificationsList()">{{notifications.length}} Notifications</a>
|
<a ng-click="showNotificationsList()">{{notifications.length}}
|
||||||
|
Notifications {{highest.severity}}</a>
|
||||||
</span>
|
</span>
|
||||||
<span class="count">{{notifications.length}}</span>
|
<span class="count">{{notifications.length}}</span>
|
||||||
</span>
|
</span>
|
@ -28,6 +28,9 @@ define(
|
|||||||
|
|
||||||
function NotificationIndicatorController($scope, notificationService, dialogService) {
|
function NotificationIndicatorController($scope, notificationService, dialogService) {
|
||||||
$scope.notifications = notificationService.notifications;
|
$scope.notifications = notificationService.notifications;
|
||||||
|
$scope.highest = notificationService.highest;
|
||||||
|
$scope.MessageSeverity = MessageSeverity;
|
||||||
|
|
||||||
$scope.showNotificationsList = function(){
|
$scope.showNotificationsList = function(){
|
||||||
|
|
||||||
var model = {
|
var model = {
|
||||||
|
@ -254,8 +254,8 @@ define(
|
|||||||
var index = this.notifications.indexOf(notification);
|
var index = this.notifications.indexOf(notification);
|
||||||
if (index >= 0) {
|
if (index >= 0) {
|
||||||
this.notifications.splice(index, 1);
|
this.notifications.splice(index, 1);
|
||||||
this.setActiveNotification(this.selectNextNotification());
|
|
||||||
}
|
}
|
||||||
|
this.setActiveNotification(this.selectNextNotification());
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
<span class="label">
|
<span class="label">
|
||||||
<a ng-click="newSuccess()">Success</a> |
|
<a ng-click="newSuccess()">Success</a> |
|
||||||
<a ng-click="newError()">Error</a> |
|
<a ng-click="newError()">Error</a> |
|
||||||
|
<a ng-click="newAlert()">Alert</a> |
|
||||||
<a ng-click="newProgress()">Progress</a>
|
<a ng-click="newProgress()">Progress</a>
|
||||||
</span>
|
</span>
|
||||||
<span class="count">Notifications</span>
|
<span class="count">Notifications</span>
|
||||||
|
@ -96,6 +96,21 @@ define(
|
|||||||
actions: getExampleActions()});
|
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(){
|
$scope.newProgress = function(){
|
||||||
|
|
||||||
var notification = {
|
var notification = {
|
||||||
|
Reference in New Issue
Block a user