app.js 7.37 KB
Ext.application({
    name : 'App',
    globals:{
    	serverNotFound:'Сервер конфигурации недоступен',
    	Error:'Ошибка'
    	
       
    },
    
   appFolder:"resources/js/app",
    views : [
        'MainConfig',
        'NetworkSetting',
        'PingUtil',
        'Eth',
        'Dns',
        'Gprs',
        'Proxy',
        'DetailDns',
        'DetailProxy',
        'RemoteServer',
        'DeviceControl',
        'Log',
        'Sv',
        'ToolsXml'
        
     
       
    ],
    controllers : [
        'NetworkSetting',
        'MainConfig',
        'PingUtil',
        'DetailDns',
        'Dns',
        'Proxy',
        'RemoteServer',
        'DeviceControl',
        'Log',
        'Gprs',
        'Sv'
     
       
    ],
    
    stores : [
     'Eth',
     'Dns',
     'Sv'
    
    ],

    launch : function() {
    	
    	
    	 //mask
    	Ext.getBody().mask("Загрузка...");
    	
   


    	Ext.create('Ext.container.Viewport', {
    	    layout: {
    	        type: 'border'
    	    },
    	    defaults: {
    	        split: true
    	    },
    	    items: [{
		    	        region: 'north',
		    	        height: 30,         
		    	        id: 'mainHeader',
		    	        margins: '0 5 5 5',
		    	        bodyPadding: 5,
		    	        items:[{
		    	            	   html:'<h2>Параметры</h2>'
		    	               }]
    	    		},
	        	    {
	        	        region: 'south',
	        	        html: "",
	        	        height: 30,
	        	        margins: '0 5 5 5',
	        	        bodyPadding: 2,
	        	        id: 'mainFooter'
	        	    },
        	    {
        	        id: 'mainContent',
        	        collapsible: false,
        	        region: 'center',
        	        //layout: 'fit',
        	        border: true,
        	        items:[
							{
							    region: 'center',
							    xtype: 'tabpanel',
							    items: [	
							            
							            
							            	{
												title: 'УСТРОЙСТВО',
												items:[
												       
												       
													{
														region: 'center',
														xtype: 'tabpanel',
														items: [ {
																			title: 'Описание',
																			items:[{ 
																	                    xtype : 'mvvm-MainConfigView',
																	                    id:'formmainconfig',
																	                    viewModel : {
																					          data : {
																					        	  description:"",
																					            	  guid:""
																					              
																					          }
																					      }
																                   
																			        }]
																  },
																  
																  {
																		title: 'Удаленный сервер',
																		items:[
																		       { 
																	              xtype :'mvvm-RemoteServerView',
																	               id:'formremoteserver'
																	           }
																		]
																  }, 
																  
																  {
																		title: 'Управление',
																		items:[
																		       
																		       { 
																		              xtype :'mvvm-DeviceControlView',
																		               id:'formdevicecontrol'
																		           }
																		       
																		       ]
																  }
																]
													}
												       
												       
														]
											},
											
											
											{
												title: 'СЕТЬ',
												items:[{
															region: 'center',
															xtype: 'tabpanel',
															items: [	
													         		{
																								title: 'ETHERNET',
																								items:[
																										{ 
																							              xtype : 'mvvm-NetworkSettingView',
																							              id:'fromnetwork',
																							              viewModel : {
																											   data:{
																											         
																											      	 }
																											          
																											      }
																							                   
																							              }
																								
																										]
																							},
																							
																							{
																								title: 'DNS',
																								items:[ { 
																									     xtype : 'mvvm-DnsView',
																									      id:'grdDns',
																									      name:'grdDns'
																									    
																									    }]
																							},
																							
																							
																							{
																								title: 'PROXY',
																								items:[{ 
																										    xtype : 'mvvm-ProxyView',
																										    id:'formproxy'
																									
																										}]
																							},
																							
																							
																							
																							{
																								title: 'GPRS',
																								items:[{ 
																										    xtype : 'mvvm-GprsView',
																										    id:'formgprs'
																									
																										}]
																							},
																							
																							
																							
																							
																							]
																						},
																						
												
														]
											},
											
											
											
											  
											{
												title: 'СЕРВИСЫ',
												items:[
												       { 
														     xtype : 'mvvm-SvView',
														      id:'grdSv',
														      name:'grdSv',
														      width: 700,
														      height: 300
														     
														    
														    }
												]
											},
											
											{
												title: 'НАСТРОЙКИ',
												items:[
												       { 
												              xtype :'mvvm-ToolsXmlView',
												               id:'formtoolsxml',
												               width:600
												           }
												]
											},
											
											{
												title: 'ЖУРНАЛ',
												items:[
														{ 
																xtype : 'mvvm-LogView',
															id:'formlog'
														
																		
															} 
												]
											},
											
											
											/*
											{
												title: 'ПЕРЕМЕННЫЕ',
												items:[
												       
															{
																region: 'center',
																xtype: 'tabpanel',
																items: [	
															     		{
																			title: 'Аналоговые',
																			items:[]
															     		},
															     		{
																			title: 'Дискретные',
																			items:[]
															     		}
															
															]
															
															}
																											       
												       
												       
												       
												       
												       
												]
									  } */
										
									]
							}
					 ]
        	    }]

    	});
    	

    	
    	
    	Ext.getBody().unmask();
    }
});