Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Дмитрий Корытько
/
hware
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
9fa4f8b8
...
9fa4f8b83b426ec797a6973a17da768129e63a91
authored
2015-07-16 15:05:47 +0400
by
root
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
save
1 parent
c4f08700
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
184 additions
and
144 deletions
DevTools/pom.xml
DevTools/src/main/java/org/emercit/app/DevInfoController.java → DevTools/src/main/java/org/emercit/devtools/app/DevInfoController.java
DevTools/src/main/java/org/emercit/app/DnsController.java → DevTools/src/main/java/org/emercit/devtools/app/DnsController.java
DevTools/src/main/java/org/emercit/app/EthController.java → DevTools/src/main/java/org/emercit/devtools/app/EthController.java
DevTools/src/main/java/org/emercit/app/HomeController.java → DevTools/src/main/java/org/emercit/devtools/app/HomeController.java
DevTools/src/main/java/org/emercit/service/DevInfoService.java → DevTools/src/main/java/org/emercit/devtools/service/DevInfoService.java
DevTools/src/main/java/org/emercit/service/DnsService.java → DevTools/src/main/java/org/emercit/devtools/service/DnsService.java
DevTools/src/main/java/org/emercit/service/EthService.java → DevTools/src/main/java/org/emercit/devtools/service/EthService.java
DevTools/src/main/webapp/WEB-INF/spring/appServlet/servlet-context.xml
DevTools/src/main/webapp/resources/js/app.js
DevTools/src/main/webapp/resources/js/app/model/Proxy.js
DevTools/src/main/webapp/resources/js/app/store/Proxy.js
DevTools/src/main/webapp/resources/js/app/view/Proxy.js
DevTools/pom.xml
View file @
9fa4f8b
...
...
@@ -150,6 +150,13 @@
<version>
1.8
</version>
</dependency>
<dependency>
<groupId>
org.emercit
</groupId>
<artifactId>
proxymanager
</artifactId>
<version>
1.5
</version>
</dependency>
</dependencies>
...
...
DevTools/src/main/java/org/emercit/app/DevInfoController.java
→
DevTools/src/main/java/org/emercit/
devtools/
app/DevInfoController.java
View file @
9fa4f8b
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
;
...
...
DevTools/src/main/java/org/emercit/app/DnsController.java
→
DevTools/src/main/java/org/emercit/
devtools/
app/DnsController.java
View file @
9fa4f8b
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
;
...
...
DevTools/src/main/java/org/emercit/app/EthController.java
→
DevTools/src/main/java/org/emercit/
devtools/
app/EthController.java
View file @
9fa4f8b
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
...
...
DevTools/src/main/java/org/emercit/app/HomeController.java
→
DevTools/src/main/java/org/emercit/
devtools/
app/HomeController.java
View file @
9fa4f8b
package
org
.
emercit
.
app
;
package
org
.
emercit
.
devtools
.
app
;
import
java.util.Locale
;
...
...
DevTools/src/main/java/org/emercit/service/DevInfoService.java
→
DevTools/src/main/java/org/emercit/
devtools/
service/DevInfoService.java
View file @
9fa4f8b
package
org
.
emercit
.
service
;
package
org
.
emercit
.
devtools
.
service
;
import
org.emercit.model.IPAddressValidator
;
...
...
DevTools/src/main/java/org/emercit/service/DnsService.java
→
DevTools/src/main/java/org/emercit/
devtools/
service/DnsService.java
View file @
9fa4f8b
package
org
.
emercit
.
service
;
package
org
.
emercit
.
devtools
.
service
;
import
org.emercit.model.IPAddressValidator
;
...
...
DevTools/src/main/java/org/emercit/service/EthService.java
→
DevTools/src/main/java/org/emercit/
devtools/
service/EthService.java
View file @
9fa4f8b
package
org
.
emercit
.
service
;
package
org
.
emercit
.
devtools
.
service
;
import
org.emercit.model.IPAddressValidator
;
...
...
DevTools/src/main/webapp/WEB-INF/spring/appServlet/servlet-context.xml
View file @
9fa4f8b
...
...
@@ -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"
>
...
...
DevTools/src/main/webapp/resources/js/app.js
View file @
9fa4f8b
...
...
@@ -20,15 +20,15 @@ Ext.application({
'MainConfig'
,
'PingUtil'
,
'DetailDns'
,
'Dns'
'Dns'
,
'Proxy'
],
stores
:
[
'Eth'
,
'Dns'
,
'Proxy'
'Dns'
],
...
...
DevTools/src/main/webapp/resources/js/app/model/Proxy.js
View file @
9fa4f8b
...
...
@@ -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
...
...
DevTools/src/main/webapp/resources/js/app/store/Proxy.js
deleted
100644 → 0
View file @
c4f0870
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
DevTools/src/main/webapp/resources/js/app/view/Proxy.js
View file @
9fa4f8b
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
...
...
Please
register
or
sign in
to post a comment