const classNamePreview = 'fr.plugin.redis.preview'; const RedisConstantName = 'dec.constant.database.conf.connect.form.redis.value'; const form = BI.Constants.getConstant(RedisConstantName); const Widget = BI.inherit(BI.Widget, { render() { return { type: 'bi.vertical', cls: 'bi-plugin-redis', bgap: 10, items: [ { type: 'bi.left', height: 30, items: [ { type: 'bi.label', text: BI.i18nText('Dec-Dcm_Connection_Form_Database_Addr'), height: 24, width: 115, textAlign: 'left', }, { type: 'bi.label', text: form.url, height: 24, }], }, { type: 'bi.left', height: 30, items: [ { type: 'bi.label', text: BI.i18nText('Dec-Dcm_Connection_Form_Database_Port'), height: 24, width: 115, textAlign: 'left', }, { type: 'bi.label', text: form.port, height: 24, }], }, { type: 'bi.left', height: 30, items: [ { type: 'bi.label', text: BI.i18nText('Dec-Dcm_Connection_Form_Password'), height: 24, width: 115, textAlign: 'left', }, { type: 'bi.label', text: '********', height: 24, }], }, ], }; }, }); BI.shortcut(classNamePreview, Widget); BI.constant('dec.constant.database.conf.connect.form.redis.preview', classNamePreview);