mirror of
https://github.com/nasa/openmct.git
synced 2025-06-14 13:18:15 +00:00
[Persistence] Show user, modification time
Show user name and modification time in dialog when revision-checking detects modifications. WTD-1033.
This commit is contained in:
@ -0,0 +1,32 @@
|
||||
/*global define*/
|
||||
|
||||
define(
|
||||
['moment', './PersistenceFailureConstants'],
|
||||
function (moment, Constants) {
|
||||
"use strict";
|
||||
|
||||
/**
|
||||
* Controller to support the template to be shown in the
|
||||
* dialog shown for persistence failures.
|
||||
*/
|
||||
function PersistenceFailureController() {
|
||||
return {
|
||||
/**
|
||||
* Format a timestamp for display in the dialog.
|
||||
*/
|
||||
formatTimestamp: function (timestamp) {
|
||||
return moment.utc(timestamp)
|
||||
.format(Constants.TIMESTAMP_FORMAT);
|
||||
},
|
||||
/**
|
||||
* Format a user name for display in the dialog.
|
||||
*/
|
||||
formatUsername: function (username) {
|
||||
return username || Constants.UNKNOWN_USER;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
return PersistenceFailureController;
|
||||
}
|
||||
);
|
Reference in New Issue
Block a user