Commit 9fa4f8b8 9fa4f8b83b426ec797a6973a17da768129e63a91 by root

save

1 parent c4f08700
......@@ -150,6 +150,13 @@
<version>1.8</version>
</dependency>
<dependency>
<groupId>org.emercit</groupId>
<artifactId>proxymanager</artifactId>
<version>1.5</version>
</dependency>
</dependencies>
......
package org.emercit.app;
package org.emercit.devtools.app;
import java.util.Locale;
......@@ -28,10 +28,8 @@ import org.springframework.web.bind.annotation.RequestBody;
import java.util.Vector;
import org.emercit.service.DevInfoService;
import org.emercit.devinfo.model.DevInfoBean;
import org.emercit.devtools.service.DevInfoService;
......
package org.emercit.app;
package org.emercit.devtools.app;
import java.util.Locale;
......@@ -23,12 +23,10 @@ import org.springframework.web.bind.annotation.RequestBody;
import java.util.Vector;
import org.emercit.ethmanager.model.EthBean;
import org.emercit.devtools.service.DnsService;
import org.emercit.devtools.service.EthService;
import org.emercit.dnsmanager.model.DnsBean;
import org.emercit.service.EthService;
import org.emercit.service.DnsService;
import java.util.ArrayList;
import java.util.List;
......
package org.emercit.app;
package org.emercit.devtools.app;
import java.util.Locale;
......@@ -30,11 +30,10 @@ import org.springframework.web.bind.annotation.RequestBody;
import java.util.Vector;
import org.emercit.ethmanager.model.EthBean;
import org.emercit.devtools.service.DnsService;
import org.emercit.devtools.service.EthService;
import org.emercit.dnsmanager.model.DnsBean;
import org.emercit.service.EthService;
import org.emercit.service.DnsService;
@Controller
......
package org.emercit.service;
package org.emercit.devtools.service;
import org.emercit.model.IPAddressValidator;
......
package org.emercit.service;
package org.emercit.devtools.service;
import org.emercit.model.IPAddressValidator;
......
package org.emercit.service;
package org.emercit.devtools.service;
import org.emercit.model.IPAddressValidator;
......
......@@ -23,7 +23,7 @@
<beans:property name="suffix" value=".jsp" />
</beans:bean>
<context:component-scan base-package="org.emercit.app" />
<context:component-scan base-package="org.emercit.devtools.app" />
<!-- Transporting JSON - Data -->
<beans:bean class="org.springframework.web.servlet.view.ContentNegotiatingViewResolver">
......
......@@ -20,15 +20,15 @@ Ext.application({
'MainConfig',
'PingUtil',
'DetailDns',
'Dns'
'Dns',
'Proxy'
],
stores : [
'Eth',
'Dns',
'Proxy'
'Dns'
],
......
......@@ -4,9 +4,23 @@ Ext.define('App.model.Proxy', {
fields : [{
name:'id',
type:'int'
},
{
name:'proxy',
},{
name:'protocol',
type:'string'
},{
name:'host',
type:'string'
},{
name:'port',
type:'int'
},{
name:'login',
type:'string'
},{
name:'pass'
},{
name:'enabled'
},{
name:'auth'
}]
});
\ No newline at end of file
......
Ext.define('App.store.Proxy', {
extend : 'Ext.data.Store',
requires : [
'App.model.Proxy'
],
storeId : 'Proxy',
model : 'App.model.Proxy',
autoLoad: true,
autoSync: true,
alias: 'store.devices',
proxy : {
type : 'ajax',
api: {
read: 'api/net/proxy'
},
reader : {
type : 'json',
idProperty : 'id'
}
}
});
\ No newline at end of file
Ext.define('App.view.Proxy', {
extend : 'Ext.grid.Panel',
extend : 'Ext.form.Panel',
xtype : 'mvvm-ProxyView',
title : 'Proxy сервера',
store : 'Proxy',
tbar: [
{
text:'Добавить',
margin:'5 5 5 5',
handler: function(){
width: 550,
bodyPadding: 10,
if (winaddproxy==null) {
var winaddproxy = Ext.create('widget.window', { // создание окна
title:'Добавить',
maximize: function(){
this.callParent([true]); //animate
},
bbar: {
restore: function(){
this.callParent([true]); //animate
items: [ {
xtype: 'button',
iconCls:'save',
itemId: 'SaveProxyButton',
text: 'Сохранить',
action: 'saveProxy',
disabled:false
},
closeAction: 'hide',
items: [
{
xtype : 'mvvm-DetailProxyView',
viewModel : {
data : {
rec : {
proxy:"http_proxy='http://user:password@proxyserver:7777'"
}
}
}
xtype: 'button',
iconCls:'load',
itemId: 'LoadProxyButton',
text: 'Обновить',
action: 'loadProxy',
disabled:false
}
]
});
winaddproxy.show();
}
},
}
}] ,
items: [
columns: [{
text : '№',
dataIndex : 'id',
flex: 1
{
xtype:'fieldset',
checkboxToggle:true,
itemId:'fshttp',
title: 'HTTP',
defaultType: 'textfield',
collapsed: false,
layout: 'anchor',
defaults: {
anchor: '100%'
},
items :[ // HTTP
{
text : 'Proxy сервер',
dataIndex : 'proxy',
flex : 5
fieldLabel: 'IP адрес',
itemId: 'httpAdress',
allowBlank:false
},{
fieldLabel: 'Порт',
itemId: 'httpPort',
allowBlank:false
},
{
xtype: 'actioncolumn',
text : '#',
flex:1,
dataIndex: 'guid',
items: [{
icon: 'resources/img/tools.png',
handler: function (grid, rowIndex, colIndex) {
var rec = grid.getStore().getAt(rowIndex);
if (wintoolsproxy==null) {
var wintoolsproxy = Ext.create('widget.window', { // создание окна
title:'Изменить',
maximize: function(){
this.callParent([true]); //animate
xtype:'fieldset',
checkboxToggle:true,
itemId:'fshttpAuth',
title: 'Авторизация',
defaultType: 'textfield',
collapsed: true,
layout: 'anchor',
defaults: {
anchor: '100%'
},
restore: function(){
this.callParent([true]); //animate
items :[{
fieldLabel: 'Логин',
itemId: 'httpLogin',
allowBlank:false
},
closeAction: 'hide',
items: [
{
xtype : 'mvvm-DetailProxyView',
viewModel : {
data : {
rec : rec
}
fieldLabel: 'Пароль',
itemId: 'httpPassword',
allowBlank:false
}]
}
}
]
});
wintoolsproxy.show();
}
}
}
],
action: 'tools'
]
},
{
xtype: 'actioncolumn',
text : '#',
flex:1,
dataIndex: 'id',
items: [{
icon: 'resources/img/delete.png',
handler: function (grid, rowIndex, colIndex) {
//HTTPS
var selectedRecord = grid.getStore().getAt(rowIndex);
grid.getStore().each(function(rec) {
if (rec == selectedRecord) {
grid.store.remove(rec);
{
xtype:'fieldset',
checkboxToggle:true,
itemId:'fshttps',
title: 'HTTPS',
defaultType: 'textfield',
collapsed: true,
layout: 'anchor',
defaults: {
anchor: '100%'
},
items :[ {
fieldLabel: 'IP адрес',
itemId: 'httpsAdress',
allowBlank:false
},{
fieldLabel: 'Порт',
itemId: 'httpsPort',
allowBlank:false
},
{
xtype:'fieldset',
checkboxToggle:true,
itemId:'fshttpsAuth',
title: 'Авторизация',
defaultType: 'textfield',
collapsed: true,
layout: 'anchor',
defaults: {
anchor: '100%'
},
items :[{
fieldLabel: 'Логин',
itemId: 'httpsLogin',
allowBlank:false
},
{
fieldLabel: 'Пароль',
itemId: 'httpsPassword',
allowBlank:false
}]
}
});
grid.getView().refresh();
]
},
//FTP
{
xtype:'fieldset',
checkboxToggle:true,
itemId:'fsftp',
title: 'FTP',
defaultType: 'textfield',
collapsed: true,
layout: 'anchor',
defaults: {
anchor: '100%'
},
items :[ {
fieldLabel: 'IP адрес',
itemId: 'ftpAdress',
allowBlank:false
},{
fieldLabel: 'Порт',
itemId: 'ftpPort',
allowBlank:false
},
{
xtype:'fieldset',
checkboxToggle:true,
title: 'Авторизация',
defaultType: 'textfield',
itemId:'fsftpAuth',
collapsed: true,
layout: 'anchor',
defaults: {
anchor: '100%'
},
items :[{
fieldLabel: 'Логин',
itemId: 'ftpLogin',
allowBlank:false
},
{
fieldLabel: 'Пароль',
itemId: 'ftpPassword',
allowBlank:false
}]
}
}],
action: 'delete'
]
}
]
]
});
\ No newline at end of file
......