diff --git a/ui/app/components/clients/history.js b/ui/app/components/clients/history.js index 94c6761ad..0d543913b 100644 --- a/ui/app/components/clients/history.js +++ b/ui/app/components/clients/history.js @@ -8,6 +8,8 @@ export default class HistoryComponent extends Component { @tracked selectedNamespace = null; + @tracked barChartSelection = false; + // Determine if we have client count data based on the current tab, // since model is slightly different for current month vs history api get hasClientData() { @@ -106,11 +108,17 @@ export default class HistoryComponent extends Component { // In case of search select component, value returned is an array if (Array.isArray(value)) { this.selectedNamespace = this.getNamespace(value[0]); + this.barChartSelection = false; } else if (typeof value === 'object') { // While D3 bar selection returns an object this.selectedNamespace = this.getNamespace(value.label); - } else { - this.selectedNamespace = null; + this.barChartSelection = true; } } + + @action + resetData() { + this.barChartSelection = false; + this.selectedNamespace = null; + } } diff --git a/ui/app/templates/components/clients/history.hbs b/ui/app/templates/components/clients/history.hbs index 0199ed7f4..dfbfda7d4 100644 --- a/ui/app/templates/components/clients/history.hbs +++ b/ui/app/templates/components/clients/history.hbs @@ -132,7 +132,7 @@ {{#if this.showGraphs}} -