UX: Hide 'other' and 'crawler' site traffic on report page (#28817)

Followup 14b436923c

On the standalone Site Traffic report page, we also need
to hide the 'other' and 'crawler' pageviews by default
like we do on the admin dashboard.
This commit is contained in:
Martin Brennan 2024-09-10 14:31:51 +10:00 committed by GitHub
parent 428fb793b7
commit 56877e9acf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 1 deletions

View File

@ -391,7 +391,7 @@ export default class AdminReport extends Component {
Report.groupingForDatapoints(report.chartData.length),
})
);
} else if (mode === "stacked-chart") {
} else if (mode === "stacked-chart" || mode === "stacked_chart") {
return this.get("reportOptions.stackedChart") || {};
}
}

View File

@ -16,6 +16,12 @@ export default class AdminReportsShowController extends Controller {
options.table.limit = 10;
}
if (type === "site_traffic") {
options.stackedChart = {
hiddenLabels: ["page_view_other", "page_view_crawler"],
};
}
options.chartGrouping = this.chart_grouping;
return options;