Skip to content

Commit

Permalink
Merge branch 'release-3.x.x' into TASK-6866
Browse files Browse the repository at this point in the history
  • Loading branch information
jmjuanes authored Oct 14, 2024
2 parents 23a7626 + a1438e3 commit 24d048b
Show file tree
Hide file tree
Showing 10 changed files with 371 additions and 319 deletions.
2 changes: 0 additions & 2 deletions src/sites/iva/iva-app.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ import "../../webcomponents/project/projects-admin.js";
import "../../webcomponents/study/admin/study-admin.js";
import "../../webcomponents/study/admin/study-admin-iva.js";
import "../../webcomponents/study/admin/catalog-admin.js";
import "../../webcomponents/study/admin/variant/study-variant-admin.js";
import "../../webcomponents/study/admin/variant/operations-admin.js";
import "../../webcomponents/user/user-profile.js";
import "../../webcomponents/api/rest-api.js";
Expand Down Expand Up @@ -231,7 +230,6 @@ class IvaApp extends LitElement {
"study-admin-iva",
// "catalog-admin",
"operations-admin",
"study-variant-admin",
"opencga-admin",
"variants-admin",
// "projects-admin",
Expand Down
16 changes: 12 additions & 4 deletions src/webcomponents/commons/analysis/analysis-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import NotificationUtils from "../utils/notification-utils";
import UtilsNew from "../../../core/utils-new";
import "../filters/feature-filter.js";
import "../filters/disease-panel-filter.js";
import LitUtils from "../utils/lit-utils";

export default class AnalysisUtils {

Expand All @@ -14,15 +15,18 @@ export default class AnalysisUtils {
// }

static submit(id, promise, context) {
promise
return promise
.then(response => {
console.log(response);
NotificationUtils.dispatch(context, NotificationUtils.NOTIFY_SUCCESS, {
title: `${id} launched`,
message: `${id} has been launched successfully`,
});
// Call to analysis onClear() method
context.onClear();
if (typeof context.onClear === "function") {
context.onClear();
}
return response;
})
.catch(response => {
console.log(response);
Expand Down Expand Up @@ -114,13 +118,14 @@ export default class AnalysisUtils {
static getAnalysisConfiguration(id, title, description, paramSections, check, config = {}) {
return {
id: id,
icon: config.icon,
icon: config.icon || "",
title: config.title || title,
description: config.description || description,
display: {
// defaultLayout: "vertical"
...config.display
...config?.display
},
buttons: config?.buttons || {},
sections: [
{
display: {},
Expand All @@ -139,6 +144,9 @@ export default class AnalysisUtils {
...paramSections,
{
title: "Job Info",
display: {
visible: config.isJob !== undefined ? config.isJob : true,
},
elements: [
{
title: "Job ID",
Expand Down
11 changes: 5 additions & 6 deletions src/webcomponents/commons/filters/catalog-search-autocomplete.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export default class CatalogSearchAutocomplete extends LitElement {
this.RESOURCES = {
"PROJECT": {
searchField: "id",
placeholder: "project...",
placeholder: "Project...",
// client: this.opencgaSession.opencgaClient.projects(),
fetch: ({study, ...params}) => this.opencgaSession.opencgaClient.projects().search(params),
fields: item => ({
Expand All @@ -91,16 +91,15 @@ export default class CatalogSearchAutocomplete extends LitElement {
}
},
"STUDY": {
searchField: "id",
placeholder: "study...",
searchField: "fqn",
placeholder: "Study...",
// client: this.opencgaSession.opencgaClient.studies(),
fetch: ({study, ...params}) => this.opencgaSession.opencgaClient.studies().search(params),
fetch: ({study, ...params}) => this.opencgaSession.opencgaClient.studies().search(this.opencgaSession.project.id, params),
fields: item => ({
"name": item.id,
}),
query: {
project: this.opencgaSession.project.id,
include: "id,name"
include: "id,name,fqn"
}
},
"SAMPLE": {
Expand Down
5 changes: 4 additions & 1 deletion src/webcomponents/commons/view/detail-tabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ export default class DetailTabs extends LitElement {
}

renderTitle() {
const title = typeof this._config.title === "function" ? this._config.title(this.data) : this._config.title + " " + (this.data?.id || "");
const title = typeof this._config.title === "function" ? this._config.title(this.data) : this._config.title + " " + UtilsNew.substring(this.data?.id || "", this._config.display?.idMaxLength);
return html`
<div class="mt-3 ${this._config?.display?.titleClass || ""}" style="${this._config?.display?.titleStyle || ""}">
<h3>${title}</h3>
Expand Down Expand Up @@ -241,6 +241,9 @@ export default class DetailTabs extends LitElement {

contentClass: "p-3",
contentStyle: "",

// maximum length of the displayed id in the title
idMaxLength: 100,
},
items: [],
// Example:
Expand Down
6 changes: 3 additions & 3 deletions src/webcomponents/study/admin/study-admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import "./study-admin-permissions.js";
import "./study-admin-variable.js";
import "./study-admin-audit.js";
import "./study-admin-configuration.js";
import "../../variant/operation/clinical-analysis-configuration-operation.js";
import "../../variant/operation/clinical-analysis-configuration-update.js";
import "../../variant/operation/variant-secondary-sample-index-configure-operation.js";
import "../../commons/layouts/custom-vertical-navbar.js";

Expand Down Expand Up @@ -228,10 +228,10 @@ export default class StudyAdmin extends LitElement {
visibility: "private",
render: (opencgaSession, study) => {
return html `
<clinical-analysis-configuration-operation
<clinical-analysis-configuration-update
.toolParams="${{study: study.id}}"
.opencgaSession="${opencgaSession}">
</clinical-analysis-configuration-operation>
</clinical-analysis-configuration-update>
`;
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import "../study-admin-family.js";
import "../study-admin-cohort.js";
import "../study-admin-configuration.js";
import "../../../variant/operation/variant-annotation-index-operation.js";
import "../../../variant/operation/clinical-analysis-configuration-operation.js";
import "../../../variant/operation/clinical-analysis-configuration-update.js";
import "../../../variant/operation/variant-index-operation.js";
import "../../../variant/operation/variant-stats-index-operation.js";
import "../../../variant/operation/variant-secondary-annotation-index-operation.js";
Expand Down

This file was deleted.

Loading

0 comments on commit 24d048b

Please sign in to comment.