Skip to content

Commit

Permalink
convert back and forth between Mhz
Browse files Browse the repository at this point in the history
  • Loading branch information
dernasherbrezon committed Feb 28, 2024
1 parent 02d3e6f commit cf0f6c6
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/components/pages/device/config.vue
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,8 @@
</template>

<script>
import Vue from 'vue'
export default {
name: 'general',
data() {
Expand All @@ -459,6 +461,11 @@ export default {
if( !response.data.rotator ) {
response.data.rotator = {}
}
if( response.data ) {
response.data.minimumFrequency = response.data.minimumFrequency / 1000000
response.data.maximumFrequency = response.data.maximumFrequency / 1000000
response.data.bandwidth = response.data.bandwidth / 1000000
}
vm.entity = response.data
})
},
Expand All @@ -478,7 +485,11 @@ export default {
this.success = false
this.submitting = true
const vm = this
vm.$http.post('/admin/device/config/save', vm.entity).then(function (response) {
var toSubmit = Vue.util.extend({}, vm.entity)
toSubmit.minimumFrequency *= 1000000
toSubmit.maximumFrequency *= 1000000
toSubmit.bandwidth *= 1000000
vm.$http.post('/admin/device/config/save', toSubmit).then(function (response) {
vm.submitting = false
vm.$router.push('/admin/restart')
}).catch(function (error) {
Expand Down

0 comments on commit cf0f6c6

Please sign in to comment.