${this.renderButtonViews()}
"
",
+ // formatLoadingMessage: () => "
",
+ loadingTemplate: () => this.gridCommons.loadingFormatter(),
onClickRow: (row, selectedElement) => this.gridCommons.onClickRow(row.id, row, selectedElement),
// onPageChange: (page, size) => {
// const result = this.gridCommons.onPageChange(page, size);
diff --git a/src/webcomponents/disease-panel/disease-panel-grid.js b/src/webcomponents/disease-panel/disease-panel-grid.js
index e307e9b571..810f74d2a9 100644
--- a/src/webcomponents/disease-panel/disease-panel-grid.js
+++ b/src/webcomponents/disease-panel/disease-panel-grid.js
@@ -177,7 +177,8 @@ export default class DiseasePanelGrid extends LitElement {
detailView: this._config.detailView,
detailFormatter: this._config.detailFormatter,
gridContext: this,
- formatLoadingMessage: () => String.raw`
`,
+ // formatLoadingMessage: () => String.raw`
`,
+ loadingTemplate: () => this.gridCommons.loadingFormatter(),
ajax: async params => {
this.filters = {
study: this.opencgaSession.study.fqn,
@@ -263,7 +264,8 @@ export default class DiseasePanelGrid extends LitElement {
detailView: this._config.detailView,
detailFormatter: this.detailFormatter,
gridContext: this,
- formatLoadingMessage: () => "
",
+ // formatLoadingMessage: () => "
",
+ loadingTemplate: () => this.gridCommons.loadingFormatter(),
onClickRow: (row, selectedElement) => this.gridCommons.onClickRow(row.id, row, selectedElement),
// onPageChange: (page, size) => {
// const result = this.gridCommons.onPageChange(page, size);
diff --git a/src/webcomponents/disease-panel/disease-panel-region-view.js b/src/webcomponents/disease-panel/disease-panel-region-view.js
index 2a86fe08b3..dce753eb71 100644
--- a/src/webcomponents/disease-panel/disease-panel-region-view.js
+++ b/src/webcomponents/disease-panel/disease-panel-region-view.js
@@ -98,7 +98,8 @@ export default class DiseasePanelRegionView extends LitElement {
showExport: this._config.showExport,
detailView: this._config.detailView,
detailFormatter: this.detailFormatter,
- formatLoadingMessage: () => "
",
+ // formatLoadingMessage: () => "
",
+ loadingTemplate: () => this.gridCommons.loadingFormatter(),
onClickRow: (row, selectedElement) => this.gridCommons.onClickRow(row.id, row, selectedElement),
// onPageChange: (page, size) => {
// const result = this.gridCommons.onPageChange(page, size);
diff --git a/src/webcomponents/family/family-grid.js b/src/webcomponents/family/family-grid.js
index 817ab67514..e07421b2ba 100644
--- a/src/webcomponents/family/family-grid.js
+++ b/src/webcomponents/family/family-grid.js
@@ -176,7 +176,8 @@ export default class FamilyGrid extends LitElement {
detailView: this._config.detailView,
detailFormatter: this._config.detailFormatter,
gridContext: this,
- formatLoadingMessage: () => "
",
+ // formatLoadingMessage: () => "
",
+ loadingTemplate: () => this.gridCommons.loadingFormatter(),
ajax: params => {
const sort = this.table.bootstrapTable("getOptions").sortName ? {
sort: this.table.bootstrapTable("getOptions").sortName,
@@ -292,7 +293,8 @@ export default class FamilyGrid extends LitElement {
detailView: this._config.detailView,
detailFormatter: this.detailFormatter,
gridContext: this,
- formatLoadingMessage: () => "
",
+ // formatLoadingMessage: () => "
",
+ loadingTemplate: () => this.gridCommons.loadingFormatter(),
onClickRow: (row, selectedElement, field) => this.gridCommons.onClickRow(row.id, row, selectedElement),
onPostBody: data => {
// We call onLoadSuccess to select first row
diff --git a/src/webcomponents/file/file-grid.js b/src/webcomponents/file/file-grid.js
index 42b1c420de..3477e0c429 100644
--- a/src/webcomponents/file/file-grid.js
+++ b/src/webcomponents/file/file-grid.js
@@ -151,7 +151,8 @@ export default class OpencgaFileGrid extends LitElement {
detailView: this._config.detailView,
detailFormatter: this._config.detailFormatter,
gridContext: this,
- formatLoadingMessage: () => "
",
+ // formatLoadingMessage: () => "
",
+ loadingTemplate: () => this.gridCommons.loadingFormatter(),
ajax: params => {
this.filters = {
study: this.opencgaSession.study.fqn,
@@ -241,7 +242,8 @@ export default class OpencgaFileGrid extends LitElement {
detailView: this._config.detailView,
detailFormatter: this.detailFormatter,
gridContext: this,
- formatLoadingMessage: () => "
",
+ // formatLoadingMessage: () => "
",
+ loadingTemplate: () => this.gridCommons.loadingFormatter(),
onClickRow: (row, selectedElement) => this.gridCommons.onClickRow(row.id, row, selectedElement),
onPageChange: (page, size) => {
const result = this.gridCommons.onPageChange(page, size);
diff --git a/src/webcomponents/individual/individual-grid.js b/src/webcomponents/individual/individual-grid.js
index c65d5662e6..8b3cb7ba59 100644
--- a/src/webcomponents/individual/individual-grid.js
+++ b/src/webcomponents/individual/individual-grid.js
@@ -176,7 +176,8 @@ export default class IndividualGrid extends LitElement {
detailView: this._config.detailView,
detailFormatter: this._config.detailFormatter,
gridContext: this,
- formatLoadingMessage: () => "
",
+ // formatLoadingMessage: () => "
",
+ loadingTemplate: () => this.gridCommons.loadingFormatter(),
ajax: params => {
const sort = this.table.bootstrapTable("getOptions").sortName ? {
sort: this.table.bootstrapTable("getOptions").sortName,
@@ -291,7 +292,8 @@ export default class IndividualGrid extends LitElement {
detailView: this._config.detailView,
detailFormatter: this.detailFormatter,
gridContext: this,
- formatLoadingMessage: () => "
",
+ // formatLoadingMessage: () => "
",
+ loadingTemplate: () => this.gridCommons.loadingFormatter(),
onClickRow: (row, selectedElement) => this.gridCommons.onClickRow(row.id, row, selectedElement),
onPostBody: data => {
// We call onLoadSuccess to select first row
diff --git a/src/webcomponents/job/job-grid.js b/src/webcomponents/job/job-grid.js
index 15776aefcc..893179b145 100644
--- a/src/webcomponents/job/job-grid.js
+++ b/src/webcomponents/job/job-grid.js
@@ -172,7 +172,8 @@ export default class JobGrid extends LitElement {
detailView: this._config.detailView,
detailFormatter: this.detailFormatter,
gridContext: this,
- formatLoadingMessage: () => "
",
+ // formatLoadingMessage: () => "
",
+ loadingTemplate: () => this.gridCommons.loadingFormatter(),
onClickRow: (row, selectedElement) => this.gridCommons.onClickRow(row.id, row, selectedElement),
onPostBody: data => {
// We call onLoadSuccess to select first row
@@ -231,7 +232,8 @@ export default class JobGrid extends LitElement {
sortName: "Creation",
sortOrder: "asc",
gridContext: this,
- formatLoadingMessage: () => "
",
+ // formatLoadingMessage: () => "
",
+ loadingTemplate: () => this.gridCommons.loadingFormatter(),
ajax: params => {
document.getElementById(this._prefix + "refreshIcon").style.visibility = "visible";
this.filters = {
diff --git a/src/webcomponents/sample/sample-grid.js b/src/webcomponents/sample/sample-grid.js
index 7ef27793bd..f62794934b 100644
--- a/src/webcomponents/sample/sample-grid.js
+++ b/src/webcomponents/sample/sample-grid.js
@@ -175,7 +175,8 @@ export default class SampleGrid extends LitElement {
detailView: this._config.detailView,
detailFormatter: this._config.detailFormatter,
gridContext: this,
- formatLoadingMessage: () => "
",
+ // formatLoadingMessage: () => "
",
+ loadingTemplate: () => this.gridCommons.loadingFormatter(),
ajax: params => {
this.filters = {
study: this.opencgaSession.study.fqn,
@@ -288,7 +289,8 @@ export default class SampleGrid extends LitElement {
detailView: this._config.detailView,
detailFormatter: this.detailFormatter,
gridContext: this,
- formatLoadingMessage: () => "
",
+ // formatLoadingMessage: () => "
",
+ loadingTemplate: () => this.gridCommons.loadingFormatter(),
onClickRow: (row, selectedElement) => this.gridCommons.onClickRow(row.id, row, selectedElement),
onPostBody: data => {
// We call onLoadSuccess to select first row
diff --git a/src/webcomponents/study/admin/study-admin-audit.js b/src/webcomponents/study/admin/study-admin-audit.js
index fd1d6010ee..99ec0e2c49 100644
--- a/src/webcomponents/study/admin/study-admin-audit.js
+++ b/src/webcomponents/study/admin/study-admin-audit.js
@@ -146,7 +146,8 @@ export default class StudyAdminAudit extends LitElement {
detailView: this._config.detailView,
detailFormatter: this._config.detailFormatter,
gridContext: this,
- formatLoadingMessage: () => "
",
+ // formatLoadingMessage: () => "
",
+ loadingTemplate: () => this.gridCommons.loadingFormatter(),
ajax: params => {
const query = {
study: this.study.fqn,
diff --git a/src/webcomponents/study/admin/study-admin-users.js b/src/webcomponents/study/admin/study-admin-users.js
index 1c3a831799..ef0ea3d34c 100644
--- a/src/webcomponents/study/admin/study-admin-users.js
+++ b/src/webcomponents/study/admin/study-admin-users.js
@@ -147,8 +147,8 @@ export default class StudyAdminUsers extends LitElement {
showExport: this._config.showExport,
detailView: this._config.detailView,
// detailFormatter: this.detailFormatter,
- formatLoadingMessage: () => "
",
-
+ // formatLoadingMessage: () => "
",
+ loadingTemplate: () => this.gridCommons.loadingFormatter(),
onClickRow: (row, selectedElement, field) => this.gridCommons.onClickRow(row.id, row, selectedElement),
onPostBody: data => {
// We call onLoadSuccess to select first row
diff --git a/src/webcomponents/study/permission/permission-browser-grid.js b/src/webcomponents/study/permission/permission-browser-grid.js
index 86e2aadf31..d0bf0f22c8 100644
--- a/src/webcomponents/study/permission/permission-browser-grid.js
+++ b/src/webcomponents/study/permission/permission-browser-grid.js
@@ -138,8 +138,8 @@ export default class PermissionBrowserGrid extends LitElement {
showExport: this._config.showExport,
detailView: this._config.detailView,
// detailFormatter: this.detailFormatter,
- formatLoadingMessage: () => "
",
-
+ // formatLoadingMessage: () => "
",
+ loadingTemplate: () => this.gridCommons.loadingFormatter(),
onClickRow: (row, selectedElement, field) => this.gridCommons.onClickRow(row.id, row, selectedElement),
onPostBody: data => {
// We call onLoadSuccess to select first row
diff --git a/src/webcomponents/variant/analysis/deprecated/opencga-knockout-analysis/knockout-gene-grid.js b/src/webcomponents/variant/analysis/deprecated/opencga-knockout-analysis/knockout-gene-grid.js
index 8040200e91..3daae82ee6 100644
--- a/src/webcomponents/variant/analysis/deprecated/opencga-knockout-analysis/knockout-gene-grid.js
+++ b/src/webcomponents/variant/analysis/deprecated/opencga-knockout-analysis/knockout-gene-grid.js
@@ -124,7 +124,8 @@ export default class KnockoutGeneGrid extends LitElement {
params.error(e);
});
},
- formatLoadingMessage: () => "
",
+ // formatLoadingMessage: () => "
",
+ loadingTemplate: () => this.gridCommons.loadingFormatter(),
onClickRow: (row, selectedElement, field) => this.gridCommons.onClickRow(row.id, row, selectedElement)
});
}
diff --git a/src/webcomponents/variant/analysis/deprecated/opencga-knockout-analysis/knockout-individual-variants.js b/src/webcomponents/variant/analysis/deprecated/opencga-knockout-analysis/knockout-individual-variants.js
index 095bae9f09..a18abb4426 100644
--- a/src/webcomponents/variant/analysis/deprecated/opencga-knockout-analysis/knockout-individual-variants.js
+++ b/src/webcomponents/variant/analysis/deprecated/opencga-knockout-analysis/knockout-individual-variants.js
@@ -20,7 +20,6 @@ import GridCommons from "../../../../commons/grid-commons.js";
import "../../../../commons/view/detail-tabs.js";
import knockoutDataIndividuals from "../test/knockout.20201103172343.kFIvpr.individuals.js";
-
export default class KnockoutIndividualVariants extends LitElement {
constructor() {
@@ -91,7 +90,8 @@ export default class KnockoutIndividualVariants extends LitElement {
paginationVAlign: "both",
// formatShowingRows: this.gridCommons.formatShowingRows,
gridContext: this,
- formatLoadingMessage: () => "
",
+ // formatLoadingMessage: () => "
",
+ loadingTemplate: () => this.gridCommons.loadingFormatter(),
onClickRow: (row, selectedElement, field) => {
},
onLoadSuccess: data => {
diff --git a/src/webcomponents/variant/analysis/deprecated/opencga-knockout-analysis/knockout-individual-view.js b/src/webcomponents/variant/analysis/deprecated/opencga-knockout-analysis/knockout-individual-view.js
index 23ff9c3ecb..7bfb94d9fe 100644
--- a/src/webcomponents/variant/analysis/deprecated/opencga-knockout-analysis/knockout-individual-view.js
+++ b/src/webcomponents/variant/analysis/deprecated/opencga-knockout-analysis/knockout-individual-view.js
@@ -124,7 +124,8 @@ export default class KnockoutIndividualView extends LitElement {
params.error(e);
});
},
- formatLoadingMessage: () => "
",
+ // formatLoadingMessage: () => "
",
+ loadingTemplate: () => this.gridCommons.loadingFormatter(),
onClickRow: (row, selectedElement, field) => {
this.individual = {id: row.sampleId, ...row}; // TODO temp fix for missing id;
this.gridCommons.onClickRow(row.id, row, selectedElement);
diff --git a/src/webcomponents/variant/analysis/deprecated/opencga-knockout-analysis/knockout-variant-allele-pairs.js b/src/webcomponents/variant/analysis/deprecated/opencga-knockout-analysis/knockout-variant-allele-pairs.js
index 2a1ca659f6..84c3baca5c 100644
--- a/src/webcomponents/variant/analysis/deprecated/opencga-knockout-analysis/knockout-variant-allele-pairs.js
+++ b/src/webcomponents/variant/analysis/deprecated/opencga-knockout-analysis/knockout-variant-allele-pairs.js
@@ -20,7 +20,6 @@ import GridCommons from "../../../../commons/grid-commons.js";
import "../../../../commons/view/detail-tabs.js";
import knockoutDataIndividuals from "../test/knockout.20201103172343.kFIvpr.individuals.js";
-
export default class KnockoutVariantAllelePairs extends LitElement {
constructor() {
@@ -85,7 +84,8 @@ export default class KnockoutVariantAllelePairs extends LitElement {
paginationVAlign: "both",
// formatShowingRows: this.gridCommons.formatShowingRows,
gridContext: this,
- formatLoadingMessage: () => "
",
+ // formatLoadingMessage: () => "
",
+ loadingTemplate: () => this.gridCommons.loadingFormatter(),
onClickRow: (row, selectedElement, field) => {
},
onLoadSuccess: data => {
diff --git a/src/webcomponents/variant/analysis/deprecated/opencga-knockout-analysis/knockout-variant-individual.js b/src/webcomponents/variant/analysis/deprecated/opencga-knockout-analysis/knockout-variant-individual.js
index dbd601d713..53d3365f73 100644
--- a/src/webcomponents/variant/analysis/deprecated/opencga-knockout-analysis/knockout-variant-individual.js
+++ b/src/webcomponents/variant/analysis/deprecated/opencga-knockout-analysis/knockout-variant-individual.js
@@ -20,7 +20,6 @@ import GridCommons from "../../../../commons/grid-commons.js";
import "../../../../commons/view/detail-tabs.js";
import knockoutDataIndividuals from "../test/knockout.20201103172343.kFIvpr.individuals.js";
-
export default class KnockoutVariantIndividual extends LitElement {
constructor() {
@@ -88,7 +87,8 @@ export default class KnockoutVariantIndividual extends LitElement {
paginationVAlign: "both",
// formatShowingRows: this.gridCommons.formatShowingRows,
gridContext: this,
- formatLoadingMessage: () => "
",
+ // formatLoadingMessage: () => "
",
+ loadingTemplate: () => this.gridCommons.loadingFormatter(),
onClickRow: (row, selectedElement, field) => {
},
onLoadSuccess: data => {
diff --git a/src/webcomponents/variant/analysis/deprecated/opencga-knockout-analysis/knockout-variant-view.js b/src/webcomponents/variant/analysis/deprecated/opencga-knockout-analysis/knockout-variant-view.js
index 5742c9e385..12983d0e65 100644
--- a/src/webcomponents/variant/analysis/deprecated/opencga-knockout-analysis/knockout-variant-view.js
+++ b/src/webcomponents/variant/analysis/deprecated/opencga-knockout-analysis/knockout-variant-view.js
@@ -227,7 +227,8 @@ export default class KnockoutVariantView extends LitElement {
params.error(e);
});
},
- formatLoadingMessage: () => "
",
+ // formatLoadingMessage: () => "
",
+ loadingTemplate: () => this.gridCommons.loadingFormatter(),
onClickRow: (row, selectedElement, field) => {
console.log(row);
this.variant = row;
diff --git a/src/webcomponents/variant/deprecated/interpretation-history.js b/src/webcomponents/variant/deprecated/interpretation-history.js
index 9c2de9ce1e..d6a1b53c24 100644
--- a/src/webcomponents/variant/deprecated/interpretation-history.js
+++ b/src/webcomponents/variant/deprecated/interpretation-history.js
@@ -132,7 +132,8 @@ class InterpretationHistory extends LitElement {
detailView: this._config.detailView,
detailFormatter: this.detailFormatter,
gridContext: this,
- formatLoadingMessage: () =>"
",
+ // formatLoadingMessage: () =>"
",
+ loadingTemplate: () => this.gridCommons.loadingFormatter(),
onClickRow: (row, selectedElement, field) => this.gridCommons.onClickRow(row.id, row, selectedElement),
onPageChange: (page, size) => {
const result = this.gridCommons.onPageChange(page, size);
diff --git a/src/webcomponents/variant/interpretation/variant-interpreter-grid.js b/src/webcomponents/variant/interpretation/variant-interpreter-grid.js
index 2b7c12d6e7..f2b9a19e8e 100644
--- a/src/webcomponents/variant/interpretation/variant-interpreter-grid.js
+++ b/src/webcomponents/variant/interpretation/variant-interpreter-grid.js
@@ -300,7 +300,8 @@ export default class VariantInterpreterGrid extends LitElement {
showExport: this._config.showExport,
detailView: this._config.detailView,
detailFormatter: (value, row) => this.detailFormatter(value, row),
- formatLoadingMessage: () => "
",
+ // formatLoadingMessage: () => "
",
+ loadingTemplate: () => this.gridCommons.loadingFormatter(),
// this makes the opencga-interpreted-variant-grid properties available in the bootstrap-table formatters
variantGrid: this,
@@ -477,8 +478,8 @@ export default class VariantInterpreterGrid extends LitElement {
showExport: this._config.showExport,
detailView: this._config.detailView,
detailFormatter: (value, row) => this.detailFormatter(value, row),
- formatLoadingMessage: () => "
",
-
+ // formatLoadingMessage: () => "
",
+ loadingTemplate: () => this.gridCommons.loadingFormatter(),
// this makes the opencga-interpreted-variant-grid properties available in the bootstrap-table formatters
variantGrid: this,
diff --git a/src/webcomponents/variant/interpretation/variant-interpreter-rearrangement-grid.js b/src/webcomponents/variant/interpretation/variant-interpreter-rearrangement-grid.js
index 900062e5ab..7ba2d67887 100644
--- a/src/webcomponents/variant/interpretation/variant-interpreter-rearrangement-grid.js
+++ b/src/webcomponents/variant/interpretation/variant-interpreter-rearrangement-grid.js
@@ -248,8 +248,8 @@ export default class VariantInterpreterRearrangementGrid extends LitElement {
showExport: this._config.showExport,
// detailView: this._config.detailView,
// detailFormatter: this.detailFormatter,
- formatLoadingMessage: () => "
",
-
+ // formatLoadingMessage: () => "
",
+ loadingTemplate: () => this.gridCommons.loadingFormatter(),
// this makes the opencga-interpreted-variant-grid properties available in the bootstrap-table formatters
variantGrid: this,
@@ -331,8 +331,8 @@ export default class VariantInterpreterRearrangementGrid extends LitElement {
showExport: this._config.showExport,
// detailView: this._config.detailView,
// detailFormatter: this.detailFormatter,
- formatLoadingMessage: () => "
",
-
+ // formatLoadingMessage: () => "
",
+ loadingTemplate: () => this.gridCommons.loadingFormatter(),
// this makes the opencga-interpreted-variant-grid properties available in the bootstrap-table formatters
variantGrid: this,
diff --git a/src/webcomponents/variant/variant-browser-grid.js b/src/webcomponents/variant/variant-browser-grid.js
index ca0e83ac7b..6817e3112e 100644
--- a/src/webcomponents/variant/variant-browser-grid.js
+++ b/src/webcomponents/variant/variant-browser-grid.js
@@ -194,7 +194,8 @@ export default class VariantBrowserGrid extends LitElement {
showExport: this._config.showExport,
detailView: this._config.detailView,
detailFormatter: this._config.detailFormatter,
- formatLoadingMessage: () => "",
+ // formatLoadingMessage: () => "",
+ loadingTemplate: () => this.gridCommons.loadingFormatter(),
// this makes the variant-browser-grid properties available in the bootstrap-table detail formatter
variantGrid: this,
ajax: params => {
@@ -338,7 +339,8 @@ export default class VariantBrowserGrid extends LitElement {
showExport: this._config.showExport,
detailView: this._config.detailView,
detailFormatter: this._config.detailFormatter,
- formatLoadingMessage: () => "",
+ // formatLoadingMessage: () => "",
+ loadingTemplate: () => this.gridCommons.loadingFormatter(),
// this makes the variant-browser-grid properties available in the bootstrap-table detail formatter
variantGrid: this,
onClickRow: (row, $element) => {
diff --git a/src/webcomponents/variant/variant-cohort-stats-grid.js b/src/webcomponents/variant/variant-cohort-stats-grid.js
index 9b88d90e0f..14fcdb36aa 100644
--- a/src/webcomponents/variant/variant-cohort-stats-grid.js
+++ b/src/webcomponents/variant/variant-cohort-stats-grid.js
@@ -17,7 +17,6 @@
import {LitElement, html} from "lit";
import UtilsNew from "../../core/utils-new.js";
-
class VariantCohortStatsGrid extends LitElement {
constructor() {
@@ -76,9 +75,9 @@ class VariantCohortStatsGrid extends LitElement {
pagination: _this._config.pagination,
pageSize: _this._config.pageSize,
pageList: _this._config.pageList,
- formatLoadingMessage: () =>"",
-
- onLoadError: function(status, res) {
+ // formatLoadingMessage: () =>"",
+ loadingTemplate: () => "
",
+ onLoadError: function (status, res) {
console.log(status);
console.log(res);
console.trace();
@@ -90,7 +89,7 @@ class VariantCohortStatsGrid extends LitElement {
// FIXME numSamples is coming son to data model, remove this formatter
numSamplesFormatter(value, row, index) {
let total = 0;
- for (let genotype of Object.keys(row.genotypeCount)) {
+ for (const genotype of Object.keys(row.genotypeCount)) {
total += row.genotypeCount[genotype];
}
return total;
@@ -98,12 +97,12 @@ class VariantCohortStatsGrid extends LitElement {
filterFormatter(value, row, index) {
let content = "";
- for (let filter of Object.keys(row.filterFreq)) {
+ for (const filter of Object.keys(row.filterFreq)) {
let fixedFreq = row.filterFreq[filter];
if (fixedFreq !== 0 && fixedFreq !== 1) {
fixedFreq = Number(fixedFreq).toFixed(4);
}
- let s = `${filter}${fixedFreq} (${row.filterCount[filter]})
`;
+ const s = `${filter}${fixedFreq} (${row.filterCount[filter]})
`;
// PASS must be the first element
if (filter === "PASS") {
content = s + content;
@@ -146,21 +145,21 @@ class VariantCohortStatsGrid extends LitElement {
count = row.genotypeCount["1/1"];
break;
}
- let fixedFreq = (freq !== 0 && freq !== 1) ? Number(freq).toFixed(4) : freq;
+ const fixedFreq = (freq !== 0 && freq !== 1) ? Number(freq).toFixed(4) : freq;
return `${fixedFreq} (${count})`;
}
othersFormatter(value, row, index) {
let str = "";
- for (let genotype of Object.keys(row.genotypeFreq)) {
+ for (const genotype of Object.keys(row.genotypeFreq)) {
if (genotype !== "0/0" && genotype !== "0/1" && genotype !== "1/1") {
- let freq = row.genotypeFreq[genotype];
- let count = row.genotypeCount[genotype];
- let fixedFreq = (freq !== 0 && freq !== 1) ? Number(freq).toFixed(4) : freq;
+ const freq = row.genotypeFreq[genotype];
+ const count = row.genotypeCount[genotype];
+ const fixedFreq = (freq !== 0 && freq !== 1) ? Number(freq).toFixed(4) : freq;
str += `${fixedFreq} (${count})
`;
}
}
- return str !== "" ? str: "NA";
+ return str !== "" ? str: "NA";
}
_createDefaultColumns() {
@@ -291,6 +290,7 @@ class VariantCohortStatsGrid extends LitElement {
`;
}
+
}
customElements.define("variant-cohort-stats-grid", VariantCohortStatsGrid);
diff --git a/src/webcomponents/variant/variant-samples.js b/src/webcomponents/variant/variant-samples.js
index 9c2a638006..18c5d6f449 100644
--- a/src/webcomponents/variant/variant-samples.js
+++ b/src/webcomponents/variant/variant-samples.js
@@ -134,7 +134,8 @@ export default class VariantSamples extends LitElement {
icons: GridCommons.GRID_ICONS,
columns: this.getColumns(),
formatShowingRows: this.gridCommons.formatShowingRows,
- formatLoadingMessage: () => "
",
+ // formatLoadingMessage: () => "
",
+ loadingTemplate: () => this.gridCommons.loadingFormatter(),
ajax: async params => {
const tableOptions = this.table.bootstrapTable("getOptions");
const query = {