mirror of
https://github.com/nasa/openmct.git
synced 2025-06-21 16:49:42 +00:00
New eslint rules auto fix (#3058)
* no-implicit-coercion and no-unneeded-ternary * End every line with a semicolon * Spacing and formatting * Enabled semi-spacing * Applies npm run lint:fix to code after master merge * Fix merge issues * Switched operator-linebreak to 'before' Co-authored-by: Joshi <simplyrender@gmail.com>
This commit is contained in:
@ -60,7 +60,7 @@ export default {
|
||||
value: '---',
|
||||
valueClass: '',
|
||||
currentObjectPath
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
formattedTimestamp() {
|
||||
@ -94,7 +94,7 @@ export default {
|
||||
.metadata
|
||||
.valuesForHints(['range'])[0];
|
||||
|
||||
this.valueKey = this.valueMetadata.key
|
||||
this.valueKey = this.valueMetadata.key;
|
||||
|
||||
this.unsubscribe = this.openmct
|
||||
.telemetry
|
||||
@ -113,7 +113,7 @@ export default {
|
||||
let newTimestamp = this.getParsedTimestamp(datum),
|
||||
limit;
|
||||
|
||||
if(this.shouldUpdate(newTimestamp)) {
|
||||
if (this.shouldUpdate(newTimestamp)) {
|
||||
this.timestamp = newTimestamp;
|
||||
this.value = this.formats[this.valueKey].format(datum);
|
||||
limit = this.limitEvaluator.evaluate(datum, this.valueMetadata);
|
||||
@ -129,8 +129,8 @@ export default {
|
||||
noExistingTimestamp = this.timestamp === undefined,
|
||||
newTimestampIsLatest = newTimestamp > this.timestamp;
|
||||
|
||||
return newTimestampInBounds &&
|
||||
(noExistingTimestamp || newTimestampIsLatest);
|
||||
return newTimestampInBounds
|
||||
&& (noExistingTimestamp || newTimestampIsLatest);
|
||||
},
|
||||
requestHistory() {
|
||||
this.openmct
|
||||
@ -148,7 +148,7 @@ export default {
|
||||
},
|
||||
updateBounds(bounds, isTick) {
|
||||
this.bounds = bounds;
|
||||
if(!isTick) {
|
||||
if (!isTick) {
|
||||
this.resetValues();
|
||||
this.requestHistory();
|
||||
}
|
||||
@ -169,24 +169,25 @@ export default {
|
||||
this.valueClass = '';
|
||||
},
|
||||
getParsedTimestamp(timestamp) {
|
||||
if(this.timeSystemFormat()) {
|
||||
if (this.timeSystemFormat()) {
|
||||
return this.formats[this.timestampKey].parse(timestamp);
|
||||
}
|
||||
},
|
||||
getFormattedTimestamp(timestamp) {
|
||||
if(this.timeSystemFormat()) {
|
||||
if (this.timeSystemFormat()) {
|
||||
return this.formats[this.timestampKey].format(timestamp);
|
||||
}
|
||||
},
|
||||
timeSystemFormat() {
|
||||
if(this.formats[this.timestampKey]) {
|
||||
if (this.formats[this.timestampKey]) {
|
||||
return true;
|
||||
} else {
|
||||
console.warn(`No formatter for ${this.timestampKey} time system for ${this.domainObject.name}.`);
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
|
Reference in New Issue
Block a user