mirror of
https://github.com/nasa/openmct.git
synced 2025-06-01 07:00:49 +00:00
Addressed issues from code review
This commit is contained in:
parent
5292b27e7d
commit
747a98d130
@ -67,7 +67,7 @@ define(
|
|||||||
* be automatically minimized or dismissed (depending on severity).
|
* be automatically minimized or dismissed (depending on severity).
|
||||||
* Additionally, if the provided value is a number, it will be used
|
* Additionally, if the provided value is a number, it will be used
|
||||||
* as the delay period before being dismissed.
|
* as the delay period before being dismissed.
|
||||||
* @property {boolean} [dismissable=true] If truthy, notification will
|
* @property {boolean} [dismissable=true] If true, notification will
|
||||||
* include an option to dismiss it completely.
|
* include an option to dismiss it completely.
|
||||||
* @property {NotificationOption} [primaryOption] the default user
|
* @property {NotificationOption} [primaryOption] the default user
|
||||||
* response to
|
* response to
|
||||||
|
@ -104,15 +104,14 @@ define(
|
|||||||
* persistence.
|
* persistence.
|
||||||
*/
|
*/
|
||||||
function notifyOnError(error, domainObject, notificationService, $q){
|
function notifyOnError(error, domainObject, notificationService, $q){
|
||||||
var errorMessage = "Unable to persist " + domainObject.getModel().name,
|
var errorMessage = "Unable to persist " + domainObject.getModel().name;
|
||||||
notification;
|
|
||||||
if (error) {
|
if (error) {
|
||||||
errorMessage += ": " + formatError(error);
|
errorMessage += ": " + formatError(error);
|
||||||
}
|
}
|
||||||
|
|
||||||
notification = notificationService.error({
|
notificationService.error({
|
||||||
title: "Error persisting " + domainObject.getModel().name,
|
title: "Error persisting " + domainObject.getModel().name,
|
||||||
hint: errorMessage || "Unknown error",
|
hint: errorMessage,
|
||||||
dismissable: true
|
dismissable: true
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user