Fix metric drill down not working for metrics with no labels
This commit is contained in:
@@ -182,7 +182,7 @@ export default {
|
||||
* Based on drill down configuration, either changes the linked block on the page
|
||||
* or opens it in a modal wit the filter and dimensions from the chart and the clicked value
|
||||
*/
|
||||
drillDown ({ label: name, filter, moduleID, drillDown }, metricIndex) {
|
||||
drillDown ({ label: name = '', filter, moduleID, drillDown }, metricIndex) {
|
||||
if (!drillDown.enabled) {
|
||||
return
|
||||
}
|
||||
|
||||
@@ -186,6 +186,7 @@
|
||||
:reduce="f => f.name"
|
||||
:calculate-position="calculateDropdownPosition"
|
||||
class="bg-white"
|
||||
@input="onMetricFieldChange"
|
||||
/>
|
||||
</b-form-group>
|
||||
|
||||
@@ -415,11 +416,6 @@ export default {
|
||||
this.edit.dateFormat = this.edit.dateFormat || 'YYYY-MM-DD'
|
||||
}
|
||||
},
|
||||
'edit.metricField': function (mf) {
|
||||
if (mf === 'count') {
|
||||
this.edit.operation = undefined
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
created () {
|
||||
@@ -472,6 +468,14 @@ export default {
|
||||
return operation
|
||||
},
|
||||
|
||||
onMetricFieldChange (field) {
|
||||
if (field === 'count') {
|
||||
this.edit.operation = undefined
|
||||
} else if (!this.edit.operation) {
|
||||
this.edit.operation = this.aggregationOperations[0].operation
|
||||
}
|
||||
},
|
||||
|
||||
setDefaultValues () {
|
||||
this.edit = undefined
|
||||
this.dimensionModifiers = []
|
||||
|
||||
Reference in New Issue
Block a user