Compare commits

..

2 Commits

  1. 7
      src/web/src/modules/app.dataset.ts
  2. 13
      src/web/src/modules/app.program.ts

7
src/web/src/modules/app.dataset.ts

@ -45,7 +45,8 @@ export class RedisDataset extends BI.Widget {
render() {
const {database = '', orderValue = 0, query = '', parameters = []} = this.options.value.datasetData || {};
this.store.setParameters(parameters);
this.store.setAbleSave(!!query);
const plainQuery = BI.Providers.getProvider("dec.provider.cipher").getPlain(query);
this.store.setAbleSave(!!plainQuery);
const inputType = typeof orderValue === 'string' ? 'formula' : 'int';
return {
@ -130,7 +131,7 @@ export class RedisDataset extends BI.Widget {
cls: 'bi-border',
height: 200,
allowBlank: true,
value: query,
value: plainQuery,
ref: (_ref: any) => {
this.queryCondition = _ref;
},
@ -227,7 +228,7 @@ export class RedisDataset extends BI.Widget {
return {
database: this.tableList.getSelectedDatabase(),
orderValue: this.databaseIndex.getValue(),
query: this.queryCondition.getValue(),
query: BI.Providers.getProvider("dec.provider.cipher").getCipher(this.queryCondition.getValue()),
parameters: this.model.parameters,
};
}

13
src/web/src/modules/app.program.ts

@ -46,9 +46,16 @@ export class RedisProgram extends BI.Widget {
}
render() {
const { database = '', orderValue = 0, script = '', parameters = [], engineType = 0 } = this.options.value.datasetData || {};
const {
database = '',
orderValue = 0,
script = '',
parameters = [],
engineType = 0
} = this.options.value.datasetData || {};
this.store.setParameters(parameters);
const inputType = typeof orderValue === 'string' ? 'formula' : 'int';
const plainScript = BI.Providers.getProvider("dec.provider.cipher").getPlain(script);
return {
type: BI.HTapeLayout.xtype,
@ -157,7 +164,7 @@ export class RedisProgram extends BI.Widget {
cls: 'bi-border',
height: 200,
allowBlank: true,
value: script,
value: plainScript,
ref: (_ref: any) => {
this.queryCondition = _ref;
},
@ -260,7 +267,7 @@ export class RedisProgram extends BI.Widget {
return {
database: this.tableList.getSelectedDatabase(),
orderValue: this.databaseIndex.getValue(),
script: this.queryCondition.getValue(),
script: BI.Providers.getProvider("dec.provider.cipher").getCipher(this.queryCondition.getValue()),
engineType: this.engineTypeSelect.getValue()[0],
parameters: this.model.parameters,
};

Loading…
Cancel
Save