Merge branch 'master' of https://github.com/nasa/openmct into topic-conditionals

This commit is contained in:
Joshi 2020-03-26 13:22:59 -07:00
commit 91e1a144ed
4 changed files with 25 additions and 5 deletions

View File

@ -81,7 +81,7 @@ define([
function TelemetryMetadataManager(metadata) {
this.metadata = metadata;
this.valueMetadatas = this.metadata.values.map(applyReasonableDefaults);
this.valueMetadatas = this.metadata.values ? this.metadata.values.map(applyReasonableDefaults) : [];
}
/**

View File

@ -81,6 +81,24 @@ define([
return printj.sprintf(formatString, baseFormat.call(this, value));
};
}
if (valueMetadata.format === 'string') {
this.formatter.parse = function (value) {
if (value === undefined) {
return '';
}
if (typeof value === 'string') {
return value;
} else {
return value.toString();
}
};
this.formatter.format = function (value) {
return value;
};
this.formatter.validate = function (value) {
return typeof value === 'string';
};
}
}
TelemetryValueFormatter.prototype.parse = function (datum) {

View File

@ -377,8 +377,10 @@ define([
* @public
*/
updateFiltersAndRefresh: function (updatedFilters) {
if (this.filters && !_.isEqual(this.filters, updatedFilters)) {
this.filters = updatedFilters;
let deepCopiedFilters = JSON.parse(JSON.stringify(updatedFilters));
if (this.filters && !_.isEqual(this.filters, deepCopiedFilters)) {
this.filters = deepCopiedFilters;
this.reset();
if (this.unsubscribe) {
this.unsubscribe();
@ -386,7 +388,7 @@ define([
}
this.fetch();
} else {
this.filters = updatedFilters;
this.filters = deepCopiedFilters;
}
}
});

View File

@ -181,7 +181,7 @@ define([
}
refreshData(bounds, isTick) {
if (!isTick) {
if (!isTick && this.outstandingRequests === 0) {
this.filteredRows.clear();
this.boundedRows.clear();
this.boundedRows.sortByTimeSystem(this.openmct.time.timeSystem());