import { shortcut } from '@core/core'; import { PROXY_CONFIG } from '@constants/constant'; import { FormItem } from '../form_item/form_item'; @shortcut() export class ProxyConfig extends BI.Widget { static xtype = 'dec.dcm.connection.plugin.redis.components.proxy' props = { proxyConfig : { ...PROXY_CONFIG, }, } render() { const { open, host, port, username, password, privateKeyPath } = this.options.proxyConfig; return { type: BI.VerticalLayout.xtype, hgap: 15, vgap: 10, items: [ { type: FormItem.xtype, name: BI.i18nText('Plugin-Redis_Proxy_Open'), forms: [{ type: BI.CenterAdaptLayout.xtype, items: [ { type: BI.MultiSelectItem.xtype, width: 30, selected: open, }, { type: BI.Label.xtype, text: BI.i18nText('Plugin-Redis_Proxy_Description'), }, ], }], }, { type: FormItem.xtype, name: BI.i18nText('Plugin-Redis_Proxy_Host'), forms: [{ type: BI.Label.xtype, text: host, }], }, { type: FormItem.xtype, name: BI.i18nText('Plugin-Redis_Proxy_Port'), forms: [{ type: BI.Label.xtype, text: port, }], }, { type: FormItem.xtype, name: BI.i18nText('Plugin-Redis_Proxy_Username'), forms: [{ type: BI.Label.xtype, text: username, }], }, { type: FormItem.xtype, name: BI.i18nText('Plugin-Redis_Proxy_Password'), forms: [{ type: BI.Label.xtype, text: password, }], }, { type: FormItem.xtype, name: BI.i18nText('Plugin-Redis_Proxy_Private_Key_Path'), forms: [{ type: BI.Label.xtype, text: privateKeyPath, }], }, ], }; } }