PingUtil.js 4.72 KB


Ext.define('App.view.PingUtil', {
		extend:'Ext.Window',
		    closeAction: 'destroy',
		    requires: [
		             
		           ],

				    initComponent: function(){


				    	Ext.apply(this, {
					         layout: 'fit',
					         	title:'Проверка пинга',
					         //	closeAction: 'hide',  
					         	alias: 'winutils',
					         	id:'winPing',
					            height: 320,
					            width:720,
					            items: [  
					                    {	xtype: 'fieldset',
					                        title: '',
					                        defaultType: 'textfield',
					                        layout: 'anchor',
					                        defaults: {
					                            anchor: '100%'
					                        },
					                        items: [
														{
														    xtype: 'fieldcontainer',
														    combineErrors: true,
														    msgTarget : 'side',
														    layout: 'hbox',
														    defaults: {
														        flex: 1,  
														    },
														    items: [

														        {
														            xtype: 'textfield',
														            id: 'ipaddress',
						        					                fieldLabel: 'HOST',
						        					                flex: 4,
						        					                margin: '5 5 5 5'
											                    
														            },
														        {
									      		                     text:'ping',
									      		                     xtype:'button',
									      		                     itemId:'btnping',
									      		                     action:'btnping',
									      		                     margin: '5 5 5 5',
									      		                   flex: 1,
								      		                   	}
														    ]
														},
														
														
														{
														    xtype: 'fieldcontainer',
														    combineErrors: true,
														    msgTarget : 'side',
														    layout: 'hbox',
														    defaults: {
														        flex: 1,
														    },
														    items: [
														           {
										      		               fieldLabel : 'РЕЗУЛЬТАТ',
										      			           margin:'5 5 10 3',
										      			           id:'pingResult',
										      			           xtype     : 'textareafield',
										      			           readOnly     :    true,
										      			           grow      : true,
										      			           preventScrollbars: false,
										      			           width:700,
										      			           height:200
								      		                   	}
														    ]
														},
										
					                      ],
					                  
				      		              		tbar: [    
				      		              		       	{
																	 xtype: 'combobox',
																	 id:'cbxups',
																	name:'cbxups',
																	fieldLabel:'ИБП:',
																//	store:Ext.create('App.store.Ups'),
																	 valueField:'id',
																	displayField:'title',
																	queryMode:'local',
																	width:230,
																	labelWidth:40,
																	margin:'5 5 5 5',
																	action:'cbxups'
																	
														},
														  {
							      		                     text:'Журнал событий',
							      		                     xtype:'button',
							      		                     name:'btnevents',
							      		                     id:'btnevents',
							      		                     action:'events',
							      		                     width:125,
							      		                     margin: '2 2 2 2'
							      		                 
						      		                    
						      		                   	}
				      		                   ]
					                    
					                      		
					                    }]
				    				});
				    	
				    	
			               		        this.callParent(arguments);
			               		    }
			               		});				    	
			
				    	//////////////////////////
/*
    
    items : [
             
             {
                 xtype      : 'textfield',
                 fieldLabel : 'HOST',
                 disable:true,
                 margin:'5 5 10 3'
             },
           
             {
	            xtype  : 'button',
	            text   : 'PING',
	            itemId : 'SaveRecord'
	        },
	       {
	   
	           bind       : '{rec.result}',
	           fieldLabel : 'РЕЗУЛЬТАТ',
	           margin:'5 5 10 3',
	           xtype     : 'textareafield',
	           grow      : true,
	           preventScrollbars: false,
	           width:700,
	           height:200
	        },
      
	       
	        
    ]
});

*/