diff --git a/client/app/services/query.js b/client/app/services/query.js index 8c00829ca1..25aa3111ca 100644 --- a/client/app/services/query.js +++ b/client/app/services/query.js @@ -57,7 +57,6 @@ export class Parameter { this.useCurrentDateTime = parameter.useCurrentDateTime; this.global = parameter.global; // backward compatibility in Widget service this.enumOptions = parameter.enumOptions; - this.queryId = parameter.queryId; this.parentQueryId = parentQueryId; // Used for meta-parameters (i.e. dashboard-level params) @@ -175,7 +174,7 @@ export class Parameter { }; } return { - [`${prefix}${this.name}`]: this.value, + [`${prefix}${this.name}_${this.parentQueryId}`]: this.value, }; } @@ -188,7 +187,7 @@ export class Parameter { this.setValue([query[keyStart], query[keyEnd]]); } } else { - const key = `${prefix}${this.name}`; + const key = `${prefix}${this.name}_${this.parentQueryId}`; if (has(query, key)) { this.setValue(query[key]); } @@ -551,7 +550,7 @@ function QueryResource( extend(params, param.toUrlParams()); }); } - params = map(params, (value, name) => `${encodeURIComponent(name)}=${encodeURIComponent(value)}`).join('&'); + params = map(params, (value, name) => `${encodeURIComponent(name)}_${this.id}=${encodeURIComponent(value)}`).join('&'); if (params !== '') { url += `?${params}`;