Commit e73ffa3fa432b16edd518f32fac9d90d3eabc841

Authored by Elena.Budnik
1 parent 4de70623

IMPEX in js modifs

js/app/models/RemoteSimuParamNode.js
... ... @@ -102,7 +102,6 @@ Ext.define('amdaModel.RemoteSimuParamNode', {
102 102  
103 103 getAllContextMenuItems: function()
104 104 {
105   - // TODO use 'isAddable' attribute
106 105 if (this.get('isAddable'))
107 106 return Ext.Array.push(this.allMenuItems(),
108 107 { fnId : 'dire-addData',
... ...
js/app/views/InteropImpexUI.js
1 1 /**
2 2 * Project  : AMDA-NG
3 3 * Name : InteropImpexUI.js
4   - * @class amdaUI.InteropImpexUI
5   - * @extends Ext.form.Panel
  4 + * @class amdaUI.InteropImpexUI
  5 + * @extends Ext.container.Container
6 6 * @brief
7 7 * @author Elena
8 8 * @version $Id: InteropImpexUI.js 2327 2014-04-29 08:47:22Z natacha $
9 9 */
10 10  
11 11 Ext.define('amdaUI.InteropImpexUI',{
12   - extend: 'Ext.container.Container',
13   - alias: 'widget.interop_impex',
14   -
15   - requires: [ 'Ext.ux.CheckColumn'],
  12 + extend: 'Ext.container.Container',
  13 + alias: 'widget.interop_impex',
  14 +
  15 + nodeDataModel : 'amdaModel.remoteSimuParamNode',
  16 + linkedNode : null,
16 17  
17   - nodeDataModel : 'amdaModel.remoteSimuParamNode',
18   - linkedNode : null,
  18 + setLinkedNode : function (myLinkedNode)
  19 + {
  20 + this.linkedNode = myLinkedNode;
  21 + },
19 22  
20   - setLinkedNode : function (myLinkedNode){
21   - this.linkedNode = myLinkedNode;
22   - },
  23 + saveCallback: function(res,e)
  24 + {
  25 + loadMask.hide();
  26 + //if success
  27 + if(e.status && res.success)
  28 + {
  29 + // reload RemoteParam Tree in explorer
  30 + var explorerTree = Ext.getCmp(amdaUI.ExplorerUI.RESRC_TAB.TREE_ID);
  31 + if (explorerTree && this.linkedNode )
  32 + {
  33 + var explorerTreeStore = explorerTree.getStore();
  34 + var explorerRoot = explorerTreeStore.getRootNode();
  35 + var updatedId = this.linkedNode.get('id');
  36 + var explorerPath = '/root/parameters-treeBase/myRemoteSimuData-treeRootNode/'+updatedId+'/';
  37 +
  38 + explorerTreeStore.load({ node : explorerRoot,
  39 + params : { nodeType: 'resources'},
  40 + callback : function()
  41 + {
  42 + explorerTree.selectPath(explorerPath);
  43 + }
  44 + });
  45 + }
  46 + }
  47 + else {
  48 + myDesktopApp.errorMsg(res.message);
  49 + }
  50 + },
23 51  
24   - saveCallback: function(res,e)
25   - {
26   - loadMask.hide();
27   - //if success
28   - if(e.status)
29   - {
30   - // reload RemoteParam Tree in explorer
31   - var explorerTree = Ext.getCmp(amdaUI.ExplorerUI.RESRC_TAB.TREE_ID);
32   - if (explorerTree && this.linkedNode )
33   - {
34   - var explorerTreeStore = explorerTree.getStore();
35   - var explorerRoot = explorerTreeStore.getRootNode();
36   - var updatedId = this.linkedNode.get('id');
37   - var explorerPath = '/root/parameters-treeBase/myRemoteSimuData-treeRootNode/'+updatedId+'/';
38   -
39   - explorerTreeStore.load({ node : explorerRoot,
40   - params : { nodeType: 'resources'},
41   - callback : function(){
42   - explorerTree.selectPath(explorerPath);
43   - }
44   - });
45   - }
46   - }
47   - //TODO error processing
48   - else {
49   - }
50   - },
  52 + /*
  53 + * UI components description / creation
  54 + */
  55 + initComponent : function()
  56 + {
  57 + var targetStore = Ext.create('Ext.data.Store', {
  58 + fields: ['target'],
  59 + data : [
  60 + { target: 'Earth' }
  61 + /* { target: 'Mars' },
  62 + { target: 'Venus' } */
  63 + ]
  64 + });
51 65  
52   - /*
53   - * UI components description / creation
54   - */
55   - initComponent : function()
56   - {
57   - //TODO Earth Only ???
58   - var targetStore = Ext.create('Ext.data.Store', {
59   - fields: ['target'],
60   - data : [
61   - { target: 'Earth' }
62   - /* { target: 'Mars' },
63   - { target: 'Venus' } */
64   - ]
65   - });
66   -
67   - var table = Ext.create('Ext.form.Panel', {
68   - bodyStyle:'padding:5px 5px 5px',
69   - layout:
70   - {
71   - type: 'table',
72   - columns: 7
73   - },
74   - defaults:
75   - {
76   - xtype: 'displayfield',
77   - bodyStyle: 'padding:20px',
78   - hideTrigger: true
79   - },
80   - items: [
81   - // header
82   - { width : 110},
83   - { value: 'value', width : 65 },
84   - { width : 20 },
85   - { value: 'weight' , width : 65},
86   - { width : 20},
87   - { value: 'scale', width : 65 },
88   - { width : 20 },
89   -
90   - { value: 'Density' },
91   - { xtype: 'numberfield', name : 'SW_Density_value', width: 50 },
92   - { value: ' *10^6m-3 ' },
93   - { xtype: 'numberfield', name : 'SW_Density_weight' , value: '1.0' , width: 50 },
94   - { value: ' ' },
95   - { xtype: 'numberfield', name: 'SW_Density_scale' , value: '7' , width: 50 },
96   - { value: ' *10^6m-3 '},
97   -
98   - { value: 'Utot' },
99   - { xtype: 'numberfield', name : 'SW_Utot_value' , width: 50 } ,
100   - { value: ' *10^3 m/s ' },
101   - { xtype: 'numberfield', name : 'SW_Utot_weight' , value: '1.0' , width: 50 },
102   - { value: ' ' },
103   - { xtype: 'numberfield', name: 'SW_Utot_scale' , value: '430' , width: 50 },
104   - { value: ' *10^3 m/s ' },
105   -
106   - { value: 'Btot' },
107   - { xtype: 'numberfield', name : 'SW_Btot_value' , width: 50 } ,
108   - { value: ' *10^-9 T ' },
109   - { xtype: 'numberfield', name : 'SW_Btot_weight' , value: '1.0' , width: 50 },
110   - { value: ' ' },
111   - { xtype: 'numberfield', name: 'SW_Btot_scale' , value: '6' , width: 50 },
112   - { value: ' *10^-9 T ' },
113   -
114   - { value: 'Temperature' },
115   - { xtype: 'numberfield', name : 'SW_Temperature_value' , width: 50 } ,
116   - { value: ' *10^3K ' },
117   - { xtype: 'numberfield', name : 'SW_Temperature_weight' , value: '1.0' , width: 50 },
118   - { value: ' ' },
119   - { xtype: 'numberfield', name: 'SW_Temperature_scale' , value: '80' , width: 50 },
120   - { value: ' *10^3K ' },
121   -
122   - { value: 'Bx' },
123   - { xtype: 'numberfield', name : 'SW_Bx_value' , width: 50 } ,
124   - { value: ' *10^-9 T ' },
125   - { xtype: 'numberfield', name : 'SW_Bx_weight' , value: '1.0' , width: 50 },
126   - { value: ' ' },
127   - { xtype: 'numberfield', name: 'SW_Bx_scale' , value: '6' , width: 50 },
128   - { value: ' *10^-9 T ' },
129   -
130   - { value: 'By' },
131   - { xtype: 'numberfield', name : 'SW_By_value' , width: 50 } ,
132   - { value: ' *10^-9 T ' },
133   - { xtype: 'numberfield', name : 'SW_By_weight' , value: '1.0' , width: 50 },
134   - { value: ' ' },
135   - { xtype: 'numberfield', name: 'SW_By_scale' , value: '6' , width: 50 },
136   - { value: ' *10^-9 T ' },
137   -
138   - { value: 'Bz' },
139   - { xtype: 'numberfield', name : 'SW_Bz_value' , width: 50 } ,
140   - { value: ' *10^-9 T ' },
141   - { xtype: 'numberfield', name : 'SW_Bz_weight' , value: '1.0' , width: 50 },
142   - { value: ' ' },
143   - { xtype: 'numberfield', name: 'SW_Bz_scale' , value: '6' , width: 50 },
144   - { value: ' *10^-9 T ' },
145   -
146   - { value: 'Function' },
147   - { xtype: 'numberfield', name : 'SW_Function_value' , width: 50 } ,
148   - { value: ' ' },
149   - { xtype: 'numberfield', name : 'SW_Function_weight' , value: '1.0' , width: 50 },
150   - { value: ' ' },
151   - { xtype: 'numberfield', name: 'SW_Function_scale' , width: 50 },
152   - { xtype: 'textfield', name: 'SW_Function_formule' }
153   - ]
154   - });
  66 + var widthH = 110;
  67 + var table = Ext.create('Ext.form.Panel', {
  68 + bodyStyle:'padding:5px 5px 5px',
  69 + layout:
  70 + {
  71 + type: 'table',
  72 + columns: 5
  73 + },
  74 + defaults:
  75 + {
  76 + xtype: 'displayfield',
  77 + bodyStyle: 'padding:20px',
  78 + hideTrigger: true,
  79 + width : 40
  80 + },
  81 + items: [
  82 + // header
  83 + { width : widthH},
  84 + { value: 'value', width : 65 },
  85 + { value: 'weight' , width : 65},
  86 + { value: 'scale', width : 65 },
  87 + { width : 20 },
  88 + { value: 'SW Density', width : widthH},
  89 + { xtype: 'numberfield', name : 'SW_Density_value'},
  90 + { xtype: 'numberfield', name : 'SW_Density_weight' , value: '1.0'},
  91 + { xtype: 'numberfield', name: 'SW_Density_scale' , value: '7'},
  92 + { value: ' cm-3 '},
  93 + { value: 'SW Velocity', width : widthH },
  94 + { xtype: 'numberfield', name : 'SW_Utot_value'} ,
  95 + { xtype: 'numberfield', name : 'SW_Utot_weight' , value: '1.0'},
  96 + { xtype: 'numberfield', name: 'SW_Utot_scale' , value: '430'},
  97 + { value: ' km/s ' },
  98 + { value: 'SW Temperature', width : widthH },
  99 + { xtype: 'numberfield', name : 'SW_Temperature_value'} ,
  100 + { xtype: 'numberfield', name : 'SW_Temperature_weight' , value: '1.0'},
  101 + { xtype: 'numberfield', name: 'SW_Temperature_scale' , value: '7' },
  102 + { value: ' eV ' },
  103 + { value: 'IMF Bx' , width : widthH},
  104 + { xtype: 'numberfield', name : 'SW_Bx_value'} ,
  105 + { xtype: 'numberfield', name : 'SW_Bx_weight' , value: '1.0'},
  106 + { xtype: 'numberfield', name: 'SW_Bx_scale' , value: '6'},
  107 + { value: ' nT ' },
  108 + { value: 'IMF By', width : widthH },
  109 + { xtype: 'numberfield', name : 'SW_By_value' , width: 50 } ,
  110 + { xtype: 'numberfield', name : 'SW_By_weight' , value: '1.0'},
  111 + { xtype: 'numberfield', name: 'SW_By_scale' , value: '6'},
  112 + { value: ' nT ' },
  113 + { value: 'IMF Bz', width : widthH },
  114 + { xtype: 'numberfield', name : 'SW_Bz_value'} ,
  115 + { xtype: 'numberfield', name : 'SW_Bz_weight' , value: '1.0'},
  116 + { xtype: 'numberfield', name: 'SW_Bz_scale' , value: '6'},
  117 + { value: ' nT ' },
  118 + { value: 'IMF Btot', width : widthH },
  119 + { xtype: 'numberfield', name : 'SW_Btot_value'} ,
  120 + { xtype: 'numberfield', name : 'SW_Btot_weight' , value: '1.0'},
  121 + { xtype: 'numberfield', name: 'SW_Btot_scale' , value: '6'},
  122 + { value: ' nT ' },
  123 + { value: 'Function', width : widthH },
  124 + { xtype: 'numberfield', name : 'SW_Function_value'} ,
  125 + { xtype: 'numberfield', name : 'SW_Function_weight' , value: '1.0'},
  126 + { xtype: 'numberfield', name: 'SW_Function_scale'},
  127 + { xtype: 'textfield', name: 'SW_Function_formule', width : 200 }
  128 + ]
  129 + });
155 130  
156   - var inputForm = Ext.create(Ext.form.Panel, {
157   - bodyStyle:'padding:5px 5px 5px',
158   - title: 'Based on a FMI algorithm',
159   - items: [
160   - {
161   - xtype : 'combo', name: 'Object',
162   - store : targetStore,
163   - displayField: 'target', valueField: 'target', value: 'Earth' , width: 170 ,
164   - fieldLabel: 'Object', queryMode: 'local'
165   - },
166   - {
167   - xtype : 'numberfield', name : 'RunCount', value: 1 , width: 170 ,
168   - fieldLabel: 'RunCount'
169   - },
170   - table
171   - ],
172   - fbar: [
173   - {
174   - text: 'Get Runs',
175   - scope: this,
176   - handler: function()
177   - {
178   - var values = this.down('form').getForm().getValues();
179   - var i = 0;
180   - var j = 0;
181   - var nullValues = new Array();
182   - var hasValues = new Array();
183   - for (key in values) {
184   - if (values.hasOwnProperty(key)) {
185   -
186   - if (values[key] == ''){
187   - nullValues[i] = key;
188   - i++;
189   - }
190   - else {
191   - hasValues[j] = key;
192   - j++;
  131 + var inputForm = Ext.create(Ext.form.Panel, {
  132 + bodyStyle:'padding:5px 5px 5px',
  133 + title: 'Based on a FMI algorithm',
  134 + items: [
  135 + {
  136 + xtype : 'combo', name: 'Object',
  137 + store : targetStore,
  138 + displayField: 'target', valueField: 'target', value: 'Earth Magnetosphere' , width: 250 ,
  139 + fieldLabel: 'Simulated Region', queryMode: 'local'
  140 + },
  141 + {
  142 + xtype : 'numberfield', name : 'RunCount', value: 1 , width: 250 , minValue : 1,
  143 + fieldLabel: 'Runs Number'
  144 + },
  145 + table
  146 + ],
  147 + fbar: [
  148 + {
  149 + text: 'Get Runs',
  150 + scope: this,
  151 + handler: function()
  152 + {
  153 + var values = this.down('form').getForm().getValues();
  154 + var i = 0;
  155 + var j = 0;
  156 + var nullValues = new Array();
  157 + var hasValues = new Array();
  158 + for (key in values)
  159 + {
  160 + if (values.hasOwnProperty(key))
  161 + {
  162 + if (values[key] == ''){
  163 + nullValues[i] = key;
  164 + i++;
  165 + }
  166 + else {
  167 + hasValues[j] = key;
  168 + j++;
  169 + }
  170 + }
  171 + }
  172 + var index;
  173 + for (key in nullValues)
  174 + {
  175 + // console.log(key + ": " + nullValues[key]);
  176 + var index;
  177 + for (index = 0; index < resOutput.columns.length; ++index)
  178 + {
  179 + if (resOutput.columns[index].items)
  180 + {
  181 + if (resOutput.columns[index].items.items[1] && resOutput.columns[index].items.items[1].dataIndex)
  182 + {
  183 + if (resOutput.columns[index].items.items[1].dataIndex == nullValues[key])
  184 + {
  185 + resOutput.columns[index].items.items[0].hidden = true;
  186 + resOutput.columns[index].items.items[0].setText("");
  187 + }
  188 + if (resOutput.columns[index].items.items[1].dataIndex == hasValues[key])
  189 + {
  190 + resOutput.columns[index].items.items[0].hidden = false;
  191 + resOutput.columns[index].items.items[0].setText("Diff. index");
  192 + }
  193 + }
  194 + }
  195 + }
  196 + }
  197 + resOutput.update();
  198 + loadMask.show();
  199 +
  200 + AmdaAction.getRun(values, function(res,e){
  201 + loadMask.hide();
  202 + //success
  203 + if(e.status)
  204 + {
  205 + resStore.load();
  206 + resOutput.show();
  207 + }
  208 + //TODO error processing
  209 + else {}
  210 + }, this);
  211 + }
  212 + }]
  213 + });
  214 +
  215 + var resStore = Ext.create('Ext.data.Store', {
  216 + fields:[ { name : 'ToAdd', type : 'bool', defaultValue : false},
  217 + 'ResourceID', 'ResourceName', 'S_diff',
  218 + { name : 'S_diff_n_SW_Density', mapping : 'S_diff_n.SW_Density' },
  219 + { name : 'SW_Density_value', mapping : 'Param_values.SW_Density' },
  220 + { name : 'S_diff_n_SW_Utot', mapping : 'S_diff_n.SW_Utot' },
  221 + { name : 'SW_Utot_value', mapping : 'Param_values.SW_Utot' },
  222 + { name : 'S_diff_n_SW_Btot', mapping : 'S_diff_n.SW_Btot' },
  223 + { name : 'SW_Btot_value', mapping : 'Param_values.SW_Btot' },
  224 + { name : 'S_diff_n_SW_Temperature', mapping : 'S_diff_n.SW_Temperature' },
  225 + { name : 'SW_Temperature_value', mapping : 'Param_values.SW_Temperature' },
  226 + { name : 'S_diff_n_SW_Bx', mapping : 'S_diff_n.SW_Bx' },
  227 + { name : 'SW_Bx_value', mapping : 'Param_values.SW_Bx' },
  228 + { name : 'S_diff_n_SW_By', mapping : 'S_diff_n.SW_By' },
  229 + { name : 'SW_By_value', mapping : 'Param_values.SW_By' },
  230 + { name : 'S_diff_n_SW_Bz', mapping : 'S_diff_n.SW_Bz' },
  231 + { name : 'SW_Bz_value', mapping : 'Param_values.SW_Bz' }
  232 + ],
  233 + proxy: {
  234 + type: 'ajax',
  235 + //TODO use sessionID user-dependent URL
  236 + url: 'data/'+sessionID+'/WS/runs.json',
  237 + reader: {
  238 + type: 'json',
  239 + root: 'runs',
  240 + idProperty: 'ResourceID'
193 241 }
194   - }
195 242 }
196   - var index;
197   - for (key in nullValues) {
198   -// console.log(key + ": " + nullValues[key]);
199   -
200   - var index;
201   - for (index = 0; index < resOutput.columns.length; ++index) {
202   - if (resOutput.columns[index].items){
203   - if (resOutput.columns[index].items.items[1] && resOutput.columns[index].items.items[1].dataIndex) {
204   - if (resOutput.columns[index].items.items[1].dataIndex == nullValues[key]) {
205   - resOutput.columns[index].items.items[0].hidden = true;
206   - resOutput.columns[index].items.items[0].setText("");
207   - }
208   - if (resOutput.columns[index].items.items[1].dataIndex == hasValues[key]) {
209   - resOutput.columns[index].items.items[0].hidden = false;
210   - resOutput.columns[index].items.items[0].setText("Diff. index");
211   - }
212   - }
213   - }
214   - }
215   - }
216   - resOutput.update();
217   - loadMask.show();
218   - AmdaAction.getRun(values, function(res,e){
219   - loadMask.hide();
220   - //success
221   - if(e.status)
222   - {
223   - resStore.load();
224   - resOutput.show();
225   - }
226   - //TODO error processing
227   - else {}
228   - }, this);
229   - }
230   - }]
231   - });
232   -
233   - var resStore = Ext.create('Ext.data.Store', {
234   - fields:[ { name : 'ToAdd', type : 'bool', defaultValue : false},
235   - 'ResourceID', 'ResourceName', 'S_diff',
236   - { name : 'S_diff_n_SW_Density', mapping : 'S_diff_n.SW_Density' },
237   - { name : 'SW_Density_value', mapping : 'Param_values.SW_Density' },
238   - { name : 'S_diff_n_SW_Utot', mapping : 'S_diff_n.SW_Utot' },
239   - { name : 'SW_Utot_value', mapping : 'Param_values.SW_Utot' },
240   - { name : 'S_diff_n_SW_Btot', mapping : 'S_diff_n.SW_Btot' },
241   - { name : 'SW_Btot_value', mapping : 'Param_values.SW_Btot' },
242   - { name : 'S_diff_n_SW_Temperature', mapping : 'S_diff_n.SW_Temperature' },
243   - { name : 'SW_Temperature_value', mapping : 'Param_values.SW_Temperature' },
244   - { name : 'S_diff_n_SW_Bx', mapping : 'S_diff_n.SW_Bx' },
245   - { name : 'SW_Bx_value', mapping : 'Param_values.SW_Bx' },
246   - { name : 'S_diff_n_SW_By', mapping : 'S_diff_n.SW_By' },
247   - { name : 'SW_By_value', mapping : 'Param_values.SW_By' },
248   - { name : 'S_diff_n_SW_Bz', mapping : 'S_diff_n.SW_Bz' },
249   - { name : 'SW_Bz_value', mapping : 'Param_values.SW_Bz' }
250   - ],
251   - proxy: {
252   - type: 'ajax',
253   - //TODO use sessionID user-dependent URL
254   - url: 'data/'+sessionID+'/WS/runs.json',
255   - reader: {
256   - type: 'json',
257   - root: 'runs',
258   - idProperty: 'ResourceID'
259   - }
260   - }
261   - });
262   -
263   - var columns = [
264   - {
265   - xtype : 'checkcolumn',
266   - menuDisabled: true,
267   - sortable: false,
268   - dataIndex : 'ToAdd',
269   - width: 30
270   - },
271   - {
272   - text : 'Run Name',
273   - sortable : false,
274   - dataIndex: 'ResourceName',
275   - width: 150
276   - },{
277   - text : 'Total diff. index',
278   - sortable : true,
279   - dataIndex: 'S_diff'
280   - },
281   - {
282   - text: 'SW_Density',
283   - columns: [{
284   - text : 'Diff. index',
285   - width : 75,
286   - dataIndex: 'S_diff_n_SW_Density'
287   - }, {
288   - text : 'Value',
289   - width : 80,
290   - dataIndex: 'SW_Density_value'
291   - }]
292   - },
293   - {
294   - text: 'SW_Utot',
295   - columns: [{
296   - text : 'Diff. index',
297   - width : 75,
298   - dataIndex: 'S_diff_n_SW_Utot'
299   - }, {
300   - text : 'Value',
301   - width : 80,
302   - dataIndex: 'SW_Utot_value'
303   - }]
304   - },
305   - {
306   - text: 'SW_Temperature',
307   - columns: [{
308   - text : 'Diff. index',
309   - width : 75,
310   - dataIndex: 'S_diff_n_SW_Temperature'
311   - }, {
312   - text : 'Value',
313   - width : 80,
314   - dataIndex: 'SW_Temperature_value'
315   - }]
316   - },
317   - {
318   - text: 'SW_Btot',
319   - columns: [{
320   - text : 'Diff. index',
321   - width : 75,
322   - dataIndex: 'S_diff_n_SW_Btot'
323   - }, {
324   - text : 'Value',
325   - width : 80,
326   - dataIndex: 'SW_Btot_value'
327   - }]
328   - },
329   - {
330   - text: 'SW_Bx',
331   - columns: [{
332   - text : 'Diff. index',
333   - width : 75,
334   - dataIndex: 'S_diff_n_SW_Bx'
335   - }, {
336   - text : 'Value',
337   - width : 80,
338   - dataIndex: 'SW_Bx_value'
339   - }]
340   - },
341   - {
342   - text: 'SW_By',
343   - columns: [{
344   - text : 'Diff. index',
345   - width : 75,
346   - dataIndex: 'S_diff_n_SW_By'
347   - }, {
348   - text : 'Value',
349   - width : 80,
350   - dataIndex: 'SW_By_value'
351   - }]
352   - },
353   - {
354   - text: 'SW_Bz',
355   - columns: [{
356   - text : 'Diff. index',
357   - width : 75,
358   - dataIndex: 'S_diff_n_SW_Bz'
359   - }, {
360   - text : 'Value',
361   - width : 80,
362   - dataIndex: 'SW_Bz_value'
363   - }]
364   - }
  243 + });
  244 +
  245 + var checkcolumn = Ext.create('Ext.grid.column.Check',{ menuDisabled: true,
  246 + sortable: false, dataIndex : 'ToAdd', width: 30, activeitem : 0});
  247 +
  248 + var columns = [
  249 + checkcolumn,
  250 + {
  251 + text : 'Run Name',
  252 + sortable : false,
  253 + dataIndex: 'ResourceName',
  254 + width: 150
  255 + },
  256 + {
  257 + text : 'Diff. index',
  258 + sortable : true,
  259 + dataIndex: 'S_diff',
  260 + width : 50
  261 + },
  262 + {
  263 + text: 'SW_Density',
  264 + columns: [{
  265 + text : 'Diff. index',
  266 + width : 50,
  267 + dataIndex: 'S_diff_n_SW_Density'
  268 + }, {
  269 + text : 'Value',
  270 + width : 50,
  271 + dataIndex: 'SW_Density_value'
  272 + }]
  273 + },
  274 + {
  275 + text: 'SW_Utot',
  276 + columns: [{
  277 + text : 'Diff. index',
  278 + width : 50,
  279 + dataIndex: 'S_diff_n_SW_Utot'
  280 + }, {
  281 + text : 'Value',
  282 + width : 50,
  283 + dataIndex: 'SW_Utot_value'
  284 + }]
  285 + },
  286 + {
  287 + text: 'SW_Temperature',
  288 + columns: [{
  289 + text : 'Diff. index',
  290 + width : 50,
  291 + dataIndex: 'S_diff_n_SW_Temperature'
  292 + }, {
  293 + text : 'Value',
  294 + width : 50,
  295 + dataIndex: 'SW_Temperature_value'
  296 + }]
  297 + },
  298 + {
  299 + text: 'SW_Btot',
  300 + columns: [{
  301 + text : 'Diff. index',
  302 + width : 50,
  303 + dataIndex: 'S_diff_n_SW_Btot'
  304 + }, {
  305 + text : 'Value',
  306 + width : 50,
  307 + dataIndex: 'SW_Btot_value'
  308 + }]
  309 + },
  310 + {
  311 + text: 'SW_Bx',
  312 + columns: [{
  313 + text : 'Diff. index',
  314 + width : 50,
  315 + dataIndex: 'S_diff_n_SW_Bx'
  316 + }, {
  317 + text : 'Value',
  318 + width : 50,
  319 + dataIndex: 'SW_Bx_value'
  320 + }]
  321 + },
  322 + {
  323 + text: 'SW_By',
  324 + columns: [{
  325 + text : 'Diff. index',
  326 + width : 50,
  327 + dataIndex: 'S_diff_n_SW_By'
  328 + }, {
  329 + text : 'Value',
  330 + width : 50,
  331 + dataIndex: 'SW_By_value'
  332 + }]
  333 + },
  334 + {
  335 + text: 'SW_Bz',
  336 + columns: [{
  337 + text : 'Diff. index',
  338 + width : 75,
  339 + dataIndex: 'S_diff_n_SW_Bz'
  340 + }, {
  341 + text : 'Value',
  342 + width : 80,
  343 + dataIndex: 'SW_Bz_value'
  344 + }]
  345 + }
365 346 ];
366 347  
367   - var cellEditing = Ext.create('Ext.grid.plugin.CellEditing');
  348 + var cellEditing = Ext.create('Ext.grid.plugin.CellEditing');
368 349  
369   - var resOutput = Ext.create('Ext.grid.Panel', {
370   - title: 'Runs Info',
371   - columns: columns,
372   - store: resStore,
373   - scroll: 'both',
374   - hidden : true,
375   - selModel: {
376   - selType: 'cellmodel'
377   - },
378   - fbar: [
379   - {
380   - text: 'Save Runs',
381   - scope: this,
382   - handler: function()
383   - {
384   - var me = this;
385   - var runsToAdd = resStore.getModifiedRecords();
386   - var values = [];
387   -
388   - Ext.Array.each(runsToAdd,function(run){
389   - values.push(run.get('ResourceID'));
390   - });
391   -
392   - loadMask.show();
393   - AmdaAction.addRun(values, me.saveCallback, me);
394   - }
395   - }],
396   - plugins: [cellEditing]
397   - });
  350 + var resOutput = Ext.create('Ext.grid.Panel', {
  351 + title: 'Runs Info',
  352 + columns: columns,
  353 + store: resStore,
  354 + scroll: 'both',
  355 + hidden : true,
  356 + selModel: {
  357 + selType: 'cellmodel'
  358 + },
  359 + fbar: [
  360 + {
  361 + text: 'Save Runs',
  362 + scope: this,
  363 + handler: function()
  364 + {
  365 + var me = this;
  366 + var runsToAdd = resStore.getModifiedRecords();
  367 + var values = [];
  368 +
  369 + Ext.Array.each(runsToAdd,function(run){
  370 + values.push(run.get('ResourceID'));
  371 + });
  372 +
  373 + loadMask.show();
  374 + AmdaAction.addRun(values, me.saveCallback, me);
  375 + }
  376 + }],
  377 + plugins: [cellEditing]
  378 + });
398 379  
399   - var config = {
400   - // bodyStyle: 'background:#ddecfe;',
401   - items: [
402   - inputForm,
403   - resOutput
404   - ]
405   - };
  380 + var config = {
  381 + // bodyStyle: 'background:#ddecfe;',
  382 + items: [
  383 + inputForm,
  384 + resOutput
  385 + ]
  386 + };
406 387  
407   - Ext.apply(this , config);
408   - this.callParent(arguments);
409   - }
  388 + Ext.apply(this , config);
  389 + this.callParent(arguments);
  390 + }
410 391 });
411 392 \ No newline at end of file
... ...