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
8fb6e0fa
...
8fb6e0fad17eb8c7e6e3a9ff3da9917e972b97d9
authored
2015-07-17 11:04:28 +0400
by
root
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
save
1 parent
170d4cb6
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
179 additions
and
75 deletions
DevTools/src/main/webapp/WEB-INF/views/home.jsp
DevTools/src/main/webapp/resources/img/beeline.png
DevTools/src/main/webapp/resources/img/megafon.png
DevTools/src/main/webapp/resources/img/mts.png
DevTools/src/main/webapp/resources/img/ping.png
DevTools/src/main/webapp/resources/img/restart.png
DevTools/src/main/webapp/resources/js/app.js
DevTools/src/main/webapp/resources/js/app/controller/MainConfig.js
DevTools/src/main/webapp/resources/js/app/controller/NetworkSetting.js
DevTools/src/main/webapp/resources/js/app/store/Eth.js
DevTools/src/main/webapp/resources/js/app/view/Eth.js
DevTools/src/main/webapp/resources/js/app/view/Gprs.js
DevTools/src/main/webapp/resources/js/app/view/MainConfig.js
DevTools/src/main/webapp/resources/js/app/view/NetworkSetting.js
DevTools/src/main/webapp/WEB-INF/views/home.jsp
View file @
8fb6e0f
...
...
@@ -31,6 +31,15 @@
background-image
:
url(resources/img/load.png)
!important
;
}
.restart
{
background-image
:
url(resources/img/restart.png)
!important
;
}
.ping
{
background-image
:
url(resources/img/ping.png)
!important
;
}
</style>
...
...
DevTools/src/main/webapp/resources/img/beeline.png
0 → 100644
View file @
8fb6e0f
2.53 KB
DevTools/src/main/webapp/resources/img/megafon.png
0 → 100644
View file @
8fb6e0f
3.24 KB
DevTools/src/main/webapp/resources/img/mts.png
0 → 100644
View file @
8fb6e0f
3.08 KB
DevTools/src/main/webapp/resources/img/ping.png
0 → 100644
View file @
8fb6e0f
489 Bytes
DevTools/src/main/webapp/resources/img/restart.png
0 → 100644
View file @
8fb6e0f
686 Bytes
DevTools/src/main/webapp/resources/js/app.js
View file @
8fb6e0f
...
...
@@ -34,26 +34,11 @@ Ext.application({
launch
:
function
()
{
var
record
=
new
Object
({
run
:
function
()
{
var
ret
=
null
;
$
.
ajax
({
url
:
'api/mainconfig/get'
,
beforeSend
:
function
()
{
},
async
:
false
,
dataType
:
"json"
,
type
:
"GET"
,
success
:
function
(
data
)
{
ret
=
data
;
}
});
return
ret
;
}
});
//mask
Ext
.
getBody
().
mask
(
"Загрузка..."
);
var
data
=
record
.
run
();
Ext
.
create
(
'Ext.container.Viewport'
,
{
...
...
@@ -119,13 +104,14 @@ Ext.application({
},
{
title
:
'Удаленный сервер'
,
items
:[]
},
{
title
:
'Управление'
,
items
:[]
}
]
}
...
...
@@ -141,11 +127,8 @@ Ext.application({
xtype
:
'tabpanel'
,
items
:
[
{
title
:
'ETH'
,
items
:[{
xtype
:
'mvvm-EthView'
,
id
:
'cbxeth'
},
title
:
'ETHERNET'
,
items
:[
{
xtype
:
'mvvm-NetworkSettingView'
,
id
:
'fromnetwork'
,
...
...
@@ -200,11 +183,14 @@ Ext.application({
]
}
},
]
},
/*
{
title: 'ПЕРЕМЕННЫЕ',
...
...
@@ -258,6 +244,24 @@ Ext.application({
]
}
*/
{
title
:
'СОХРАНЕНИЕ'
,
items
:[
{
region
:
'center'
,
xtype
:
'tabpanel'
,
items
:
[
]
}
]
},
]
}
]
...
...
@@ -265,7 +269,7 @@ Ext.application({
});
Ext
.
getBody
().
unmask
();
}
});
...
...
DevTools/src/main/webapp/resources/js/app/controller/MainConfig.js
View file @
8fb6e0f
...
...
@@ -5,11 +5,22 @@ Ext.define('App.controller.MainConfig', {
this
.
control
({
'
mvvm-MainConfigView > button#SaveRecord
'
:
{
'
toolbar button[action=saveMainConfig]
'
:
{
click
:
this
.
onSaveButtonClick
},
'toolbar button[action=loadMainConfig]'
:
{
click
:
this
.
onLoadButtonClick
}
});
this
.
onLoadButtonClick
();
},
onLoadButtonClick
:
function
()
{
Ext
.
Ajax
.
request
({
method
:
"GET"
,
...
...
@@ -29,8 +40,10 @@ Ext.define('App.controller.MainConfig', {
},
failure
:
function
(
response
,
opts
)
{
}
});
},
onSaveButtonClick
:
function
(
btn
)
{
var
mainconfigView
=
btn
.
up
(
'mvvm-MainConfigView'
);
...
...
DevTools/src/main/webapp/resources/js/app/controller/NetworkSetting.js
View file @
8fb6e0f
...
...
@@ -5,7 +5,7 @@ Ext.define('App.controller.NetworkSetting', {
this
.
control
({
'
mvvm-NetworkSettingView > button#SaveRecord
'
:
{
'
toolbar button[action=saveEth]
'
:
{
click
:
this
.
onSaveButtonClick
}
});
...
...
@@ -40,6 +40,9 @@ Ext.define('App.controller.NetworkSetting', {
var
eth
=
record
?
record
.
get
(
combo
.
displayField
)
:
null
;
Ext
.
Ajax
.
request
({
method
:
"GET"
,
url
:
'api/net/byeth/'
+
eth
,
...
...
@@ -62,13 +65,22 @@ Ext.define('App.controller.NetworkSetting', {
}
});
//unmask
}
},
onSaveButtonClick
:
function
(
btn
)
{
var
networksettingView
=
btn
.
up
(
'mvvm-NetworkSettingView'
);
//mask
networksettingView
.
mask
(
"Сохранение..."
);
var
record
=
networksettingView
.
getViewModel
().
getData
();
if
(
record
)
{
...
...
@@ -77,7 +89,7 @@ Ext.define('App.controller.NetworkSetting', {
Ext
.
Ajax
.
request
({
method
:
"POST"
,
url
:
'api/
net
/update'
,
url
:
'api/
eth
/update'
,
headers
:
{
'Accept'
:
'application/json'
,
'Content-Type'
:
'application/json'
...
...
@@ -92,6 +104,7 @@ Ext.define('App.controller.NetworkSetting', {
}
},
failure
:
function
(
response
,
opts
)
{
Ext
.
Msg
.
alert
(
'Failure'
,
'Обновление конфигурации не выполнено!'
);
}
});
...
...
@@ -100,7 +113,7 @@ Ext.define('App.controller.NetworkSetting', {
}
networksettingView
.
unmask
();
}
...
...
DevTools/src/main/webapp/resources/js/app/store/Eth.js
View file @
8fb6e0f
...
...
@@ -15,7 +15,7 @@ Ext.define('App.store.Eth', {
type
:
'ajax'
,
api
:
{
read
:
'api/
net/alleth
'
read
:
'api/
eth/all
'
},
reader
:
{
...
...
DevTools/src/main/webapp/resources/js/app/view/Eth.js
View file @
8fb6e0f
...
...
@@ -20,7 +20,7 @@ Ext.define('App.view.Eth', {
Ext
.
Ajax
.
request
({
method
:
"GET"
,
url
:
'api/
net
/byeth/'
+
records
[
0
].
get
(
'name'
),
url
:
'api/
eth
/byeth/'
+
records
[
0
].
get
(
'name'
),
headers
:
{
'Accept'
:
'application/json'
,
'Content-Type'
:
'application/json'
...
...
DevTools/src/main/webapp/resources/js/app/view/Gprs.js
View file @
8fb6e0f
...
...
@@ -19,18 +19,41 @@ Ext.define('App.view.Gprs', {
type
:
'gprsform'
},
bbar
:
{
items
:
[
{
xtype
:
'button'
,
iconCls
:
'save'
,
itemId
:
'SaveGprsButton'
,
text
:
'Сохранить'
,
action
:
'saveGprs'
,
disabled
:
false
},
{
xtype
:
'button'
,
iconCls
:
'load'
,
itemId
:
'LoadGprsButton'
,
text
:
'Обновить'
,
action
:
'loadGprs'
,
disabled
:
false
}
]
},
items
:
[
{
xtype
:
'radiogroup'
,
fieldLabel
:
'Оператор связи'
,
width
:
500
,
columns
:
2
,
width
:
400
,
height
:
100
,
columns
:
3
,
itemId
:
'internetGprs'
,
items
:
[
{
xtype
:
'radiofield'
,
boxLabel
:
'<img src="resources/img/mts.
jp
g"/>'
,
boxLabel
:
'<img src="resources/img/mts.
pn
g"/>'
,
name
:
'framework'
,
checked
:
true
,
width
:
100
,
...
...
@@ -38,24 +61,21 @@ Ext.define('App.view.Gprs', {
},
{
xtype
:
'radiofield'
,
boxLabel
:
'Megafon
'
,
boxLabel
:
'<img src="resources/img/megafon.png"/>
'
,
name
:
'framework'
,
width
:
100
,
inputValue
:
'megafon'
},
{
xtype
:
'radiofield'
,
boxLabel
:
'
Beeline
'
,
boxLabel
:
'
<img src="resources/img/beeline.png"/>
'
,
name
:
'framework'
,
width
:
100
,
inputValue
:
'beeline'
}
]
},
{
xtype
:
'button'
,
text
:
'Применить'
}
]
});
\ No newline at end of file
...
...
DevTools/src/main/webapp/resources/js/app/view/MainConfig.js
View file @
8fb6e0f
...
...
@@ -15,6 +15,28 @@ Ext.define('App.view.MainConfig', {
type
:
'mainconfigform'
// references DetailViewModel
},
bbar
:
{
items
:
[
{
xtype
:
'button'
,
iconCls
:
'save'
,
itemId
:
'SaveMainConfigButton'
,
text
:
'Сохранить'
,
action
:
'saveMainConfig'
,
disabled
:
false
},
{
xtype
:
'button'
,
iconCls
:
'save'
,
itemId
:
'LoadMainConfigButton'
,
text
:
'Обновить'
,
action
:
'loadMainConfig'
,
disabled
:
false
}
]
},
items
:
[{
xtype
:
'textfield'
,
bind
:
'{guid}'
,
...
...
@@ -32,14 +54,6 @@ Ext.define('App.view.MainConfig', {
width
:
500
,
id
:
'title'
,
margin
:
'5 5 10 3'
},
{
xtype
:
'button'
,
text
:
'Сохранить'
,
itemId
:
'SaveRecord'
}
]
});
\ No newline at end of file
...
...
DevTools/src/main/webapp/resources/js/app/view/NetworkSetting.js
View file @
8fb6e0f
...
...
@@ -8,8 +8,61 @@ Ext.define('App.view.NetworkSetting', {
frame
:
false
,
padding
:
3
,
tbar
:
{
items
:
[
{
xtype
:
'button'
,
iconCls
:
'ping'
,
itemId
:
'pingButton'
,
text
:
'проверка-ping'
,
action
:
'showformping'
,
disabled
:
false
}]
},
bbar
:
{
items
:
[
{
xtype
:
'button'
,
iconCls
:
'save'
,
itemId
:
'SaveEthButton'
,
text
:
'Сохранить'
,
action
:
'saveEth'
,
disabled
:
false
},
{
xtype
:
'button'
,
iconCls
:
'load'
,
itemId
:
'LoadEthButton'
,
text
:
'Обновить'
,
action
:
'loadEth'
,
disabled
:
false
},
{
xtype
:
'button'
,
iconCls
:
'restart'
,
itemId
:
'RebootEthButton'
,
text
:
'Перезагрузить'
,
action
:
'rebootEth'
,
disabled
:
false
}
]
},
items
:
[
{
xtype
:
'mvvm-EthView'
,
id
:
'cbxeth'
},
{
xtype
:
'checkboxfield'
,
...
...
@@ -27,6 +80,7 @@ Ext.define('App.view.NetworkSetting', {
bind
:
'{mac}'
,
id
:
'mac'
,
fieldLabel
:
'MAC'
,
disabled
:
true
,
margin
:
'5 5 10 3'
},
...
...
@@ -58,17 +112,6 @@ Ext.define('App.view.NetworkSetting', {
margin
:
'5 5 10 3'
},
{
xtype
:
'textfield'
,
bind
:
'{broadcast}'
,
fieldLabel
:
'BROADCAST'
,
id
:
'broadcast'
,
margin
:
'5 5 10 3'
,
},
{
xtype
:
'textarea'
,
bind
:
'{info}'
,
...
...
@@ -80,20 +123,8 @@ Ext.define('App.view.NetworkSetting', {
width
:
700
,
height
:
100
,
},
{
xtype
:
'button'
,
text
:
'ПРИМЕНИТЬ'
,
itemId
:
'SaveRecord'
,
margin
:
'5 5 10 3'
}
]
});
\ No newline at end of file
...
...
Please
register
or
sign in
to post a comment