Skip to content

Commit

Permalink
fix sql panels
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Alloza committed May 31, 2024
1 parent a6050d8 commit cf25a38
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ export class EdaBlankPanelComponent implements OnInit {
if (this.panel.content) {
try{
const contentQuery = this.panel.content.query;
const modeSQL = contentQuery.query.modeSQL;
const modeSQL = contentQuery.query.modeSQL; // Comptabilitzar dashboard antics sense queryMode informat
let queryMode = contentQuery.query.queryMode;

if (!queryMode) {
Expand All @@ -228,6 +228,7 @@ export class EdaBlankPanelComponent implements OnInit {

if (modeSQL || queryMode=='SQL') {
this.currentSQLQuery = contentQuery.query.SQLexpression;

this.sqlOriginTable = this.tables.filter(t => t.table_name === contentQuery.query.fields[0].table_id)
.map(table => ({ label: table.display_name.default, value: table.table_name }))[0];
}
Expand Down Expand Up @@ -437,7 +438,7 @@ export class EdaBlankPanelComponent implements OnInit {
const modeSQL = panelContent.query.query.modeSQL;
const queryMode = panelContent.query.query.queryMode;
this.showHiddenColumn = true;
if ((queryMode && queryMode != 'SQL') || !modeSQL) {
if ((queryMode && queryMode != 'SQL') || modeSQL === false) {
try {
if (queryMode == 'EDA2') {
// Assert Relation Tables
Expand Down

0 comments on commit cf25a38

Please sign in to comment.