Commit 0dbe71f2 0dbe71f2defc6e4db04398fffe5d0596dd2613be by root

Добавление функционала: перезагрузка, выключение, установка параметров

NTP 
1 parent 3a8d7501
Showing 31 changed files with 572 additions and 218 deletions
1 eclipse.preferences.version=1
2 encoding//src/main/webapp/WEB-INF/views/login.jsp=UTF-8
...@@ -128,19 +128,7 @@ ...@@ -128,19 +128,7 @@
128 <version>1.2</version> 128 <version>1.2</version>
129 </dependency> 129 </dependency>
130 130
131
132
133
134
135
136
137 131
138
139
140
141
142
143
144 132
145 <!-- Test --> 133 <!-- Test -->
146 <dependency> 134 <dependency>
...@@ -193,7 +181,11 @@ ...@@ -193,7 +181,11 @@
193 <version>1.0</version> 181 <version>1.0</version>
194 </dependency> 182 </dependency>
195 183
196 184 <dependency>
185 <groupId>org.emercit</groupId>
186 <artifactId>dtmanager</artifactId>
187 <version>1.2</version>
188 </dependency>
197 189
198 190
199 191
...@@ -201,6 +193,23 @@ ...@@ -201,6 +193,23 @@
201 </dependencies> 193 </dependencies>
202 194
203 195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
204 <repositories> 213 <repositories>
205 <!-- For testing against latest Spring snapshots --> 214 <!-- For testing against latest Spring snapshots -->
206 <repository> 215 <repository>
...@@ -226,7 +235,17 @@ ...@@ -226,7 +235,17 @@
226 235
227 236
228 237
229 <repository> 238
239
240
241 <repository>
242 <id>project.local</id>
243 <name>project</name>
244 <url>file:/root/git/hardwareconfig/DevTools/repo</url>
245 </repository>
246
247
248 <repository>
230 <id>org.repo.jfrog.artifactory.libs-releases</id> 249 <id>org.repo.jfrog.artifactory.libs-releases</id>
231 <name>Repository1</name> 250 <name>Repository1</name>
232 <url>http://repo.jfrog.org/artifactory/libs-releases</url> 251 <url>http://repo.jfrog.org/artifactory/libs-releases</url>
......
1 9b270266d406498c4c46a39cf6a66def
...\ No newline at end of file ...\ No newline at end of file
1 06a207b558d6eaed84033124b59981ecb7d71466
...\ 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>dtmanager</artifactId>
7 <version>1.1</version>
8 </project>
1 a4aa91f89ab51f76f964dea56f98dd86
...\ No newline at end of file ...\ No newline at end of file
1 8f121b8c03501fd42750867dfc24c41526faf68e
...\ No newline at end of file ...\ No newline at end of file
1 d866175ba3e831cb50eff67dccf1c5e3
...\ No newline at end of file ...\ No newline at end of file
1 0a9b721ea35bbe6d87e490184ca427a9a1326b04
...\ 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>dtmanager</artifactId>
7 <version>1.2</version>
8 </project>
1 0f3dd1c62f9bcdb88159382dd9ab1fc3
...\ No newline at end of file ...\ No newline at end of file
1 da6b0490fdc274c0533e0ce714355a10d620e177
...\ No newline at end of file ...\ No newline at end of file
1 <?xml version="1.0" encoding="UTF-8"?>
2 <metadata>
3 <groupId>org.emercit</groupId>
4 <artifactId>dtmanager</artifactId>
5 <versioning>
6 <release>1.2</release>
7 <versions>
8 <version>1.1</version>
9 <version>1.2</version>
10 </versions>
11 <lastUpdated>20150723083113</lastUpdated>
12 </versioning>
13 </metadata>
1 7b199d75cde3425e268a167addd233a7
...\ No newline at end of file ...\ No newline at end of file
1 42b5711bbb0d86f2ddb7e7352797848c0e39afeb
...\ No newline at end of file ...\ No newline at end of file
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.ResponseBody;
21 import org.springframework.web.bind.annotation.RequestBody;
22
23 import java.util.Vector;
24
25 import org.emercit.ethmanager.model.EthBean;
26 import org.emercit.proxymanager.model.ProxyBean;
27 import org.emercit.devinfo.model.DevInfoBean;
28 import org.emercit.devtools.service.DevInfoService;
29 import org.emercit.devtools.service.DnsService;
30 import org.emercit.devtools.service.EthService;
31 import org.emercit.dnsmanager.model.DnsBean;
32
33 import java.util.ArrayList;
34 import java.util.List;
35
36 import org.emercit.devtools.service.DevControlService;
37 import org.emercit.dtmanager.model.DateInfo;
38
39 @Controller
40 @RequestMapping("api")
41 public class DevControlController {
42
43 @RequestMapping(value="devcontrol/ntp" , method = RequestMethod.POST)
44 public @ResponseBody boolean changeNtp(@RequestBody DateInfo m) {
45
46 return DevControlService.INSTANCE.ChangeNtp(m.ntp);
47
48
49
50 }
51
52
53 @RequestMapping(value = "devcontrol/dateinfo", method = RequestMethod.GET)
54 public @ResponseBody DateInfo getDi() {
55
56
57 return DevControlService.INSTANCE.getDateInfo();
58
59 }
60
61
62
63
64
65 @RequestMapping(value = "devcontrol/reboot", method = RequestMethod.GET)
66 public @ResponseBody boolean DevReboot() {
67
68
69 DevControlService.INSTANCE.Reboot();
70
71 return true;
72
73 }
74
75
76
77 @RequestMapping(value = "devcontrol/calibration", method = RequestMethod.GET)
78 public @ResponseBody boolean DvCalibration() {
79
80
81 DevControlService.INSTANCE.Calibration();
82
83 return true;
84
85 }
86
87
88
89
90
91 }
92
93
94 /*
95 url: 'api/devcontrol/ntp',
96 url: 'api/devcontrol/reboot',
97 url: 'api/devcontrol/off',
98 url: 'api/devcontrol/dateinfo',
99 */
...\ No newline at end of file ...\ No newline at end of file
1 package org.emercit.devtools.service;
2
3 import org.emercit.devinfo.model.DevInfoBean;
4 import org.emercit.dtmanager.model.DateInfo;
5 import org.emercit.dtmanager.service.NtpLinux;
6
7 import java.util.Calendar;
8 import java.util.Date;
9 import java.util.TimeZone;
10 import java.text.SimpleDateFormat;
11
12 import org.emercit.pckutils.cmd.CmdExec;
13 import org.springframework.web.bind.annotation.RequestMapping;
14 import org.springframework.web.bind.annotation.RequestMethod;
15 import org.springframework.web.bind.annotation.ResponseBody;
16
17 public enum DevControlService {
18
19 INSTANCE;
20
21 private NtpLinux ntplinux= new NtpLinux();
22
23 private CmdExec cmdexec=new CmdExec();
24
25
26 public DateInfo getDateInfo() {
27 DateInfo dateinfo=new DateInfo();
28
29
30 dateinfo.ntp=ntplinux.getUseNtpServer();
31
32 Calendar calendar = Calendar.getInstance();
33
34 TimeZone.setDefault(TimeZone.getTimeZone("Europe/Moscow"));
35
36 TimeZone timeZone = calendar.getTimeZone();
37
38
39 Date date=calendar.getTime();
40 dateinfo.dt = new SimpleDateFormat("dd.MM.yyyy HH:mm:ss").format(new Date());
41
42 return dateinfo;
43 }
44
45
46 public boolean ChangeNtp(String value) {
47
48
49 boolean result=ntplinux.setUsNtpServer(value);
50
51 if (result) {
52
53 try { cmdexec.Run("/etc/init.d/ntp restart"); } catch (Exception e) {};
54 }
55
56 return result;
57 }
58
59
60
61 public void Reboot() {
62 try { cmdexec.Run("reboot"); } catch (Exception e) {};
63
64 }
65
66
67
68 public void Off() {
69 try { cmdexec.Run("shutdown -h now"); } catch (Exception e) {};
70
71 }
72
73 public void Calibration() {
74
75 try { cmdexec.Run("/opt/devtools/calibrator.sh"); } catch (Exception e) {};
76
77 }
78
79
80
81 }
...\ No newline at end of file ...\ No newline at end of file
...@@ -4,8 +4,5 @@ ...@@ -4,8 +4,5 @@
4 xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"> 4 xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
5 5
6 6
7
8 <!-- Файл с настройками безопасности -->
9 <import resource="security.xml" />
10 7
11 </beans> 8 </beans>
...\ No newline at end of file ...\ No newline at end of file
......
1 <beans:beans xmlns="http://www.springframework.org/schema/security"
2 xmlns:beans="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3 xsi:schemaLocation="http://www.springframework.org/schema/beans
4 http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
5 http://www.springframework.org/schema/security
6 http://www.springframework.org/schema/security/spring-security-3.0.xsd">
7
8
9 <http access-denied-page="/error403.jsp">
10 <intercept-url pattern="/" access="ROLE_USER,ROLE_ANONYMOUS" />
11 <intercept-url pattern="/add*" access="ROLE_USER" />
12 <intercept-url pattern="/delete/*" access="ROLE_ADMIN" />
13 <form-login login-page="/login.jsp" default-target-url="/index"
14 authentication-failure-url="/login.jsp?error=true" />
15 <logout logout-url="/logout" logout-success-url="/index" />
16
17 <anonymous username="guest" granted-authority="ROLE_ANONYMOUS" />
18 <remember-me />
19 </http>
20
21 <authentication-manager>
22 <authentication-provider>
23 <user-service>
24 <user name="admin" password="pass" authorities="ROLE_ADMIN,ROLE_USER" />
25 <user name="user1" password="1111" authorities="ROLE_USER" />
26 <user name="user2" password="2222" disabled="true" authorities="ROLE_USER" />
27 </user-service>
28 </authentication-provider>
29 </authentication-manager>
30
31
32
33 </beans:beans>
...\ No newline at end of file ...\ No newline at end of file
1 <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
2 <html>
3 <head></head>
4
5 <body>
6 <h1>Anonymous page</h1>
7
8 <a href="<c:url value="/login.html" />">To Login</a>
9 </body>
10 </html>
...\ No newline at end of file ...\ No newline at end of file
...@@ -48,6 +48,25 @@ ...@@ -48,6 +48,25 @@
48 } 48 }
49 49
50 50
51 .displayconfig {
52 background-image:url(resources/img/displayconfig.png) !important;
53 }
54
55
56 .datetime {
57 background-image:url(resources/img/datetime.png) !important;
58 }
59
60
61
62 .fieladtime {
63 background-image:none;
64 background-color:#FFFFCC;
65 color:red;
66
67 }
68
69
51 </style> 70 </style>
52 71
53 72
...@@ -55,20 +74,7 @@ ...@@ -55,20 +74,7 @@
55 <body> 74 <body>
56 75
57 76
58 <h1>This is the body of the sample view</h1>
59
60 <security:authorize access="hasRole('ROLE_USER')">
61 This text is only visible to a user
62 <br/>
63 </security:authorize>
64
65 <security:authorize access="hasRole('ROLE_ADMIN')">
66 This text is only visible to an admin
67 <br/>
68 </security:authorize>
69 77
70 <a href="<c:url value="/perform_logout" />">Logout</a>
71
72 78
73 79
74 </body> 80 </body>
......
1 <%@ page language="java" contentType="text/html; charset=utf8"
2 pageEncoding="utf8"%>
3 <%@taglib uri="http://www.springframework.org/tags" prefix="spring"%>
4 <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
5 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
6 <html>
7 <head>
8 <meta http-equiv="Content-Type" content="text/html; charset=utf8">
9 <title><spring:message code="label.title" /></title>
10 </head>
11 <body>
12
13 <a href="<c:url value="/index" />">
14 <spring:message code="label.contacts" />
15 </a><br/>
16
17 <c:if test="${not empty param.error}">
18 <font color="red"> <spring:message code="label.loginerror" />
19 : ${sessionScope["SPRING_SECURITY_LAST_EXCEPTION"].message} </font>
20 </c:if>
21 <form method="POST" action="<c:url value="/j_spring_security_check" />">
22 <table>
23 <tr>
24 <td align="right"><spring:message code="label.login" /></td>
25 <td><input type="text" name="j_username" /></td>
26 </tr>
27 <tr>
28 <td align="right"><spring:message code="label.password" /></td>
29 <td><input type="password" name="j_password" /></td>
30 </tr>
31 <tr>
32 <td align="right"><spring:message code="label.remember" /></td>
33 <td><input type="checkbox" name="_spring_security_remember_me" /></td>
34 </tr>
35 <tr>
36 <td colspan="2" align="right"><input type="submit" value="Login" />
37 <input type="reset" value="Reset" /></td>
38 </tr>
39 </table>
40 </form>
41 </body>
42 </html>
...\ No newline at end of file ...\ No newline at end of file
...@@ -207,6 +207,21 @@ Ext.application({ ...@@ -207,6 +207,21 @@ Ext.application({
207 207
208 208
209 209
210
211 {
212 title: 'СЕРВИСЫ',
213 items:[
214 {
215 region: 'center',
216 xtype: 'tabpanel',
217 items: [
218
219 ]
220
221 }
222 ]
223 },
224
210 /* 225 /*
211 { 226 {
212 title: 'ПЕРЕМЕННЫЕ', 227 title: 'ПЕРЕМЕННЫЕ',
...@@ -235,49 +250,8 @@ Ext.application({ ...@@ -235,49 +250,8 @@ Ext.application({
235 250
236 251
237 ] 252 ]
238 }, 253 } */
239 */ 254
240
241 /*
242 {
243 title: 'СЕРВИСЫ',
244 items:[
245 {
246 region: 'center',
247 xtype: 'tabpanel',
248 items: [
249 {
250 title: 'SNMP Клиент',
251 items:[]
252 },
253 {
254 title: 'SNMP Агент',
255 items:[]
256 }
257 ]
258
259 }
260 ]
261 }
262 */
263
264
265
266 {
267 title: 'СОХРАНЕНИЕ',
268 items:[
269 {
270 region: 'center',
271 xtype: 'tabpanel',
272 items: [
273
274 ]
275
276 }
277 ]
278 },
279
280
281 ] 255 ]
282 } 256 }
283 ] 257 ]
......
...@@ -10,35 +10,99 @@ Ext.define('App.controller.DeviceControl', { ...@@ -10,35 +10,99 @@ Ext.define('App.controller.DeviceControl', {
10 10
11 'toolbar button[action=DcReboot]' : { 11 'toolbar button[action=DcReboot]' : {
12 click : this.DcRebootClick 12 click : this.DcRebootClick
13 },
14
15 '#btnToolsTime': {
16 click: this.DcToolsTime
17 },
18 '#btnCalibration': {
19 click: this.Calibration
13 } 20 }
14 }); 21 });
15 22
23
24
25 Ext.Ajax.request({
26 method: "GET",
27 url: 'api/devcontrol/dateinfo',
28 headers: {
29 'Accept': 'application/json',
30 'Content-Type': 'application/json'
31 },
32
33 success: function(response, opts) {
34
35 var result = Ext.JSON.decode(response.responseText);
36
37
38 Ext.getCmp('dtCurrent').setValue(result.dt);
39 Ext.getCmp('ntpServer').setValue(result.ntp);
40
41 }, failure: function(response, opts) {
42 }
43 });
44
45
46 this.LoadDTParams();
47
48 Ext.TaskManager.start({
49 run: this.LoadDTParams,
50 interval: 15000 ,
51 scope: this
52 });
53
54 },
55
56
57
58
59 // timeout: 60000
60 LoadDTParams:function() {
61
62
63
64 // Ext.getCmp('fsdateinfo').mask('Обновление ...');
65 Ext.Ajax.request({
66 method: "GET",
67 url: 'api/devcontrol/dateinfo',
68 headers: {
69 'Accept': 'application/json',
70 'Content-Type': 'application/json'
71 },
72
73 success: function(response, opts) {
74
75 var result = Ext.JSON.decode(response.responseText);
76
77
78 Ext.getCmp('dtCurrent').setValue(result.dt);
79 // Ext.getCmp('ntpServer').setValue(result.ntp);
80
81 }, failure: function(response, opts) {
82 }
83 });
84
85
86
16 }, 87 },
17 88
89
90
91
18 DcOffClick:function() { 92 DcOffClick:function() {
19 93
20 Ext.getBody().mask('Выключение устройства ...'); 94 Ext.getBody().mask('Выключение устройства ...');
21 95
22 /* 96
23 Ext.Ajax.request({ 97 Ext.Ajax.request({
24 method: "GET", 98 method: "GET",
25 url: 'api/devinfo/', 99 url: 'api/devcontrol/off',
26 headers: { 100 headers: {
27 'Accept': 'application/json', 101 'Accept': 'application/json',
28 'Content-Type': 'application/json' 102 'Content-Type': 'application/json'
29 },
30
31 success: function(response, opts) {
32
33 var result = Ext.JSON.decode(response.responseText);
34
35 Ext.getCmp('guid').setValue(result.guid);
36 Ext.getCmp('title').setValue(result.description);
37
38 }, failure: function(response, opts) {
39 } 103 }
40 }); 104 });
41 */ 105
42 106
43 }, 107 },
44 108
...@@ -48,30 +112,101 @@ Ext.define('App.controller.DeviceControl', { ...@@ -48,30 +112,101 @@ Ext.define('App.controller.DeviceControl', {
48 112
49 Ext.getBody().mask('Перезагрузка устройства ...'); 113 Ext.getBody().mask('Перезагрузка устройства ...');
50 114
51 /* 115
52 Ext.Ajax.request({ 116 Ext.Ajax.request({
53 method: "GET", 117 method: "GET",
54 url: 'api/devinfo/', 118 url: 'api/devcontrol/reboot',
55 headers: { 119 headers: {
56 'Accept': 'application/json', 120 'Accept': 'application/json',
57 'Content-Type': 'application/json' 121 'Content-Type': 'application/json'
58 },
59
60 success: function(response, opts) {
61
62 //var result = Ext.JSON.decode(response.responseText);
63 Ext.getBody('Перезагрузка устройства ...');
64
65 // Ext.getCmp('guid').setValue(result.guid);
66 // Ext.getCmp('title').setValue(result.description);
67
68 }, failure: function(response, opts) {
69 } 122 }
70 }); 123 });
71 */ 124
72 125
73 126
74 } 127 },
128
129
130
131 Calibration : function() {
132
133
134 Ext.getCmp('fsdisplay').mask('Калибровка экрана...');
135
136
137 Ext.Ajax.request({
138 method: "GET",
139 url: 'api/devcontrol/calibration',
140 headers: {
141 'Accept': 'application/json',
142 'Content-Type': 'application/json'
143 },
144 success: function(response, opts) {
145
146 Ext.getCmp('fsdisplay').unmask();
147 }
148 });
149
150
151
152 },
153
154
155
156
157
158 DcToolsTime:function () {
159
160
161
162 Ext.getCmp('fsdateinfo').mask('Сохранение и перезапуск NTP ...');
163 var value=Ext.getCmp('ntpServer').getValue();
164
165 var m={
166 dt: '',
167 ntp: value
168 }
169
170
171
172 var data=Ext.util.JSON.encode(m);
173
174 Ext.Ajax.request({
175 method: "POST",
176 url: 'api/devcontrol/ntp',
177 headers: {
178 'Accept': 'application/json',
179 'Content-Type': 'application/json'
180 },
181 params: data,
182 success: function(response, opts) {
183
184 var result = Ext.JSON.decode(response.responseText);
185
186 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
201 }
202 });
203
204
205
206 }
207
208
209
75 }); 210 });
76 211
77 212
...@@ -97,4 +232,3 @@ Ext.define('App.controller.DeviceControl', { ...@@ -97,4 +232,3 @@ Ext.define('App.controller.DeviceControl', {
97 232
98 233
99 234
100
......
...@@ -21,6 +21,7 @@ Ext.define('App.controller.MainConfig', { ...@@ -21,6 +21,7 @@ Ext.define('App.controller.MainConfig', {
21 21
22 onLoadButtonClick:function() { 22 onLoadButtonClick:function() {
23 23
24
24 Ext.Ajax.request({ 25 Ext.Ajax.request({
25 method: "GET", 26 method: "GET",
26 url: 'api/devinfo/', 27 url: 'api/devinfo/',
...@@ -39,11 +40,15 @@ Ext.define('App.controller.MainConfig', { ...@@ -39,11 +40,15 @@ Ext.define('App.controller.MainConfig', {
39 }, failure: function(response, opts) { 40 }, failure: function(response, opts) {
40 } 41 }
41 }); 42 });
43
44
42 45
43 }, 46 },
44 47
45 48
46 onSaveButtonClick : function(btn) { 49 onSaveButtonClick : function(btn) {
50
51 Ext.getCmp('formmainconfig').mask('Загрузка...');
47 52
48 var mainconfigView = btn.up('mvvm-MainConfigView'); 53 var mainconfigView = btn.up('mvvm-MainConfigView');
49 54
...@@ -83,9 +88,9 @@ Ext.define('App.controller.MainConfig', { ...@@ -83,9 +88,9 @@ Ext.define('App.controller.MainConfig', {
83 }); 88 });
84 89
85 } 90 }
86 else { 91
87 // Ext.Msg.alert('Failure', 'Обновление конфигурации не выполнено!'); 92 Ext.getCmp('formmainconfig').unmask();
88 } 93
89 } 94 }
90 }); 95 });
91 96
......
...@@ -20,13 +20,7 @@ Ext.define('App.controller.NetworkSetting', { ...@@ -20,13 +20,7 @@ Ext.define('App.controller.NetworkSetting', {
20 20
21 21
22 22
23 /* 23
24 Ext.TaskManager.start({
25 run: this.ReloadData,
26 interval: 10000 ,
27 scope: this
28 });
29 */
30 }, 24 },
31 25
32 26
......
...@@ -11,23 +11,116 @@ Ext.define('App.view.DeviceControl', { ...@@ -11,23 +11,116 @@ Ext.define('App.view.DeviceControl', {
11 }, 11 },
12 12
13 13
14 bbar: {items: [{ 14 tbar: {items: [
15 xtype: 'button', 15 {
16 iconCls:'off', 16 xtype: 'button',
17 itemId: 'btnOffDc', 17 iconCls:'off',
18 text: 'Выключить', 18 itemId: 'btnOffDc',
19 action: 'DcOff', 19 text: 'Выключить',
20 disabled:false 20 action: 'DcOff',
21 }, 21 disabled:false
22 { 22 },
23 xtype: 'button', 23 {
24 iconCls:'restart', 24 xtype: 'button',
25 itemId: 'btnRebootDc', 25 iconCls:'restart',
26 text: 'Перезагрузить', 26 itemId: 'btnRebootDc',
27 action: 'DcReboot', 27 text: 'Перезагрузить',
28 disabled:false 28 action: 'DcReboot',
29 }] 29 disabled:false
30 }
31 ]
30 }, 32 },
31 33
32 items : [] 34 items : [{
35 xtype:'fieldset',
36 title: 'Экран',
37 id:"fsdisplay",
38 collapsed: false,
39 width:150,
40 padding:'5 5 5 5',
41 // layout: 'anchor',
42 defaults: {
43 // anchor: '100%'
44 },
45 items :[{
46 xtype: 'button',
47 iconCls:'displayconfig',
48 id: 'btnCalibration',
49 text: 'Калибровка',
50 width:120,
51 disabled:false
52 }]
53 },
54
55
56
57 {
58 xtype:'fieldset',
59 // title: 'Дата/время',
60 width:350,
61 id:'fsdateinfo',
62 collapsed: false,
63 padding:'5 5 5 5',
64 // layout: 'anchor',
65 defaults: {
66 // anchor: '100%'
67 },
68 items :[
69
70 {
71 xtype: 'textfield',
72 id: 'dtCurrent',
73 fieldLabel: "Дата/время",
74 value: '',
75 margin:'5 0 5 5',
76 fieldStyle : "color:red",
77 allowBlank: false
78 },
79
80
81 {
82 xtype: 'textfield',
83 id: 'ntpServer',
84 fieldLabel: "NTP сервер",
85 value: '',
86 margin:'5 0 5 5',
87
88 allowBlank: false
89 },
90
91
92 // {
93 // xtype: 'fieldcontainer',
94 // layout: 'hbox',
95 // padding:'5 5 5 5',
96 // items: [
97
98 {
99 xtype: 'button',
100 iconCls:'save',
101 id: 'btnToolsTime',
102 text: 'Применить',
103 margin:'5 0 5 5',
104 width:120,
105
106 disabled:false
107 }
108
109
110 ]
111 }
112
113
114
115 // ]
116 // }
117
118
119
120
121
122
123
124
125 ]
33 }); 126 });
...\ No newline at end of file ...\ No newline at end of file
......