/*
 * File: app/view/DataSourceWindow.js
 *
 * This file was generated by Sencha Architect version 3.2.0.
 * http://www.sencha.com/products/architect/
 *
 * This file requires use of the Ext JS 4.2.x library, under independent license.
 * License of Sencha Architect does not include license for Ext JS 4.2.x. For more
 * details see http://www.sencha.com/license or contact license@sencha.com.
 *
 * This file will be auto-generated each and everytime you save your project.
 *
 * Do NOT hand edit this file.
 */

Ext.define('webapp.view.DataSourceWindow', {
    extend: 'Ext.window.Window',
    alias: 'widget.dsWin',

    requires: [
        'Ext.form.Panel',
        'Ext.form.field.ComboBox',
        'Ext.form.FieldSet',
        'Ext.toolbar.Toolbar',
        'Ext.button.Button'
    ],

    height: 395,
    width: 600,
    bodyPadding: 15,
    title: 'New Datasource',

    initComponent: function() {
        var me = this;

        Ext.applyIf(me, {
            items: [
                {
                    xtype: 'form',
                    title: '',
                    items: [
                        {
                            xtype: 'textfield',
                            fieldLabel: 'Name'
                        },
                        {
                            xtype: 'combobox',
                            fieldLabel: 'Database Type'
                        },
                        {
                            xtype: 'textfield',
                            width: 555,
                            fieldLabel: 'JDBC URL'
                        },
                        {
                            xtype: 'textfield',
                            fieldLabel: 'Username'
                        },
                        {
                            xtype: 'textfield',
                            fieldLabel: 'Pasword',
                            inputType: 'password'
                        },
                        {
                            xtype: 'fieldset',
                            padding: 10,
                            fieldDefaults: {
                                labelWidth: 130
                            },
                            title: 'Connection Pool',
                            items: [
                                {
                                    xtype: 'textfield',
                                    fieldLabel: 'Max Connection Pool'
                                },
                                {
                                    xtype: 'textfield',
                                    fieldLabel: 'Min Connetion Pool'
                                },
                                {
                                    xtype: 'textfield',
                                    fieldLabel: 'Max Timeout(ms)'
                                }
                            ]
                        }
                    ]
                }
            ],
            dockedItems: [
                {
                    xtype: 'toolbar',
                    dock: 'bottom',
                    ui: 'footer',
                    layout: {
                        type: 'hbox',
                        pack: 'center'
                    },
                    items: [
                        {
                            xtype: 'button',
                            text: 'Test Connection'
                        },
                        {
                            xtype: 'button',
                            text: 'Create'
                        },
                        {
                            xtype: 'button',
                            text: 'Canel'
                        }
                    ]
                }
            ]
        });

        me.callParent(arguments);
    }

});