save
Showing
8 changed files
with
42 additions
and
24 deletions
| ... | @@ -58,12 +58,7 @@ Ext.define('App.controller.Dns', { | ... | @@ -58,12 +58,7 @@ Ext.define('App.controller.Dns', { |
| 58 | params: data, | 58 | params: data, |
| 59 | success: function(response, opts) { | 59 | success: function(response, opts) { |
| 60 | 60 | ||
| 61 | var Ok = Ext.JSON.decode(response.responseText); | 61 | |
| 62 | if (Ok) { | ||
| 63 | Ext.Msg.alert('Success', 'Сохранение выполнено успешно'); | ||
| 64 | }else { | ||
| 65 | Ext.Msg.alert('Failure', 'Ошибка сохранения'); | ||
| 66 | } | ||
| 67 | 62 | ||
| 68 | }, failure: function(response, opts) { | 63 | }, failure: function(response, opts) { |
| 69 | 64 | ... | ... |
| ... | @@ -15,18 +15,47 @@ Ext.define('App.controller.Gprs', { | ... | @@ -15,18 +15,47 @@ Ext.define('App.controller.Gprs', { |
| 15 | }); | 15 | }); |
| 16 | 16 | ||
| 17 | 17 | ||
| 18 | this.loadGprs(); | ||
| 19 | }, | ||
| 18 | 20 | ||
| 19 | 21 | ||
| 20 | this.loadGprs(); | 22 | saveGprs:function() { |
| 23 | |||
| 24 | var selected=Ext.getCmp('internetGprs').getValue(); | ||
| 25 | |||
| 26 | |||
| 27 | |||
| 28 | var data=Ext.util.JSON.encode(selected); | ||
| 29 | |||
| 30 | Ext.Ajax.request({ | ||
| 31 | method: "POST", | ||
| 32 | url: 'api/gsm/update', | ||
| 33 | headers: { | ||
| 34 | 'Accept': 'application/json', | ||
| 35 | 'Content-Type': 'application/json' | ||
| 36 | }, | ||
| 37 | params: data, | ||
| 38 | success: function(response, opts) { | ||
| 39 | |||
| 40 | var result = Ext.JSON.decode(response.responseText); | ||
| 41 | |||
| 42 | Ext.Msg.alert(result.type+" "+"Код-"+result.code,result.message); | ||
| 43 | |||
| 44 | }, failure: function(response, opts) { | ||
| 45 | Ext.Msg.alert('Ошибка', 'Сервер недоступен'); | ||
| 46 | } | ||
| 47 | }); | ||
| 21 | 48 | ||
| 22 | 49 | ||
| 23 | }, | 50 | }, |
| 24 | 51 | ||
| 25 | loadGprs:function() { | 52 | loadGprs:function() { |
| 26 | 53 | ||
| 54 | |||
| 55 | |||
| 27 | Ext.Ajax.request({ | 56 | Ext.Ajax.request({ |
| 28 | method: "GET", | 57 | method: "GET", |
| 29 | url: 'api/devcontrol/dateinfo', | 58 | url: 'api/gsm', |
| 30 | headers: { | 59 | headers: { |
| 31 | 'Accept': 'application/json', | 60 | 'Accept': 'application/json', |
| 32 | 'Content-Type': 'application/json' | 61 | 'Content-Type': 'application/json' |
| ... | @@ -36,11 +65,10 @@ Ext.define('App.controller.Gprs', { | ... | @@ -36,11 +65,10 @@ Ext.define('App.controller.Gprs', { |
| 36 | 65 | ||
| 37 | var result = Ext.JSON.decode(response.responseText); | 66 | var result = Ext.JSON.decode(response.responseText); |
| 38 | 67 | ||
| 39 | 68 | Ext.getCmp('internetGprs').setValue(result); | |
| 40 | // Ext.getCmp('dtCurrent').setValue(result.dt); | ||
| 41 | // Ext.getCmp('ntpServer').setValue(result.ntp); | ||
| 42 | 69 | ||
| 43 | }, failure: function(response, opts) { | 70 | }, failure: function(response, opts) { |
| 71 | Ext.Msg.alert('Ошибка', 'Сервер недоступен'); | ||
| 44 | } | 72 | } |
| 45 | }); | 73 | }); |
| 46 | 74 | ... | ... |
| ... | @@ -66,7 +66,7 @@ Ext.define('App.controller.MainConfig', { | ... | @@ -66,7 +66,7 @@ Ext.define('App.controller.MainConfig', { |
| 66 | 66 | ||
| 67 | var result = Ext.JSON.decode(response.responseText); | 67 | var result = Ext.JSON.decode(response.responseText); |
| 68 | 68 | ||
| 69 | Ext.Msg.alert(result.type+" "+"Код-"+result.code,result.message); | 69 | // Ext.Msg.alert(result.type+" "+"Код-"+result.code,result.message); |
| 70 | 70 | ||
| 71 | }, failure: function(response, opts) { | 71 | }, failure: function(response, opts) { |
| 72 | Ext.Msg.alert('Ошибка', 'Сервер недоступен'); | 72 | Ext.Msg.alert('Ошибка', 'Сервер недоступен'); | ... | ... |
| ... | @@ -82,7 +82,7 @@ Ext.define('App.controller.Proxy', { | ... | @@ -82,7 +82,7 @@ Ext.define('App.controller.Proxy', { |
| 82 | success: function(response, opts) { | 82 | success: function(response, opts) { |
| 83 | // proxyView.unmask(); | 83 | // proxyView.unmask(); |
| 84 | var result = Ext.JSON.decode(response.responseText); | 84 | var result = Ext.JSON.decode(response.responseText); |
| 85 | Ext.Msg.alert(result.type+" "+"Код-"+result.code,result.message); | 85 | // Ext.Msg.alert(result.type+" "+"Код-"+result.code,result.message); |
| 86 | 86 | ||
| 87 | }, failure: function(response, opts) { | 87 | }, failure: function(response, opts) { |
| 88 | proxyView.unmask(); | 88 | proxyView.unmask(); |
| ... | @@ -152,7 +152,7 @@ Ext.define('App.controller.Proxy', { | ... | @@ -152,7 +152,7 @@ Ext.define('App.controller.Proxy', { |
| 152 | } | 152 | } |
| 153 | 153 | ||
| 154 | 154 | ||
| 155 | Ext.Msg.alert('Успешно', 'Загрузка данных выполнена'); | 155 | // Ext.Msg.alert('Успешно', 'Загрузка данных выполнена'); |
| 156 | 156 | ||
| 157 | }, failure: function(response, opts) { | 157 | }, failure: function(response, opts) { |
| 158 | proxyView.unmask(); | 158 | proxyView.unmask(); | ... | ... |
| ... | @@ -45,7 +45,7 @@ Ext.define('App.view.Gprs', { | ... | @@ -45,7 +45,7 @@ Ext.define('App.view.Gprs', { |
| 45 | 45 | ||
| 46 | { | 46 | { |
| 47 | xtype: 'radiogroup', | 47 | xtype: 'radiogroup', |
| 48 | fieldLabel: 'Оператор связи', | 48 | fieldLabel: 'Оператор', |
| 49 | width:400, | 49 | width:400, |
| 50 | height:100, | 50 | height:100, |
| 51 | columns: 3, | 51 | columns: 3, |
| ... | @@ -54,22 +54,21 @@ Ext.define('App.view.Gprs', { | ... | @@ -54,22 +54,21 @@ Ext.define('App.view.Gprs', { |
| 54 | { | 54 | { |
| 55 | xtype: 'radiofield', | 55 | xtype: 'radiofield', |
| 56 | boxLabel: '<img src="resources/img/mts.png"/>', | 56 | boxLabel: '<img src="resources/img/mts.png"/>', |
| 57 | name: 'framework', | 57 | name: 'operator', |
| 58 | // checked: true, | ||
| 59 | width:100, | 58 | width:100, |
| 60 | inputValue: 'mts' | 59 | inputValue: 'mts' |
| 61 | }, | 60 | }, |
| 62 | { | 61 | { |
| 63 | xtype: 'radiofield', | 62 | xtype: 'radiofield', |
| 64 | boxLabel: '<img src="resources/img/megafon.png"/>', | 63 | boxLabel: '<img src="resources/img/megafon.png"/>', |
| 65 | name: 'framework', | 64 | name: 'operator', |
| 66 | width:100, | 65 | width:100, |
| 67 | inputValue: 'megafon' | 66 | inputValue: 'megafon' |
| 68 | }, | 67 | }, |
| 69 | { | 68 | { |
| 70 | xtype: 'radiofield', | 69 | xtype: 'radiofield', |
| 71 | boxLabel: '<img src="resources/img/beeline.png"/>', | 70 | boxLabel: '<img src="resources/img/beeline.png"/>', |
| 72 | name: 'framework', | 71 | name: 'operator', |
| 73 | width:100, | 72 | width:100, |
| 74 | inputValue: 'beeline' | 73 | inputValue: 'beeline' |
| 75 | } | 74 | } | ... | ... |
| ... | @@ -275,11 +275,6 @@ public class DevToolsBean extends RoundPanel implements Externalizable { | ... | @@ -275,11 +275,6 @@ public class DevToolsBean extends RoundPanel implements Externalizable { |
| 275 | 275 | ||
| 276 | }.execute(); | 276 | }.execute(); |
| 277 | 277 | ||
| 278 | |||
| 279 | |||
| 280 | |||
| 281 | |||
| 282 | |||
| 283 | } | 278 | } |
| 284 | } | 279 | } |
| 285 | 280 | ... | ... |
-
Please register or sign in to post a comment