chore: add prettier (2/3): apply formatting, re-enable lint ci step (#6682)
* style: apply prettier formatting * fix: re-enable lint ci check
This commit is contained in:
@@ -21,109 +21,102 @@
|
||||
-->
|
||||
|
||||
<template>
|
||||
<div
|
||||
v-if="isShowDetails"
|
||||
class="c-inspector__properties c-inspect-properties"
|
||||
>
|
||||
<div v-if="isShowDetails" class="c-inspector__properties c-inspect-properties">
|
||||
<div class="c-inspect-properties__header">Fault Details</div>
|
||||
<ul
|
||||
class="c-inspect-properties__section"
|
||||
>
|
||||
<DetailText :detail="sourceDetails" />
|
||||
<DetailText :detail="occuredDetails" />
|
||||
<DetailText :detail="criticalityDetails" />
|
||||
<DetailText :detail="descriptionDetails" />
|
||||
<ul class="c-inspect-properties__section">
|
||||
<DetailText :detail="sourceDetails" />
|
||||
<DetailText :detail="occuredDetails" />
|
||||
<DetailText :detail="criticalityDetails" />
|
||||
<DetailText :detail="descriptionDetails" />
|
||||
</ul>
|
||||
|
||||
<div class="c-inspect-properties__header">Telemetry</div>
|
||||
<ul
|
||||
class="c-inspect-properties__section"
|
||||
>
|
||||
<DetailText :detail="systemDetails" />
|
||||
<DetailText :detail="tripValueDetails" />
|
||||
<DetailText :detail="currentValueDetails" />
|
||||
<ul class="c-inspect-properties__section">
|
||||
<DetailText :detail="systemDetails" />
|
||||
<DetailText :detail="tripValueDetails" />
|
||||
<DetailText :detail="currentValueDetails" />
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import DetailText from '../inspectorViews/properties/DetailText.vue';
|
||||
|
||||
export default {
|
||||
name: 'FaultManagementInspector',
|
||||
components: {
|
||||
DetailText
|
||||
name: 'FaultManagementInspector',
|
||||
components: {
|
||||
DetailText
|
||||
},
|
||||
inject: ['openmct'],
|
||||
data() {
|
||||
return {
|
||||
isShowDetails: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
criticalityDetails() {
|
||||
return {
|
||||
name: 'Criticality',
|
||||
value: this.selectedFault?.severity
|
||||
};
|
||||
},
|
||||
inject: ['openmct'],
|
||||
data() {
|
||||
return {
|
||||
isShowDetails: false
|
||||
};
|
||||
currentValueDetails() {
|
||||
return {
|
||||
name: 'Live value',
|
||||
value: this.selectedFault?.currentValueInfo?.value
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
criticalityDetails() {
|
||||
return {
|
||||
name: 'Criticality',
|
||||
value: this.selectedFault?.severity
|
||||
};
|
||||
},
|
||||
currentValueDetails() {
|
||||
return {
|
||||
name: 'Live value',
|
||||
value: this.selectedFault?.currentValueInfo?.value
|
||||
};
|
||||
},
|
||||
descriptionDetails() {
|
||||
return {
|
||||
name: 'Description',
|
||||
value: this.selectedFault?.shortDescription
|
||||
};
|
||||
},
|
||||
occuredDetails() {
|
||||
return {
|
||||
name: 'Occured',
|
||||
value: this.selectedFault?.triggerTime
|
||||
};
|
||||
},
|
||||
sourceDetails() {
|
||||
return {
|
||||
name: 'Source',
|
||||
value: this.selectedFault?.name
|
||||
};
|
||||
},
|
||||
systemDetails() {
|
||||
return {
|
||||
name: 'System',
|
||||
value: this.selectedFault?.namespace
|
||||
};
|
||||
},
|
||||
tripValueDetails() {
|
||||
return {
|
||||
name: 'Trip Value',
|
||||
value: this.selectedFault?.triggerValueInfo?.value
|
||||
};
|
||||
}
|
||||
descriptionDetails() {
|
||||
return {
|
||||
name: 'Description',
|
||||
value: this.selectedFault?.shortDescription
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.updateSelectedFaults();
|
||||
occuredDetails() {
|
||||
return {
|
||||
name: 'Occured',
|
||||
value: this.selectedFault?.triggerTime
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
updateSelectedFaults() {
|
||||
const selection = this.openmct.selection.get();
|
||||
this.isShowDetails = false;
|
||||
|
||||
if (selection.length === 0 || selection[0].length < 2) {
|
||||
return;
|
||||
}
|
||||
|
||||
const selectedFaults = selection[0][1].context.selectedFaults;
|
||||
if (selectedFaults.length !== 1) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.isShowDetails = true;
|
||||
this.selectedFault = selectedFaults[0];
|
||||
}
|
||||
sourceDetails() {
|
||||
return {
|
||||
name: 'Source',
|
||||
value: this.selectedFault?.name
|
||||
};
|
||||
},
|
||||
systemDetails() {
|
||||
return {
|
||||
name: 'System',
|
||||
value: this.selectedFault?.namespace
|
||||
};
|
||||
},
|
||||
tripValueDetails() {
|
||||
return {
|
||||
name: 'Trip Value',
|
||||
value: this.selectedFault?.triggerValueInfo?.value
|
||||
};
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.updateSelectedFaults();
|
||||
},
|
||||
methods: {
|
||||
updateSelectedFaults() {
|
||||
const selection = this.openmct.selection.get();
|
||||
this.isShowDetails = false;
|
||||
|
||||
if (selection.length === 0 || selection[0].length < 2) {
|
||||
return;
|
||||
}
|
||||
|
||||
const selectedFaults = selection[0][1].context.selectedFaults;
|
||||
if (selectedFaults.length !== 1) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.isShowDetails = true;
|
||||
this.selectedFault = selectedFaults[0];
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user