[Timer] Re-implement Timer object in Vue.js (#4311)

* Re-implemented timer and clock and installed as a plugin
* Clock indicator is installed as configuration to clock plugin
* Uses moment

Co-authored-by: Andrew Henry <akhenry@gmail.com>
Co-authored-by: Nikhil <nikhil.k.mandlik@nasa.gov>
This commit is contained in:
Khalid Adil
2021-11-09 16:41:42 -06:00
committed by GitHub
parent b8fabb7e73
commit 6d4a324fca
35 changed files with 1123 additions and 2106 deletions

View File

@ -473,6 +473,23 @@ ObjectAPI.prototype.mutate = function (domainObject, path, value) {
}
};
/**
* Updates a domain object based on its latest persisted state. Note that this will mutate the provided object.
* @param {module:openmct.DomainObject} domainObject an object to refresh from its persistence store
* @returns {Promise} the provided object, updated to reflect the latest persisted state of the object.
*/
ObjectAPI.prototype.refresh = async function (domainObject) {
const refreshedObject = await this.get(domainObject.identifier);
if (domainObject.isMutable) {
domainObject.$refresh(refreshedObject);
} else {
utils.refresh(domainObject, refreshedObject);
}
return domainObject;
};
/**
* @private
*/