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