in src/main/resources/static/coverage.js [476:494]
async showPercentageColumns() {
// This method is expected to be called when percentage columns are
// attached, which means that the current page is at change view and that
// the current project can be parsed from the current URL.
const project = this.parseProjectFromPathName(window.location.pathname);
if (project !== this.coverageConfig.project) {
this.coverageConfig.project = project;
this.coverageConfig.configPromise = this.plugin.restApi().get(
`/projects/${encodeURIComponent(project)}/` +
`${encodeURIComponent(this.plugin.getPluginName())}~config`);
}
try {
const config = await this.coverageConfig.configPromise;
return config && config.enabled;
} catch(error) {
console.log(error);
return false;
}
}