mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-12-04 12:24:09 +01:00
Updated frontend dependencies.
Also fixed errors with mutated props.
This commit is contained in:
@@ -151,7 +151,6 @@ export default {
|
||||
},
|
||||
watch: {
|
||||
value (newValue) {
|
||||
console.log(newValue)
|
||||
this.input = newValue
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
outlined
|
||||
dense
|
||||
:error-messages="errors"
|
||||
@input="$emit('input', resources)"
|
||||
/>
|
||||
</validation-provider>
|
||||
</validation-observer>
|
||||
@@ -21,7 +22,12 @@
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
resources: Array
|
||||
value: Array
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
resources: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async validateForm () {
|
||||
@@ -32,6 +38,14 @@ export default {
|
||||
return { name: r.name, max_value: r.max_value }
|
||||
})
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
value: {
|
||||
handler: function (newValue) {
|
||||
this.resources = [...newValue]
|
||||
},
|
||||
immediate: true
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -72,12 +72,6 @@ export default {
|
||||
return this.statistics.title
|
||||
}
|
||||
return ''
|
||||
},
|
||||
colors () {
|
||||
if (this.graphicName === 'averagetraffic') {
|
||||
return ['#ff6347', '#ffff00', '#4682B4', '#7cfc00', '#ffa500', '#d3d3d3']
|
||||
}
|
||||
return ['#ffa500', '#41d1cc']
|
||||
}
|
||||
},
|
||||
data () {
|
||||
@@ -85,7 +79,7 @@ export default {
|
||||
dateMenu: false,
|
||||
menu: false,
|
||||
options: {
|
||||
colors: this.colors,
|
||||
colors: [],
|
||||
chart: {
|
||||
type: 'area',
|
||||
stacked: false,
|
||||
@@ -120,6 +114,12 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getColors () {
|
||||
if (this.graphicName === 'averagetraffic') {
|
||||
return ['#ff6347', '#ffff00', '#4682B4', '#7cfc00', '#ffa500', '#d3d3d3']
|
||||
}
|
||||
return ['#ffa500', '#41d1cc']
|
||||
},
|
||||
setCustomPeriod () {
|
||||
this.period = 'custom'
|
||||
this.fetchStatistics()
|
||||
@@ -148,6 +148,11 @@ export default {
|
||||
},
|
||||
mounted () {
|
||||
this.fetchStatistics()
|
||||
},
|
||||
watch: {
|
||||
graphicName (newValue) {
|
||||
this.$set(this.options, 'colors', this.getColors())
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user