Commit 541a1351 541a1351d41f11cf114a457faf94d23dab9d1174 by root

save

1 parent d27f4cd8
Showing 77 changed files with 400 additions and 224 deletions
...@@ -136,7 +136,7 @@ ...@@ -136,7 +136,7 @@
136 <dependency> 136 <dependency>
137 <groupId>org.emercit</groupId> 137 <groupId>org.emercit</groupId>
138 <artifactId>utilstools</artifactId> 138 <artifactId>utilstools</artifactId>
139 <version>1.3</version> 139 <version>1.10</version>
140 </dependency> 140 </dependency>
141 141
142 </dependencies> 142 </dependencies>
......
1 6f13b6f9fb79652a6aac0b78f2380bd5
...\ No newline at end of file ...\ No newline at end of file
1 0e40e1ccef32125b11c78d64436af5454189aa01
...\ No newline at end of file ...\ No newline at end of file
1 <?xml version="1.0" encoding="UTF-8"?>
2 <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
3 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
4 <modelVersion>4.0.0</modelVersion>
5 <groupId>org.emercit</groupId>
6 <artifactId>utilstools</artifactId>
7 <version>1.10</version>
8 </project>
1 fbc8e29a6fc8ed1308256ea1a718cf44
...\ No newline at end of file ...\ No newline at end of file
1 97922d063626fc90f509e731ddfcfc5172741cc4
...\ No newline at end of file ...\ No newline at end of file
1 16b24a6d9f04bae73304ca817b233fda
...\ No newline at end of file ...\ No newline at end of file
1 2197f21c750bc525f319ca880168cee607c1bec9
...\ No newline at end of file ...\ No newline at end of file
1 <?xml version="1.0" encoding="UTF-8"?>
2 <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
3 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
4 <modelVersion>4.0.0</modelVersion>
5 <groupId>org.emercit</groupId>
6 <artifactId>utilstools</artifactId>
7 <version>1.4</version>
8 </project>
1 d90a4a325b54b454fc18ff3390e910fe
...\ No newline at end of file ...\ No newline at end of file
1 6cfb23e1135c818d3907369d381053eedbbd53c1
...\ No newline at end of file ...\ No newline at end of file
1 9bfff7a8f3552afa1575707e621ba2da
...\ No newline at end of file ...\ No newline at end of file
1 38e78707725e4441cb8790413d0d2173954e999e
...\ No newline at end of file ...\ No newline at end of file
1 <?xml version="1.0" encoding="UTF-8"?>
2 <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
3 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
4 <modelVersion>4.0.0</modelVersion>
5 <groupId>org.emercit</groupId>
6 <artifactId>utilstools</artifactId>
7 <version>1.5</version>
8 </project>
1 0e856d2372abd3a4b8a60c351ffb4923
...\ No newline at end of file ...\ No newline at end of file
1 63601f61f2ab24e4c5d64adaaa04045e2dcc7a92
...\ No newline at end of file ...\ No newline at end of file
1 06d4ce453a4a8874c87ec31f9e16a88c
...\ No newline at end of file ...\ No newline at end of file
1 6eb801d8ddceaa06291f6876758c61cb3839d0cc
...\ No newline at end of file ...\ No newline at end of file
1 <?xml version="1.0" encoding="UTF-8"?>
2 <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
3 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
4 <modelVersion>4.0.0</modelVersion>
5 <groupId>org.emercit</groupId>
6 <artifactId>utilstools</artifactId>
7 <version>1.6</version>
8 </project>
1 ea143d61f07743e16446c8e357d6f440
...\ No newline at end of file ...\ No newline at end of file
1 692d2d7b9aca8a6741d47b04e7be5010e0e15448
...\ No newline at end of file ...\ No newline at end of file
1 594a3ca4edce91ca5480f62cb7a5a787
...\ No newline at end of file ...\ No newline at end of file
1 b6fd221377336f3192b827cc1b7ca6b705d957b3
...\ No newline at end of file ...\ No newline at end of file
1 <?xml version="1.0" encoding="UTF-8"?>
2 <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
3 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
4 <modelVersion>4.0.0</modelVersion>
5 <groupId>org.emercit</groupId>
6 <artifactId>utilstools</artifactId>
7 <version>1.7</version>
8 </project>
1 114662813466d86e074e5cd5ad8d77a0
...\ No newline at end of file ...\ No newline at end of file
1 ea637e7c763763ab67bcc19a4fa19729f2613702
...\ No newline at end of file ...\ No newline at end of file
1 be99a653df3112c4595c6b25c1dc4878
...\ No newline at end of file ...\ No newline at end of file
1 b2c6709a31fcd0cd2c6acbdcdbf52ee40b5b8b92
...\ No newline at end of file ...\ No newline at end of file
1 <?xml version="1.0" encoding="UTF-8"?>
2 <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
3 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
4 <modelVersion>4.0.0</modelVersion>
5 <groupId>org.emercit</groupId>
6 <artifactId>utilstools</artifactId>
7 <version>1.8</version>
8 </project>
1 18bf10a6c67fd7a878c5325eb82f3866
...\ No newline at end of file ...\ No newline at end of file
1 dd8b28080eade78b8679e3fbf899a5f11870494d
...\ No newline at end of file ...\ No newline at end of file
1 6d4186d224e70ecfc2e45e56bffa58fa
...\ No newline at end of file ...\ No newline at end of file
1 0bc2676e90a99467fcff40ef9e600e8d80041ee3
...\ No newline at end of file ...\ No newline at end of file
1 <?xml version="1.0" encoding="UTF-8"?>
2 <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
3 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
4 <modelVersion>4.0.0</modelVersion>
5 <groupId>org.emercit</groupId>
6 <artifactId>utilstools</artifactId>
7 <version>1.9</version>
8 </project>
1 5a6d7080d89a71485c2ac63dc595d711
...\ No newline at end of file ...\ No newline at end of file
1 678ee19fd36756ecf7b485831708c6a4197ffeb3
...\ No newline at end of file ...\ No newline at end of file
...@@ -3,13 +3,20 @@ ...@@ -3,13 +3,20 @@
3 <groupId>org.emercit</groupId> 3 <groupId>org.emercit</groupId>
4 <artifactId>utilstools</artifactId> 4 <artifactId>utilstools</artifactId>
5 <versioning> 5 <versioning>
6 <release>1.3</release> 6 <release>1.10</release>
7 <versions> 7 <versions>
8 <version>1.0</version> 8 <version>1.0</version>
9 <version>1.1</version> 9 <version>1.1</version>
10 <version>1.2</version> 10 <version>1.2</version>
11 <version>1.3</version> 11 <version>1.3</version>
12 <version>1.4</version>
13 <version>1.5</version>
14 <version>1.6</version>
15 <version>1.7</version>
16 <version>1.8</version>
17 <version>1.9</version>
18 <version>1.10</version>
12 </versions> 19 </versions>
13 <lastUpdated>20150730083754</lastUpdated> 20 <lastUpdated>20150730104601</lastUpdated>
14 </versioning> 21 </versioning>
15 </metadata> 22 </metadata>
......
1 f694c82e4fbd3e4132fed50768c031e6
...\ No newline at end of file ...\ No newline at end of file
1 9d106f7b79ae181205c9a30243b5a016
...\ No newline at end of file ...\ No newline at end of file
......
1 500d42766cac423c8bf0bbead4ea70c1483b96f8
...\ No newline at end of file ...\ No newline at end of file
1 b525ea5f10b108b6840c20968146c6608b40168c
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -36,14 +36,18 @@ import java.util.List; ...@@ -36,14 +36,18 @@ import java.util.List;
36 import org.emercit.devtools.service.DevControlService; 36 import org.emercit.devtools.service.DevControlService;
37 import org.emercit.dtmanager.model.DateInfo; 37 import org.emercit.dtmanager.model.DateInfo;
38 38
39 import org.emercit.utilstools.config.Msg;
40 import org.emercit.utilstools.config.MsgResult;
41
39 @Controller 42 @Controller
40 @RequestMapping("api") 43 @RequestMapping("api")
41 public class DevControlController { 44 public class DevControlController {
42 45
43 @RequestMapping(value="devcontrol/ntp" , method = RequestMethod.POST) 46 @RequestMapping(value="devcontrol/ntp" , method = RequestMethod.POST)
44 public @ResponseBody boolean changeNtp(@RequestBody DateInfo m) { 47 public @ResponseBody MsgResult changeNtp(@RequestBody DateInfo m) {
48
49 return Msg.getMsgResultByCode(DevControlService.INSTANCE.ChangeNtp(m.getNtp()));
45 50
46 return DevControlService.INSTANCE.ChangeNtp(m.getNtp());
47 } 51 }
48 52
49 @RequestMapping(value = "devcontrol/dateinfo", method = RequestMethod.GET) 53 @RequestMapping(value = "devcontrol/dateinfo", method = RequestMethod.GET)
...@@ -61,11 +65,10 @@ public class DevControlController { ...@@ -61,11 +65,10 @@ public class DevControlController {
61 } 65 }
62 66
63 @RequestMapping(value = "devcontrol/calibration", method = RequestMethod.GET) 67 @RequestMapping(value = "devcontrol/calibration", method = RequestMethod.GET)
64 public @ResponseBody boolean DvCalibration() { 68 public @ResponseBody MsgResult DvCalibration() {
65 69
66 DevControlService.INSTANCE.Calibration(); 70 return Msg.getMsgResultByCode(DevControlService.INSTANCE.Calibration());
67 71
68 return true;
69 } 72 }
70 73
71 } 74 }
......
...@@ -31,6 +31,8 @@ import java.util.Vector; ...@@ -31,6 +31,8 @@ import java.util.Vector;
31 import org.emercit.devinfo.model.DevInfoBean; 31 import org.emercit.devinfo.model.DevInfoBean;
32 import org.emercit.devtools.service.DevInfoService; 32 import org.emercit.devtools.service.DevInfoService;
33 33
34 import org.emercit.utilstools.config.Msg;
35 import org.emercit.utilstools.config.MsgResult;
34 36
35 37
36 @Controller 38 @Controller
...@@ -41,19 +43,13 @@ public class DevInfoController { ...@@ -41,19 +43,13 @@ public class DevInfoController {
41 @RequestMapping(value = "devinfo", method = RequestMethod.GET) 43 @RequestMapping(value = "devinfo", method = RequestMethod.GET)
42 public @ResponseBody DevInfoBean getDevInfo() { 44 public @ResponseBody DevInfoBean getDevInfo() {
43 45
44
45 return DevInfoService.INSTANCE.get(); 46 return DevInfoService.INSTANCE.get();
46
47 } 47 }
48 48
49
50
51
52 @RequestMapping(value="devinfo/update" , method = RequestMethod.POST) 49 @RequestMapping(value="devinfo/update" , method = RequestMethod.POST)
53 public @ResponseBody boolean update(@RequestBody DevInfoBean m) { 50 public @ResponseBody MsgResult update(@RequestBody DevInfoBean m) {
54
55 return DevInfoService.INSTANCE.set(m);
56 51
52 return Msg.getMsgResultByCode(DevInfoService.INSTANCE.set(m));
57 } 53 }
58 } 54 }
59 55
......
...@@ -30,22 +30,21 @@ import org.emercit.dnsmanager.model.DnsBean; ...@@ -30,22 +30,21 @@ import org.emercit.dnsmanager.model.DnsBean;
30 import java.util.ArrayList; 30 import java.util.ArrayList;
31 import java.util.List; 31 import java.util.List;
32 32
33 import org.emercit.utilstools.config.Msg;
34 import org.emercit.utilstools.config.MsgResult;
33 35
34 @Controller 36 @Controller
35 @RequestMapping("api") 37 @RequestMapping("api")
36 public class DnsController { 38 public class DnsController {
37 39
38 40
39
40
41 @RequestMapping(value = "dns/all", method = RequestMethod.GET) 41 @RequestMapping(value = "dns/all", method = RequestMethod.GET)
42 public @ResponseBody Vector<DnsBean> getAllDns() { 42 public @ResponseBody Vector<DnsBean> getAllDns() {
43 return DnsService.INSTANCE.getAllDnsBean(); 43 return DnsService.INSTANCE.getAllDnsBean();
44 } 44 }
45 45
46 @RequestMapping(value="dns/update" , method = RequestMethod.POST) 46 @RequestMapping(value="dns/update" , method = RequestMethod.POST)
47 public @ResponseBody boolean update(@RequestBody DnsBean[] beans) { 47 public @ResponseBody MsgResult update(@RequestBody DnsBean[] beans) {
48
49 48
50 Vector<DnsBean> dbs=new Vector<DnsBean>(); 49 Vector<DnsBean> dbs=new Vector<DnsBean>();
51 50
...@@ -57,10 +56,7 @@ public class DnsController { ...@@ -57,10 +56,7 @@ public class DnsController {
57 56
58 dbs.add(db); 57 dbs.add(db);
59 } 58 }
60 59 return Msg.getMsgResultByCode(DnsService.INSTANCE.Upd(dbs));
61
62
63 return DnsService.INSTANCE.Upd(dbs);
64 } 60 }
65 61
66 } 62 }
......
...@@ -34,7 +34,8 @@ import org.emercit.devtools.service.DnsService; ...@@ -34,7 +34,8 @@ import org.emercit.devtools.service.DnsService;
34 import org.emercit.devtools.service.EthService; 34 import org.emercit.devtools.service.EthService;
35 import org.emercit.dnsmanager.model.DnsBean; 35 import org.emercit.dnsmanager.model.DnsBean;
36 36
37 37 import org.emercit.utilstools.config.Msg;
38 import org.emercit.utilstools.config.MsgResult;
38 39
39 @Controller 40 @Controller
40 @RequestMapping("api") 41 @RequestMapping("api")
...@@ -54,44 +55,14 @@ public class EthController { ...@@ -54,44 +55,14 @@ public class EthController {
54 } 55 }
55 } 56 }
56 57
57
58 /*
59 @RequestMapping(value = "net/proxy", method = RequestMethod.GET)
60 public @ResponseBody Vector<ProxyBean> getAllProxy() {
61
62 try {
63 return NetService.INSTANCE.getProxy();
64 }
65 catch(Exception e)
66 {
67 return null;
68 }
69 }
70 */
71
72 /*
73 export http_proxy='http://user:password@prox-server:3128'
74 export https_proxy='http://user:password@prox-server:3128'
75 export ftp_proxy='http://user:password@prox-server:3128'
76
77 */
78
79 /*
80 *
81 */
82
83
84 @RequestMapping(value = "eth/byeth/{eth}", method = RequestMethod.GET) 58 @RequestMapping(value = "eth/byeth/{eth}", method = RequestMethod.GET)
85 public @ResponseBody EthBean getEth(@PathVariable String eth) { 59 public @ResponseBody EthBean getEth(@PathVariable String eth) {
86
87 return EthService.INSTANCE.getByName(eth); 60 return EthService.INSTANCE.getByName(eth);
88
89 } 61 }
90 62
91 @RequestMapping(value="eth/update" , method = RequestMethod.POST) 63 @RequestMapping(value="eth/update" , method = RequestMethod.POST)
92 public @ResponseBody boolean update(@RequestBody EthBean m) { 64 public @ResponseBody MsgResult update(@RequestBody EthBean m) {
93 65 return Msg.getMsgResultByCode(EthService.INSTANCE.Upd(m));
94 return EthService.INSTANCE.Upd(m);
95 } 66 }
96 67
97 } 68 }
......
1 package org.emercit.devtools.app;
2
3 import java.util.Locale;
4
5 import org.slf4j.Logger;
6 import org.slf4j.LoggerFactory;
7 import org.springframework.web.bind.annotation.RequestMapping;
8 import org.springframework.web.bind.annotation.RequestMethod;
9 import org.springframework.beans.factory.annotation.Autowired;
10
11 import javax.servlet.http.*;
12 import javax.servlet.ServletContext;
13
14 import java.io.*;
15
16 import org.springframework.stereotype.Controller;
17 import org.springframework.validation.BindingResult;
18 import org.springframework.web.bind.annotation.ModelAttribute;
19 import org.springframework.web.bind.annotation.PathVariable;
20 import org.springframework.web.bind.annotation.RequestMapping;
21 import org.springframework.web.bind.annotation.RequestMethod;
22 import org.springframework.web.bind.annotation.RequestParam;
23 import org.springframework.stereotype.Controller;
24 import org.springframework.web.bind.annotation.RequestMapping;
25 import org.springframework.web.bind.annotation.RequestMethod;
26 import org.springframework.web.bind.annotation.ResponseBody;
27 import org.springframework.web.bind.annotation.RequestBody;
28
29 import java.util.Vector;
30
31 import org.emercit.logreader.Reader;
32
33
34 @Controller
35 @RequestMapping("api")
36
37 public class LogController {
38
39 private Reader log=new Reader();
40
41 @RequestMapping(value = "log/show", method = RequestMethod.GET)
42 public @ResponseBody Vector<String> getLog() {
43
44
45
46 return log.read();
47
48 }
49
50 }
51
52
53
54
55
...@@ -34,17 +34,12 @@ import org.emercit.devtools.service.DnsService; ...@@ -34,17 +34,12 @@ import org.emercit.devtools.service.DnsService;
34 import org.emercit.devtools.service.ProxyService; 34 import org.emercit.devtools.service.ProxyService;
35 import org.emercit.dnsmanager.model.DnsBean; 35 import org.emercit.dnsmanager.model.DnsBean;
36 36
37 37 import org.emercit.utilstools.config.Msg;
38 import org.emercit.utilstools.config.MsgResult;
38 39
39 @Controller 40 @Controller
40 @RequestMapping("api") 41 @RequestMapping("api")
41 public class ProxyController { 42 public class ProxyController {
42
43
44
45
46
47
48 @RequestMapping(value = "proxy/all", method = RequestMethod.GET) 43 @RequestMapping(value = "proxy/all", method = RequestMethod.GET)
49 public @ResponseBody Vector<ProxyBean> getAllProxy() { 44 public @ResponseBody Vector<ProxyBean> getAllProxy() {
50 45
...@@ -59,8 +54,7 @@ public class ProxyController { ...@@ -59,8 +54,7 @@ public class ProxyController {
59 54
60 55
61 @RequestMapping(value="proxy/update" , method = RequestMethod.POST) 56 @RequestMapping(value="proxy/update" , method = RequestMethod.POST)
62 public @ResponseBody boolean update(@RequestBody ProxyBean[] beans) { 57 public @ResponseBody MsgResult update(@RequestBody ProxyBean[] beans) {
63
64 58
65 Vector<ProxyBean> dbs=new Vector<ProxyBean>(); 59 Vector<ProxyBean> dbs=new Vector<ProxyBean>();
66 60
...@@ -77,28 +71,11 @@ public class ProxyController { ...@@ -77,28 +71,11 @@ public class ProxyController {
77 db.setPass(d.getPass()); 71 db.setPass(d.getPass());
78 db.setEnabled(d.getEnabled()); 72 db.setEnabled(d.getEnabled());
79 // db.setAuth(d.getAuth()); 73 // db.setAuth(d.getAuth());
80
81
82 dbs.add(db); 74 dbs.add(db);
83 } 75 }
84 76 return Msg.getMsgResultByCode(ProxyService.INSTANCE.Upd(dbs));
85
86
87 return ProxyService.INSTANCE.Upd(dbs);
88 } 77 }
89 78
90 /*
91 export http_proxy='http://user:password@prox-server:3128'
92 export https_proxy='http://user:password@prox-server:3128'
93 export ftp_proxy='http://user:password@prox-server:3128'
94
95 */
96
97 /*
98 *
99 */
100
101
102 79
103 } 80 }
104 81
......
...@@ -33,16 +33,13 @@ import org.emercit.devtools.service.EthService; ...@@ -33,16 +33,13 @@ import org.emercit.devtools.service.EthService;
33 import org.emercit.devtools.service.RemoteServerManager; 33 import org.emercit.devtools.service.RemoteServerManager;
34 import org.emercit.ethmanager.model.EthBean; 34 import org.emercit.ethmanager.model.EthBean;
35 import org.emercit.servers.model.ServerBean; 35 import org.emercit.servers.model.ServerBean;
36 36 import org.emercit.utilstools.config.Msg;
37 37 import org.emercit.utilstools.config.MsgResult;
38 38
39 @Controller 39 @Controller
40 @RequestMapping("api") 40 @RequestMapping("api")
41 public class RemoteServerController { 41 public class RemoteServerController {
42 42
43
44
45
46 @RequestMapping(value = "remoteserver/bytype/{type}", method = RequestMethod.GET) 43 @RequestMapping(value = "remoteserver/bytype/{type}", method = RequestMethod.GET)
47 public @ResponseBody ServerBean getRemoteServerByType(@PathVariable String type) { 44 public @ResponseBody ServerBean getRemoteServerByType(@PathVariable String type) {
48 45
...@@ -50,13 +47,10 @@ public class RemoteServerController { ...@@ -50,13 +47,10 @@ public class RemoteServerController {
50 47
51 } 48 }
52 49
53
54
55
56 @RequestMapping(value="remoteserver/update" , method = RequestMethod.POST) 50 @RequestMapping(value="remoteserver/update" , method = RequestMethod.POST)
57 public @ResponseBody boolean update(@RequestBody ServerBean b) { 51 public @ResponseBody MsgResult update(@RequestBody ServerBean b) {
58 52
59 return RemoteServerManager.INSTANCE.Update(b); 53 return Msg.getMsgResultByCode(RemoteServerManager.INSTANCE.Update(b));
60 54
61 } 55 }
62 } 56 }
......
...@@ -14,6 +14,10 @@ import org.springframework.web.bind.annotation.RequestMapping; ...@@ -14,6 +14,10 @@ import org.springframework.web.bind.annotation.RequestMapping;
14 import org.springframework.web.bind.annotation.RequestMethod; 14 import org.springframework.web.bind.annotation.RequestMethod;
15 import org.springframework.web.bind.annotation.ResponseBody; 15 import org.springframework.web.bind.annotation.ResponseBody;
16 16
17 import org.emercit.displaycalibrator.service.DCalibratorBB;
18
19 import org.emercit.utilstools.config.Paths;
20
17 public enum DevControlService { 21 public enum DevControlService {
18 22
19 INSTANCE; 23 INSTANCE;
...@@ -22,6 +26,7 @@ public enum DevControlService { ...@@ -22,6 +26,7 @@ public enum DevControlService {
22 26
23 private CmdExec cmdexec=new CmdExec(); 27 private CmdExec cmdexec=new CmdExec();
24 28
29 private DCalibratorBB calibrator=new DCalibratorBB();
25 30
26 public DateInfo getDateInfo() { 31 public DateInfo getDateInfo() {
27 DateInfo dateinfo=new DateInfo(); 32 DateInfo dateinfo=new DateInfo();
...@@ -43,16 +48,10 @@ public enum DevControlService { ...@@ -43,16 +48,10 @@ public enum DevControlService {
43 } 48 }
44 49
45 50
46 public boolean ChangeNtp(String value) { 51 public int ChangeNtp(String value) {
47
48
49 boolean result=ntplinux.setUsNtpServer(value);
50
51 if (result) {
52 52
53 int result=ntplinux.setUsNtpServer(value);
53 try { cmdexec.Run("/etc/init.d/ntp restart"); } catch (Exception e) {}; 54 try { cmdexec.Run("/etc/init.d/ntp restart"); } catch (Exception e) {};
54 }
55
56 return result; 55 return result;
57 } 56 }
58 57
...@@ -70,10 +69,11 @@ public enum DevControlService { ...@@ -70,10 +69,11 @@ public enum DevControlService {
70 69
71 } 70 }
72 71
73 public void Calibration() { 72 public int Calibration() {
74 73
75 try { cmdexec.Run("/opt/devtools/calibrator.sh"); } catch (Exception e) {}; 74 //try { cmdexec.Run("/opt/devtools/calibrator.sh"); } catch (Exception e) {};
76 75
76 return calibrator.Run(Paths.dirScripts+"calibrator.sh");
77 } 77 }
78 78
79 79
......
...@@ -21,7 +21,7 @@ public enum DevInfoService { ...@@ -21,7 +21,7 @@ public enum DevInfoService {
21 return devinfo.get(); 21 return devinfo.get();
22 } 22 }
23 23
24 public boolean set(DevInfoBean m) { 24 public int set(DevInfoBean m) {
25 25
26 return devinfo.set(m); 26 return devinfo.set(m);
27 } 27 }
......
...@@ -20,15 +20,10 @@ public enum DnsService { ...@@ -20,15 +20,10 @@ public enum DnsService {
20 20
21 public Vector<DnsBean> getAllDnsBean() { 21 public Vector<DnsBean> getAllDnsBean() {
22 return dnslinux.getAllDns(); 22 return dnslinux.getAllDns();
23
24 } 23 }
25 24
26 25 public int Upd(Vector<DnsBean> beans) {
27
28 public boolean Upd(Vector<DnsBean> beans) {
29
30 return dnslinux.Config(beans); 26 return dnslinux.Config(beans);
31
32 } 27 }
33 28
34 29
......
...@@ -9,7 +9,6 @@ import org.emercit.ethmanager.model.EthBean; ...@@ -9,7 +9,6 @@ import org.emercit.ethmanager.model.EthBean;
9 import org.emercit.ethmanager.service.EthLinux; 9 import org.emercit.ethmanager.service.EthLinux;
10 10
11 11
12
13 public enum EthService { 12 public enum EthService {
14 13
15 INSTANCE; 14 INSTANCE;
...@@ -32,25 +31,12 @@ public enum EthService { ...@@ -32,25 +31,12 @@ public enum EthService {
32 return vEbns; 31 return vEbns;
33 } 32 }
34 33
35 public boolean ApplyConfig(EthBean eb) {
36
37 //return ethlinux.;
38 return true;
39 }
40
41 public EthBean getByName(String value) { 34 public EthBean getByName(String value) {
42
43 return ethlinux.getEthByName(value); 35 return ethlinux.getEthByName(value);
44
45 } 36 }
46 37
47 38 public int Upd(EthBean m) {
48 public boolean Upd(EthBean m) {
49
50
51 return ethlinux.Update(m); 39 return ethlinux.Update(m);
52
53
54 } 40 }
55 41
56 42
......
...@@ -15,8 +15,7 @@ public enum GSMService { ...@@ -15,8 +15,7 @@ public enum GSMService {
15 return gsm.get(); 15 return gsm.get();
16 } 16 }
17 17
18 public boolean Update(GSMBean m) { 18 public int Update(GSMBean m) {
19
20 return gsm.set(m); 19 return gsm.set(m);
21 } 20 }
22 } 21 }
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -5,12 +5,10 @@ import org.emercit.model.IPAddressValidator; ...@@ -5,12 +5,10 @@ import org.emercit.model.IPAddressValidator;
5 5
6 import java.util.Vector; 6 import java.util.Vector;
7 7
8
9 import org.emercit.proxymanager.model.ProxyBean; 8 import org.emercit.proxymanager.model.ProxyBean;
10 import org.emercit.proxymanager.service.ProxyLinux; 9 import org.emercit.proxymanager.service.ProxyLinux;
11 import org.emercit.xmldbmanager.service.Db; 10 import org.emercit.xmldbmanager.service.Db;
12 import org.emercit.projecttools.constants.Paths; 11 import org.emercit.utilstools.config.Paths;
13
14 12
15 public enum ProxyService { 13 public enum ProxyService {
16 14
...@@ -24,13 +22,10 @@ public enum ProxyService { ...@@ -24,13 +22,10 @@ public enum ProxyService {
24 22
25 public Vector<ProxyBean> getAllProxyBean() { 23 public Vector<ProxyBean> getAllProxyBean() {
26 return (Vector<ProxyBean> )db.select(); 24 return (Vector<ProxyBean> )db.select();
27
28 } 25 }
29 26
30 public boolean Upd(Vector<ProxyBean> beans) { 27 public int Upd(Vector<ProxyBean> beans) {
31 28 return proxy.Config(beans);
32 // proxy.Config(beans);
33 return true;
34 } 29 }
35 } 30 }
36 31
......
...@@ -38,10 +38,11 @@ public enum RemoteServerManager { ...@@ -38,10 +38,11 @@ public enum RemoteServerManager {
38 } 38 }
39 39
40 40
41 public boolean Update(ServerBean b) { 41 public int Update(ServerBean b) {
42 42
43 beans=store.get(); 43 beans=store.get();
44 44
45
45 for (ServerBean bean:beans) { 46 for (ServerBean bean:beans) {
46 47
47 48
...@@ -55,10 +56,8 @@ public enum RemoteServerManager { ...@@ -55,10 +56,8 @@ public enum RemoteServerManager {
55 return store.set(beans); 56 return store.set(beans);
56 57
57 } 58 }
58
59
60 } 59 }
61 return false; 60 return 2;
62 } 61 }
63 } 62 }
64 63
......
...@@ -13,9 +13,11 @@ ...@@ -13,9 +13,11 @@
13 <appender name="file" class="org.apache.log4j.FileAppender"> 13 <appender name="file" class="org.apache.log4j.FileAppender">
14 14
15 <param name="File" value="/var/log/devtools.log" /> 15 <param name="File" value="/var/log/devtools.log" />
16 <param name="MaxFileSize" value="10KB"/> 16 <param name="MaxFileSize" value="1KB"/>
17 <layout class="org.apache.log4j.PatternLayout"> 17 <layout class="org.apache.log4j.PatternLayout">
18 <param name="ConversionPattern" value="%-7p %d [%t] %c %x - %m%n"/> 18 <param name="ConversionPattern" value="%-7p %d [%t] %c %x - %m%n"/>
19
20
19 </layout> 21 </layout>
20 </appender> 22 </appender>
21 23
......
...@@ -12,7 +12,8 @@ Ext.application({ ...@@ -12,7 +12,8 @@ Ext.application({
12 'DetailDns', 12 'DetailDns',
13 'DetailProxy', 13 'DetailProxy',
14 'RemoteServer', 14 'RemoteServer',
15 'DeviceControl' 15 'DeviceControl',
16 'Log'
16 17
17 18
18 19
...@@ -25,7 +26,8 @@ Ext.application({ ...@@ -25,7 +26,8 @@ Ext.application({
25 'Dns', 26 'Dns',
26 'Proxy', 27 'Proxy',
27 'RemoteServer', 28 'RemoteServer',
28 'DeviceControl' 29 'DeviceControl',
30 'Log'
29 31
30 32
31 ], 33 ],
...@@ -222,6 +224,23 @@ Ext.application({ ...@@ -222,6 +224,23 @@ Ext.application({
222 ] 224 ]
223 }, 225 },
224 226
227 {
228 title: 'ЖУРНАЛ',
229 items:[
230 {
231 region: 'center',
232 xtype: 'tabpanel',
233 items: [{
234 xtype : 'mvvm-LogView',
235 id:'formlog'
236
237 }
238 ]
239
240 }
241 ]
242 },
243
225 /* 244 /*
226 { 245 {
227 title: 'ПЕРЕМЕННЫЕ', 246 title: 'ПЕРЕМЕННЫЕ',
......
...@@ -45,6 +45,7 @@ Ext.define('App.controller.DeviceControl', { ...@@ -45,6 +45,7 @@ Ext.define('App.controller.DeviceControl', {
45 45
46 this.LoadDTParams(); 46 this.LoadDTParams();
47 47
48
48 Ext.TaskManager.start({ 49 Ext.TaskManager.start({
49 run: this.LoadDTParams, 50 run: this.LoadDTParams,
50 interval: 15000 , 51 interval: 15000 ,
...@@ -74,11 +75,11 @@ Ext.define('App.controller.DeviceControl', { ...@@ -74,11 +75,11 @@ Ext.define('App.controller.DeviceControl', {
74 75
75 var result = Ext.JSON.decode(response.responseText); 76 var result = Ext.JSON.decode(response.responseText);
76 77
77
78 Ext.getCmp('dtCurrent').setValue(result.dt); 78 Ext.getCmp('dtCurrent').setValue(result.dt);
79 // Ext.getCmp('ntpServer').setValue(result.ntp); 79 // Ext.getCmp('ntpServer').setValue(result.ntp);
80 80
81 }, failure: function(response, opts) { 81 }, failure: function(response, opts) {
82 Ext.Msg.alert('Ошибка', 'Сервер недоступен');
82 } 83 }
83 }); 84 });
84 85
...@@ -100,6 +101,9 @@ Ext.define('App.controller.DeviceControl', { ...@@ -100,6 +101,9 @@ Ext.define('App.controller.DeviceControl', {
100 headers: { 101 headers: {
101 'Accept': 'application/json', 102 'Accept': 'application/json',
102 'Content-Type': 'application/json' 103 'Content-Type': 'application/json'
104
105 }, failure: function(response, opts) {
106 Ext.Msg.alert('Ошибка', 'Сервер недоступен');
103 } 107 }
104 }); 108 });
105 109
...@@ -119,6 +123,8 @@ Ext.define('App.controller.DeviceControl', { ...@@ -119,6 +123,8 @@ Ext.define('App.controller.DeviceControl', {
119 headers: { 123 headers: {
120 'Accept': 'application/json', 124 'Accept': 'application/json',
121 'Content-Type': 'application/json' 125 'Content-Type': 'application/json'
126 }, failure: function(response, opts) {
127 Ext.Msg.alert('Ошибка', 'Сервер недоступен');
122 } 128 }
123 }); 129 });
124 130
...@@ -144,6 +150,8 @@ Ext.define('App.controller.DeviceControl', { ...@@ -144,6 +150,8 @@ Ext.define('App.controller.DeviceControl', {
144 success: function(response, opts) { 150 success: function(response, opts) {
145 151
146 Ext.getCmp('fsdisplay').unmask(); 152 Ext.getCmp('fsdisplay').unmask();
153 }, failure: function(response, opts) {
154 Ext.Msg.alert('Ошибка', 'Сервер недоступен');
147 } 155 }
148 }); 156 });
149 157
...@@ -184,20 +192,10 @@ Ext.define('App.controller.DeviceControl', { ...@@ -184,20 +192,10 @@ Ext.define('App.controller.DeviceControl', {
184 var result = Ext.JSON.decode(response.responseText); 192 var result = Ext.JSON.decode(response.responseText);
185 193
186 Ext.getCmp('fsdateinfo').unmask(); 194 Ext.getCmp('fsdateinfo').unmask();
187 /*
188 if(result) {
189 Ext.Msg.alert('Успешно', 'Обновление конфигурации выполнено!');
190
191 }
192 else
193 {
194 Ext.Msg.alert('Ошибка', 'Обновление конфигурации не выполнено!');
195 }
196
197 */
198
199
200 195
196 Ext.Msg.alert(result.type+" "+"Код-"+result.code,result.message);
197 }, failure: function(response, opts) {
198 Ext.Msg.alert('Ошибка', 'Сервер недоступен');
201 } 199 }
202 }); 200 });
203 201
......
1 Ext.define('App.controller.Log', {
2 extend : 'Ext.app.Controller',
3
4 init : function() {
5
6 this.control({
7 'toolbar button[action=loadLog]' : {
8 click : this.onLoadLog
9 }
10 });
11 },
12 onLoadLog :function (btn, e, options) {
13
14
15 var form = Ext.getCmp('formlog');
16
17 if (form!=null) {
18
19
20
21
22 Ext.Ajax.request({
23 method: "GET",
24 url: 'api/log/show',
25 headers: {
26 'Accept': 'application/json',
27 'Content-Type': 'application/json'
28 },
29
30 success: function(response, opts) {
31
32 var result = Ext.JSON.decode(response.responseText);
33 var str="";
34 for(var i in result){
35 str=str+result[i]+"\n";
36 }
37 Ext.getCmp('logResult').setValue(str);
38 form.unmask();
39
40 }, failure: function(response, opts) {
41 form.unmask();
42 Ext.Msg.alert('Failure', 'Ошибка связи с сервером');
43 }
44 });
45 }
46 }
47
48 });
...\ No newline at end of file ...\ No newline at end of file
...@@ -40,12 +40,8 @@ Ext.define('App.controller.MainConfig', { ...@@ -40,12 +40,8 @@ Ext.define('App.controller.MainConfig', {
40 }, failure: function(response, opts) { 40 }, failure: function(response, opts) {
41 } 41 }
42 }); 42 });
43
44
45
46 }, 43 },
47 44
48
49 onSaveButtonClick : function(btn) { 45 onSaveButtonClick : function(btn) {
50 46
51 Ext.getCmp('formmainconfig').mask('Загрузка...'); 47 Ext.getCmp('formmainconfig').mask('Загрузка...');
...@@ -68,22 +64,12 @@ Ext.define('App.controller.MainConfig', { ...@@ -68,22 +64,12 @@ Ext.define('App.controller.MainConfig', {
68 params: data, 64 params: data,
69 success: function(response, opts) { 65 success: function(response, opts) {
70 66
71 // var result = Ext.JSON.decode(response.responseText); 67 var result = Ext.JSON.decode(response.responseText);
72
73 /*
74 if(result) {
75 Ext.Msg.alert('Success', 'Обновление конфигурации выполнено!');
76 //record.commit();
77 }
78 else
79 {
80 Ext.Msg.alert('Failure', 'Обновление конфигурации не выполнено!');
81 }
82 68
83 */ 69 Ext.Msg.alert(result.type+" "+"Код-"+result.code,result.message);
84 70
85 }, failure: function(response, opts) { 71 }, failure: function(response, opts) {
86 // Ext.Msg.alert('Failure', 'Обновление конфигурации не выполнено!'); 72 Ext.Msg.alert('Ошибка', 'Сервер недоступен');
87 } 73 }
88 }); 74 });
89 75
......
...@@ -160,12 +160,10 @@ Ext.define('App.controller.Proxy', { ...@@ -160,12 +160,10 @@ Ext.define('App.controller.Proxy', {
160 var result = Ext.JSON.decode(response.responseText); 160 var result = Ext.JSON.decode(response.responseText);
161 161
162 for(var i in result){ 162 for(var i in result){
163
164 this.setModelToForm(result[i]); 163 this.setModelToForm(result[i]);
165 } 164 }
166
167
168 }, failure: function(response, opts) { 165 }, failure: function(response, opts) {
166 Ext.Msg.alert('Failure', 'Ошибка сохранения');
169 } 167 }
170 }); 168 });
171 169
......
...@@ -20,10 +20,6 @@ Ext.define('App.controller.RemoteServer', { ...@@ -20,10 +20,6 @@ Ext.define('App.controller.RemoteServer', {
20 20
21 onLoad:function() { 21 onLoad:function() {
22 22
23
24 //mask
25 //Ext.getCmp('formremoteserver').mask("Загрузка...");
26
27 Ext.Ajax.request({ 23 Ext.Ajax.request({
28 method: "GET", 24 method: "GET",
29 url: 'api/remoteserver/bytype/szs', 25 url: 'api/remoteserver/bytype/szs',
...@@ -46,14 +42,8 @@ Ext.define('App.controller.RemoteServer', { ...@@ -46,14 +42,8 @@ Ext.define('App.controller.RemoteServer', {
46 remoteServerView.down('#IdRemoteServer').setValue(result.id); 42 remoteServerView.down('#IdRemoteServer').setValue(result.id);
47 43
48 44
49
50
51
52 /*
53 Ext.getCmp('guid').setValue(result.guid);
54 Ext.getCmp('title').setValue(result.description);
55 */
56 }, failure: function(response, opts) { 45 }, failure: function(response, opts) {
46 Ext.Msg.alert('Ошибка', 'Сервер недоступен');
57 } 47 }
58 }); 48 });
59 49
...@@ -97,21 +87,10 @@ Ext.define('App.controller.RemoteServer', { ...@@ -97,21 +87,10 @@ Ext.define('App.controller.RemoteServer', {
97 success: function(response, opts) { 87 success: function(response, opts) {
98 88
99 var result = Ext.JSON.decode(response.responseText); 89 var result = Ext.JSON.decode(response.responseText);
100 90 Ext.Msg.alert(result.type+" "+"Код-"+result.code,result.message);
101
102 if(result) {
103 Ext.Msg.alert('Success', 'Обновление конфигурации выполнено!');
104 //record.commit();
105 }
106 else
107 {
108 Ext.Msg.alert('Failure', 'Обновление конфигурации не выполнено!');
109 }
110
111
112 91
113 }, failure: function(response, opts) { 92 }, failure: function(response, opts) {
114 Ext.Msg.alert('Failure', 'Обновление конфигурации не выполнено!'); 93 Ext.Msg.alert('Ошибка', 'Сервер недоступен');
115 } 94 }
116 }); 95 });
117 96
......
1
2
3 Ext.define('App.view.Log', {
4 extend : 'Ext.form.Panel',
5 xtype : 'mvvm-LogView',
6
7
8 width : 400,
9 height:300,
10 bodyPadding: 10,
11 bbar: {
12
13 items: [
14 {
15 xtype: 'button',
16 iconCls:'load',
17 itemId: 'LoadLogButton',
18 text: 'Обновить',
19 action: 'loadLog',
20 disabled:false
21 }
22 ]
23
24
25 },
26
27
28
29
30 items: [{
31 xtype : 'textareafield',
32 grow : true,
33 id:'logResult',
34 readOnly : true,
35 allowBlank: false,
36 style:'overflow-y: scroll',
37 height: 100,
38 anchor: '95%'
39 }
40 ]
41
42
43
44 });
45
46
47
48
49
50
...\ No newline at end of file ...\ No newline at end of file
...@@ -71,6 +71,7 @@ Ext.define('App.view.PingUtil', { ...@@ -71,6 +71,7 @@ Ext.define('App.view.PingUtil', {
71 margin:'5 5 10 3', 71 margin:'5 5 10 3',
72 id:'pingResult', 72 id:'pingResult',
73 xtype : 'textareafield', 73 xtype : 'textareafield',
74 readOnly : true,
74 grow : true, 75 grow : true,
75 preventScrollbars: false, 76 preventScrollbars: false,
76 width:700, 77 width:700,
......
...@@ -10,31 +10,60 @@ ...@@ -10,31 +10,60 @@
10 </layout> 10 </layout>
11 </appender> 11 </appender>
12 12
13 <appender name="file" class="org.apache.log4j.FileAppender">
14
15 <param name="File" value="/var/log/devtools.log" />
16 <param name="MaxFileSize" value="10KB"/>
17 <layout class="org.apache.log4j.PatternLayout">
18 <param name="ConversionPattern" value="%-7p %d [%t] %c %x - %m%n"/>
19 </layout>
20 </appender>
21
22
13 <!-- Application Loggers --> 23 <!-- Application Loggers -->
14 <logger name="org.emercit.app"> 24 <logger name="org.emercit.app">
25
26 <level value="info" />
27 <appender-ref ref="console" />
28 <appender-ref ref="file" />
29 </logger>
30
31
32 <logger name="org.emercit">
15 <level value="info" /> 33 <level value="info" />
34 <appender-ref ref="console" />
35 <appender-ref ref="file" />
16 </logger> 36 </logger>
17 37
18 <!-- 3rdparty Loggers --> 38
39 <!-- rdparty Loggers -->
19 <logger name="org.springframework.core"> 40 <logger name="org.springframework.core">
20 <level value="info" /> 41 <level value="info" />
42 <appender-ref ref="console" />
43 <appender-ref ref="file" />
21 </logger> 44 </logger>
22 45
23 <logger name="org.springframework.beans"> 46 <logger name="org.springframework.beans">
24 <level value="info" /> 47 <level value="info" />
48 <appender-ref ref="console" />
49 <appender-ref ref="file" />
25 </logger> 50 </logger>
26 51
27 <logger name="org.springframework.context"> 52 <logger name="org.springframework.context">
28 <level value="info" /> 53 <level value="info" />
54 <appender-ref ref="console" />
55 <appender-ref ref="file" />
29 </logger> 56 </logger>
30 57
31 <logger name="org.springframework.web"> 58 <logger name="org.springframework.web">
32 <level value="info" /> 59 <level value="info" />
60 <appender-ref ref="console" />
61 <appender-ref ref="file" />
33 </logger> 62 </logger>
34 63
35 <!-- Root Logger --> 64 <!-- Root Logger -->
36 <root> 65 <root>
37 <priority value="info" /> 66 <priority value="warn" />
38 <appender-ref ref="console" /> 67 <appender-ref ref="console" />
39 </root> 68 </root>
40 69
......
...@@ -67,7 +67,7 @@ public class NtpLinux implements INtp { ...@@ -67,7 +67,7 @@ public class NtpLinux implements INtp {
67 log.error(e.getMessage()); 67 log.error(e.getMessage());
68 return Msg.SaveFileError.getCode(); 68 return Msg.SaveFileError.getCode();
69 } 69 }
70 return Msg.SaveFileError.getCode(); 70 return Msg.SaveFileSucc.getCode();
71 } 71 }
72 72
73 public int init() { 73 public int init() {
......
...@@ -24,7 +24,7 @@ public class Reader { ...@@ -24,7 +24,7 @@ public class Reader {
24 reader = new BufferedReader(new InputStreamReader(fis)); 24 reader = new BufferedReader(new InputStreamReader(fis));
25 String line = reader.readLine(); 25 String line = reader.readLine();
26 while(line != null){ 26 while(line != null){
27 System.out.println(line); 27 result.add(line);
28 line = reader.readLine(); 28 line = reader.readLine();
29 } 29 }
30 30
......
...@@ -29,7 +29,7 @@ public class CmdExec { ...@@ -29,7 +29,7 @@ public class CmdExec {
29 while(br.ready()) { 29 while(br.ready()) {
30 String message=br.readLine(); 30 String message=br.readLine();
31 v.add(message); 31 v.add(message);
32 log.info(message); 32 //log.info(message);
33 } 33 }
34 return v; 34 return v;
35 } 35 }
......
...@@ -2,6 +2,9 @@ package org.emercit.utilstools.config; ...@@ -2,6 +2,9 @@ package org.emercit.utilstools.config;
2 2
3 import org.emercit.utilstools.config.TypeMsg; 3 import org.emercit.utilstools.config.TypeMsg;
4 4
5 import org.emercit.utilstools.config.MsgResult;
6
7
5 public enum Msg { 8 public enum Msg {
6 9
7 SaveFileSucc(1,TypeMsg.INFO,"Выполнено сохранение файла"), 10 SaveFileSucc(1,TypeMsg.INFO,"Выполнено сохранение файла"),
...@@ -47,7 +50,7 @@ public enum Msg { ...@@ -47,7 +50,7 @@ public enum Msg {
47 this.description=description; 50 this.description=description;
48 } 51 }
49 52
50 static public Msg getCode(int code) { 53 static public Msg getByCode(int code) {
51 for (Msg v: Msg.values()) { 54 for (Msg v: Msg.values()) {
52 if (v.getCode()==code) { 55 if (v.getCode()==code) {
53 return v; 56 return v;
...@@ -68,19 +71,21 @@ public enum Msg { ...@@ -68,19 +71,21 @@ public enum Msg {
68 } 71 }
69 72
70 73
74 static public MsgResult getMsgResultByCode(int code) {
71 75
72 76
77 for (Msg v: Msg.values()) {
78 if (v.getCode()==code) {
79 MsgResult result=new MsgResult();
80 result.code=v.getCode();
81 result.type=v.getTypeVariable().getDescription();
82 result.message=v.getDescription();
83 return result;
84 }
85 }
86 return null;
73 87
74 88 }
75
76 /*
77 public static final String msgUpdSucc="Выполнено обновление";
78 public static final String msgUpdErr="Обновление не выполнено";
79
80 public static final String mdgCalibratorSucc="Выполнена калибровка экрана";
81 public static final String msgCalibratorError="Калибровка экрана не выполнена";
82 */
83
84 89
85 90
86 } 91 }
......
1 package org.emercit.utilstools.config;
2
3 public class MsgResult {
4 public int code;
5 public String type;
6 public String message;
7
8 }
...@@ -78,11 +78,7 @@ public class Settings implements ISettings { ...@@ -78,11 +78,7 @@ public class Settings implements ISettings {
78 78
79 proxylinux.Config(model.getProxyBeans()); 79 proxylinux.Config(model.getProxyBeans());
80 80
81
82 remserv.set(model.getRserverbeans()); 81 remserv.set(model.getRserverbeans());
83
84
85
86 } 82 }
87 83
88 public SettingsBean make() { 84 public SettingsBean make() {
......
...@@ -35,7 +35,7 @@ public class Db implements IDb { ...@@ -35,7 +35,7 @@ public class Db implements IDb {
35 XMLEncoder xmlEncoder = new XMLEncoder(bos); 35 XMLEncoder xmlEncoder = new XMLEncoder(bos);
36 xmlEncoder.writeObject(o); 36 xmlEncoder.writeObject(o);
37 xmlEncoder.close(); 37 xmlEncoder.close();
38 log.error(Msg.SaveFileSucc.getDescription()); 38 log.info(Msg.SaveFileSucc.getDescription());
39 }catch(Exception e) { 39 }catch(Exception e) {
40 log.error(e.getMessage()); 40 log.error(e.getMessage());
41 return Msg.SaveFileError.getCode(); 41 return Msg.SaveFileError.getCode();
......