Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/TASK-7100' into TASK-7100
Browse files Browse the repository at this point in the history
  • Loading branch information
gpveronica committed Dec 20, 2024
2 parents ba53596 + 25811ca commit 73a3c56
Show file tree
Hide file tree
Showing 13 changed files with 70 additions and 89 deletions.
13 changes: 4 additions & 9 deletions src/sites/iva/iva-app.js
Original file line number Diff line number Diff line change
Expand Up @@ -1349,15 +1349,10 @@ class IvaApp extends LitElement {
break;
case "workflow-manager":
content = html`
<tool-header
title="Workflow Manager"
icon="fas fa-stream">
</tool-header>
<div class="content">
<workflow-manager
.opencgaSession="${this.opencgaSession}">
</workflow-manager>
</div>
<tool-header title="Workflow Manager"></tool-header>
<workflow-manager
.opencgaSession="${this.opencgaSession}">
</workflow-manager>
`;
break;
case "cat-browser":
Expand Down
10 changes: 4 additions & 6 deletions src/webcomponents/clinical/clinical-analysis-browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,21 +93,21 @@ export default class ClinicalAnalysisBrowser extends LitElement {
...this._config.filter?.result?.grid,
...this.opencgaSession.user?.configs?.IVA?.settings?.[this.COMPONENT_ID]?.grid,
});

this.requestUpdate();
}

onSettingsUpdate() {
this.settingsObserver();
this.requestUpdate();
}

onClinicalAnalysisUpdate() {
this.settingsObserver();
this.requestUpdate();
}

render() {
if (!this._config) {
return null;
if (!this.opencgaSession) {
return nothing;
}

return html`
Expand All @@ -124,8 +124,6 @@ export default class ClinicalAnalysisBrowser extends LitElement {
getDefaultConfig() {
return {
title: "Clinical Analysis Browser",
icon: "fab fa-searchengin",
// searchButtonText: "Search",
views: [
{
id: "table-tab",
Expand Down
21 changes: 12 additions & 9 deletions src/webcomponents/cohort/cohort-browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@ export default class CohortBrowser extends LitElement {

constructor() {
super();

// Set status and init private properties
this._init();
this.#init();
}

createRenderRoot() {
Expand All @@ -48,7 +46,7 @@ export default class CohortBrowser extends LitElement {
};
}

_init() {
#init() {
this.COMPONENT_ID = "cohort-browser";
this._config = this.getDefaultConfig();
}
Expand All @@ -57,6 +55,7 @@ export default class CohortBrowser extends LitElement {
if (changedProperties.has("settings")) {
this.settingsObserver();
}

super.update(changedProperties);
}

Expand All @@ -83,33 +82,37 @@ export default class CohortBrowser extends LitElement {
...this._config.filter?.result?.grid,
...this.opencgaSession.user?.configs?.IVA?.settings?.[this.COMPONENT_ID]?.grid
});

this.requestUpdate();
}

onSettingsUpdate() {
this.settingsObserver();
this.requestUpdate();
}

onCohortUpdate() {
this.settingsObserver();
this.requestUpdate();
}

render() {
return this.opencgaSession && this._config ? html`
if (!this.opencgaSession) {
return nothing;
}

return html`
<opencga-browser
resource="COHORT"
.opencgaSession="${this.opencgaSession}"
.query="${this.query}"
.config="${this._config}"
@cohortUpdate="${this.onCohortUpdate}">
</opencga-browser>` : "";
</opencga-browser>
`;
}

getDefaultConfig() {
return {
title: "Cohort Browser",
icon: "fab fa-searchengin",
views: [
{
id: "table-tab",
Expand Down
13 changes: 7 additions & 6 deletions src/webcomponents/disease-panel/disease-panel-browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export default class DiseasePanelBrowser extends LitElement {

constructor() {
super();
this._init();
this.#init();
}

createRenderRoot() {
Expand All @@ -55,7 +55,7 @@ export default class DiseasePanelBrowser extends LitElement {
};
}

_init() {
#init() {
this.COMPONENT_ID = "disease-panel-browser";
this._config = this.getDefaultConfig();
}
Expand All @@ -64,6 +64,7 @@ export default class DiseasePanelBrowser extends LitElement {
if (changedProperties.has("settings") || changedProperties.has("config")) {
this.settingsObserver();
}

super.update(changedProperties);
}

Expand Down Expand Up @@ -93,19 +94,20 @@ export default class DiseasePanelBrowser extends LitElement {
...this._config.filter?.result?.grid,
...this.opencgaSession.user?.configs?.IVA?.settings?.[this.COMPONENT_ID]?.grid
});

this.requestUpdate();
}

onSettingsUpdate() {
this.settingsObserver();
this.requestUpdate();
}

onDiseasePanelUpdate() {
this.settingsObserver();
this.requestUpdate();
}

render() {
return html `
return html`
<opencga-browser
resource="DISEASE_PANEL"
.opencgaSession="${this.opencgaSession}"
Expand All @@ -120,7 +122,6 @@ export default class DiseasePanelBrowser extends LitElement {
getDefaultConfig() {
return {
title: "Disease Panel Browser",
icon: "fab fa-searchengin",
views: [
{
id: "table-tab",
Expand Down
14 changes: 6 additions & 8 deletions src/webcomponents/family/family-browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@ export default class FamilyBrowser extends LitElement {

constructor() {
super();

// Set status and init private properties
this._init();
this.#init();
}

createRenderRoot() {
Expand All @@ -48,7 +46,7 @@ export default class FamilyBrowser extends LitElement {
};
}

_init() {
#init() {
this.COMPONENT_ID = "family-browser";
this._config = this.getDefaultConfig();
}
Expand All @@ -57,6 +55,7 @@ export default class FamilyBrowser extends LitElement {
if (changedProperties.has("settings")) {
this.settingsObserver();
}

super.update(changedProperties);
}

Expand All @@ -83,21 +82,21 @@ export default class FamilyBrowser extends LitElement {
...this._config.filter?.result?.grid,
...this.opencgaSession.user?.configs?.IVA?.settings?.[this.COMPONENT_ID]?.grid
});

this.requestUpdate();
}

onSettingsUpdate() {
this.settingsObserver();
this.requestUpdate();
}

onFamilyUpdate() {
this.settingsObserver();
this.requestUpdate();
}

render() {
if (!this.opencgaSession) {
return html`<div>Not valid session</div>`;
return nothing;
}

return html`
Expand All @@ -114,7 +113,6 @@ export default class FamilyBrowser extends LitElement {
getDefaultConfig() {
return {
title: "Family Browser",
icon: "fa-users",
views: [
{
id: "table-tab",
Expand Down
18 changes: 8 additions & 10 deletions src/webcomponents/file/file-browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@ export default class FileBrowser extends LitElement {

constructor() {
super();

// Set status and init private properties
this._init();
this.#init();
}

createRenderRoot() {
Expand All @@ -52,7 +50,7 @@ export default class FileBrowser extends LitElement {
};
}

_init() {
#init() {
this.COMPONENT_ID = "file-browser";
this._config = this.getDefaultConfig();
}
Expand All @@ -61,6 +59,7 @@ export default class FileBrowser extends LitElement {
if (changedProperties.has("settings")) {
this.settingsObserver();
}

super.update(changedProperties);
}

Expand All @@ -87,20 +86,21 @@ export default class FileBrowser extends LitElement {
...this._config.filter?.result?.grid,
...this.opencgaSession.user?.configs?.IVA?.settings?.[this.COMPONENT_ID]?.grid
});

this.requestUpdate();
}

onSettingsUpdate() {
this.settingsObserver();
this.requestUpdate();
}

onFileUpdate() {
this.settingsObserver();
this.requestUpdate();
}

render() {
if (!this.opencgaSession || !this._config) {
return "";
if (!this.opencgaSession) {
return nothing;
}

return html`
Expand All @@ -117,8 +117,6 @@ export default class FileBrowser extends LitElement {
getDefaultConfig() {
return {
title: "File Browser",
icon: "fa-file",
description: "",
views: [
{
id: "table-tab-file",
Expand Down
14 changes: 6 additions & 8 deletions src/webcomponents/individual/individual-browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@ export default class IndividualBrowser extends LitElement {

constructor() {
super();

// Set status and init private properties
this._init();
this.#init();
}

createRenderRoot() {
Expand All @@ -55,7 +53,7 @@ export default class IndividualBrowser extends LitElement {
};
}

_init() {
#init() {
this.COMPONENT_ID = "individual-browser";
this._config = this.getDefaultConfig();
}
Expand All @@ -64,6 +62,7 @@ export default class IndividualBrowser extends LitElement {
if (changedProperties.has("settings")) {
this.settingsObserver();
}

super.update(changedProperties);
}

Expand All @@ -90,21 +89,21 @@ export default class IndividualBrowser extends LitElement {
...this._config.filter?.result?.grid,
...this.opencgaSession.user?.configs?.IVA?.settings?.[this.COMPONENT_ID]?.grid
});

this.requestUpdate();
}

onSettingsUpdate() {
this.settingsObserver();
this.requestUpdate();
}

onIndividualUpdate() {
this.settingsObserver();
this.requestUpdate();
}

render() {
if (!this.opencgaSession) {
return html`<div>Not valid session</div>`;
return nothing;
}

return html`
Expand All @@ -121,7 +120,6 @@ export default class IndividualBrowser extends LitElement {
getDefaultConfig() {
return {
title: "Individual Browser",
icon: "fa-user",
views: [
{
id: "table-tab",
Expand Down
Loading

0 comments on commit 73a3c56

Please sign in to comment.