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
d7c44780
...
d7c4478047620bd30a4191a060d10f83861652ee
authored
2015-08-04 10:09:13 +0300
by
root
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
save
1 parent
9f54c469
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
59 additions
and
41 deletions
DevTools/src/main/webapp/resources/js/app.js
DevTools/src/main/webapp/resources/js/app/controller/Dns.js
DevTools/src/main/webapp/resources/js/app/controller/GprsController.js → DevTools/src/main/webapp/resources/js/app/controller/Gprs.js
DevTools/src/main/webapp/resources/js/app/controller/MainConfig.js
DevTools/src/main/webapp/resources/js/app/controller/Proxy.js
DevTools/src/main/webapp/resources/js/app/view/Gprs.js
UtilsTools/src/main/java/org/emercit/controldevtools/bean/DevToolsBean.java
UtilsTools/src/main/java/org/emercit/utilstools/service/Settings.java
DevTools/src/main/webapp/resources/js/app.js
View file @
d7c4478
...
...
@@ -36,6 +36,7 @@ Ext.application({
'RemoteServer'
,
'DeviceControl'
,
'Log'
,
'Gprs'
,
'Sv'
...
...
DevTools/src/main/webapp/resources/js/app/controller/Dns.js
View file @
d7c4478
...
...
@@ -58,12 +58,7 @@ Ext.define('App.controller.Dns', {
params
:
data
,
success
:
function
(
response
,
opts
)
{
var
Ok
=
Ext
.
JSON
.
decode
(
response
.
responseText
);
if
(
Ok
)
{
Ext
.
Msg
.
alert
(
'Success'
,
'Сохранение выполнено успешно'
);
}
else
{
Ext
.
Msg
.
alert
(
'Failure'
,
'Ошибка сохранения'
);
}
},
failure
:
function
(
response
,
opts
)
{
...
...
DevTools/src/main/webapp/resources/js/app/controller/Gprs
Controller
.js
→
DevTools/src/main/webapp/resources/js/app/controller/Gprs.js
View file @
d7c4478
...
...
@@ -13,20 +13,49 @@ Ext.define('App.controller.Gprs', {
}
});
this
.
loadGprs
();
},
saveGprs
:
function
()
{
var
selected
=
Ext
.
getCmp
(
'internetGprs'
).
getValue
();
var
data
=
Ext
.
util
.
JSON
.
encode
(
selected
);
Ext
.
Ajax
.
request
({
method
:
"POST"
,
url
:
'api/gsm/update'
,
headers
:
{
'Accept'
:
'application/json'
,
'Content-Type'
:
'application/json'
},
params
:
data
,
success
:
function
(
response
,
opts
)
{
var
result
=
Ext
.
JSON
.
decode
(
response
.
responseText
);
Ext
.
Msg
.
alert
(
result
.
type
+
" "
+
"Код-"
+
result
.
code
,
result
.
message
);
},
failure
:
function
(
response
,
opts
)
{
Ext
.
Msg
.
alert
(
'Ошибка'
,
'Сервер недоступен'
);
}
});
this
.
loadGprs
();
},
loadGprs
:
function
()
{
Ext
.
Ajax
.
request
({
method
:
"GET"
,
url
:
'api/
devcontrol/dateinfo
'
,
url
:
'api/
gsm
'
,
headers
:
{
'Accept'
:
'application/json'
,
'Content-Type'
:
'application/json'
...
...
@@ -35,13 +64,12 @@ Ext.define('App.controller.Gprs', {
success
:
function
(
response
,
opts
)
{
var
result
=
Ext
.
JSON
.
decode
(
response
.
responseText
);
// Ext.getCmp('dtCurrent').setValue(result.dt);
// Ext.getCmp('ntpServer').setValue(result.ntp);
},
failure
:
function
(
response
,
opts
)
{
}
Ext
.
getCmp
(
'internetGprs'
).
setValue
(
result
);
},
failure
:
function
(
response
,
opts
)
{
Ext
.
Msg
.
alert
(
'Ошибка'
,
'Сервер недоступен'
);
}
});
...
...
DevTools/src/main/webapp/resources/js/app/controller/MainConfig.js
View file @
d7c4478
...
...
@@ -66,7 +66,7 @@ Ext.define('App.controller.MainConfig', {
var
result
=
Ext
.
JSON
.
decode
(
response
.
responseText
);
Ext
.
Msg
.
alert
(
result
.
type
+
" "
+
"Код-"
+
result
.
code
,
result
.
message
);
//
Ext.Msg.alert(result.type+" "+"Код-"+result.code,result.message);
},
failure
:
function
(
response
,
opts
)
{
Ext
.
Msg
.
alert
(
'Ошибка'
,
'Сервер недоступен'
);
...
...
DevTools/src/main/webapp/resources/js/app/controller/Proxy.js
View file @
d7c4478
...
...
@@ -82,7 +82,7 @@ Ext.define('App.controller.Proxy', {
success
:
function
(
response
,
opts
)
{
// proxyView.unmask();
var
result
=
Ext
.
JSON
.
decode
(
response
.
responseText
);
Ext
.
Msg
.
alert
(
result
.
type
+
" "
+
"Код-"
+
result
.
code
,
result
.
message
);
//
Ext.Msg.alert(result.type+" "+"Код-"+result.code,result.message);
},
failure
:
function
(
response
,
opts
)
{
proxyView
.
unmask
();
...
...
@@ -152,7 +152,7 @@ Ext.define('App.controller.Proxy', {
}
Ext
.
Msg
.
alert
(
'Успешно'
,
'Загрузка данных выполнена'
);
//
Ext.Msg.alert('Успешно', 'Загрузка данных выполнена');
},
failure
:
function
(
response
,
opts
)
{
proxyView
.
unmask
();
...
...
DevTools/src/main/webapp/resources/js/app/view/Gprs.js
View file @
d7c4478
...
...
@@ -45,7 +45,7 @@ Ext.define('App.view.Gprs', {
{
xtype
:
'radiogroup'
,
fieldLabel
:
'Оператор
связи
'
,
fieldLabel
:
'Оператор'
,
width
:
400
,
height
:
100
,
columns
:
3
,
...
...
@@ -54,22 +54,21 @@ Ext.define('App.view.Gprs', {
{
xtype
:
'radiofield'
,
boxLabel
:
'<img src="resources/img/mts.png"/>'
,
name
:
'framework'
,
// checked: true,
name
:
'operator'
,
width
:
100
,
inputValue
:
'mts'
},
{
xtype
:
'radiofield'
,
boxLabel
:
'<img src="resources/img/megafon.png"/>'
,
name
:
'
framework
'
,
name
:
'
operator
'
,
width
:
100
,
inputValue
:
'megafon'
},
{
xtype
:
'radiofield'
,
boxLabel
:
'<img src="resources/img/beeline.png"/>'
,
name
:
'
framework
'
,
name
:
'
operator
'
,
width
:
100
,
inputValue
:
'beeline'
}
...
...
UtilsTools/src/main/java/org/emercit/controldevtools/bean/DevToolsBean.java
View file @
d7c4478
...
...
@@ -275,11 +275,6 @@ public class DevToolsBean extends RoundPanel implements Externalizable {
}.
execute
();
}
}
...
...
UtilsTools/src/main/java/org/emercit/utilstools/service/Settings.java
View file @
d7c4478
...
...
@@ -63,22 +63,22 @@ public class Settings implements ISettings {
*/
public
void
configuring
(
SettingsBean
model
)
{
devinfo
.
set
(
model
.
getDevInfoBean
());
dnslinux
.
Config
(
model
.
getDnsbeans
());
devinfo
.
set
(
model
.
getDevInfoBean
());
dnslinux
.
Config
(
model
.
getDnsbeans
());
DateInfo
dateinfo
=
model
.
getDateInfo
();
ntplinux
.
setUsNtpServer
(
dateinfo
.
getNtp
());
DateInfo
dateinfo
=
model
.
getDateInfo
();
ntplinux
.
setUsNtpServer
(
dateinfo
.
getNtp
());
gsm
.
set
(
model
.
getGSMBean
());
gsm
.
set
(
model
.
getGSMBean
());
for
(
EthBean
eb:
model
.
getEthBeans
())
{
for
(
EthBean
eb:
model
.
getEthBeans
())
{
ethlinux
.
Update
(
eb
);
}
ethlinux
.
Update
(
eb
);
}
proxylinux
.
Config
(
model
.
getProxyBeans
());
proxylinux
.
Config
(
model
.
getProxyBeans
());
remserv
.
set
(
model
.
getRserverbeans
());
remserv
.
set
(
model
.
getRserverbeans
());
}
public
SettingsBean
make
()
{
...
...
Please
register
or
sign in
to post a comment