Skip to content

Commit

Permalink
Cast Eng Low and High to numbers in Metric editor and schema builder (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexGodbehere authored Feb 27, 2024
1 parent 41cdbe6 commit de0ca3b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions resources/js/components/Devices/Schemas/SparkplugMetric.vue
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
<template #content>
<Input :showDescription="false" :control="{
name: 'Eng Low',
}" :valid="{}" v-model="localModel.Eng_Low"></Input>
}" :valid="{}" :value="localModel.Eng_Low" @input="(val) => {localModel.Eng_Low = Number(val)}"></Input>
</template>
</Wrapper>
<Wrapper>
Expand All @@ -107,7 +107,7 @@
<template #content>
<Input :showDescription="false" :control="{
name: 'Eng High',
}" :valid="{}" v-model="localModel.Eng_High"></Input>
}" :valid="{}" :value="localModel.Eng_High" @input="(val) => {localModel.Eng_High = Number(val)}"></Input>
</template>
</Wrapper>
<Wrapper>
Expand Down Expand Up @@ -180,7 +180,7 @@ export default {
this.schema = data.data
this.schemaLoading = false
this.localModel = this.selectedMetric.model
this.$emit('loaded');
this.$emit('loaded')
}).catch(error => {
this.posting = false
if (error && error.response && error.response.status === 401) {
Expand Down
4 changes: 2 additions & 2 deletions resources/js/components/SchemaEditor/MetricEditPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
<Input :showDescription="false"
:control="{name: 'Low',}"
:valid="{}"
v-model="localMetric.Eng_Low.default"
:value="localMetric.Eng_Low.default" @input="(val) => {localMetric.Eng_Low.default = Number(val)}"
></Input>
</div>
</template>
Expand All @@ -79,7 +79,7 @@
<Input :showDescription="false"
:control="{name: 'High',}"
:valid="{}"
v-model="localMetric.Eng_High.default"
:value="localMetric.Eng_High.default" @input="(val) => {localMetric.Eng_High.default = Number(val)}"
></Input>
</div>
</template>
Expand Down

0 comments on commit de0ca3b

Please sign in to comment.