Commit 700ae381 700ae381d3eb8f675993eaeaac0763f8d20fd560 by root

save

1 parent dea66014
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
8 <packaging>war</packaging> 8 <packaging>war</packaging>
9 <version>1.0.0-BUILD-SNAPSHOT</version> 9 <version>1.0.0-BUILD-SNAPSHOT</version>
10 <properties> 10 <properties>
11 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
11 <java-version>1.7</java-version> 12 <java-version>1.7</java-version>
12 <org.springframework-version>3.1.1.RELEASE</org.springframework-version> 13 <org.springframework-version>3.1.1.RELEASE</org.springframework-version>
13 <org.aspectj-version>1.6.10</org.aspectj-version> 14 <org.aspectj-version>1.6.10</org.aspectj-version>
...@@ -147,7 +148,7 @@ ...@@ -147,7 +148,7 @@
147 <dependency> 148 <dependency>
148 <groupId>org.emercit</groupId> 149 <groupId>org.emercit</groupId>
149 <artifactId>utilstools</artifactId> 150 <artifactId>utilstools</artifactId>
150 <version>1.50</version> 151 <version>1.80</version>
151 </dependency> 152 </dependency>
152 153
153 <dependency> 154 <dependency>
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
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.51</release> 6 <release>1.80</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>
...@@ -52,7 +52,14 @@ ...@@ -52,7 +52,14 @@
52 <version>1.46</version> 52 <version>1.46</version>
53 <version>1.50</version> 53 <version>1.50</version>
54 <version>1.51</version> 54 <version>1.51</version>
55 <version>1.52</version>
56 <version>1.53</version>
57 <version>1.54</version>
58 <version>1.60</version>
59 <version>1.61</version>
60 <version>1.70</version>
61 <version>1.80</version>
55 </versions> 62 </versions>
56 <lastUpdated>20150813132852</lastUpdated> 63 <lastUpdated>20150814140534</lastUpdated>
57 </versioning> 64 </versioning>
58 </metadata> 65 </metadata>
......
1 36c05f604b5a2389eadd82ff9a473bc2
...\ No newline at end of file ...\ No newline at end of file
1 53a52e0c68d3baed1d568dd835971a3d
...\ No newline at end of file ...\ No newline at end of file
......
1 2434c8c356890462296365b3031f71da4d66ee1f
...\ No newline at end of file ...\ No newline at end of file
1 f4ccba1c9d2fea75ed0fa68fdb7cea6bc154d9f5
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -30,11 +30,12 @@ import org.emercit.devtools.service.SvService; ...@@ -30,11 +30,12 @@ import org.emercit.devtools.service.SvService;
30 30
31 import org.emercit.utilstools.svmanager.model.SvBean; 31 import org.emercit.utilstools.svmanager.model.SvBean;
32 32
33
34
33 @Controller 35 @Controller
34 @RequestMapping("api") 36 @RequestMapping("api")
35 public class SvController { 37 public class SvController {
36 38
37
38 @RequestMapping(value = "sv/all", method = RequestMethod.GET) 39 @RequestMapping(value = "sv/all", method = RequestMethod.GET)
39 public @ResponseBody Vector<SvBean> getAllSv() { 40 public @ResponseBody Vector<SvBean> getAllSv() {
40 41
...@@ -54,7 +55,6 @@ public class SvController { ...@@ -54,7 +55,6 @@ public class SvController {
54 return Msg.getMsgResultByCode(SvService.INSTANCE.Start(bean)); 55 return Msg.getMsgResultByCode(SvService.INSTANCE.Start(bean));
55 } 56 }
56 57
57
58 @RequestMapping(value="sv/stop" , method = RequestMethod.POST) 58 @RequestMapping(value="sv/stop" , method = RequestMethod.POST)
59 public @ResponseBody MsgResult stop(@RequestBody SvBean bean) { 59 public @ResponseBody MsgResult stop(@RequestBody SvBean bean) {
60 60
......
...@@ -43,7 +43,13 @@ public enum SvService { ...@@ -43,7 +43,13 @@ public enum SvService {
43 svbeans=sv.get(); 43 svbeans=sv.get();
44 44
45 for (SvBean s:svbeans) { // проверяем запущен или остановлен 45 for (SvBean s:svbeans) { // проверяем запущен или остановлен
46 try { s.setIsrun(st.IsRun(s.getProcess())); } catch (Exception e) { log.error(e.getMessage());}; 46 try {
47
48 s.setIsrun(st.IsRun(s.getProcess()));
49
50 } catch (Exception e) {
51 log.error(e.getMessage());
52 };
47 } 53 }
48 return svbeans; 54 return svbeans;
49 } 55 }
......
...@@ -195,7 +195,7 @@ Ext.application({ ...@@ -195,7 +195,7 @@ Ext.application({
195 }, 195 },
196 196
197 197
198 198 /*
199 { 199 {
200 title: 'GPRS', 200 title: 'GPRS',
201 items:[{ 201 items:[{
...@@ -206,7 +206,7 @@ Ext.application({ ...@@ -206,7 +206,7 @@ Ext.application({
206 }, 206 },
207 207
208 208
209 209 */
210 210
211 ] 211 ]
212 }, 212 },
...@@ -214,10 +214,7 @@ Ext.application({ ...@@ -214,10 +214,7 @@ Ext.application({
214 214
215 ] 215 ]
216 }, 216 },
217 217 /*
218
219
220
221 { 218 {
222 title: 'СЕРВИСЫ', 219 title: 'СЕРВИСЫ',
223 items:[ 220 items:[
...@@ -232,6 +229,7 @@ Ext.application({ ...@@ -232,6 +229,7 @@ Ext.application({
232 } 229 }
233 ] 230 ]
234 }, 231 },
232 */
235 233
236 { 234 {
237 title: 'НАСТРОЙКИ', 235 title: 'НАСТРОЙКИ',
...@@ -293,10 +291,6 @@ Ext.application({ ...@@ -293,10 +291,6 @@ Ext.application({
293 }] 291 }]
294 292
295 }); 293 });
296
297
298
299
300 Ext.getBody().unmask(); 294 Ext.getBody().unmask();
301 } 295 }
302 }); 296 });
......
...@@ -6,175 +6,16 @@ Ext.define('App.controller.Sv', { ...@@ -6,175 +6,16 @@ Ext.define('App.controller.Sv', {
6 6
7 'toolbar button[action=loadSv]': { 7 'toolbar button[action=loadSv]': {
8 click : this.loadSv 8 click : this.loadSv
9 },
10
11 'mvvm-DnsView': {
12 selectionchange: this.gridSelectionChange,
13 viewready: this.onViewReady,
14 select: this.onRowSelect
15 },
16 'mvvm-DnsView': {
17 edit: this.onRowEdit,
18 beforeedit: this.onRowBeforeEdit
19 }
20 });
21 },
22
23 saveDns:function(btn) {
24
25 var grid = btn.up('gridpanel');
26 var store = grid.getStore();
27
28 var records = [];
29
30 store.each(function(r){
31 records.push({
32 id: r.get("id"),
33 ip: r.get("ip")
34 });
35 });
36
37
38 var data=Ext.util.JSON.encode(records);
39
40 Ext.Ajax.request({
41 method: "POST",
42 url: 'api/dns/update',
43 headers: {
44 'Accept': 'application/json',
45 'Content-Type': 'application/json'
46 },
47 params: data,
48 success: function(response, opts) {
49
50 var Ok = Ext.JSON.decode(response.responseText);
51 if (Ok) {
52 Ext.Msg.alert('Success', 'Сохранение выполнено успешно');
53 }else {
54 Ext.Msg.alert('Failure', 'Ошибка сохранения');
55 } 9 }
56 10
57 }, failure: function(response, opts) {
58
59 Ext.Msg.alert('Failure', 'Ошибка сохранения');
60 }
61 });
62
63
64
65
66
67
68
69
70
71
72
73
74
75 //fires create, update and delete request when calling sync and commit changes in the store when autoSync=false
76 /*
77 store.sync({
78 success : function(batch, eOpts){
79 Ext.Msg.alert('Status', 'Changes saved successfully.');
80 },
81 failure : function(record, eOpts){
82 Ext.Msg.alert('Status', 'Request failed.');
83 }
84 }); 11 });
85 */
86
87 }, 12 },
88 13
89 loadSv:function(btn) { 14 loadSv:function(btn) {
90
91 var grid = btn.up('gridpanel'); 15 var grid = btn.up('gridpanel');
92 var store = grid.getStore(); 16 var store = grid.getStore();
93 store.load(); 17 store.load();
94
95 },
96
97 onRowEdit:function(editor, context, eOpts) {
98
99 },
100
101 onRowBeforeEdit:function() {
102
103
104 },
105
106
107
108 newDns : function(btn) {
109
110
111 var grid = btn.up('gridpanel');
112 var store = grid.getStore();
113 var rowEditing=grid.getPlugin('modelDnsEditPlagin');
114
115
116 rowEditing.cancelEdit();
117
118 var records = grid.getStore().getRange();
119
120 var r = Ext.create('App.model.Dns', {
121 id: records.length,
122 ip: '8.8.8.8',
123 });
124 store.insert(0, r);
125
126
127 var records = [];
128
129 store.each(function(r){
130 records.push({
131 id: r.get("id"),
132 ip: r.get("ip")
133 });
134 });
135
136 rowEditing.startEdit(0, 0);
137
138 },
139
140 delDns:function(btn) {
141
142
143 var grid = btn.up('gridpanel');
144 var store=grid.getStore();
145
146
147 var selectedRows = grid.getSelectionModel().getSelection();
148
149 if(selectedRows.length) {
150
151 store.remove(selectedRows);
152 } else {
153 Ext.Msg.alert('Статус', 'Выберите запись');
154 } 18 }
155 },
156
157 gridSelectionChange:function(selModel, selections, eOpts) {
158
159 /*
160 var grid = selModel.view.ownerCt;
161 var btnDelete=grid.down('button[itemId=deleteDnsButton]');
162
163 btnDelete.setDisabled(false);
164
165 console.log(selections[0].data);
166 var json=Ext.util.JSON.encode(selections[0].data);
167 console.log(json);
168 */
169 },
170 onViewReady:function() {
171 },
172
173 onRowSelect: function(selModel, record, index, opts) {
174
175
176 }
177
178 }); 19 });
179 20
180 21
......
...@@ -140,9 +140,7 @@ Ext.define('App.view.Sv', { ...@@ -140,9 +140,7 @@ Ext.define('App.view.Sv', {
140 handler: function(grid, rowIndex, colIndex) { 140 handler: function(grid, rowIndex, colIndex) {
141 var rec = grid.getStore().getAt(rowIndex); 141 var rec = grid.getStore().getAt(rowIndex);
142 var data=Ext.util.JSON.encode(rec.data); 142 var data=Ext.util.JSON.encode(rec.data);
143
144 grid.mask("Остановка..."); 143 grid.mask("Остановка...");
145
146 Ext.Ajax.request({ 144 Ext.Ajax.request({
147 method: "POST", 145 method: "POST",
148 url: 'api/sv/stop', 146 url: 'api/sv/stop',
...@@ -153,17 +151,11 @@ Ext.define('App.view.Sv', { ...@@ -153,17 +151,11 @@ Ext.define('App.view.Sv', {
153 }, 151 },
154 params:data, 152 params:data,
155 success: function(response, opts) { 153 success: function(response, opts) {
156
157 grid.unmask(); 154 grid.unmask();
158
159 grid.store.load(); 155 grid.store.load();
160 grid.getView().refresh(); 156 grid.getView().refresh();
161
162 var result = Ext.JSON.decode(response.responseText); 157 var result = Ext.JSON.decode(response.responseText);
163
164
165 Ext.Msg.alert(result.type+" "+"Код-"+result.code,result.message); 158 Ext.Msg.alert(result.type+" "+"Код-"+result.code,result.message);
166
167 }, failure: function(response, opts) { 159 }, failure: function(response, opts) {
168 grid.unmask(); 160 grid.unmask();
169 Ext.Msg.alert('Failure', 'Ошибка соединения'); 161 Ext.Msg.alert('Failure', 'Ошибка соединения');
...@@ -176,8 +168,10 @@ Ext.define('App.view.Sv', { ...@@ -176,8 +168,10 @@ Ext.define('App.view.Sv', {
176 tooltip: 'Перезапустить', 168 tooltip: 'Перезапустить',
177 handler: function(grid, rowIndex, colIndex) { 169 handler: function(grid, rowIndex, colIndex) {
178 var rec = grid.getStore().getAt(rowIndex); 170 var rec = grid.getStore().getAt(rowIndex);
179 var data=Ext.util.JSON.encode(rec.data);
180 171
172
173 var data=Ext.util.JSON.encode(rec.data);
174 console.log(data);
181 grid.mask("Перезапуск..."); 175 grid.mask("Перезапуск...");
182 176
183 Ext.Ajax.request({ 177 Ext.Ajax.request({
...@@ -190,17 +184,12 @@ Ext.define('App.view.Sv', { ...@@ -190,17 +184,12 @@ Ext.define('App.view.Sv', {
190 }, 184 },
191 params:data, 185 params:data,
192 success: function(response, opts) { 186 success: function(response, opts) {
193
194
195
196 grid.unmask(); 187 grid.unmask();
197
198 grid.store.load(); 188 grid.store.load();
199 grid.getView().refresh(); 189 grid.getView().refresh();
200 190
201 var result = Ext.JSON.decode(response.responseText); 191 var result = Ext.JSON.decode(response.responseText);
202 192
203
204 Ext.Msg.alert(result.type+" "+"Код-"+result.code,result.message); 193 Ext.Msg.alert(result.type+" "+"Код-"+result.code,result.message);
205 194
206 }, failure: function(response, opts) { 195 }, failure: function(response, opts) {
......
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
67 <dependency> 67 <dependency>
68 <groupId>org.emercit</groupId> 68 <groupId>org.emercit</groupId>
69 <artifactId>utilstools</artifactId> 69 <artifactId>utilstools</artifactId>
70 <version>1.51</version> 70 <version>1.70</version>
71 </dependency> 71 </dependency>
72 72
73 73
......
...@@ -258,7 +258,8 @@ public class DevToolsBean extends RoundPanel implements Externalizable { ...@@ -258,7 +258,8 @@ public class DevToolsBean extends RoundPanel implements Externalizable {
258 btnStop.setEnabled(false); 258 btnStop.setEnabled(false);
259 259
260 try { 260 try {
261 261 sshecex.setCmd("rm /etc/udev/rules.d/70-persistent-net.rules");
262 sshecex.Exec();
262 sshecex.setCmd("touch /etc/udev/rules.d/70-persistent-net.rules"); 263 sshecex.setCmd("touch /etc/udev/rules.d/70-persistent-net.rules");
263 sshecex.Exec(); 264 sshecex.Exec();
264 265
......
...@@ -21,12 +21,12 @@ public class Notification implements INotification { ...@@ -21,12 +21,12 @@ public class Notification implements INotification {
21 } 21 }
22 22
23 public void playSiren() { 23 public void playSiren() {
24 SZSTerminal.siren.sirenOn(); 24 // SZSTerminal.siren.sirenOn();
25 } 25 }
26 26
27 public void stopSiren() { 27 public void stopSiren() {
28 28
29 SZSTerminal.siren.sirenOff(); 29 // SZSTerminal.siren.sirenOff();
30 } 30 }
31 31
32 32
......
1 package org.emercit.szs.model; 1 package org.emercit.szs.model;
2 2
3 public class SirenJNI { 3 public class SirenJNI {
4
5
6 /*
4 static { 7 static {
5 System.loadLibrary("siren"); 8 System.loadLibrary("siren");
6 } 9 }
10 */
7 11
8 public native void sirenOn(); 12 public native void sirenOn();
9 13
......
...@@ -105,8 +105,8 @@ public class WebPost { ...@@ -105,8 +105,8 @@ public class WebPost {
105 105
106 } catch (Exception e) { 106 } catch (Exception e) {
107 107
108 log.error(e.getMessage()); 108 //log.error(e.getMessage());
109 log.error(MsgSzs.connectServerError); 109 //log.error(MsgSzs.connectServerError);
110 110
111 SData.INSTANCE.setIsConnect(false); 111 SData.INSTANCE.setIsConnect(false);
112 112
...@@ -123,8 +123,8 @@ public class WebPost { ...@@ -123,8 +123,8 @@ public class WebPost {
123 123
124 } catch (Exception ex) { 124 } catch (Exception ex) {
125 125
126 log.error(ex.getMessage()); 126 //log.error(ex.getMessage());
127 log.error(MsgSzs.connectServerError); 127 //log.error(MsgSzs.connectServerError);
128 128
129 SData.INSTANCE.setIsConnect(false); 129 SData.INSTANCE.setIsConnect(false);
130 130
......
...@@ -86,14 +86,12 @@ public class SZSTerminal { ...@@ -86,14 +86,12 @@ public class SZSTerminal {
86 private static JFrame mainFrame; 86 private static JFrame mainFrame;
87 private static JPanel mainPanel; 87 private static JPanel mainPanel;
88 public static JPnlHeader jpnlheader; 88 public static JPnlHeader jpnlheader;
89
90
91 public static JPnlCurrent pnlcurrent = new JPnlCurrent(); 89 public static JPnlCurrent pnlcurrent = new JPnlCurrent();
92 public static JPnlLog jpnllog = new JPnlLog(); 90 public static JPnlLog jpnllog = new JPnlLog();
93 public static JPnlContacts jpnlcontacts = new JPnlContacts(); 91 public static JPnlContacts jpnlcontacts = new JPnlContacts();
94 public static JPnlControl jpnlcontrol = new JPnlControl(); 92 public static JPnlControl jpnlcontrol = new JPnlControl();
95 93
96 public static SirenJNI siren = new SirenJNI(); 94 //public static SirenJNI siren = new SirenJNI();
97 95
98 private static Timer ftdTimerMain = new Timer(); 96 private static Timer ftdTimerMain = new Timer();
99 97
...@@ -196,11 +194,9 @@ public class SZSTerminal { ...@@ -196,11 +194,9 @@ public class SZSTerminal {
196 194
197 public static void main(String[] args) { 195 public static void main(String[] args) {
198 196
199
200
201 EventQueue.invokeLater(new Runnable() { 197 EventQueue.invokeLater(new Runnable() {
202 public void run() { 198 public void run() {
203 try {siren.sirenOff(); } catch (Exception e) {}; 199 //try {siren.sirenOff(); } catch (Exception e) {};
204 mainFrame = new JFrame(); 200 mainFrame = new JFrame();
205 mainFrame.setSize(800, 600); 201 mainFrame.setSize(800, 600);
206 mainFrame.setUndecorated(false); 202 mainFrame.setUndecorated(false);
......
...@@ -26,12 +26,12 @@ public class DCalibratorBB implements DCalibrator { ...@@ -26,12 +26,12 @@ public class DCalibratorBB implements DCalibrator {
26 26
27 public int Run(String cmd) { 27 public int Run(String cmd) {
28 try { 28 try {
29 Vector<String> defaults=getDefContent(); 29
30 Vector<String> params=cmdExec.Run(cmd); 30 Vector<String> params=cmdExec.Run(cmd);
31 31
32 32
33 33
34 File file = new File("/etc/X11/xorg.conf.d/99-calibration.conf"); 34 File file = new File("/usr/share/X11/xorg.conf.d/10-evdev.conf");
35 35
36 if (!file.exists()) { 36 if (!file.exists()) {
37 file.createNewFile(); 37 file.createNewFile();
...@@ -42,13 +42,49 @@ public class DCalibratorBB implements DCalibrator { ...@@ -42,13 +42,49 @@ public class DCalibratorBB implements DCalibrator {
42 42
43 bw.write("#Generated by DisplayCalibrator\n"); 43 bw.write("#Generated by DisplayCalibrator\n");
44 44
45 for (int i=7;i<params.size();i++) {
46 defaults.add(params.get(i));
47 defaults.add("\n");
48 }
49 45
50 for (int i=0;i<defaults.size();i++) { 46
51 bw.write(defaults.get(i)); 47 bw.write("Section \"InputClass\"\n");
48 bw.write("Identifier \"evdev pointer catchall\"\n");
49 bw.write("MatchIsPointer \"on\"\n");
50 bw.write("MatchDevicePath \"/dev/input/event*\"\n");
51 bw.write("Driver \"evdev\"\n");
52 bw.write("EndSection\n");
53 bw.write("\n");
54 bw.write("Section \"InputClass\"\n");
55 bw.write("Identifier \"evdev keyboard catchall\"\n");
56 bw.write("MatchIsKeyboard \"on\"\n");
57 bw.write("MatchDevicePath \"/dev/input/event*\"\n");
58 bw.write("Driver \"evdev\"\n");
59 bw.write("EndSection\n");
60 bw.write("\n");
61 bw.write("Section \"InputClass\"\n");
62 bw.write("Identifier \"evdev touchpad catchall\"\n");
63 bw.write("MatchIsTouchpad \"on\"\n");
64 bw.write("MatchDevicePath \"/dev/input/event*\"\n");
65 bw.write("Driver \"evdev\"\n");
66 bw.write("EndSection\n");
67 bw.write("\n");
68 bw.write("Section \"InputClass\"\n");
69 bw.write("Identifier \"evdev tablet catchall\"\n");
70 bw.write("MatchIsTablet \"on\"\n");
71 bw.write("MatchDevicePath \"/dev/input/event*\"\n");
72 bw.write("Driver \"evdev\"\n");
73 bw.write("EndSection\n");
74 bw.write("\n");
75 bw.write("Section \"InputClass\"\n");
76 bw.write("Identifier \"evdev touchscreen catchall\"\n");
77 bw.write("MatchIsTouchscreen \"on\"\n");
78 bw.write("MatchDevicePath \"/dev/input/event*\"\n");
79 bw.write("Driver \"evdev\"\n");
80 bw.write("EndSection\n");
81 bw.write("\n");
82
83
84
85 for (int i=8;i<params.size();i++) {
86 bw.write(params.get(i));
87 bw.write("\n");
52 } 88 }
53 89
54 bw.write("\n"); 90 bw.write("\n");
...@@ -62,14 +98,4 @@ public class DCalibratorBB implements DCalibrator { ...@@ -62,14 +98,4 @@ public class DCalibratorBB implements DCalibrator {
62 } 98 }
63 } 99 }
64 100
65 /*
66 * Содержание файла по умолчанию
67 */
68 public Vector<String> getDefContent() throws Exception {
69
70 return cmdExec.Run("cat /usr/share/X11/xorg.conf.d/10-evdev.conf");
71
72 }
73
74
75 } 101 }
......
...@@ -13,6 +13,7 @@ import org.emercit.utilstools.config.DefSettings; ...@@ -13,6 +13,7 @@ import org.emercit.utilstools.config.DefSettings;
13 import org.emercit.utilstools.config.Msg; 13 import org.emercit.utilstools.config.Msg;
14 import org.emercit.utilstools.ethmanager.model.EthBean; 14 import org.emercit.utilstools.ethmanager.model.EthBean;
15 import org.emercit.utilstools.pckutils.cmd.CmdExec; 15 import org.emercit.utilstools.pckutils.cmd.CmdExec;
16 import org.emercit.utilstools.sshexec.SSHExec;
16 import org.emercit.utilstools.xmldbmanager.service.Db; 17 import org.emercit.utilstools.xmldbmanager.service.Db;
17 18
18 public class EthLinux implements IEth { 19 public class EthLinux implements IEth {
...@@ -21,12 +22,17 @@ public class EthLinux implements IEth { ...@@ -21,12 +22,17 @@ public class EthLinux implements IEth {
21 22
22 private CmdExec cmdexec=new CmdExec(); 23 private CmdExec cmdexec=new CmdExec();
23 24
25 private SSHExec sshexec=new SSHExec();
26
27
24 private Vector<EthBean> ebs=new Vector<EthBean>(); 28 private Vector<EthBean> ebs=new Vector<EthBean>();
25 private Db db=new Db(Paths.BEAN_ETH); 29 private Db db=new Db(Paths.BEAN_ETH);
26 private Vector<String> extinfo; 30 private Vector<String> extinfo;
27 private String mac; 31 private String mac;
28 private EthBean emp; 32 private EthBean emp;
29 33
34
35
30 public EthLinux() { 36 public EthLinux() {
31 } 37 }
32 38
...@@ -43,7 +49,10 @@ public class EthLinux implements IEth { ...@@ -43,7 +49,10 @@ public class EthLinux implements IEth {
43 buff=cmdexec.Run("ifup"+" "+name); 49 buff=cmdexec.Run("ifup"+" "+name);
44 Thread.sleep(3000); 50 Thread.sleep(3000);
45 */ 51 */
46 Vector<String> buff=cmdexec.Run("/etc/init.d/networking restart"); 52 sshexec.setCmd("/etc/init.d/networking restart");
53
54 sshexec.Exec();
55
47 Msg msg=Msg.RestartEthSucc; 56 Msg msg=Msg.RestartEthSucc;
48 return msg.getCode(); 57 return msg.getCode();
49 }catch(Exception e) { 58 }catch(Exception e) {
......
...@@ -22,7 +22,7 @@ public class Reader { ...@@ -22,7 +22,7 @@ public class Reader {
22 22
23 try { 23 try {
24 fis = new FileInputStream(Paths.UTILSTOOLS_LOGFILE); 24 fis = new FileInputStream(Paths.UTILSTOOLS_LOGFILE);
25 reader = new BufferedReader(new InputStreamReader(fis)); 25 reader = new BufferedReader(new InputStreamReader(fis,"UTF8"));
26 String line = reader.readLine(); 26 String line = reader.readLine();
27 while(line != null){ 27 while(line != null){
28 result.add(line); 28 result.add(line);
......
...@@ -31,7 +31,6 @@ public class SvControl implements ISvControl { ...@@ -31,7 +31,6 @@ public class SvControl implements ISvControl {
31 this.svbean=svbean; 31 this.svbean=svbean;
32 this.sshexec=new SSHExec(); 32 this.sshexec=new SSHExec();
33 33
34
35 } 34 }
36 /* 35 /*
37 * Остановка процесса 36 * Остановка процесса
......