Commit 592d7b65cdcef8fe18f12d0504946565ed973331
Exists in
master
and in
42 other branches
Merge develop into this branch
Showing
38 changed files
with
916 additions
and
465 deletions
Show diff stats
generic_data/Functions/functions.xml
... | ... | @@ -49,34 +49,6 @@ |
49 | 49 | <info_brief>skewness() function</info_brief> |
50 | 50 | <new_kernel>#skew</new_kernel> |
51 | 51 | </function> |
52 | - <function name="covariance_(,,)" args="2" kind="time" group="stat"> | |
53 | - <prompts> | |
54 | - <prompt>input window time in secs</prompt> | |
55 | - </prompts> | |
56 | - <info_brief>covariance() function for two params</info_brief> | |
57 | - <new_kernel>#covariance</new_kernel> | |
58 | - </function> | |
59 | - <function name="pearson_(,,)" args="2" kind="time" group="stat"> | |
60 | - <prompts> | |
61 | - <prompt>input window time in secs</prompt> | |
62 | - </prompts> | |
63 | - <info_brief>Pearson coefficient of two parameters</info_brief> | |
64 | - <new_kernel>#pearson</new_kernel> | |
65 | - </function> | |
66 | - <function name="kendall_(,,)" args="2" kind="time" group="stat"> | |
67 | - <prompts> | |
68 | - <prompt>input window time in secs</prompt> | |
69 | - </prompts> | |
70 | - <info_brief>Kendall coefficient of two parameters</info_brief> | |
71 | - <new_kernel>#kendall</new_kernel> | |
72 | - </function> | |
73 | - <function name="spearman_(,,)" args="2" kind="time" group="stat"> | |
74 | - <prompts> | |
75 | - <prompt>input window time in secs</prompt> | |
76 | - </prompts> | |
77 | - <info_brief>Spearman coefficient of two parameters</info_brief> | |
78 | - <new_kernel>#spearman</new_kernel> | |
79 | - </function> | |
80 | 52 | <function name="mean_sm_(,)" args="1" kind="sliding" group="stat"> |
81 | 53 | <prompts> |
82 | 54 | <prompt>input averaging time in secs</prompt> |
... | ... | @@ -126,6 +98,34 @@ |
126 | 98 | <info_brief>smooths with a boxcar average</info_brief> |
127 | 99 | <new_kernel>#boxcar</new_kernel> |
128 | 100 | </function> |
101 | + <function name="covariance_(,,)" args="2" kind="sliding" group="stat"> | |
102 | + <prompts> | |
103 | + <prompt>input window time in secs</prompt> | |
104 | + </prompts> | |
105 | + <info_brief>covariance() function for two params</info_brief> | |
106 | + <new_kernel>#covariance</new_kernel> | |
107 | + </function> | |
108 | + <function name="pearson_(,,)" args="2" kind="sliding" group="stat"> | |
109 | + <prompts> | |
110 | + <prompt>input window time in secs</prompt> | |
111 | + </prompts> | |
112 | + <info_brief>Pearson coefficient of two parameters</info_brief> | |
113 | + <new_kernel>#pearson</new_kernel> | |
114 | + </function> | |
115 | + <function name="kendall_(,,)" args="2" kind="sliding" group="stat"> | |
116 | + <prompts> | |
117 | + <prompt>input window time in secs</prompt> | |
118 | + </prompts> | |
119 | + <info_brief>Kendall coefficient of two parameters</info_brief> | |
120 | + <new_kernel>#kendall</new_kernel> | |
121 | + </function> | |
122 | + <function name="spearman_(,,)" args="2" kind="sliding" group="stat"> | |
123 | + <prompts> | |
124 | + <prompt>input window time in secs</prompt> | |
125 | + </prompts> | |
126 | + <info_brief>Spearman coefficient of two parameters</info_brief> | |
127 | + <new_kernel>#spearman</new_kernel> | |
128 | + </function> | |
129 | 129 | <!-- <function name="shiftN_(,)" args="1" kind="amda"> |
130 | 130 | <prompt>input number of points N to delay by</prompt> |
131 | 131 | <info_brief>Delays array by N points back (N < 0) and forth (N > 0)</info_brief> |
... | ... |
index.html
... | ... | @@ -106,6 +106,8 @@ |
106 | 106 | <div id="PaveAnnoucements"> |
107 | 107 | <div id="TitrePaveAnnoucement">Announcements</div> |
108 | 108 | |
109 | +<div id="DateAnnoucement">03/08/2022</div> | |
110 | +<div id="TexteAnnoucement">AMDA DOI: https://doi.org/10.6096/2011</div> | |
109 | 111 | <div id="DateAnnoucement">20/01/2022</div> |
110 | 112 | <div id="TexteAnnoucement">Solar Orbiter RPW, <br/>Solar Orbiter PAS: Version 2.0,<br/> Fix Cassini LEMMS data,<br/> Fix VEX orbits shared catalog,<br/>New frames available in framesTransformation function</div> |
111 | 113 | <div id="DateAnnoucement">28/07/2021</div> |
... | ... |
js/app/AmdaApp.js
... | ... | @@ -191,6 +191,9 @@ Ext.define('amdaApp.AmdaApp', { |
191 | 191 | |
192 | 192 | // TT duration management |
193 | 193 | Ext.state.Manager.getProvider().set('tt_duration', 3); |
194 | + | |
195 | + // Cat duration management | |
196 | + Ext.state.Manager.getProvider().set('cat_duration', 3); | |
194 | 197 | |
195 | 198 | // now ready... |
196 | 199 | //override createWindow method of desktop |
... | ... |
js/app/controllers/InteractiveModule.js
... | ... | @@ -254,9 +254,9 @@ Ext.define('amdaDesktop.InteractiveModule', { |
254 | 254 | * @param {String} objectName The name of sent object |
255 | 255 | * @param {String} isLeaf boolean true if it's a leaf parameter |
256 | 256 | */ |
257 | - addParam : function(objectName, isLeaf, needsArgs, components, predefined_args) { | |
257 | + addParam : function(objectName, isLeaf, needsArgs, components, predefined_args, info) { | |
258 | 258 | var uiContent = this.getUiContent(); |
259 | - uiContent.addParam(objectName, isLeaf, needsArgs, components, predefined_args); | |
259 | + uiContent.addParam(objectName, isLeaf, needsArgs, components, predefined_args, info); | |
260 | 260 | }, |
261 | 261 | |
262 | 262 | parseTemplatedParam: function(templatedParamId, onParamParsed) { |
... | ... |
js/app/controllers/PlotModule.js
... | ... | @@ -52,12 +52,21 @@ Ext.define('amdaDesktop.PlotModule', { |
52 | 52 | |
53 | 53 | computePreviewWindowSize: function (previewContent) { |
54 | 54 | var size = previewContent.getImageSize(); |
55 | +<<<<<<< HEAD | |
55 | 56 | size.width += 30; |
56 | 57 | size.height += 65; |
57 | 58 | return size; |
58 | 59 | }, |
59 | 60 | |
60 | 61 | updateInteractiveSession: function (session, newplot) { |
62 | +======= | |
63 | + size.width += 30; | |
64 | + size.height += 100; | |
65 | + return size; | |
66 | + }, | |
67 | + | |
68 | + updateInteractiveSession : function(session, newplot, panelId_, time_) { | |
69 | +>>>>>>> develop | |
61 | 70 | var me = this; |
62 | 71 | |
63 | 72 | |
... | ... | @@ -69,10 +78,19 @@ Ext.define('amdaDesktop.PlotModule', { |
69 | 78 | |
70 | 79 | if (tabResult.preview) { |
71 | 80 | var plotPreviewConfig = { |
81 | +<<<<<<< HEAD | |
72 | 82 | folder: session.folder, |
73 | 83 | plotFile: tabResult.plot, |
74 | 84 | context: tabResult.context, |
75 | 85 | interactiveId: tabResult.id |
86 | +======= | |
87 | + folder : session.folder, | |
88 | + plotFile : tabResult.plot, | |
89 | + context : tabResult.context, | |
90 | + time : time_, | |
91 | + panelId : panelId_, | |
92 | + interactiveId : tabResult.id | |
93 | +>>>>>>> develop | |
76 | 94 | }; |
77 | 95 | me.updatePreview(plotPreviewConfig); |
78 | 96 | return; |
... | ... | @@ -101,7 +119,7 @@ Ext.define('amdaDesktop.PlotModule', { |
101 | 119 | var y = 100 + tabResult.index * 20; |
102 | 120 | //create new result win |
103 | 121 | var panelResult = new amdaUI.PlotTabResultUI(plotTabConfig); |
104 | - | |
122 | + me.panelResultInstance = panelResult; | |
105 | 123 | var size = me.computeResultWindowSize(panelResult); |
106 | 124 | |
107 | 125 | var win = myDesktopApp.getDesktop().createWindow({ |
... | ... | @@ -177,7 +195,8 @@ Ext.define('amdaDesktop.PlotModule', { |
177 | 195 | if (winPreview == null) { |
178 | 196 | //create new preview win |
179 | 197 | var previewContent = new amdaPlotComp.PlotPreviewUI(plotPreviewConfig); |
180 | - | |
198 | + previewContent.setPanelResultInstance(this.panelResultInstance); | |
199 | + //previewContent.setPanelId | |
181 | 200 | var size = this.computePreviewWindowSize(previewContent); |
182 | 201 | |
183 | 202 | var win = myDesktopApp.getDesktop().createWindow({ |
... | ... |
js/app/models/InteractiveNode.js
... | ... | @@ -190,7 +190,7 @@ Ext.define('amdaModel.InteractiveNode', { |
190 | 190 | |
191 | 191 | var scope = opt.scope ? opt.scope : this; |
192 | 192 | if (opt.callback) |
193 | - opt.callback.call(scope,'update'); | |
193 | + opt.callback.call(scope,'update',res); | |
194 | 194 | if(opt.notDisplayMsg || opt.callback ){ |
195 | 195 | //do nothing |
196 | 196 | }else{ |
... | ... | @@ -337,7 +337,7 @@ Ext.define('amdaModel.InteractiveNode', { |
337 | 337 | if (opt) { |
338 | 338 | var scope = opt.scope ? opt.scope : this; |
339 | 339 | if (opt.callback) |
340 | - opt.callback.call(scope,'create'); | |
340 | + opt.callback.call(scope,'create',res); | |
341 | 341 | } |
342 | 342 | }, this); |
343 | 343 | } |
... | ... |
js/app/models/LocalParamNode.js
... | ... | @@ -194,7 +194,7 @@ Ext.define('amdaModel.LocalParamNode', |
194 | 194 | else |
195 | 195 | paramName = node.get('id'); |
196 | 196 | |
197 | - module.addParam(paramName,node.get('leaf'),node.get('needsArgs'),components); | |
197 | + module.addParam(paramName,node.get('leaf'),node.get('needsArgs'),components, null, null); | |
198 | 198 | }); |
199 | 199 | }, |
200 | 200 | |
... | ... |
js/app/models/PlotObjects/PlotPanelObject.js
... | ... | @@ -31,6 +31,7 @@ Ext.define('amdaPlotObj.PlotPanelObject', { |
31 | 31 | |
32 | 32 | fields : [ |
33 | 33 | {name: 'id', type: 'string'}, |
34 | + {name: 'info', type: 'string'}, | |
34 | 35 | {name: 'panel-node-state', type: 'int', defaultValue: 2}, //0 : collapsed, 1 : expanded, 2 : not set |
35 | 36 | {name: 'axes-node-state', type: 'int', defaultValue: 2}, //0 : collapsed, 1 : expanded, 2 : not set |
36 | 37 | {name: 'params-node-state', type: 'int', defaultValue: 2}, //0 : collapsed, 1 : expanded, 2 : not set |
... | ... | @@ -192,6 +193,7 @@ Ext.define('amdaPlotObj.PlotPanelObject', { |
192 | 193 | params[index]['dim2-min-value'] = param['dim2-min-range']; |
193 | 194 | params[index]['dim2-max-value'] = param['dim2-max-range']; |
194 | 195 | params[index]['is-init'] = true; |
196 | + params[index]['info'] = param['info']; | |
195 | 197 | }); |
196 | 198 | this.params().loadData(params); |
197 | 199 | }, |
... | ... | @@ -300,6 +302,7 @@ Ext.define('amdaPlotObj.PlotPanelObject', { |
300 | 302 | var isVector = (typeof data !== "undefined") && (typeof data.isVector !== "undefined") && data.isVector; |
301 | 303 | var components = (typeof data !== "undefined") && (typeof data.components !== "undefined") && data.components ? data.components : null; |
302 | 304 | var template_args = (typeof data !== "undefined") && (typeof data.template_args !== "undefined") && data.template_args ? data.template_args : null; |
305 | + var info = (typeof data !== "undefined") && (typeof data.info !== "undefined") && data.info ? data.info : null; | |
303 | 306 | |
304 | 307 | this.set('last-param-id', this.get('last-param-id') + 1); |
305 | 308 | |
... | ... | @@ -313,6 +316,9 @@ Ext.define('amdaPlotObj.PlotPanelObject', { |
313 | 316 | if (template_args) { |
314 | 317 | recs[0].set('template_args', template_args); |
315 | 318 | } |
319 | + if (info){ | |
320 | + recs[0].set('info', info); | |
321 | + } | |
316 | 322 | |
317 | 323 | if (components != null) { |
318 | 324 | if (components['index1']) { |
... | ... |
js/app/models/PlotObjects/PlotTreeNode.js
... | ... | @@ -67,14 +67,17 @@ Ext.define('amdaPlotObj.PlotTreeNode', { |
67 | 67 | this.set('leaf',this.leaf); |
68 | 68 | this.set('type',this.type); |
69 | 69 | this.set('removable',this.removable); |
70 | - if (config && config.object) | |
70 | + if (config && config.object) { | |
71 | 71 | this.object = config.object; |
72 | + this.set('qtip', config.object.get('info')); | |
73 | + } | |
72 | 74 | if (this.getNodeState() != 2) |
73 | 75 | this.set('expanded',(this.getNodeState() == 1)); |
74 | 76 | else { |
75 | 77 | this.set('expanded',this.expanded); |
76 | 78 | this.setNodeState(this.expanded ? 1 : 0); |
77 | 79 | } |
80 | + | |
78 | 81 | } |
79 | 82 | }, function () { |
80 | 83 | Ext.data.NodeInterface.decorate(this); |
... | ... |
js/app/models/RequestParamObject.js
... | ... | @@ -21,7 +21,8 @@ Ext.define('amdaModel.RequestParamObject', { |
21 | 21 | getEmptyObj: function() { |
22 | 22 | return { |
23 | 23 | 'paramid': '', |
24 | - 'is-init': false, | |
24 | + 'qtip':'', | |
25 | + 'is-init': false, | |
25 | 26 | 'type': 0, |
26 | 27 | 'dim1-index': '*', |
27 | 28 | 'dim1-sum-type': 0, |
... | ... | @@ -46,6 +47,7 @@ Ext.define('amdaModel.RequestParamObject', { |
46 | 47 | {name: 'type', type: 'int'}, /* Parameter type. 0: Scalar, 1: Tab1D, 2: Tab2D */ |
47 | 48 | {name: 'is-init', type: 'bool', default:false}, |
48 | 49 | {name: 'paramid', type: 'string'}, |
50 | + {name: 'qtip', type:'string'}, | |
49 | 51 | /* Fields for dim1 */ |
50 | 52 | {name: 'dim1-index', type: 'string', defaultValue: '*'}, |
51 | 53 | {name: 'dim1-sum-type', type: 'int', defaultValue: 0}, /* Sum type. 0: None, 1: sum into values range, 2: sum between indexes */ |
... | ... |
js/app/models/SpecialParamNode.js
... | ... | @@ -106,7 +106,7 @@ Ext.define('amdaModel.SpecialParamNode', { |
106 | 106 | } |
107 | 107 | var paramName = node.get('id'); |
108 | 108 | var components = null; |
109 | - module.addParam(paramName,node.get('leaf'),node.get('needsArgs'),components); | |
109 | + module.addParam(paramName,node.get('leaf'),node.get('needsArgs'),components, null, null); | |
110 | 110 | }); |
111 | 111 | }, |
112 | 112 | |
... | ... |
js/app/views/CatalogUI.js
... | ... | @@ -17,8 +17,10 @@ Ext.define('amdaUI.CatalogUI', { |
17 | 17 | 'Ext.ux.grid.filter.DateFilter', |
18 | 18 | 'Ext.ux.grid.filter.NumericFilter', |
19 | 19 | 'Ext.ux.grid.filter.StringFilter', |
20 | + 'amdaUI.OperationsTT', | |
20 | 21 | 'Ext.grid.plugin.BufferedRenderer', |
21 | - 'amdaUI.StatisticalPlug' | |
22 | + 'amdaUI.StatisticalPlug', | |
23 | ++ 'amdaDesktop.AmdaStateProvider' | |
22 | 24 | ], |
23 | 25 | |
24 | 26 | isCatalog: true, |
... | ... | @@ -49,7 +51,7 @@ Ext.define('amdaUI.CatalogUI', { |
49 | 51 | |
50 | 52 | Ext.Array.each(this.TTGrid.headerCt.getGridColumns(), function (item, index, all) { |
51 | 53 | // if item is the default duration column |
52 | - if (item.id == amdaUI.CatalogUI.COL_TO_HIDE_DURATION + '2') { | |
54 | + if (item.id == amdaUI.CatalogUI.COL_TO_HIDE_DURATION + Ext.state.Manager.getProvider().get('cat_duration').toString()) { | |
53 | 55 | // show this column |
54 | 56 | item.show(); |
55 | 57 | } |
... | ... | @@ -148,62 +150,18 @@ Ext.define('amdaUI.CatalogUI', { |
148 | 150 | return; |
149 | 151 | } |
150 | 152 | }, |
151 | - updateSurveyDates : function(ttObj){ | |
152 | - var starts = []; | |
153 | - var stops= []; | |
153 | + updateSurveyDates : function(res){ | |
154 | 154 | if (this.TTGrid.getStore().getTotalCount() <= 0) |
155 | 155 | return; |
156 | - reqObj = { | |
157 | - 'typeTT': 'catalog', | |
158 | - } | |
159 | - AmdaAction.readCacheIntervals(reqObj, function(result, e) | |
160 | - { | |
161 | - if (!result) { | |
162 | - myDesktopApp.errorMsg(e.message); | |
163 | - Ext.defer(function () { | |
164 | - Ext.Msg.toFront() | |
165 | - }, 10); | |
166 | - | |
167 | - return; | |
168 | - } else if (!result.success) | |
169 | - { | |
170 | - if (result.message) | |
171 | - myDesktopApp.errorMsg(result.message); | |
172 | - else | |
173 | - myDesktopApp.errorMsg('Unknown error during catalog survey dates update'); | |
174 | - | |
175 | - Ext.defer(function () { | |
176 | - Ext.Msg.toFront() | |
177 | - }, 10); | |
178 | - | |
179 | - return; | |
180 | - } | |
181 | - Ext.Array.each(result.intervals, function (item, index) { | |
182 | - starts[index] = new Date(item.start); | |
183 | - stops[index] = new Date(item.stop); | |
184 | - }); | |
185 | - if(starts.length !== 0 || stops.length !== 0) { | |
186 | - | |
187 | - starts.sort(function(a,b){return a.getTime() - b.getTime()}); | |
188 | - stops.sort(function(a,b){return a.getTime() - b.getTime()}); | |
189 | - | |
190 | - | |
191 | - s = starts[0]; | |
192 | - e = stops[stops.length - 1]; | |
193 | 156 | |
194 | - s = Ext.Date.format(s, 'Y-m-d\\TH:i:s.u'); | |
195 | - e = Ext.Date.format(e, 'Y-m-d\\TH:i:s.u'); | |
196 | - | |
197 | - if(! ttObj.get('surveyStart') ){ | |
198 | - ttObj.set('surveyStart', s); | |
199 | - this.status.isModified = true; | |
200 | - } | |
201 | - if(! ttObj.get('surveyStop') ){ | |
202 | - ttObj.set('surveyStop', e); | |
203 | - this.status.isModified = true; | |
204 | - } | |
205 | - } | |
206 | - }); | |
157 | + if(! this.object.get('surveyStart') ){ | |
158 | + this.object.set('surveyStart', res['minStart']); | |
159 | + this.status.isModified = true; | |
160 | + } | |
161 | + if(! this.object.get('surveyStop') ){ | |
162 | + this.object.set('surveyStop', res['maxStop']); | |
163 | + this.status.isModified = true; | |
164 | + } | |
207 | 165 | }, |
208 | 166 | |
209 | 167 | createTT: function (catId) { |
... | ... | @@ -215,7 +173,6 @@ Ext.define('amdaUI.CatalogUI', { |
215 | 173 | descr = 'Generated by CDPP/Amda Catalog Module \n' + 'From Catalog: ' + this.object.get('name') + '\nOn: ' + date + '\n'; |
216 | 174 | ttObj.set('description', descr + this.object.get('description')); |
217 | 175 | ttObj.set('contact', this.object.get('contact')); |
218 | - //this.updateSurveyDates(ttObj); | |
219 | 176 | timeTabNode.set('object', ttObj); |
220 | 177 | var explorerTree = Ext.getCmp(amdaUI.ExplorerUI.RESRC_TAB.TREE_ID); |
221 | 178 | var ttRootNode = explorerTree.getRootNode().findChild('id', 'timeTable-treeRootNode', true); |
... | ... | @@ -406,7 +363,7 @@ Ext.define('amdaUI.CatalogUI', { |
406 | 363 | width: 120, |
407 | 364 | minWidth: 50, |
408 | 365 | menuDisabled: false, |
409 | - hidden: true, | |
366 | + hidden: Ext.state.Manager.getProvider().get('cat_duration') != 1 ? true : false, | |
410 | 367 | id: amdaUI.CatalogUI.COL_TO_HIDE_DURATION + '1', |
411 | 368 | renderer: function (value) { |
412 | 369 | return this.dateToString(value); |
... | ... | @@ -426,7 +383,7 @@ Ext.define('amdaUI.CatalogUI', { |
426 | 383 | width: 120, |
427 | 384 | minWidth: 50, |
428 | 385 | menuDisabled: false, |
429 | - hidden: true, | |
386 | + hidden: Ext.state.Manager.getProvider().get('cat_duration') != 2 ? true : false, | |
430 | 387 | id: amdaUI.CatalogUI.COL_TO_HIDE_DURATION + '2', |
431 | 388 | renderer: function (value) { |
432 | 389 | return this.dateToString(value); |
... | ... | @@ -446,7 +403,7 @@ Ext.define('amdaUI.CatalogUI', { |
446 | 403 | width: 120, |
447 | 404 | minWidth: 50, |
448 | 405 | menuDisabled: false, |
449 | - hidden: false, | |
406 | + hidden: Ext.state.Manager.getProvider().get('cat_duration') != 3 ? true : false, | |
450 | 407 | id: amdaUI.CatalogUI.COL_TO_HIDE_DURATION + '3', |
451 | 408 | renderer: function (value) { |
452 | 409 | return this.dateToString(value); |
... | ... | @@ -466,7 +423,7 @@ Ext.define('amdaUI.CatalogUI', { |
466 | 423 | width: 120, |
467 | 424 | minWidth: 50, |
468 | 425 | menuDisabled: false, |
469 | - hidden: true, | |
426 | + hidden: Ext.state.Manager.getProvider().get('cat_duration') != 4 ? true : false, | |
470 | 427 | id: amdaUI.CatalogUI.COL_TO_HIDE_DURATION + '4', |
471 | 428 | renderer: function (value) { |
472 | 429 | return Ext.util.Format.number(value, '0.000'); |
... | ... | @@ -688,6 +645,40 @@ Ext.define('amdaUI.CatalogUI', { |
688 | 645 | }, |
689 | 646 | |
690 | 647 | checkIntervalsStatusForSave: function (onStatusOk) { |
648 | + if (this.status == null) | |
649 | + return; | |
650 | + | |
651 | + if (this.status.nbValid <= 0) | |
652 | + { | |
653 | + myDesktopApp.errorMsg('Your catalog is invalid, <br>you must have at least one valid interval'); | |
654 | + return; | |
655 | + } | |
656 | + | |
657 | + var msg = ''; | |
658 | + if (this.status.nbInvalid > 0) | |
659 | + msg += 'There are some invalid intervals. Only valid intervals will be saved!<br/>'; | |
660 | + if (this.status.nbFiltered > 0) | |
661 | + msg += 'There are some filtered intervals. Filtered intervals will not be saved!<br/>'; | |
662 | + if (msg != '') | |
663 | + { | |
664 | + msg += 'Do you want to continue?'; | |
665 | + Ext.Msg.show({ | |
666 | + title: 'Warning!', | |
667 | + msg: msg, | |
668 | + buttons: Ext.Msg.OKCANCEL, | |
669 | + fn: function (btnId) { | |
670 | + if (btnId === 'cancel') { | |
671 | + // cancel the save action | |
672 | + } else { | |
673 | + onStatusOk(); | |
674 | + } | |
675 | + }, | |
676 | + scope: this, | |
677 | + icon: Ext.Msg.WARNING | |
678 | + }); | |
679 | + return; | |
680 | + } | |
681 | + | |
691 | 682 | onStatusOk(); |
692 | 683 | }, |
693 | 684 | |
... | ... | @@ -699,7 +690,6 @@ Ext.define('amdaUI.CatalogUI', { |
699 | 690 | var module = myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.catalog.id); |
700 | 691 | // store / columns are the same - not needed to reconfigure grid |
701 | 692 | this.toReconfigure = false; |
702 | - this.updateSurveyDates(this.object); | |
703 | 693 | |
704 | 694 | // if save shared catalog |
705 | 695 | if (module.contextNode && (module.contextNode.get('id') == 'sharedcatalog-treeRootNode')) |
... | ... | @@ -710,13 +700,14 @@ Ext.define('amdaUI.CatalogUI', { |
710 | 700 | var obj = module.linkedNode.get('object'); |
711 | 701 | // synchronisation of objects |
712 | 702 | this.object = obj; |
713 | - module.linkedNode.create({notDisplayMsg: notDisplayMsg, callback: function () { | |
714 | - if (onAfterSave) | |
703 | + module.linkedNode.create({notDisplayMsg: notDisplayMsg, callback: function (type,res) { | |
704 | + this.updateSurveyDates(res); | |
705 | + if (onAfterSave) | |
715 | 706 | onAfterSave(); |
716 | 707 | }, scope: this}); |
717 | 708 | } |
718 | 709 | // if the name has been modified this is a creation |
719 | - else if (this.fclose() || this.status && (this.status.nbFiltered > 0)) { | |
710 | + else if (this.fclose() || this.status) { | |
720 | 711 | if (this.object.isModified('name') || this.object.get('fromPlugin')) { |
721 | 712 | // if object already has an id : it's a 'rename' of an existing |
722 | 713 | if (this.object.get('id')) { |
... | ... | @@ -736,16 +727,18 @@ Ext.define('amdaUI.CatalogUI', { |
736 | 727 | module.linkedNode.toRename = true; |
737 | 728 | } |
738 | 729 | module.linkedNode.create({callback: function () { |
739 | - module.linkedNode.update({notDisplayMsg: notDisplayMsg, callback: function () { | |
740 | - if (onAfterSave) | |
741 | - onAfterSave(); | |
730 | + module.linkedNode.update({notDisplayMsg: notDisplayMsg, callback: function (type,res) { | |
731 | + this.updateSurveyDates(res); | |
732 | + if (onAfterSave) | |
733 | + onAfterSave(); | |
742 | 734 | }, scope: this}, "", notDisplayMsg); |
743 | 735 | }, scope: this}); |
744 | 736 | } else { |
745 | 737 | //update |
746 | - module.linkedNode.update({notDisplayMsg: notDisplayMsg, callback: function () { | |
747 | - if (onAfterSave) | |
748 | - onAfterSave(); | |
738 | + module.linkedNode.update({notDisplayMsg: notDisplayMsg, callback: function (type,res) { | |
739 | + this.updateSurveyDates(res); | |
740 | + if (onAfterSave) | |
741 | + onAfterSave(); | |
749 | 742 | }, scope: this}); |
750 | 743 | } |
751 | 744 | } |
... | ... | @@ -754,58 +747,52 @@ Ext.define('amdaUI.CatalogUI', { |
754 | 747 | if (this.updateObject()) |
755 | 748 | { |
756 | 749 | var basicForm = this.formPanel.getForm(); |
757 | - // if there's at least one record in the store of TTGrid | |
758 | - if (this.TTGrid.getStore().getTotalCount() > 0) | |
759 | - { | |
760 | 750 | // update TimeTable object which the content of form |
761 | 751 | |
762 | - basicForm.updateRecord(this.object); | |
763 | - var me = this; | |
764 | - this.checkIntervalsStatusForSave(function () { | |
765 | - //Name validation | |
766 | - var module = myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.catalog.id); | |
767 | - | |
768 | - if (!module) | |
752 | + basicForm.updateRecord(this.object); | |
753 | + var me = this; | |
754 | + this.checkIntervalsStatusForSave(function () { | |
755 | + //Name validation | |
756 | + var module = myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.catalog.id); | |
757 | + | |
758 | + if (!module) | |
759 | + return; | |
760 | + module.linkedNode.isValidName(me.fieldName.getValue(), function (res) | |
761 | + { | |
762 | + if (!res) { | |
763 | + me.fieldName.validFlag = 'Error during object validation'; | |
764 | + myDesktopApp.errorMsg(me.fieldName.validFlag); | |
765 | + me.fieldName.validate(); | |
769 | 766 | return; |
770 | - module.linkedNode.isValidName(me.fieldName.getValue(), function (res) | |
771 | - { | |
772 | - if (!res) { | |
773 | - me.fieldName.validFlag = 'Error during object validation'; | |
774 | - myDesktopApp.errorMsg(me.fieldName.validFlag); | |
775 | - me.fieldName.validate(); | |
776 | - return; | |
777 | - } | |
767 | + } | |
778 | 768 | |
779 | - if (!res.valid) { | |
780 | - if (res.error) { | |
781 | - if (res.error.search('subtree') != -1) { | |
782 | - Ext.MessageBox.show({title: 'Warning', | |
783 | - msg: res.error + '<br/>Do you want to overwrite it?', | |
784 | - width: 300, | |
785 | - buttons: Ext.MessageBox.OKCANCEL, | |
786 | - fn: me.overwriteProcess, | |
787 | - icon: Ext.MessageBox.WARNING, | |
788 | - scope: me | |
789 | - }); | |
790 | - me.fieldName.validFlag = true; | |
791 | - } else | |
792 | - me.fieldName.validFlag = res.error; | |
793 | - } else { | |
794 | - me.fieldName.validFlag = 'Invalid object name'; | |
795 | - myDesktopApp.errorMsg(me.fieldName.validFlag); | |
796 | - } | |
797 | - me.fieldName.validate(); | |
798 | - return; | |
769 | + if (!res.valid) { | |
770 | + if (res.error) { | |
771 | + if (res.error.search('subtree') != -1) { | |
772 | + Ext.MessageBox.show({title: 'Warning', | |
773 | + msg: res.error + '<br/>Do you want to overwrite it?', | |
774 | + width: 300, | |
775 | + buttons: Ext.MessageBox.OKCANCEL, | |
776 | + fn: me.overwriteProcess, | |
777 | + icon: Ext.MessageBox.WARNING, | |
778 | + scope: me | |
779 | + }); | |
780 | + me.fieldName.validFlag = true; | |
781 | + } else | |
782 | + me.fieldName.validFlag = res.error; | |
783 | + } else { | |
784 | + me.fieldName.validFlag = 'Invalid object name'; | |
785 | + myDesktopApp.errorMsg(me.fieldName.validFlag); | |
799 | 786 | } |
800 | - | |
801 | - me.fieldName.validFlag = true; | |
802 | 787 | me.fieldName.validate(); |
803 | - me.saveProcess(false, onAfterSave, notDisplayMsg); | |
804 | - }); | |
788 | + return; | |
789 | + } | |
790 | + | |
791 | + me.fieldName.validFlag = true; | |
792 | + me.fieldName.validate(); | |
793 | + me.saveProcess(false, onAfterSave, notDisplayMsg); | |
805 | 794 | }); |
806 | - } else { | |
807 | - Ext.Msg.alert('No intervals', 'Your catalog is invalid, <br>you must have at least one interval'); | |
808 | - } | |
795 | + }); | |
809 | 796 | } |
810 | 797 | }, |
811 | 798 | |
... | ... | @@ -1205,7 +1192,15 @@ Ext.define('amdaUI.CatalogUI', { |
1205 | 1192 | }); |
1206 | 1193 | }, this); |
1207 | 1194 | }, |
1208 | - scope: this | |
1195 | + scope: this, | |
1196 | + columnschanged:function(ct,eOpts){ // Takes into count the duration changes | |
1197 | + Ext.Array.each(ct.getGridColumns(), function (item, index, all) { | |
1198 | + if (Ext.util.Format.substr(item.id, 0, amdaUI.CatalogUI.COL_TO_HIDE_DURATION.length) == amdaUI.CatalogUI.COL_TO_HIDE_DURATION && !item.isHidden()) { | |
1199 | + var durationNumber = parseInt(Ext.util.Format.substr(item.id, amdaUI.CatalogUI.COL_TO_HIDE_DURATION.length, amdaUI.CatalogUI.COL_TO_HIDE_DURATION.length+1)); | |
1200 | + Ext.state.Manager.getProvider().set('cat_duration', durationNumber); | |
1201 | + } | |
1202 | + }); | |
1203 | + } | |
1209 | 1204 | }, |
1210 | 1205 | dockedItems: [{ |
1211 | 1206 | xtype: 'toolbar', |
... | ... | @@ -1284,6 +1279,7 @@ Ext.define('amdaUI.CatalogUI', { |
1284 | 1279 | this.formPanel = Ext.create('Ext.form.Panel', { |
1285 | 1280 | region: 'center', |
1286 | 1281 | layout: 'hbox', |
1282 | + overflowY:'auto', | |
1287 | 1283 | model: 'amdaModel.Catalog', |
1288 | 1284 | trackResetOnLoad: true, // reset to the last loaded record |
1289 | 1285 | bodyStyle: {background: '#dfe8f6'}, |
... | ... | @@ -1344,20 +1340,20 @@ Ext.define('amdaUI.CatalogUI', { |
1344 | 1340 | }, |
1345 | 1341 | } |
1346 | 1342 | }, { |
1347 | - fieldLabel: 'Stop Time', | |
1348 | - name: 'surveyStop', | |
1349 | - emptyText: 'YYYY/MM/DDThh:mm:ss.fff', | |
1350 | - format: 'Y-m-d\\TH:i:s.u', | |
1351 | - labelAlign: 'left', | |
1352 | - enforceMaxLength: true, | |
1353 | - maxLength: 25, | |
1354 | - labelWidth: 60, | |
1355 | - align: 'left', | |
1356 | - listeners: { | |
1357 | - change: this.onChangeStopField, | |
1358 | - focus: function(field) { | |
1359 | - this.activeField = 'surveyStop'; | |
1360 | - }, | |
1343 | + fieldLabel: 'Stop Time', | |
1344 | + name: 'surveyStop', | |
1345 | + emptyText: 'YYYY/MM/DDThh:mm:ss.fff', | |
1346 | + format: 'Y-m-d\\TH:i:s.u', | |
1347 | + labelAlign: 'left', | |
1348 | + enforceMaxLength: true, | |
1349 | + maxLength: 25, | |
1350 | + labelWidth: 60, | |
1351 | + align: 'left', | |
1352 | + listeners: { | |
1353 | + change: this.onChangeStopField, | |
1354 | + focus: function(field) { | |
1355 | + this.activeField = 'surveyStop'; | |
1356 | + }, | |
1361 | 1357 | } |
1362 | 1358 | }] |
1363 | 1359 | }, |
... | ... | @@ -1374,15 +1370,20 @@ Ext.define('amdaUI.CatalogUI', { |
1374 | 1370 | height: 150 |
1375 | 1371 | }, |
1376 | 1372 | { |
1377 | - xtype: 'component', | |
1378 | - height: 20 | |
1379 | - }], | |
1373 | + xtype: 'operationsTT', | |
1374 | + margin:'5 0 0 0', | |
1375 | + collapsible: true, | |
1376 | + collapsed:true, | |
1377 | + parent: this, | |
1378 | + isCat:true, | |
1379 | + id: 'operationCat' | |
1380 | + },], | |
1380 | 1381 | dockedItems: [ |
1381 | 1382 | { |
1382 | 1383 | xtype: 'toolbar', |
1383 | 1384 | dock: 'bottom', |
1384 | 1385 | ui: 'footer', |
1385 | - height: 120, | |
1386 | + height: 50, | |
1386 | 1387 | |
1387 | 1388 | items: [ |
1388 | 1389 | { |
... | ... | @@ -1444,7 +1445,6 @@ Ext.define('amdaUI.CatalogUI', { |
1444 | 1445 | } |
1445 | 1446 | }] |
1446 | 1447 | }, |
1447 | - | |
1448 | 1448 | //statistical info |
1449 | 1449 | { |
1450 | 1450 | xtype: 'toolbar', |
... | ... | @@ -1470,7 +1470,7 @@ Ext.define('amdaUI.CatalogUI', { |
1470 | 1470 | module.visualize(me.object); |
1471 | 1471 | }); |
1472 | 1472 | } |
1473 | - } | |
1473 | + }, | |
1474 | 1474 | ] |
1475 | 1475 | }, |
1476 | 1476 | { |
... | ... |
js/app/views/CatalogVisuHistogram.js
... | ... | @@ -10,6 +10,11 @@ |
10 | 10 | Ext.define('amdaUI.CatalogVisuHistogram', { |
11 | 11 | extend: 'Ext.form.Panel', |
12 | 12 | alias: 'widget.panelCatalogVisuHistogram', |
13 | + requires: [ | |
14 | + 'amdaPlotObj.PlotObjectConfig', | |
15 | + 'amdaPlotComp.PlotColorPicker' | |
16 | + ], | |
17 | + | |
13 | 18 | histogramStore: null, |
14 | 19 | visuUI:null, |
15 | 20 | constructor: function(config) { |
... | ... | @@ -17,12 +22,15 @@ Ext.define('amdaUI.CatalogVisuHistogram', { |
17 | 22 | this.callParent(arguments); |
18 | 23 | }, |
19 | 24 | |
20 | - getChartConfig: function(catalogStore) { | |
25 | + getChartConfig: function(catalogStore,isColorBar=false) { | |
21 | 26 | var paramOpt = { |
22 | 27 | paramId: '', |
23 | 28 | title: 'Parameter' |
24 | 29 | }; |
25 | 30 | |
31 | + var plotColorField = Ext.getCmp('visu-histo-color'); | |
32 | + var plotColor=plotColorField.ownerCt.colorDisplayer.value; | |
33 | + | |
26 | 34 | var paramField = Ext.getCmp('visu-histo-param'); |
27 | 35 | var paramFieldId = paramField.getValue(); |
28 | 36 | if (paramFieldId && (paramFieldId != "")) { |
... | ... | @@ -60,7 +68,8 @@ Ext.define('amdaUI.CatalogVisuHistogram', { |
60 | 68 | myDesktopApp.errorMsg('Not enough data or constant data'); |
61 | 69 | return null; |
62 | 70 | } |
63 | - var isLogScale = Ext.getCmp('visu-scatter-logbox').getValue(); | |
71 | + var isLogScaleX = Ext.getCmp('visu-histo-logbox-X').getValue(); | |
72 | + var isLogScaleY = Ext.getCmp('visu-histo-logbox-Y').getValue(); | |
64 | 73 | var binSize = (maxValue-minValue) / (nbBinsValue); |
65 | 74 | var x=[]; |
66 | 75 | catalogStore.each(function (item) { |
... | ... | @@ -70,6 +79,9 @@ Ext.define('amdaUI.CatalogVisuHistogram', { |
70 | 79 | var trace = { |
71 | 80 | x: x, |
72 | 81 | type: 'histogram', |
82 | + marker:{ | |
83 | + color:plotColor, | |
84 | + }, | |
73 | 85 | histnorm: Ext.getCmp('normalizedCheckbox').getValue() ? 'probability': null, |
74 | 86 | xbins: { end: maxValue, size: binSize, start: minValue } |
75 | 87 | }; |
... | ... | @@ -79,15 +91,36 @@ Ext.define('amdaUI.CatalogVisuHistogram', { |
79 | 91 | margin: {l: 60,r: 40, b: 40,t: 40,pad: 5}, |
80 | 92 | yaxis: { |
81 | 93 | title: Ext.getCmp('normalizedCheckbox').getValue() ? 'Frequency': 'Events', |
82 | - type: isLogScale ? 'log' : null | |
94 | + type: isLogScaleY ? 'log' : null | |
83 | 95 | }, |
84 | - xaxis: {title: paramOpt.title}, | |
96 | + xaxis: { | |
97 | + title: paramOpt.title, | |
98 | + type: isLogScaleX ? 'log' : null}, | |
85 | 99 | }; |
86 | 100 | |
87 | 101 | var result = {data:data,layout:layout} |
88 | 102 | return result; |
89 | 103 | }, |
90 | 104 | |
105 | + generateLogBox: function(axis){ | |
106 | + return {xtype: 'fieldcontainer', | |
107 | + fieldLabel: axis+' Log Scale', | |
108 | + defaultType: 'checkboxfield', | |
109 | + items: [ | |
110 | + { | |
111 | + name : 'logscale'+axis, | |
112 | + inputValue: false, | |
113 | + id : 'visu-histo-logbox-'+axis, | |
114 | + listeners:{ | |
115 | + change:function(){ | |
116 | + this.visuUI.plotChart(); | |
117 | + }, | |
118 | + scope: this | |
119 | + } | |
120 | + } | |
121 | + ],} | |
122 | + }, | |
123 | + | |
91 | 124 | getHistoConfig: function(parametersStore) { |
92 | 125 | var paramComboConfig = { |
93 | 126 | xtype: 'combo', |
... | ... | @@ -105,24 +138,6 @@ Ext.define('amdaUI.CatalogVisuHistogram', { |
105 | 138 | scope: this |
106 | 139 | } |
107 | 140 | }; |
108 | - var logbox={ | |
109 | - xtype: 'fieldcontainer', | |
110 | - fieldLabel: 'Log Scale', | |
111 | - defaultType: 'checkboxfield', | |
112 | - items: [ | |
113 | - { | |
114 | - name : 'logscale', | |
115 | - inputValue: false, | |
116 | - id : 'visu-scatter-logbox', | |
117 | - listeners:{ | |
118 | - change:function(){ | |
119 | - this.visuUI.plotChart(); | |
120 | - }, | |
121 | - scope: this | |
122 | - } | |
123 | - } | |
124 | - ], | |
125 | - }; | |
126 | 141 | var normalizedbox={ |
127 | 142 | xtype: 'fieldcontainer', |
128 | 143 | fieldLabel: 'Normalized', |
... | ... | @@ -141,6 +156,16 @@ Ext.define('amdaUI.CatalogVisuHistogram', { |
141 | 156 | } |
142 | 157 | ], |
143 | 158 | }; |
159 | + var colorPicker = this.addColorsPicker('visu-histo-color', 'Color', amdaPlotObj.PlotObjectConfig.availableColorsNew, 'standard'); | |
160 | + var plotThemeComboConfig = {xtype:'fieldset', | |
161 | + id:'visu-hiso-color-fieldset', | |
162 | + margin:'5 0 0 0', | |
163 | + padding:0, | |
164 | + border:false, | |
165 | + items:[colorPicker], | |
166 | + }; | |
167 | + colorPicker.add({id:'visu-histo-color'}); | |
168 | + | |
144 | 169 | var sliderConfig = { |
145 | 170 | xtype : 'fieldcontainer', |
146 | 171 | layout: 'hbox', |
... | ... | @@ -193,10 +218,11 @@ Ext.define('amdaUI.CatalogVisuHistogram', { |
193 | 218 | paramComboConfig, |
194 | 219 | sliderConfig, |
195 | 220 | normalizedbox, |
196 | - logbox, | |
221 | + this.generateLogBox('X'), | |
222 | + this.generateLogBox('Y'), | |
197 | 223 | { |
198 | 224 | xtype: 'textfield', |
199 | - fieldLabel: 'Title', | |
225 | + fieldLabel: 'X Title', | |
200 | 226 | id: 'visu-histo-title', |
201 | 227 | listeners: { |
202 | 228 | change: function(){ |
... | ... | @@ -204,11 +230,23 @@ Ext.define('amdaUI.CatalogVisuHistogram', { |
204 | 230 | }, |
205 | 231 | scope: this |
206 | 232 | } |
207 | - } | |
233 | + }, | |
234 | + | |
235 | + plotThemeComboConfig, | |
208 | 236 | ] |
209 | 237 | }; |
210 | 238 | }, |
211 | 239 | |
240 | + addColorsPicker: function (name, label, availableColors, mode) { | |
241 | + if (!mode) { | |
242 | + mode = 'standard'; | |
243 | + } | |
244 | + var me =this; | |
245 | + return new amdaPlotComp.PlotColorPicker({name: name, label: label, mode: mode, colors: availableColors, onChange: function(name, newValue, oldValue) { | |
246 | + me.visuUI.plotChart(); | |
247 | + }}); | |
248 | + }, | |
249 | + | |
212 | 250 | init : function (config) |
213 | 251 | { |
214 | 252 | var myConf = { |
... | ... |
js/app/views/CatalogVisuScatter.js
... | ... | @@ -10,20 +10,52 @@ |
10 | 10 | Ext.define('amdaUI.CatalogVisuScatter', { |
11 | 11 | extend: 'Ext.form.Panel', |
12 | 12 | alias: 'widget.panelCatalogVisuScatter', |
13 | + requires: [ | |
14 | + 'amdaPlotObj.PlotObjectConfig', | |
15 | + 'amdaPlotComp.PlotColorPicker' | |
16 | + ], | |
17 | + | |
18 | + availableSymbolsTypes: [ | |
19 | + { 'key': 'circle', 'value': 'Dot' }, | |
20 | + { 'key': 'cross-open', 'value': 'Plus' }, | |
21 | + { 'key': 'circle-open', 'value': 'Circle' }, | |
22 | + { 'key': 'x-open', 'value': 'Crux' }, | |
23 | + { 'key': 'square-open', 'value': 'Square' }, | |
24 | + { 'key': 'triangle-up-open', 'value': 'Triangle Up' }, | |
25 | + { 'key': 'triangle-down-open', 'value': 'Triangle Down' }, | |
26 | + { 'key': 'triangle-left-open', 'value': 'Triangle Left' }, | |
27 | + { 'key': 'triangle-right-open', 'value': 'Triangle Right' }, | |
28 | + { 'key': 'circle-cross-open', 'value': 'Crux in circle' }, | |
29 | + { 'key': 'circle-open-dot', 'value': 'Dot in circle' }, | |
30 | + { 'key': 'diamond', 'value': 'Diamond' }, | |
31 | + { 'key': 'star-open', 'value': 'Star' }, | |
32 | + { 'key': 'hexagram-open', 'value': 'Hexagram' }, | |
33 | + { 'key': 'square', 'value': 'Full square' }, | |
34 | + { 'key': 'star', 'value': 'Full star' } | |
35 | + ], | |
13 | 36 | |
14 | 37 | constructor: function(config) { |
15 | 38 | this.init(config); |
16 | 39 | this.callParent(arguments); |
17 | 40 | }, |
18 | 41 | |
19 | - getChartConfig: function(catalogStore) { | |
42 | + getChartConfig: function(catalogStore, isColorBar=true) { | |
20 | 43 | var plotTypeField = Ext.getCmp('visu-scatter-type'); |
21 | 44 | var plotType = plotTypeField.getValue(); |
22 | 45 | |
23 | 46 | var plotColorField = Ext.getCmp('visu-scatter-color'); |
24 | - plotColor = plotColorField.getValue(); | |
47 | + var plotColor=plotColorField.ownerCt.colorDisplayer.value; | |
48 | + | |
49 | + var plotSizeField = Ext.getCmp('visu-scatter-size'); | |
50 | + var plotSize = plotSizeField.getValue(); | |
51 | + | |
52 | + var plotSymbolField = Ext.getCmp('visu-scatter-symbol'); | |
53 | + var plotSymbol = plotSymbolField.getValue(); | |
54 | + | |
55 | + //plotColor = plotColorField.getValue(); | |
25 | 56 | var xAxisOpt = this.getAxisOptions('X'); |
26 | 57 | var yAxisOpt = this.getAxisOptions('Y'); |
58 | + var zAxisOpt = this.getAxisOptions('Z'); | |
27 | 59 | |
28 | 60 | if ((!xAxisOpt.paramId) || (xAxisOpt.paramId == '')) { |
29 | 61 | //myDesktopApp.errorMsg('Missing parameter selection for X axis'); |
... | ... | @@ -34,23 +66,64 @@ Ext.define('amdaUI.CatalogVisuScatter', { |
34 | 66 | //myDesktopApp.errorMsg('Missing parameter selection for Y axis'); |
35 | 67 | return null; |
36 | 68 | } |
69 | + if ((!zAxisOpt.paramId) || (zAxisOpt.paramId == '')) { | |
70 | + //myDesktopApp.errorMsg('Missing parameter selection for Y axis'); | |
71 | + isColorBar= false; | |
72 | + } | |
73 | + | |
37 | 74 | var x=[]; |
38 | 75 | var y=[]; |
76 | + var z=[]; | |
39 | 77 | var text=[]; |
40 | 78 | catalogStore.each(function(item){ |
41 | 79 | x.push(item.get(xAxisOpt.paramId)); |
42 | 80 | y.push(item.get(yAxisOpt.paramId)); |
81 | + if (isColorBar){ | |
82 | + if (zAxisOpt.logscale && zAxisOpt.range ){ | |
83 | + if (Math.log10(item.get(zAxisOpt.paramId)) >= zAxisOpt.range.min && Math.log10(item.get(zAxisOpt.paramId)) <= zAxisOpt.range.max){ | |
84 | + z.push(Math.log10(item.get(zAxisOpt.paramId))); | |
85 | + } | |
86 | + else { | |
87 | + z.push(NaN); | |
88 | + } | |
89 | + } | |
90 | + else if(zAxisOpt.logscale && !zAxisOpt.range){ | |
91 | + z.push(Math.log10(item.get(zAxisOpt.paramId))); | |
92 | + } | |
93 | + else if( !zAxisOpt.logscale && zAxisOpt.range){ | |
94 | + if (item.get(zAxisOpt.paramId) >= zAxisOpt.range.min && item.get(zAxisOpt.paramId) <= zAxisOpt.range.max){ | |
95 | + z.push(item.get(zAxisOpt.paramId)); | |
96 | + } | |
97 | + else { | |
98 | + z.push(NaN); | |
99 | + } | |
100 | + } | |
101 | + else{ | |
102 | + z.push(item.get(zAxisOpt.paramId)); | |
103 | + } | |
104 | + } | |
43 | 105 | text.push(''+item.get('start').toISOString()+'<br>'+item.get('stop').toISOString()); |
44 | 106 | }); |
45 | 107 | |
46 | - | |
47 | 108 | var data =[{ |
48 | 109 | x: x, |
49 | 110 | y: y, |
50 | - mode: (plotType=='line') ? 'lines+markers' : 'markers', | |
111 | + mode: (plotType=='point+line') ? 'lines+markers' : 'markers', | |
112 | + hovertemplate: (isColorBar) ? '(%{x},%{y},%{marker.color}) <br>%{text}<extra></extra>': null, | |
51 | 113 | text: text, |
52 | 114 | marker:{ |
53 | - color:plotColor}, | |
115 | + color: (isColorBar) ? z : plotColor, | |
116 | + colorbar:(isColorBar) ? { | |
117 | + len:0.7, | |
118 | + title: (zAxisOpt.logscale) ? 'log'+'10'.sub()+'('+zAxisOpt.title+')' : zAxisOpt.title, | |
119 | + titleside:'right', | |
120 | + titlefont:{size:10}, | |
121 | + } : null, | |
122 | + colorscale: (isColorBar) ?'Jet':null, | |
123 | + showscale:isColorBar, | |
124 | + symbol: plotSymbol, | |
125 | + size : plotSize, | |
126 | + }, | |
54 | 127 | type: 'scatter'}]; |
55 | 128 | |
56 | 129 | var layout = { |
... | ... | @@ -93,8 +166,10 @@ Ext.define('amdaUI.CatalogVisuScatter', { |
93 | 166 | } |
94 | 167 | |
95 | 168 | var axisScalingField = Ext.getCmp('visu-scatter-'+axisName+'-scaling'); |
96 | - var axisScaling = axisScalingField.getValue(); | |
97 | - if (axisScaling == 'manual') { | |
169 | + if (axisScalingField){ | |
170 | + var axisScaling = axisScalingField.getValue(); | |
171 | + } | |
172 | + if (axisScaling == 'manual') { | |
98 | 173 | var axisRangeMinField = Ext.getCmp('visu-scatter-' + axisName + '-range-min'); |
99 | 174 | var axisRangeMin = axisRangeMinField.getValue(); |
100 | 175 | var axisRangeMaxField = Ext.getCmp('visu-scatter-' + axisName + '-range-max'); |
... | ... | @@ -105,12 +180,13 @@ Ext.define('amdaUI.CatalogVisuScatter', { |
105 | 180 | }; |
106 | 181 | } |
107 | 182 | |
108 | - opt.logscale = Ext.getCmp('visu-scatter-' + axisName + '-logbox').getValue(); | |
109 | - | |
183 | + if (Ext.getCmp('visu-scatter-' + axisName + '-logbox')){ | |
184 | + opt.logscale = Ext.getCmp('visu-scatter-' + axisName + '-logbox').getValue(); | |
185 | + } | |
110 | 186 | return opt; |
111 | 187 | }, |
112 | 188 | |
113 | - getAxisConfig: function(axisIndex, axisName, parametersStore) { | |
189 | + getAxisConfig: function(axisIndex, axisName, parametersStore, isColorbar = false) { | |
114 | 190 | var paramComboConfig = { |
115 | 191 | xtype: 'combo', |
116 | 192 | emptyText: 'select parameter', |
... | ... | @@ -123,7 +199,8 @@ Ext.define('amdaUI.CatalogVisuScatter', { |
123 | 199 | id: 'visu-scatter-' + axisName + '-param', |
124 | 200 | listeners:{ |
125 | 201 | change:function(){ |
126 | - this.visuUI.plotChart(); | |
202 | + var isNotColorBar = Ext.getCmp('Zaxis-fieldset'); | |
203 | + this.visuUI.plotChart(!isNotColorBar.collapsed); | |
127 | 204 | }, |
128 | 205 | scope: this |
129 | 206 | } |
... | ... | @@ -138,7 +215,7 @@ Ext.define('amdaUI.CatalogVisuScatter', { |
138 | 215 | forceSelection:true, |
139 | 216 | value: 'auto', |
140 | 217 | width: 80, |
141 | - id: 'visu-scatter-' + axisName + '-scaling', | |
218 | + id: 'visu-scatter-' + axisName + '-scaling', | |
142 | 219 | listeners : { |
143 | 220 | scope : this, |
144 | 221 | change : function(combo, newValue, oldValue) { |
... | ... | @@ -164,7 +241,8 @@ Ext.define('amdaUI.CatalogVisuScatter', { |
164 | 241 | id : 'visu-scatter-' + axisName + '-logbox', |
165 | 242 | listeners:{ |
166 | 243 | change:function(){ |
167 | - this.visuUI.plotChart(); | |
244 | + var isNotColorBar = Ext.getCmp('Zaxis-fieldset'); | |
245 | + this.visuUI.plotChart(!isNotColorBar.collapsed); | |
168 | 246 | }, |
169 | 247 | scope: this |
170 | 248 | } |
... | ... | @@ -194,7 +272,8 @@ Ext.define('amdaUI.CatalogVisuScatter', { |
194 | 272 | id: 'visu-scatter-' + axisName + '-range-min', |
195 | 273 | listeners:{ |
196 | 274 | change:function(){ |
197 | - this.visuUI.plotChart(); | |
275 | + var isNotColorBar = Ext.getCmp('Zaxis-fieldset'); | |
276 | + this.visuUI.plotChart(!isNotColorBar.collapsed); | |
198 | 277 | }, |
199 | 278 | scope: this |
200 | 279 | } |
... | ... | @@ -210,7 +289,8 @@ Ext.define('amdaUI.CatalogVisuScatter', { |
210 | 289 | id: 'visu-scatter-' + axisName + '-range-max', |
211 | 290 | listeners:{ |
212 | 291 | change:function(){ |
213 | - this.visuUI.plotChart(); | |
292 | + var isNotColorBar = Ext.getCmp('Zaxis-fieldset'); | |
293 | + this.visuUI.plotChart(!isNotColorBar.collapsed); | |
214 | 294 | }, |
215 | 295 | scope: this |
216 | 296 | } |
... | ... | @@ -222,81 +302,177 @@ Ext.define('amdaUI.CatalogVisuScatter', { |
222 | 302 | |
223 | 303 | return { |
224 | 304 | xtype : 'fieldset', |
305 | + id:axisName + 'axis-fieldset', | |
306 | + collapsed:isColorbar, | |
307 | + collapsible:true, | |
308 | + checkboxToggle:isColorbar, | |
309 | + checkboxName:axisName + ' axis-checkbox', | |
225 | 310 | title : axisName + ' axis', |
226 | - items : [ | |
227 | - paramComboConfig, | |
228 | - axisRangeConfig, | |
229 | - logbox, | |
230 | - { | |
231 | - xtype: 'textfield', | |
232 | - fieldLabel: axisName + ' title', | |
233 | - id: 'visu-scatter-' + axisName + '-title', | |
234 | - listeners:{ | |
235 | - change:function(){ | |
236 | - this.visuUI.plotChart(); | |
311 | + items : | |
312 | + [ | |
313 | + paramComboConfig, | |
314 | + axisRangeConfig, | |
315 | + logbox, | |
316 | + { | |
317 | + xtype: 'textfield', | |
318 | + fieldLabel: axisName + ' title', | |
319 | + id: 'visu-scatter-' + axisName + '-title', | |
320 | + listeners:{ | |
321 | + change:function(){ | |
322 | + var isNotColorBar = Ext.getCmp('Zaxis-fieldset'); | |
323 | + this.visuUI.plotChart(!isNotColorBar.collapsed); | |
324 | + }, | |
325 | + scope: this | |
237 | 326 | }, |
238 | - scope: this | |
239 | - }, | |
240 | - } | |
241 | - ] | |
327 | + } | |
328 | + ], | |
329 | + listeners: (isColorbar) ? { | |
330 | + collapse:function(){ | |
331 | + this.visuUI.plotChart(false); | |
332 | + var colorPicker = Ext.getCmp('visu-scatter-color-fieldset'); | |
333 | + colorPicker.show(true) | |
334 | + | |
335 | + }, | |
336 | + expand : function(combo, newValue, oldValue){ | |
337 | + this.visuUI.plotChart(); | |
338 | + var colorPicker = Ext.getCmp('visu-scatter-color-fieldset'); | |
339 | + colorPicker.hide(true) | |
340 | + }, | |
341 | + scope: this | |
342 | + }: null, | |
242 | 343 | }; |
243 | 344 | }, |
244 | 345 | |
245 | 346 | getPlottingOptionConfig: function() { |
246 | 347 | var plotTypeComboConfig = { |
247 | 348 | xtype: 'combo', |
349 | + fieldLabel:'Type', | |
350 | + margin:'2 2 2 2', | |
248 | 351 | emptyText: 'select plot type', |
249 | 352 | editable: false, |
250 | - store: ['scatter', 'line'], | |
353 | + store: ['point', 'point+line'], | |
251 | 354 | queryMode: 'local', |
252 | 355 | valueField: 'type', |
253 | - value: 'scatter', | |
356 | + value: 'point', | |
254 | 357 | id: 'visu-scatter-type', |
255 | 358 | listeners : { |
256 | 359 | scope : this, |
257 | 360 | change : function(combo, newValue, oldValue) { |
258 | 361 | //this.chartConfig.series[0].type = newValue; |
259 | - this.visuUI.plotChart(); | |
362 | + var isNotColorBar = Ext.getCmp('Zaxis-fieldset'); | |
363 | + this.visuUI.plotChart(!isNotColorBar.collapsed); | |
260 | 364 | } |
261 | 365 | },scope: this |
262 | 366 | }; |
367 | + var colorPicker = this.addColorsPicker('visu-scatter-color', 'Color', amdaPlotObj.PlotObjectConfig.availableColorsNew, 'standard'); | |
368 | + var plotThemeComboConfig = {xtype:'fieldset', | |
369 | + id:'visu-scatter-color-fieldset', | |
370 | + margin:'5 0 0 0', | |
371 | + padding:0, | |
372 | + border:false, | |
373 | + items:[colorPicker], | |
374 | + }; | |
375 | + colorPicker.add({id:'visu-scatter-color'}); | |
263 | 376 | |
264 | - var plotThemeComboConfig = { | |
377 | + var comboStore = Ext.create('Ext.data.Store', { | |
378 | + fields: [amdaPlotObj.PlotObjectConfig.fieldComboBox.key, amdaPlotObj.PlotObjectConfig.fieldComboBox.value], | |
379 | + data: this.availableSymbolsTypes | |
380 | + }); | |
381 | + var plotSymbolConfig = | |
382 | + { | |
265 | 383 | xtype: 'combo', |
266 | - emptyText: 'select theme', | |
267 | - editable: false, | |
268 | - store: ['Base','Green','Sky','Red','Purple','Blue','Yellow'], | |
384 | + store: comboStore, | |
385 | + fieldLabel:'Symbol', | |
386 | + editable:false, | |
387 | + margin:'2 2 2 2', | |
269 | 388 | queryMode: 'local', |
270 | - valueField: 'type', | |
271 | - value: 'Blue', | |
272 | - id: 'visu-scatter-color', | |
273 | - listeners : { | |
389 | + displayField: 'value', | |
390 | + valueField: 'key', | |
391 | + value:'circle', | |
392 | + id: 'visu-scatter-symbol', | |
393 | + listeners: { | |
274 | 394 | scope : this, |
275 | 395 | change : function(combo, newValue, oldValue) { |
276 | 396 | //this.chartConfig.theme = newValue; |
277 | - this.visuUI.plotChart(); | |
397 | + var isNotColorBar = Ext.getCmp('Zaxis-fieldset'); | |
398 | + this.visuUI.plotChart(!isNotColorBar.collapsed); | |
278 | 399 | } |
279 | 400 | } |
280 | 401 | }; |
281 | 402 | |
403 | + var plotSizeNumber= | |
404 | + { | |
405 | + xtype: 'numberfield', | |
406 | + layout:'hbox', | |
407 | + hidden: true, | |
408 | + width: 50, | |
409 | + disabled: true, | |
410 | + value: 5, | |
411 | + id: 'visu-scatter-size' | |
412 | + }; | |
413 | + | |
414 | + var plotSizeConfig = { | |
415 | + xtype: 'slider', | |
416 | + fieldLabel: 'Size', | |
417 | + layout:'hbox', | |
418 | + margin:'2 2 2 2', | |
419 | + width: 80, | |
420 | + value: 5, | |
421 | + increment: 1, | |
422 | + minValue: 1, | |
423 | + maxValue: 20, | |
424 | + id: 'visu-scatter-size2', | |
425 | + listeners: { | |
426 | + change: function ( slider, newValue, thumb, eOpts ) { | |
427 | + var binValueField = Ext.getCmp('visu-scatter-size'); | |
428 | + binValueField.setValue(newValue); | |
429 | + }, | |
430 | + changecomplete: function(){ | |
431 | + var isNotColorBar = Ext.getCmp('Zaxis-fieldset'); | |
432 | + this.visuUI.plotChart(!isNotColorBar.collapsed); | |
433 | + }, | |
434 | + scope: this | |
435 | + } | |
436 | + }; | |
437 | + | |
438 | + | |
282 | 439 | return { |
283 | 440 | xtype : 'fieldset', |
441 | + collapsed:true, | |
442 | + collapsible:true, | |
443 | + layout:'fit', | |
284 | 444 | title : 'Plotting Options', |
285 | 445 | items : [ |
286 | 446 | plotTypeComboConfig, |
287 | - plotThemeComboConfig | |
447 | + plotSymbolConfig, | |
448 | + plotSizeConfig, | |
449 | + plotSizeNumber, | |
450 | + plotThemeComboConfig, | |
288 | 451 | ] |
289 | 452 | }; |
290 | 453 | }, |
291 | 454 | |
455 | + addColorsPicker: function (name, label, availableColors, mode) { | |
456 | + if (!mode) { | |
457 | + mode = 'standard'; | |
458 | + } | |
459 | + var me =this; | |
460 | + return new amdaPlotComp.PlotColorPicker({name: name, label: label, mode: mode, colors: availableColors, onChange: function(name, newValue, oldValue) { | |
461 | + var isNotColorBar = Ext.getCmp('Zaxis-fieldset'); | |
462 | + me.visuUI.plotChart(!isNotColorBar.collapsed); | |
463 | + }}); | |
464 | + }, | |
465 | + | |
292 | 466 | init : function (config) |
293 | 467 | { |
294 | 468 | var myConf = { |
469 | + autoScroll:true, | |
295 | 470 | items: [ |
296 | 471 | this.getAxisConfig(0,'X', config.parametersStore), |
297 | 472 | this.getAxisConfig(0,'Y', config.parametersStore), |
473 | + this.getAxisConfig(0,'Z', config.parametersStore,true), | |
298 | 474 | this.getPlottingOptionConfig() |
299 | - ] | |
475 | + ], | |
300 | 476 | }; |
301 | 477 | |
302 | 478 | Ext.apply (this, Ext.apply(arguments, myConf)); |
... | ... |
js/app/views/DownloadUI.js
... | ... | @@ -164,7 +164,7 @@ Ext.define('amdaUI.DownloadUI', { |
164 | 164 | return false; |
165 | 165 | }, |
166 | 166 | |
167 | - addParam: function (paramId, isLeaf, needArgs, components, predefined_args) { | |
167 | + addParam: function (paramId, isLeaf, needArgs, components, predefined_args, info) { | |
168 | 168 | // adding the parameter to the paramGrid |
169 | 169 | var paramObj = amdaModel.RequestParamObject.getEmptyObj(); |
170 | 170 | paramObj.paramid = paramId; |
... | ... | @@ -184,6 +184,10 @@ Ext.define('amdaUI.DownloadUI', { |
184 | 184 | if (predefined_args) { |
185 | 185 | paramObj.template_args = predefined_args; |
186 | 186 | } |
187 | + | |
188 | + if(info){ | |
189 | + paramObj.qtip= info; | |
190 | + } | |
187 | 191 | |
188 | 192 | var r = Ext.create('amdaModel.DownloadParam', paramObj); |
189 | 193 | var pos = this.paramGrid.store.getCount(); |
... | ... | @@ -415,6 +419,8 @@ Ext.define('amdaUI.DownloadUI', { |
415 | 419 | var idToSent; |
416 | 420 | var components = null; |
417 | 421 | var predefinedArgs = record.get('predefinedArgs'); |
422 | + var info = record.get('info'); | |
423 | + | |
418 | 424 | switch (record.get('nodeType')) { |
419 | 425 | case 'localParam': |
420 | 426 | case 'remoteParam': |
... | ... | @@ -488,11 +494,11 @@ Ext.define('amdaUI.DownloadUI', { |
488 | 494 | if (downModule) { |
489 | 495 | if (predefinedArgs) { |
490 | 496 | downModule.parseTemplatedParam(idToSent, function (param_info) { |
491 | - downModule.addParam(param_info.paramid, record.get('leaf'), record.get('needsArgs'), components, param_info.template_args); | |
497 | + downModule.addParam(param_info.paramid, record.get('leaf'), record.get('needsArgs'), components, param_info.template_args, info); | |
492 | 498 | }); |
493 | 499 | } |
494 | 500 | else { |
495 | - downModule.addParam(idToSent, record.get('leaf'), record.get('needsArgs'), components); | |
501 | + downModule.addParam(idToSent, record.get('leaf'), record.get('needsArgs'), components, null,info); | |
496 | 502 | return true; |
497 | 503 | } |
498 | 504 | } |
... | ... | @@ -540,6 +546,7 @@ Ext.define('amdaUI.DownloadUI', { |
540 | 546 | sortable: false, |
541 | 547 | menuDisabled: true, |
542 | 548 | renderer: function (val, meta, rec) { |
549 | + meta.tdAttr = 'data-qtip="' + rec.data.qtip + '"'; | |
543 | 550 | return rec.getParamFullName(); |
544 | 551 | } |
545 | 552 | }, |
... | ... |
js/app/views/IntervalUI.js
... | ... | @@ -231,7 +231,6 @@ Ext.define('amdaUI.IntervalUI', { |
231 | 231 | // margin : '10 0 5 5', // (top, right, bottom, left). |
232 | 232 | name: fieldName, |
233 | 233 | width : 230, |
234 | - id : fieldName+'id', | |
235 | 234 | emptyText: 'YYYY/MM/DD hh:mm:ss.uuu', |
236 | 235 | tip: 'Date formatted as YYYY/MM/DD hh:mm:ss.uuu', |
237 | 236 | format: 'Y/m/d H:i:s.u', |
... | ... |
js/app/views/OperationsTT.js
... | ... | @@ -63,19 +63,20 @@ Ext.define('amdaUI.OperationsTT', { |
63 | 63 | |
64 | 64 | var me = this; |
65 | 65 | me.parent.TTGrid.getSelectionModel().deselectAll(); |
66 | - AmdaAction.operationTTCacheIntervals(extend,shift, function () { | |
66 | + AmdaAction.operationTTCacheIntervals(extend,shift, me.isCat, function () { | |
67 | 67 | me.parent.TTGrid.getStore().reload(); |
68 | 68 | |
69 | 69 | // Update historic field |
70 | - var history = me.parent.formPanel.getForm().findField('history').getValue(); | |
71 | - if (extend != 0) { | |
72 | - history += " \n Extended by "+ dir*extendForm + " " + extendUnit; | |
70 | + if(!me.isCat){ | |
71 | + var history = me.parent.formPanel.getForm().findField('history').getValue(); | |
72 | + if (extend != 0) { | |
73 | + history += " \n Extended by "+ dir*extendForm + " " + extendUnit; | |
74 | + } | |
75 | + if (shift != 0) { | |
76 | + history += " \n Shifted by "+ dir*shiftForm + " " + shiftUnit; | |
77 | + } | |
78 | + me.parent.formPanel.getForm().findField('history').setValue(history); | |
73 | 79 | } |
74 | - if (shift != 0) { | |
75 | - history += " \n Shifted by "+ dir*shiftForm + " " + shiftUnit; | |
76 | - } | |
77 | - me.parent.formPanel.getForm().findField('history').setValue(history); | |
78 | - | |
79 | 80 | }); |
80 | 81 | |
81 | 82 | }, |
... | ... | @@ -96,13 +97,47 @@ Ext.define('amdaUI.OperationsTT', { |
96 | 97 | initComponent : function (){ |
97 | 98 | this.cntApply = 0; |
98 | 99 | this.formExtend = new Ext.form.Panel({ |
99 | - xtype: 'form', frame: true, buttonAlign: 'center', height: 75, | |
100 | + xtype: 'form', frame: true, buttonAlign: 'center', height: (this.isCat) ? 90 : 75, | |
100 | 101 | trackResetOnLoad : true, // reset to the last loaded record |
101 | 102 | fieldDefaults: { |
102 | 103 | labelWidth: 40, labelSeparator: '' |
103 | 104 | }, |
104 | - items: [ | |
105 | - { | |
105 | + items: (this.isCat) ? | |
106 | + [ | |
107 | + { | |
108 | + xtype: 'fieldcontainer', | |
109 | + layout:'hbox', | |
110 | + defaults: { | |
111 | + flex: 1, | |
112 | + }, | |
113 | + items: [ | |
114 | + { xtype: 'label',text: 'Extend',margin: '3 0 0 0' }, | |
115 | + {xtype:'numberfield', name: 'extend', hideTrigger: true, width: 50}, | |
116 | + { | |
117 | + xtype:'combo',name: 'extendUnit', store:['sec', 'min', 'hour', 'day'], | |
118 | + editable: false, width: 50, value: 'min', triggerAction: 'all' | |
119 | + }, | |
120 | + ] | |
121 | + }, | |
122 | + { | |
123 | + xtype: 'fieldcontainer', | |
124 | + layout:'hbox', | |
125 | + defaults: { | |
126 | + flex: 1, | |
127 | + //hideLabel: true | |
128 | + }, | |
129 | + items: [ | |
130 | + { xtype: 'label', text: 'Shift', margin: '3 0 0 0' }, | |
131 | + {xtype:'numberfield', name: 'shift', hideTrigger: true, width: 50}, | |
132 | + { | |
133 | + xtype:'combo',name: 'shiftUnit', store:['sec', 'min', 'hour', 'day'], | |
134 | + editable: false, width: 50, value: 'min', triggerAction: 'all' | |
135 | + }, | |
136 | + ] | |
137 | + } | |
138 | + ] | |
139 | + : | |
140 | + [{ | |
106 | 141 | xtype: 'fieldcontainer', |
107 | 142 | layout: 'hbox', |
108 | 143 | fieldLabel:'Extend', |
... | ... | @@ -148,6 +183,7 @@ Ext.define('amdaUI.OperationsTT', { |
148 | 183 | items: [ |
149 | 184 | {xtype: 'splitter', width: 5}, |
150 | 185 | this.formExtend, |
186 | + (this.isCat) ? {} : | |
151 | 187 | { |
152 | 188 | xtype: 'form', frame: true, |
153 | 189 | border: 1, |
... | ... | @@ -188,4 +224,4 @@ Ext.define('amdaUI.OperationsTT', { |
188 | 224 | Ext.apply (this , Ext.apply (this.initialConfig, config)); |
189 | 225 | this.callParent(arguments); |
190 | 226 | } |
191 | - }); | |
192 | 227 | \ No newline at end of file |
228 | + }); | |
... | ... |
js/app/views/ParamArgumentsUI.js
... | ... | @@ -21,6 +21,10 @@ Ext.define('amdaUI.ParamArgumentsUI', { |
21 | 21 | pluginOwner: null, |
22 | 22 | inRebuild: false, |
23 | 23 | |
24 | + requires: [ | |
25 | + 'amdaPlotObj.PlotObjectConfig' | |
26 | + ], | |
27 | + | |
24 | 28 | constructor: function (config) { |
25 | 29 | this.init(config); |
26 | 30 | this.callParent(arguments); |
... | ... | @@ -585,7 +589,8 @@ Ext.define('amdaUI.ParamArgumentsUI', { |
585 | 589 | var argumentField = Ext.create('Ext.form.field.Date', { |
586 | 590 | argId: 'template_' + key, |
587 | 591 | fieldLabel: argument.name, |
588 | - allowBlank: false, format: 'Y/m/d H:i:s.u', | |
592 | + allowBlank: false, | |
593 | + format: 'Y/m/d H:i:s.u', | |
589 | 594 | minValue:'1970/01/01 00:00:00.000', |
590 | 595 | value: parseInt(argument.default), |
591 | 596 | listeners: { |
... | ... | @@ -594,8 +599,8 @@ Ext.define('amdaUI.ParamArgumentsUI', { |
594 | 599 | if (!template_args) |
595 | 600 | template_args = {}; |
596 | 601 | |
597 | - if(field.isValid() && newValue.getTime() > 0 ){ | |
598 | - template_args[key] = newValue.getTime()/1000.; | |
602 | + if(field.isValid()){ | |
603 | + template_args[key] = (newValue.getTime() - newValue.getTimezoneOffset() * 60000)/1000.; | |
599 | 604 | } |
600 | 605 | else{ |
601 | 606 | template_args[key] = 0; |
... | ... |
js/app/views/ParameterUI.js
... | ... | @@ -371,11 +371,11 @@ Ext.define('amdaUI.ParameterUI', |
371 | 371 | if (paramModule) { |
372 | 372 | if (data.records[0].get('predefinedArgs')) { |
373 | 373 | paramModule.parseTemplatedParam(nameToSent, function (param_info) { |
374 | - paramModule.addParam(param_info.paramid, data.records[0].get('leaf'), true, components, param_info.template_args); | |
374 | + paramModule.addParam(param_info.paramid, data.records[0].get('leaf'), true, components, param_info.template_args, null); | |
375 | 375 | }); |
376 | 376 | } |
377 | 377 | else { |
378 | - paramModule.addParam(nameToSent, data.records[0].get('leaf'), data.records[0].get('needsArgs'), components); | |
378 | + paramModule.addParam(nameToSent, data.records[0].get('leaf'), data.records[0].get('needsArgs'), components,null,null); | |
379 | 379 | } |
380 | 380 | } |
381 | 381 | return true; |
... | ... |
js/app/views/PlotComponents/PlotContextManager.js
... | ... | @@ -144,6 +144,23 @@ Ext.define('amdaPlotComp.PlotContextManager', { |
144 | 144 | return isInterval; |
145 | 145 | }, |
146 | 146 | |
147 | + getInstantTimePrev :function(context) | |
148 | + { | |
149 | + if (!context.success) | |
150 | + return null; | |
151 | + | |
152 | + if(context.page.instantTimeNav) | |
153 | + return context.page.instantTimeNav.prevTime; | |
154 | + }, | |
155 | + | |
156 | + getInstantTimeNext :function(context) | |
157 | + { | |
158 | + if (!context.success) | |
159 | + return null; | |
160 | + | |
161 | + if(context.page.instantTimeNav) | |
162 | + return context.page.instantTimeNav.nextTime; | |
163 | + }, | |
147 | 164 | |
148 | 165 | getPanelAxisById : function(panelContext, axisId) |
149 | 166 | { |
... | ... |
js/app/views/PlotComponents/PlotPanelForm.js
... | ... | @@ -50,8 +50,8 @@ Ext.define('amdaPlotComp.PlotPanelForm', { |
50 | 50 | //Instant time visibility |
51 | 51 | var instantTimeField = this.getForm().findField('panel-instant-time'); |
52 | 52 | instantTimeField.setVisible(plotType == 'instantPlot'); |
53 | - var startDate = Ext.getCmp('startDateid').getValue(); | |
54 | - var stopDate = Ext.getCmp('stopDateid').getValue(); | |
53 | + var startDate = this.up().up().up().timeSelector.intervalSel.items.items[0].getValue(); | |
54 | + var stopDate = this.up().up().up().timeSelector.intervalSel.items.items[1].getValue(); | |
55 | 55 | if(startDate <= stopDate ){ |
56 | 56 | var interval = (stopDate-startDate)/2 |
57 | 57 | instantTimeField.setValue(new Date(stopDate-interval)); |
... | ... |
js/app/views/PlotComponents/PlotPreviewUI.js
... | ... | @@ -19,7 +19,8 @@ Ext.define('amdaPlotComp.PlotPreviewUI', { |
19 | 19 | |
20 | 20 | requires: [ |
21 | 21 | 'amdaPlotComp.PlotContextManager', |
22 | - 'amdaPlotComp.PlotResultImage' | |
22 | + 'amdaPlotComp.PlotResultImage', | |
23 | + 'amdaUI.PlotTabResultUI' | |
23 | 24 | ], |
24 | 25 | |
25 | 26 | panelImage : null, |
... | ... | @@ -27,7 +28,12 @@ Ext.define('amdaPlotComp.PlotPreviewUI', { |
27 | 28 | sliderPage : null, |
28 | 29 | contextualMenu : null, |
29 | 30 | hiddenForm: null, |
31 | + panelResultInstance:null, | |
30 | 32 | |
33 | + setPanelResultInstance: function(panelResultInstance_) | |
34 | + { | |
35 | + this.panelResultInstance = panelResultInstance_; | |
36 | + }, | |
31 | 37 | constructor: function(config) { |
32 | 38 | this.init(config); |
33 | 39 | this.callParent(arguments); |
... | ... | @@ -137,7 +143,9 @@ Ext.define('amdaPlotComp.PlotPreviewUI', { |
137 | 143 | this.crtContext = configResult.context; |
138 | 144 | |
139 | 145 | this.panelImage.setSrc(this.getImageUrl(configResult.folder, configResult.plotFile)); |
140 | - | |
146 | + var newTime = new Date(configResult.time); | |
147 | + newTime = Ext.Date.add(newTime, Ext.Date.MINUTE, newTime.getTimezoneOffset()); | |
148 | + Ext.getCmp('plotPreview-goto-Date' + configResult.interactiveId).setValue(newTime); | |
141 | 149 | var size = this.getImageSize(); |
142 | 150 | this.panelImage.setSize(size.width, size.height); |
143 | 151 | |
... | ... | @@ -149,6 +157,9 @@ Ext.define('amdaPlotComp.PlotPreviewUI', { |
149 | 157 | |
150 | 158 | this.crtContext = configResult.context; |
151 | 159 | this.interactiveId = configResult.interactiveId; |
160 | + this.time = new Date(configResult.time); | |
161 | + this.time = Ext.Date.add(this.time, Ext.Date.MINUTE, this.time.getTimezoneOffset()); | |
162 | + this.panelId= configResult.panelId | |
152 | 163 | |
153 | 164 | this.coordinatesField = new Ext.toolbar.TextItem({ |
154 | 165 | width: 300, |
... | ... | @@ -174,7 +185,58 @@ Ext.define('amdaPlotComp.PlotPreviewUI', { |
174 | 185 | } |
175 | 186 | } |
176 | 187 | }); |
177 | - | |
188 | + var topToolbar= | |
189 | + { | |
190 | + xtype:'toolbar', | |
191 | + dock:'top', | |
192 | + items:[{ | |
193 | + xtype: 'datefield', | |
194 | + allowBlank:true, | |
195 | + format: 'Y-m-d\\TH:i:s.u', | |
196 | + id: 'plotPreview-goto-Date' + this.interactiveId, | |
197 | + value:this.time, | |
198 | + width: 175, | |
199 | + renderer: function (value) { | |
200 | + if (value != null) { | |
201 | + if (Ext.isDate(value)) { | |
202 | + return Ext.Date.format(value, 'Y-m-d\\TH:i:s.u'); | |
203 | + } else { | |
204 | + return Ext.Date.format(new Date(value), 'Y-m-d\\TH:i:s.u'); | |
205 | + } | |
206 | + } else { | |
207 | + return value; | |
208 | + } | |
209 | + } | |
210 | + | |
211 | + },'-', | |
212 | + { | |
213 | + text: 'Change cut time', | |
214 | + scope: this, | |
215 | + handler: function (bt) { | |
216 | + var newTime = Ext.getCmp('plotPreview-goto-Date' + me.interactiveId).getValue(); | |
217 | + newTime = Ext.Date.add(newTime, Ext.Date.MINUTE, -newTime.getTimezoneOffset()); | |
218 | + me.panelResultInstance.callInteractivePlot({ 'action': 'instant', 'interactiveId': me.panelResultInstance.interactiveId, 'panelId': me.panelId, 'time': newTime.toISOString()}); | |
219 | + } | |
220 | + }, | |
221 | + '-', | |
222 | + { | |
223 | + xtype:'button', | |
224 | + text : 'Previous', | |
225 | + handler: function(){ | |
226 | + var newTime = new Date(amdaPlotComp.PlotContextManager.getInstantTimePrev(me.crtContext)*1000); | |
227 | + me.panelResultInstance.callInteractivePlot({ 'action': 'instant', 'interactiveId': me.panelResultInstance.interactiveId, 'panelId': me.panelId, 'time': newTime.toISOString()}); | |
228 | + } | |
229 | + }, | |
230 | + { | |
231 | + xtype:'button', | |
232 | + text : 'Next', | |
233 | + handler: function(){ | |
234 | + var newTime = new Date(amdaPlotComp.PlotContextManager.getInstantTimeNext(me.crtContext) *1000); | |
235 | + me.panelResultInstance.callInteractivePlot({ 'action': 'instant', 'interactiveId': me.panelResultInstance.interactiveId, 'panelId': me.panelId, 'time': newTime.toISOString()}); | |
236 | + } | |
237 | + } | |
238 | + ] | |
239 | + } | |
178 | 240 | var mouseToolbar = { |
179 | 241 | xtype: 'toolbar', |
180 | 242 | height: 25, |
... | ... | @@ -223,11 +285,11 @@ Ext.define('amdaPlotComp.PlotPreviewUI', { |
223 | 285 | |
224 | 286 | var plotPreviewPanelConfig = { |
225 | 287 | preventHeader : true, |
226 | - autoScroll: true, | |
288 | + autoScroll: false, | |
227 | 289 | items: [ |
228 | 290 | this.createPlotImage(configResult.folder, configResult.plotFile) |
229 | 291 | ], |
230 | - dockedItems: [mouseToolbar] | |
292 | + dockedItems: [topToolbar,mouseToolbar] | |
231 | 293 | }; |
232 | 294 | |
233 | 295 | Ext.apply(this , plotPreviewPanelConfig); |
... | ... |
js/app/views/PlotComponents/PlotTabPanel.js
... | ... | @@ -178,6 +178,16 @@ Ext.define('amdaPlotComp.PlotTabPanel', { |
178 | 178 | return this.getActiveTab().child(); |
179 | 179 | return null; |
180 | 180 | }, |
181 | + | |
182 | + setActiveTabByInteractiveId : function(interactiveId) { | |
183 | + var tabsInfo = this.getTabsInfo(); | |
184 | + var me = this; | |
185 | + Ext.Array.each(tabsInfo, function(tabInfo) { | |
186 | + if (('plot_'+tabInfo.object.get('tab-index')) == interactiveId) { | |
187 | + me.setActiveTab(tabInfo.tabItem); | |
188 | + } | |
189 | + }); | |
190 | + }, | |
181 | 191 | |
182 | 192 | updateTimeObjects : function() { |
183 | 193 | for (i = 0; i < this.items.getCount(); ++i) |
... | ... | @@ -201,6 +211,7 @@ Ext.define('amdaPlotComp.PlotTabPanel', { |
201 | 211 | plotNode.get('object').set('tab-index', tabContent.tabIndex); |
202 | 212 | plotNode.get('object').set('tab-title', tabContent.getPlotTitle()); |
203 | 213 | tabsInfo.push({ |
214 | + tabItem: tabItem, | |
204 | 215 | name: plotNode.get('object').get('tab-title'), |
205 | 216 | object: plotNode.get('object'), |
206 | 217 | selected: (tabItem == this.getActiveTab()), |
... | ... |
js/app/views/PlotComponents/PlotTree.js
... | ... | @@ -611,179 +611,180 @@ Ext.define('amdaPlotComp.PlotTree', { |
611 | 611 | return false; |
612 | 612 | }, |
613 | 613 | |
614 | - dropParamToCreate: function (targetNode, position, paramId, data) | |
615 | - { | |
616 | - var panelObject = null; | |
617 | - if (targetNode == null) | |
618 | - { | |
619 | - //create new panel | |
620 | - panelObject = this.tabObject.createNewPanel(); | |
621 | - } else | |
622 | - { | |
623 | - switch (targetNode.$className) | |
624 | - { | |
625 | - case 'amdaPlotObj.PlotParamsTreeNode' : | |
626 | - case 'amdaPlotObj.PlotPanelTreeNode' : | |
627 | - case 'amdaPlotObj.PlotAxesTreeNode' : | |
628 | - panelObject = targetNode.object; | |
629 | - break; | |
630 | - case 'amdaPlotObj.PlotTimeAxisTreeNode' : | |
631 | - case 'amdaPlotObj.PlotEpochAxisTreeNode' : | |
632 | - case 'amdaPlotObj.PlotXAxisTreeNode' : | |
633 | - case 'amdaPlotObj.PlotYLeftAxisTreeNode' : | |
634 | - case 'amdaPlotObj.PlotYRightAxisTreeNode' : | |
635 | - case 'amdaPlotObj.PlotColorAxisTreeNode' : | |
636 | - case 'amdaPlotObj.PlotParamTreeNode' : | |
637 | - panelObject = targetNode.parentNode.object; | |
638 | - break; | |
639 | - default: | |
640 | - //create new panel | |
641 | - panelObject = this.tabObject.createNewPanel(); | |
642 | - } | |
643 | - } | |
614 | + dropParamToCreate: function (targetNode, position, paramId, data) | |
615 | + { | |
616 | + var panelObject = null; | |
617 | + if (targetNode == null) | |
618 | + { | |
619 | + //create new panel | |
620 | + panelObject = this.tabObject.createNewPanel(); | |
621 | + } else | |
622 | + { | |
623 | + switch (targetNode.$className) | |
624 | + { | |
625 | + case 'amdaPlotObj.PlotParamsTreeNode' : | |
626 | + case 'amdaPlotObj.PlotPanelTreeNode' : | |
627 | + case 'amdaPlotObj.PlotAxesTreeNode' : | |
628 | + panelObject = targetNode.object; | |
629 | + break; | |
630 | + case 'amdaPlotObj.PlotTimeAxisTreeNode' : | |
631 | + case 'amdaPlotObj.PlotEpochAxisTreeNode' : | |
632 | + case 'amdaPlotObj.PlotXAxisTreeNode' : | |
633 | + case 'amdaPlotObj.PlotYLeftAxisTreeNode' : | |
634 | + case 'amdaPlotObj.PlotYRightAxisTreeNode' : | |
635 | + case 'amdaPlotObj.PlotColorAxisTreeNode' : | |
636 | + case 'amdaPlotObj.PlotParamTreeNode' : | |
637 | + panelObject = targetNode.parentNode.object; | |
638 | + break; | |
639 | + default: | |
640 | + //create new panel | |
641 | + panelObject = this.tabObject.createNewPanel(); | |
642 | + } | |
643 | + } | |
644 | 644 | |
645 | - //Create param object | |
646 | - var me = this; | |
647 | - if ((typeof data !== "undefined") && (typeof data.predefinedArgs !== "undefined") && data.predefinedArgs) { | |
648 | - var plotModule = myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.plot.id); | |
649 | - plotModule.parseTemplatedParam(paramId, function(param_info) { | |
650 | - data.template_args = param_info.template_args; | |
651 | - panelObject.createNewParam(param_info.paramid, data, function (newParamObject) { | |
652 | - //Rebuild params node | |
653 | - me.buildPanelsNode(newParamObject.getId()); | |
654 | - }); | |
655 | - //downModule.addParam(param_info.paramid, true, true, components, param_info.template_args); | |
656 | - }); | |
657 | - } | |
658 | - else { | |
659 | - panelObject.createNewParam(paramId, data, function (newParamObject) { | |
660 | - //Rebuild params node | |
661 | - me.buildPanelsNode(newParamObject.getId()); | |
662 | - //BRE newParamObject | |
663 | - }); | |
664 | - } | |
665 | - }, | |
645 | + //Create param object | |
646 | + var me = this; | |
647 | + if ((typeof data !== "undefined") && (typeof data.predefinedArgs !== "undefined") && data.predefinedArgs) { | |
648 | + var plotModule = myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.plot.id); | |
649 | + plotModule.parseTemplatedParam(paramId, function(param_info) { | |
650 | + data.template_args = param_info.template_args; | |
651 | + panelObject.createNewParam(param_info.paramid, data, function (newParamObject) { | |
652 | + //Rebuild params node | |
653 | + me.buildPanelsNode(newParamObject.getId()); | |
654 | + }); | |
655 | + //downModule.addParam(param_info.paramid, true, true, components, param_info.template_args); | |
656 | + }); | |
657 | + } | |
658 | + else { | |
659 | + panelObject.createNewParam(paramId, data, function (newParamObject) { | |
660 | + //Rebuild params node | |
661 | + me.buildPanelsNode(newParamObject.getId()); | |
662 | + //BRE newParamObject | |
663 | + }); | |
664 | + } | |
665 | + }, | |
666 | 666 | |
667 | - dropRecord: function (record, targetNode, position) | |
668 | - { | |
669 | - var selModel = this.getSelectionModel(); | |
667 | + dropRecord: function (record, targetNode, position) | |
668 | + { | |
669 | + var selModel = this.getSelectionModel(); | |
670 | 670 | |
671 | - //select the target node if defined | |
672 | - if (targetNode) | |
673 | - selModel.select(targetNode); | |
674 | - else | |
675 | - selModel.deselectAll(); | |
671 | + //select the target node if defined | |
672 | + if (targetNode) | |
673 | + selModel.select(targetNode); | |
674 | + else | |
675 | + selModel.deselectAll(); | |
676 | 676 | |
677 | - switch (record.$className) | |
678 | - { | |
679 | - case 'amdaModel.sharedTimeTableNode' : | |
680 | - case 'amdaModel.sharedCatalogNode' : | |
681 | - case 'amdaModel.TimeTableNode' : | |
682 | - case 'amdaModel.CatalogNode' : | |
683 | - if (!record.get('leaf')) | |
684 | - return false; | |
685 | - this.dropParamToCreate(targetNode, position, record.get('id'), {'isTTCat': true, 'name': record.get('text')}); | |
686 | - return true; | |
687 | - case 'amdaModel.LocalParamNode' : | |
688 | - case 'amdaModel.RemoteParamNode' : | |
689 | - case 'amdaModel.RemoteSimuParamNode' : | |
690 | - if (!record.get('isParameter') || record.get('disable')) | |
691 | - return false; | |
677 | + switch (record.$className) | |
678 | + { | |
679 | + case 'amdaModel.sharedTimeTableNode' : | |
680 | + case 'amdaModel.sharedCatalogNode' : | |
681 | + case 'amdaModel.TimeTableNode' : | |
682 | + case 'amdaModel.CatalogNode' : | |
683 | + if (!record.get('leaf')) | |
684 | + return false; | |
685 | + this.dropParamToCreate(targetNode, position, record.get('id'), {'isTTCat': true, 'name': record.get('text'), 'info':record.data.info}); | |
686 | + return true; | |
687 | + case 'amdaModel.LocalParamNode' : | |
688 | + case 'amdaModel.RemoteParamNode' : | |
689 | + case 'amdaModel.RemoteSimuParamNode' : | |
690 | + if (!record.get('isParameter') || record.get('disable')) | |
691 | + return false; | |
692 | 692 | |
693 | - if (record.get('alias') != "") | |
694 | - this.dropParamToCreate(targetNode, position, "#" + record.get('alias')); | |
695 | - else { | |
696 | - var isVector = record.get('iconCls') == 'icon-vector'; | |
697 | - var component_info = record.get('component_info'); | |
698 | - var param_id = record.get('id'); | |
699 | - var plot_only = record.get('notyet'); | |
700 | - var components = null; | |
701 | - var predefinedArgs = record.get('predefinedArgs'); | |
702 | - if (component_info && component_info.parentId) { | |
703 | - //It's a component | |
704 | - param_id = component_info.parentId; | |
705 | - components = []; | |
706 | - if (component_info.index1) | |
707 | - components['index1'] = component_info.index1; | |
708 | - if (component_info.index2) | |
709 | - components['index2'] = component_info.index2; | |
693 | + if (record.get('alias') != "") | |
694 | + this.dropParamToCreate(targetNode, position, "#" + record.get('alias')); | |
695 | + else { | |
696 | + var isVector = record.get('iconCls') == 'icon-vector'; | |
697 | + var component_info = record.get('component_info'); | |
698 | + var param_id = record.get('id'); | |
699 | + var plot_only = record.get('notyet'); | |
700 | + var param_info = record.data.info; | |
701 | + var components = null; | |
702 | + var predefinedArgs = record.get('predefinedArgs'); | |
703 | + if (component_info && component_info.parentId) { | |
704 | + //It's a component | |
705 | + param_id = component_info.parentId; | |
706 | + components = []; | |
707 | + if (component_info.index1) | |
708 | + components['index1'] = component_info.index1; | |
709 | + if (component_info.index2) | |
710 | + components['index2'] = component_info.index2; | |
710 | 711 | predefinedArgs = record.parentNode.get('predefinedArgs'); |
711 | - } | |
712 | - this.dropParamToCreate(targetNode, position, param_id, {'components': components, 'isVector': isVector, 'plotOnly': plot_only, 'predefinedArgs': predefinedArgs}); | |
713 | - } | |
714 | - return true; | |
715 | - case 'amdaModel.AliasNode' : | |
716 | - if (!record.isLeaf()) | |
717 | - return false; | |
718 | - this.dropParamToCreate(targetNode, position, "#" + record.get('text')); | |
719 | - return true; | |
720 | - case 'amdaModel.DerivedParamNode' : | |
721 | - if (!record.get('isParameter')) | |
722 | - return false; | |
723 | - //targetNode, position, paramId, paramComponents, isVector, plotOnly | |
724 | - var isVector = record.get('iconCls') == 'icon-vector'; | |
725 | - var components = null; | |
726 | - var dim1=record.get("dim_1"); | |
727 | - var dim2=record.get("dim_2"); | |
728 | - if(dim1>3 && dim2==1) | |
729 | - { | |
730 | - components = []; | |
731 | - components['index2'] ="0" | |
732 | - }else if(dim1==1 && dim2>1) | |
733 | - { | |
734 | - components = []; | |
735 | - components['index1'] ="0" | |
736 | - } | |
737 | - this.dropParamToCreate(targetNode, position, "ws_" + record.get('text'), {'components': components, 'isVector': isVector}); | |
738 | - return true; | |
739 | - case 'amdaModel.DerivedParamComponentNode': | |
740 | - if (!record.get('isParameter')) | |
741 | - return false; | |
742 | - //targetNode, position, paramId, paramComponents, isVector, plotOnly | |
743 | - paramId=record.get('text'); | |
744 | - var parentId = paramId.substr(0, paramId.length - 3); | |
745 | - idToSent = "ws_" + parentId; | |
746 | - var regExp = /\(([\d]+)\)/; | |
747 | - var component_index = regExp.exec(paramId); | |
748 | - if (component_index) | |
749 | - { | |
750 | - components = []; | |
751 | - components['index1'] = component_index[1]; | |
752 | - } | |
753 | - this.dropParamToCreate(targetNode, position,idToSent, {'components': components}); | |
754 | - return true; | |
755 | - case 'amdaModel.MyDataParamComponentNode': | |
756 | - if (!record.get('isParameter')) | |
757 | - return false; | |
758 | - //targetNode, position, paramId, paramComponents, isVector, plotOnly | |
759 | - paramId=record.get('text'); | |
760 | - var parentId = paramId.substr(0, paramId.length - 3); | |
761 | - idToSent = "wsd_" + parentId; | |
762 | - var regExp = /\(([\d]+)\)/; | |
763 | - var component_index = regExp.exec(paramId); | |
764 | - if (component_index) | |
765 | - { | |
766 | - components = []; | |
767 | - components['index1'] = component_index[1]; | |
768 | - } | |
769 | - this.dropParamToCreate(targetNode, position,idToSent, {'components': components}); | |
770 | - return true; | |
771 | - case 'amdaModel.MyDataParamNode' : | |
772 | - if (!record.get('isParameter')) | |
773 | - return false; | |
774 | - this.dropParamToCreate(targetNode, position, "wsd_" + record.get('text')); | |
775 | - return true; | |
776 | - case 'amdaPlotObj.PlotParamTreeNode' : | |
777 | - return this.moveParam(record, targetNode, position); | |
778 | - case 'amdaPlotObj.PlotPanelTreeNode' : | |
779 | - return this.movePanel(record, targetNode, position); | |
780 | - case 'amdaModel.SpecialParamNode' : | |
781 | - if (!record.get('isParameter')) | |
782 | - return false; | |
783 | - this.dropParamToCreate(targetNode, position, record.get('id')); | |
784 | - return true; | |
785 | - default : | |
786 | - return false; | |
712 | + } | |
713 | + this.dropParamToCreate(targetNode, position, param_id, {'components': components, 'isVector': isVector, 'plotOnly': plot_only, 'predefinedArgs': predefinedArgs, 'info':param_info}); | |
714 | + } | |
715 | + return true; | |
716 | + case 'amdaModel.AliasNode' : | |
717 | + if (!record.isLeaf()) | |
718 | + return false; | |
719 | + this.dropParamToCreate(targetNode, position, "#" + record.get('text')); | |
720 | + return true; | |
721 | + case 'amdaModel.DerivedParamNode' : | |
722 | + if (!record.get('isParameter')) | |
723 | + return false; | |
724 | + //targetNode, position, paramId, paramComponents, isVector, plotOnly | |
725 | + var isVector = record.get('iconCls') == 'icon-vector'; | |
726 | + var components = null; | |
727 | + var dim1=record.get("dim_1"); | |
728 | + var dim2=record.get("dim_2"); | |
729 | + if(dim1>3 && dim2==1) | |
730 | + { | |
731 | + components = []; | |
732 | + components['index2'] ="0" | |
733 | + }else if(dim1==1 && dim2>1) | |
734 | + { | |
735 | + components = []; | |
736 | + components['index1'] ="0" | |
737 | + } | |
738 | + this.dropParamToCreate(targetNode, position, "ws_" + record.get('text'), {'components': components, 'isVector': isVector, 'info':record.data.info}); | |
739 | + return true; | |
740 | + case 'amdaModel.DerivedParamComponentNode': | |
741 | + if (!record.get('isParameter')) | |
742 | + return false; | |
743 | + //targetNode, position, paramId, paramComponents, isVector, plotOnly | |
744 | + paramId=record.get('text'); | |
745 | + var parentId = paramId.substr(0, paramId.length - 3); | |
746 | + idToSent = "ws_" + parentId; | |
747 | + var regExp = /\(([\d]+)\)/; | |
748 | + var component_index = regExp.exec(paramId); | |
749 | + if (component_index) | |
750 | + { | |
751 | + components = []; | |
752 | + components['index1'] = component_index[1]; | |
753 | + } | |
754 | + this.dropParamToCreate(targetNode, position,idToSent, {'components': components}); | |
755 | + return true; | |
756 | + case 'amdaModel.MyDataParamComponentNode': | |
757 | + if (!record.get('isParameter')) | |
758 | + return false; | |
759 | + //targetNode, position, paramId, paramComponents, isVector, plotOnly | |
760 | + paramId=record.get('text'); | |
761 | + var parentId = paramId.substr(0, paramId.length - 3); | |
762 | + idToSent = "wsd_" + parentId; | |
763 | + var regExp = /\(([\d]+)\)/; | |
764 | + var component_index = regExp.exec(paramId); | |
765 | + if (component_index) | |
766 | + { | |
767 | + components = []; | |
768 | + components['index1'] = component_index[1]; | |
769 | + } | |
770 | + this.dropParamToCreate(targetNode, position,idToSent, {'components': components}); | |
771 | + return true; | |
772 | + case 'amdaModel.MyDataParamNode' : | |
773 | + if (!record.get('isParameter')) | |
774 | + return false; | |
775 | + this.dropParamToCreate(targetNode, position, "wsd_" + record.get('text')); | |
776 | + return true; | |
777 | + case 'amdaPlotObj.PlotParamTreeNode' : | |
778 | + return this.moveParam(record, targetNode, position); | |
779 | + case 'amdaPlotObj.PlotPanelTreeNode' : | |
780 | + return this.movePanel(record, targetNode, position); | |
781 | + case 'amdaModel.SpecialParamNode' : | |
782 | + if (!record.get('isParameter')) | |
783 | + return false; | |
784 | + this.dropParamToCreate(targetNode, position, record.get('id')); | |
785 | + return true; | |
786 | + default : | |
787 | + return false; | |
787 | 788 | } |
788 | 789 | return false; |
789 | 790 | }, |
... | ... |
js/app/views/PlotComponents/PlotZoomPlug.js
... | ... | @@ -232,6 +232,7 @@ Ext.define('amdaPlotComp.PlotZoomPlug', { |
232 | 232 | var timeObj = new Object(); |
233 | 233 | timeObj.start = this.form.getForm().findField('zoom-min-time').getValue(); |
234 | 234 | timeObj.stop = this.form.getForm().findField('zoom-max-time').getValue(); |
235 | + timeObj.interactiveId = this.interactiveId; | |
235 | 236 | var plotModule = myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.plot.id); |
236 | 237 | plotModule.setTimeInterval(timeObj); |
237 | 238 | }, |
... | ... |
js/app/views/PlotTabResultUI.js
... | ... | @@ -87,6 +87,7 @@ Ext.define('amdaUI.PlotTabResultUI', { |
87 | 87 | |
88 | 88 | var me = this; |
89 | 89 | var insertIntervalItem = null; |
90 | + var plotFunctionItem = null; | |
90 | 91 | Ext.each(panelContext.plotArea.axes, function (axis) { |
91 | 92 | //Events for zoom on a time axis |
92 | 93 | var onMinTimeSelection = function (posX) { |
... | ... | @@ -161,7 +162,7 @@ Ext.define('amdaUI.PlotTabResultUI', { |
161 | 162 | scope: this |
162 | 163 | }); |
163 | 164 | //plotFunction Menu |
164 | - plotFunctionItem = { | |
165 | + /*plotFunctionItem = { | |
165 | 166 | text: 'Apply a Function on Interval', |
166 | 167 | handler: function (item, e) { |
167 | 168 | zoomPlugin.show(me.interactiveId, axis.id, panelContext.id, true); |
... | ... | @@ -169,7 +170,7 @@ Ext.define('amdaUI.PlotTabResultUI', { |
169 | 170 | me.panelImage.startZoom(true, 0, size.height, onMinTimeSelection, onMaxTimeSelection); |
170 | 171 | }, |
171 | 172 | scope: this |
172 | - }; | |
173 | + };*/ | |
173 | 174 | insertIntervalItem = { |
174 | 175 | text: 'Insert Interval in TimeTable or Catalog', |
175 | 176 | handler: function (item, e) { |
... | ... | @@ -335,8 +336,8 @@ Ext.define('amdaUI.PlotTabResultUI', { |
335 | 336 | handler: function () { |
336 | 337 | |
337 | 338 | var crtTime = new Date(crtTimestamp * 1000); |
338 | - crtTime = Ext.Date.add(crtTime, Ext.Date.MINUTE, crtTime.getTimezoneOffset()); | |
339 | - me.callInteractivePlot({ 'action': 'instant', 'interactiveId': this.interactiveId, 'panelId': panel.id, 'time': crtTime }); | |
339 | + //crtTime = Ext.Date.add(crtTime, Ext.Date.MINUTE, crtTime.getTimezoneOffset()); | |
340 | + me.callInteractivePlot({ 'action': 'instant', 'interactiveId': this.interactiveId, 'panelId': panel.id, 'time': crtTime.toISOString() }); | |
340 | 341 | }, |
341 | 342 | scope: me |
342 | 343 | }, |
... | ... | @@ -468,8 +469,7 @@ Ext.define('amdaUI.PlotTabResultUI', { |
468 | 469 | if (result) { |
469 | 470 | console.log(result); |
470 | 471 | if (result.success) { |
471 | - plotModule.updateInteractiveSession(result, false); | |
472 | - postProcess(); | |
472 | + plotModule.updateInteractiveSession(result, false, obj['panelId'], obj['time']); | |
473 | 473 | } |
474 | 474 | else |
475 | 475 | myDesktopApp.errorMsg('Interactive action error - ' + result.message); |
... | ... |
js/app/views/PlotUI.js
... | ... | @@ -140,6 +140,9 @@ Ext.define('amdaUI.PlotUI', { |
140 | 140 | setTimeFromData : function(obj) { |
141 | 141 | if (!obj.start || !obj.stop) |
142 | 142 | return; |
143 | + if (obj.interactiveId) { | |
144 | + this.plotTabs.setActiveTabByInteractiveId(obj.interactiveId); | |
145 | + } | |
143 | 146 | var plotTab = this.plotTabs.getCurrentPlotTabContent(); |
144 | 147 | if (plotTab) |
145 | 148 | plotTab.setTime(obj.start, obj.stop); |
... | ... |
js/app/views/PlotlyContainer.js
1 | 1 | Ext.define('amdaUI.PlotlyContainer', { |
2 | 2 | extend: 'Ext.container.Container', |
3 | + | |
4 | + alias: 'widget.PlotlyContainer', | |
3 | 5 | |
4 | 6 | constructor: function(config) { |
5 | 7 | this.init(config); |
... | ... | @@ -23,7 +25,7 @@ Ext.define('amdaUI.PlotlyContainer', { |
23 | 25 | } |
24 | 26 | }, |
25 | 27 | resize: function(container, eOpts) { |
26 | - var update = { | |
28 | + var update = { | |
27 | 29 | width: me.getEl().getWidth(), |
28 | 30 | height: me.getEl().getHeight() |
29 | 31 | }; |
... | ... |
js/app/views/SearchUI.js
... | ... | @@ -386,11 +386,11 @@ Ext.define('amdaUI.SearchUI', |
386 | 386 | if (searchModule) { |
387 | 387 | if (data.records[0].get('predefinedArgs')) { |
388 | 388 | searchModule.parseTemplatedParam(nameToSent, function (param_info) { |
389 | - searchModule.addParam(param_info.paramid, data.records[0].get('leaf'), true, components, param_info.template_args); | |
389 | + searchModule.addParam(param_info.paramid, data.records[0].get('leaf'), true, components, param_info.template_args, null); | |
390 | 390 | }); |
391 | 391 | } |
392 | 392 | else { |
393 | - searchModule.addParam(nameToSent, data.records[0].get('leaf'), data.records[0].get('needsArgs'), components); | |
393 | + searchModule.addParam(nameToSent, data.records[0].get('leaf'), data.records[0].get('needsArgs'), components, null, null); | |
394 | 394 | } |
395 | 395 | } |
396 | 396 | return true; |
... | ... |
js/app/views/StatisticsUI.js
... | ... | @@ -50,7 +50,7 @@ Ext.define('amdaUI.StatisticsUI', |
50 | 50 | parentUI.paramGrid.getView().refresh(); |
51 | 51 | }, |
52 | 52 | |
53 | - addParam: function (paramId, isLeaf, needArgs, components) | |
53 | + addParam: function (paramId, isLeaf, needArgs, components, predefined_args,info) | |
54 | 54 | { |
55 | 55 | // adding the parameter to the paramGrid |
56 | 56 | var paramObj = amdaModel.RequestParamObject.getEmptyObj(); |
... | ... | @@ -68,6 +68,10 @@ Ext.define('amdaUI.StatisticsUI', |
68 | 68 | } |
69 | 69 | } |
70 | 70 | |
71 | + if(info){ | |
72 | + paramObj.qtip= info; | |
73 | + } | |
74 | + | |
71 | 75 | var r = Ext.create('amdaModel.StatisticParam', paramObj); |
72 | 76 | this.paramGrid.getStore().add(r); |
73 | 77 | this.paramGrid.getSelectionModel().select(this.paramGrid.getStore().getCount() - 1); |
... | ... | @@ -296,6 +300,7 @@ Ext.define('amdaUI.StatisticsUI', |
296 | 300 | sortable: false, |
297 | 301 | menuDisabled: true, |
298 | 302 | renderer: function (val, meta, rec) { |
303 | + meta.tdAttr = 'data-qtip="' + rec.data.qtip + '"'; | |
299 | 304 | return rec.getParamFullName(); |
300 | 305 | } |
301 | 306 | }, |
... | ... | @@ -366,6 +371,7 @@ Ext.define('amdaUI.StatisticsUI', |
366 | 371 | return false; |
367 | 372 | var nameToSent; |
368 | 373 | var components = null; |
374 | + var info = data.records[0].get('info'); | |
369 | 375 | |
370 | 376 | switch (data.records[0].data.nodeType) |
371 | 377 | { |
... | ... | @@ -449,11 +455,11 @@ Ext.define('amdaUI.StatisticsUI', |
449 | 455 | { |
450 | 456 | if (data.records[0].get('predefinedArgs')) { |
451 | 457 | module.parseTemplatedParam(nameToSent, function(param_info) { |
452 | - module.addParam(param_info.paramid, data.records[0].get('leaf'), true, components, param_info.template_args); | |
458 | + module.addParam(param_info.paramid, data.records[0].get('leaf'), true, components, param_info.template_args, info); | |
453 | 459 | }); |
454 | 460 | } |
455 | 461 | else { |
456 | - module.addParam(nameToSent, data.records[0].get('leaf'), data.records[0].get('needsArgs'), components); | |
462 | + module.addParam(nameToSent, data.records[0].get('leaf'), data.records[0].get('needsArgs'), components,null,info); | |
457 | 463 | } |
458 | 464 | } |
459 | 465 | return true; |
... | ... |
js/app/views/VisuUI.js
... | ... | @@ -149,9 +149,9 @@ Ext.define('amdaUI.VisuUI', { |
149 | 149 | return false; |
150 | 150 | }, |
151 | 151 | |
152 | - plotChart: function () { | |
152 | + plotChart: function (isColorBar) { | |
153 | 153 | var tabPanel = Ext.getCmp('visu-tabpanel'); |
154 | - var allData = tabPanel.activeTab.items.items[0].getChartConfig(this.catalogStore); | |
154 | + var allData = tabPanel.activeTab.items.items[0].getChartConfig(this.catalogStore,isColorBar); | |
155 | 155 | this.replaceChart(allData); |
156 | 156 | }, |
157 | 157 | |
... | ... | @@ -226,7 +226,7 @@ Ext.define('amdaUI.VisuUI', { |
226 | 226 | }); |
227 | 227 | |
228 | 228 | this.emptyChartConfig = { |
229 | - xtype: 'amdaUI.PlotlyContainer', | |
229 | + xtype: 'PlotlyContainer', | |
230 | 230 | id: 'visu-chart', |
231 | 231 | }; |
232 | 232 | |
... | ... | @@ -255,12 +255,15 @@ Ext.define('amdaUI.VisuUI', { |
255 | 255 | { |
256 | 256 | xtype: 'container', |
257 | 257 | region: 'center', |
258 | - layout: 'border', | |
258 | + layout: { | |
259 | + type: 'hbox', | |
260 | + align: 'stretch' | |
261 | + }, | |
259 | 262 | items: [ |
260 | 263 | { |
261 | 264 | xtype: 'tabpanel', |
262 | 265 | region: 'west', |
263 | - width: 250, | |
266 | + width: 275, | |
264 | 267 | // height: 400, |
265 | 268 | id: 'visu-tabpanel', |
266 | 269 | listeners:{ |
... | ... | @@ -270,7 +273,14 @@ Ext.define('amdaUI.VisuUI', { |
270 | 273 | scope: this |
271 | 274 | } |
272 | 275 | }, |
273 | - this.emptyChartConfig | |
276 | + { | |
277 | + xtype: 'container', | |
278 | + layout:'fit', | |
279 | + flex: 1, | |
280 | + items: [ | |
281 | + this.emptyChartConfig | |
282 | + ] | |
283 | + } | |
274 | 284 | ] |
275 | 285 | } |
276 | 286 | ], |
... | ... |
php/WebServices/xml/AmdaPlots.xml
... | ... | @@ -84,7 +84,30 @@ |
84 | 84 | <param name='pas_momgr1_v_rtn_tot'/> |
85 | 85 | </mission> |
86 | 86 | <mission xml:id='SOLO'> |
87 | - <param name='solo_het_tot_eflux(0)'/> | |
88 | - <param name='solo_het_total_hflux(16)'/> | |
87 | + <param name='solo_het_omni_eflux(0)'/> | |
88 | + <param name='solo_het_omni_hflux(16)'/> | |
89 | + </mission> | |
90 | + <mission xml:id='ROSETTA'> | |
91 | + <param name='ros_ib_totrsmp'/> | |
92 | + <param name='ros_ib_rsmp'/> | |
93 | + </mission> | |
94 | + <mission xml:id='JUNO_CRUISE'> | |
95 | + <param name='juno_fgm_cruise60_mag'/> | |
96 | + <param name='juno_fgm_cruise60_rtn'/> | |
97 | + </mission> | |
98 | + <mission xml:id='JUNO_JUPITER_ORBIT'> | |
99 | + <param name='juno_fgm_orb60_mag'/> | |
100 | + <param name='juno_fgm_orb60_jso'/> | |
101 | + </mission> | |
102 | + <mission xml:id='CASSINI'> | |
103 | + <param name='cass_b_rtn'/> | |
104 | + <param name='cass_lemms_acc1houra'/> | |
105 | + </mission> | |
106 | + <mission xml:id='MGS'> | |
107 | + <param name='b_mgs_mso'/> | |
108 | + </mission> | |
109 | + <mission xml:id='MESSENGER'> | |
110 | + <param name='mes_b_orbrtn1m'/> | |
111 | + <param name='mes_fips_n_h'/> | |
89 | 112 | </mission> |
90 | 113 | </missions> |
... | ... |
php/classes/AmdaAction.php
... | ... | @@ -1215,9 +1215,14 @@ class AmdaAction |
1215 | 1215 | return $cacheMgr->modifyIntervalFromId($o->cacheId, $o->data); |
1216 | 1216 | } |
1217 | 1217 | |
1218 | - public function operationTTCacheIntervals($extendTime, $shiftTime) | |
1218 | + public function operationTTCacheIntervals($extendTime, $shiftTime, $isCat) | |
1219 | 1219 | { |
1220 | - $cacheMgr = new TimeTableCacheMgr(); | |
1220 | + if($isCat){ | |
1221 | + $cacheMgr = new CatalogCacheMgr(); | |
1222 | + } | |
1223 | + else{ | |
1224 | + $cacheMgr = new TimeTableCacheMgr(); | |
1225 | + } | |
1221 | 1226 | return $cacheMgr->operationIntervals($extendTime, $shiftTime); |
1222 | 1227 | } |
1223 | 1228 | |
... | ... |
php/classes/CatalogCacheMgr.php
php/classes/CatalogMgr.php
... | ... | @@ -92,6 +92,8 @@ class CatalogMgr extends TimeTableMgr |
92 | 92 | else |
93 | 93 | return array('error' => 'Unknown error during intervals save'); |
94 | 94 | } |
95 | + $result['minStart'] = TimeUtils::stamp2iso($resultSaveInt['minStart']); | |
96 | + $result['maxStop'] = TimeUtils::stamp2iso($resultSaveInt['maxStop']); | |
95 | 97 | } |
96 | 98 | return $result; |
97 | 99 | } |
... | ... |
php/classes/TimeTableMgr.php
... | ... | @@ -148,7 +148,7 @@ class TimeTableMgr extends AmdaObjectMgr |
148 | 148 | if ($tmpFileExist) { |
149 | 149 | unlink($ttFilePath . ".tmp"); |
150 | 150 | } |
151 | - return ['id' => $p->id, 'info' => $result['info']]; | |
151 | + return $result; | |
152 | 152 | } catch (Exception $exception) { |
153 | 153 | //Restore TT file |
154 | 154 | if ($tmpFileExist) { |
... | ... | @@ -524,9 +524,19 @@ class TimeTableMgr extends AmdaObjectMgr |
524 | 524 | $objToGet->removeChild($toRemove); |
525 | 525 | unset($toRemove); |
526 | 526 | } |
527 | + $minStart =0; | |
528 | + $maxStop=0; | |
527 | 529 | |
528 | 530 | //add new intervals |
529 | 531 | foreach ($intervals as $interval) { |
532 | + $startTime = TimeUtils::iso2stamp($interval['start']); | |
533 | + $stopTime = TimeUtils::iso2stamp($interval['stop']); | |
534 | + if ($minStart == 0) | |
535 | + $minStart = $startTime; | |
536 | + elseif ($startTime < $minStart ) | |
537 | + $minStart = $startTime; | |
538 | + if ($stopTime > $maxStop ) | |
539 | + $maxStop = $stopTime; | |
530 | 540 | $newInterval = $this->createIntervalElement($interval, $options); |
531 | 541 | $this->objectDom->documentElement->appendChild($newInterval); |
532 | 542 | } |
... | ... | @@ -538,7 +548,8 @@ class TimeTableMgr extends AmdaObjectMgr |
538 | 548 | |
539 | 549 | unset($this->objectDom); |
540 | 550 | |
541 | - return ['success' => true, 'action' => $action, 'nbIntervals' => count($intervals)]; | |
551 | + return ['success' => true, 'action' => $action, 'nbIntervals' => count($intervals), | |
552 | + 'minStart' => $minStart, 'maxStop' => $maxStop]; | |
542 | 553 | } |
543 | 554 | |
544 | 555 | /** |
... | ... |
php/config.php
... | ... | @@ -164,7 +164,7 @@ $API = array( |
164 | 164 | 'addCacheInterval'=>array('len'=>1), |
165 | 165 | 'removeTTCacheIntervalFromId'=>array('len'=>2), |
166 | 166 | 'modifyCacheInterval'=>array('len'=>1), |
167 | - 'operationTTCacheIntervals'=>array('len'=>2), | |
167 | + 'operationTTCacheIntervals'=>array('len'=>3), | |
168 | 168 | 'mergeTTCacheIntervals'=>array('len'=>0), |
169 | 169 | 'getTTCacheStatistics'=>array('len'=>1), |
170 | 170 | 'sendFeedback'=>array('len'=>1), |
... | ... |