Commit 2a4ea30c42cae710b7cd19fa1421027acc144e82
Exists in
mlplasmas
and in
1 other branch
Merge branch 'amdadev' into mlplasmas
Showing
25 changed files
with
644 additions
and
245 deletions
Show diff stats
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/controllers/PlotModule.js
... | ... | @@ -22,6 +22,7 @@ Ext.define('amdaDesktop.PlotModule', { |
22 | 22 | |
23 | 23 | contentId : 'plotUI', |
24 | 24 | linkedNode : null, |
25 | + panelResultInstance:null, | |
25 | 26 | |
26 | 27 | /** |
27 | 28 | * @cfg {String} data models |
... | ... | @@ -53,11 +54,11 @@ Ext.define('amdaDesktop.PlotModule', { |
53 | 54 | computePreviewWindowSize : function(previewContent) { |
54 | 55 | var size = previewContent.getImageSize(); |
55 | 56 | size.width += 30; |
56 | - size.height += 65; | |
57 | + size.height += 100; | |
57 | 58 | return size; |
58 | 59 | }, |
59 | 60 | |
60 | - updateInteractiveSession : function(session, newplot) { | |
61 | + updateInteractiveSession : function(session, newplot, panelId_, time_) { | |
61 | 62 | var me = this; |
62 | 63 | |
63 | 64 | |
... | ... | @@ -71,6 +72,8 @@ Ext.define('amdaDesktop.PlotModule', { |
71 | 72 | folder : session.folder, |
72 | 73 | plotFile : tabResult.plot, |
73 | 74 | context : tabResult.context, |
75 | + time : time_, | |
76 | + panelId : panelId_, | |
74 | 77 | interactiveId : tabResult.id |
75 | 78 | }; |
76 | 79 | me.updatePreview(plotPreviewConfig); |
... | ... | @@ -99,7 +102,7 @@ Ext.define('amdaDesktop.PlotModule', { |
99 | 102 | var y = 100 + tabResult.index * 20; |
100 | 103 | //create new result win |
101 | 104 | var panelResult = new amdaUI.PlotTabResultUI(plotTabConfig); |
102 | - | |
105 | + me.panelResultInstance =panelResult; | |
103 | 106 | var size = me.computeResultWindowSize(panelResult); |
104 | 107 | |
105 | 108 | var win = myDesktopApp.getDesktop().createWindow({ |
... | ... | @@ -175,7 +178,8 @@ Ext.define('amdaDesktop.PlotModule', { |
175 | 178 | if (winPreview == null) { |
176 | 179 | //create new preview win |
177 | 180 | var previewContent = new amdaPlotComp.PlotPreviewUI(plotPreviewConfig); |
178 | - | |
181 | + previewContent.setPanelResultInstance(this.panelResultInstance); | |
182 | + //previewContent.setPanelId | |
179 | 183 | var size = this.computePreviewWindowSize(previewContent); |
180 | 184 | |
181 | 185 | 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/views/CatalogUI.js
... | ... | @@ -17,6 +17,7 @@ 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 | 22 | 'amdaUI.StatisticalPlug' |
22 | 23 | ], |
... | ... | @@ -148,62 +149,18 @@ Ext.define('amdaUI.CatalogUI', { |
148 | 149 | return; |
149 | 150 | } |
150 | 151 | }, |
151 | - updateSurveyDates : function(ttObj){ | |
152 | - var starts = []; | |
153 | - var stops= []; | |
152 | + updateSurveyDates : function(res){ | |
154 | 153 | if (this.TTGrid.getStore().getTotalCount() <= 0) |
155 | 154 | 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 | 155 | |
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 | - }); | |
156 | + if(! this.object.get('surveyStart') ){ | |
157 | + this.object.set('surveyStart', res['minStart']); | |
158 | + this.status.isModified = true; | |
159 | + } | |
160 | + if(! this.object.get('surveyStop') ){ | |
161 | + this.object.set('surveyStop', res['maxStop']); | |
162 | + this.status.isModified = true; | |
163 | + } | |
207 | 164 | }, |
208 | 165 | |
209 | 166 | createTT: function (catId) { |
... | ... | @@ -215,7 +172,6 @@ Ext.define('amdaUI.CatalogUI', { |
215 | 172 | descr = 'Generated by CDPP/Amda Catalog Module \n' + 'From Catalog: ' + this.object.get('name') + '\nOn: ' + date + '\n'; |
216 | 173 | ttObj.set('description', descr + this.object.get('description')); |
217 | 174 | ttObj.set('contact', this.object.get('contact')); |
218 | - //this.updateSurveyDates(ttObj); | |
219 | 175 | timeTabNode.set('object', ttObj); |
220 | 176 | var explorerTree = Ext.getCmp(amdaUI.ExplorerUI.RESRC_TAB.TREE_ID); |
221 | 177 | var ttRootNode = explorerTree.getRootNode().findChild('id', 'timeTable-treeRootNode', true); |
... | ... | @@ -688,6 +644,40 @@ Ext.define('amdaUI.CatalogUI', { |
688 | 644 | }, |
689 | 645 | |
690 | 646 | checkIntervalsStatusForSave: function (onStatusOk) { |
647 | + if (this.status == null) | |
648 | + return; | |
649 | + | |
650 | + if (this.status.nbValid <= 0) | |
651 | + { | |
652 | + myDesktopApp.errorMsg('Your catalog is invalid, <br>you must have at least one valid interval'); | |
653 | + return; | |
654 | + } | |
655 | + | |
656 | + var msg = ''; | |
657 | + if (this.status.nbInvalid > 0) | |
658 | + msg += 'There are some invalid intervals. Only valid intervals will be saved!<br/>'; | |
659 | + if (this.status.nbFiltered > 0) | |
660 | + msg += 'There are some filtered intervals. Filtered intervals will not be saved!<br/>'; | |
661 | + if (msg != '') | |
662 | + { | |
663 | + msg += 'Do you want to continue?'; | |
664 | + Ext.Msg.show({ | |
665 | + title: 'Warning!', | |
666 | + msg: msg, | |
667 | + buttons: Ext.Msg.OKCANCEL, | |
668 | + fn: function (btnId) { | |
669 | + if (btnId === 'cancel') { | |
670 | + // cancel the save action | |
671 | + } else { | |
672 | + onStatusOk(); | |
673 | + } | |
674 | + }, | |
675 | + scope: this, | |
676 | + icon: Ext.Msg.WARNING | |
677 | + }); | |
678 | + return; | |
679 | + } | |
680 | + | |
691 | 681 | onStatusOk(); |
692 | 682 | }, |
693 | 683 | |
... | ... | @@ -699,7 +689,6 @@ Ext.define('amdaUI.CatalogUI', { |
699 | 689 | var module = myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.catalog.id); |
700 | 690 | // store / columns are the same - not needed to reconfigure grid |
701 | 691 | this.toReconfigure = false; |
702 | - this.updateSurveyDates(this.object); | |
703 | 692 | |
704 | 693 | // if save shared catalog |
705 | 694 | if (module.contextNode && (module.contextNode.get('id') == 'sharedcatalog-treeRootNode')) |
... | ... | @@ -710,13 +699,14 @@ Ext.define('amdaUI.CatalogUI', { |
710 | 699 | var obj = module.linkedNode.get('object'); |
711 | 700 | // synchronisation of objects |
712 | 701 | this.object = obj; |
713 | - module.linkedNode.create({notDisplayMsg: notDisplayMsg, callback: function () { | |
714 | - if (onAfterSave) | |
702 | + module.linkedNode.create({notDisplayMsg: notDisplayMsg, callback: function (type,res) { | |
703 | + this.updateSurveyDates(res); | |
704 | + if (onAfterSave) | |
715 | 705 | onAfterSave(); |
716 | 706 | }, scope: this}); |
717 | 707 | } |
718 | 708 | // if the name has been modified this is a creation |
719 | - else if (this.fclose() || this.status && (this.status.nbFiltered > 0)) { | |
709 | + else if (this.fclose() || this.status) { | |
720 | 710 | if (this.object.isModified('name') || this.object.get('fromPlugin')) { |
721 | 711 | // if object already has an id : it's a 'rename' of an existing |
722 | 712 | if (this.object.get('id')) { |
... | ... | @@ -736,16 +726,18 @@ Ext.define('amdaUI.CatalogUI', { |
736 | 726 | module.linkedNode.toRename = true; |
737 | 727 | } |
738 | 728 | module.linkedNode.create({callback: function () { |
739 | - module.linkedNode.update({notDisplayMsg: notDisplayMsg, callback: function () { | |
740 | - if (onAfterSave) | |
741 | - onAfterSave(); | |
729 | + module.linkedNode.update({notDisplayMsg: notDisplayMsg, callback: function (type,res) { | |
730 | + this.updateSurveyDates(res); | |
731 | + if (onAfterSave) | |
732 | + onAfterSave(); | |
742 | 733 | }, scope: this}, "", notDisplayMsg); |
743 | 734 | }, scope: this}); |
744 | 735 | } else { |
745 | 736 | //update |
746 | - module.linkedNode.update({notDisplayMsg: notDisplayMsg, callback: function () { | |
747 | - if (onAfterSave) | |
748 | - onAfterSave(); | |
737 | + module.linkedNode.update({notDisplayMsg: notDisplayMsg, callback: function (type,res) { | |
738 | + this.updateSurveyDates(res); | |
739 | + if (onAfterSave) | |
740 | + onAfterSave(); | |
749 | 741 | }, scope: this}); |
750 | 742 | } |
751 | 743 | } |
... | ... | @@ -754,58 +746,52 @@ Ext.define('amdaUI.CatalogUI', { |
754 | 746 | if (this.updateObject()) |
755 | 747 | { |
756 | 748 | 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 | 749 | // update TimeTable object which the content of form |
761 | 750 | |
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) | |
751 | + basicForm.updateRecord(this.object); | |
752 | + var me = this; | |
753 | + this.checkIntervalsStatusForSave(function () { | |
754 | + //Name validation | |
755 | + var module = myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.catalog.id); | |
756 | + | |
757 | + if (!module) | |
758 | + return; | |
759 | + module.linkedNode.isValidName(me.fieldName.getValue(), function (res) | |
760 | + { | |
761 | + if (!res) { | |
762 | + me.fieldName.validFlag = 'Error during object validation'; | |
763 | + myDesktopApp.errorMsg(me.fieldName.validFlag); | |
764 | + me.fieldName.validate(); | |
769 | 765 | 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 | - } | |
766 | + } | |
778 | 767 | |
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; | |
768 | + if (!res.valid) { | |
769 | + if (res.error) { | |
770 | + if (res.error.search('subtree') != -1) { | |
771 | + Ext.MessageBox.show({title: 'Warning', | |
772 | + msg: res.error + '<br/>Do you want to overwrite it?', | |
773 | + width: 300, | |
774 | + buttons: Ext.MessageBox.OKCANCEL, | |
775 | + fn: me.overwriteProcess, | |
776 | + icon: Ext.MessageBox.WARNING, | |
777 | + scope: me | |
778 | + }); | |
779 | + me.fieldName.validFlag = true; | |
780 | + } else | |
781 | + me.fieldName.validFlag = res.error; | |
782 | + } else { | |
783 | + me.fieldName.validFlag = 'Invalid object name'; | |
784 | + myDesktopApp.errorMsg(me.fieldName.validFlag); | |
799 | 785 | } |
800 | - | |
801 | - me.fieldName.validFlag = true; | |
802 | 786 | me.fieldName.validate(); |
803 | - me.saveProcess(false, onAfterSave, notDisplayMsg); | |
804 | - }); | |
787 | + return; | |
788 | + } | |
789 | + | |
790 | + me.fieldName.validFlag = true; | |
791 | + me.fieldName.validate(); | |
792 | + me.saveProcess(false, onAfterSave, notDisplayMsg); | |
805 | 793 | }); |
806 | - } else { | |
807 | - Ext.Msg.alert('No intervals', 'Your catalog is invalid, <br>you must have at least one interval'); | |
808 | - } | |
794 | + }); | |
809 | 795 | } |
810 | 796 | }, |
811 | 797 | |
... | ... | @@ -1284,6 +1270,7 @@ Ext.define('amdaUI.CatalogUI', { |
1284 | 1270 | this.formPanel = Ext.create('Ext.form.Panel', { |
1285 | 1271 | region: 'center', |
1286 | 1272 | layout: 'hbox', |
1273 | + overflowY:'auto', | |
1287 | 1274 | model: 'amdaModel.Catalog', |
1288 | 1275 | trackResetOnLoad: true, // reset to the last loaded record |
1289 | 1276 | bodyStyle: {background: '#dfe8f6'}, |
... | ... | @@ -1344,20 +1331,20 @@ Ext.define('amdaUI.CatalogUI', { |
1344 | 1331 | }, |
1345 | 1332 | } |
1346 | 1333 | }, { |
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 | - }, | |
1334 | + fieldLabel: 'Stop Time', | |
1335 | + name: 'surveyStop', | |
1336 | + emptyText: 'YYYY/MM/DDThh:mm:ss.fff', | |
1337 | + format: 'Y-m-d\\TH:i:s.u', | |
1338 | + labelAlign: 'left', | |
1339 | + enforceMaxLength: true, | |
1340 | + maxLength: 25, | |
1341 | + labelWidth: 60, | |
1342 | + align: 'left', | |
1343 | + listeners: { | |
1344 | + change: this.onChangeStopField, | |
1345 | + focus: function(field) { | |
1346 | + this.activeField = 'surveyStop'; | |
1347 | + }, | |
1361 | 1348 | } |
1362 | 1349 | }] |
1363 | 1350 | }, |
... | ... | @@ -1374,15 +1361,20 @@ Ext.define('amdaUI.CatalogUI', { |
1374 | 1361 | height: 150 |
1375 | 1362 | }, |
1376 | 1363 | { |
1377 | - xtype: 'component', | |
1378 | - height: 20 | |
1379 | - }], | |
1364 | + xtype: 'operationsTT', | |
1365 | + margin:'5 0 0 0', | |
1366 | + collapsible: true, | |
1367 | + collapsed:true, | |
1368 | + parent: this, | |
1369 | + isCat:true, | |
1370 | + id: 'operationCat' | |
1371 | + },], | |
1380 | 1372 | dockedItems: [ |
1381 | 1373 | { |
1382 | 1374 | xtype: 'toolbar', |
1383 | 1375 | dock: 'bottom', |
1384 | 1376 | ui: 'footer', |
1385 | - height: 120, | |
1377 | + height: 50, | |
1386 | 1378 | |
1387 | 1379 | items: [ |
1388 | 1380 | { |
... | ... | @@ -1444,7 +1436,6 @@ Ext.define('amdaUI.CatalogUI', { |
1444 | 1436 | } |
1445 | 1437 | }] |
1446 | 1438 | }, |
1447 | - | |
1448 | 1439 | //statistical info |
1449 | 1440 | { |
1450 | 1441 | xtype: 'toolbar', |
... | ... | @@ -1470,7 +1461,7 @@ Ext.define('amdaUI.CatalogUI', { |
1470 | 1461 | module.visualize(me.object); |
1471 | 1462 | }); |
1472 | 1463 | } |
1473 | - } | |
1464 | + }, | |
1474 | 1465 | ] |
1475 | 1466 | }, |
1476 | 1467 | { |
... | ... |
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/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); |
... | ... |
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/PlotZoomPlug.js
... | ... | @@ -231,6 +231,7 @@ Ext.define('amdaPlotComp.PlotZoomPlug', { |
231 | 231 | var timeObj = new Object(); |
232 | 232 | timeObj.start = this.form.getForm().findField('zoom-min-time').getValue(); |
233 | 233 | timeObj.stop = this.form.getForm().findField('zoom-max-time').getValue(); |
234 | + timeObj.interactiveId = this.interactiveId; | |
234 | 235 | var plotModule = myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.plot.id); |
235 | 236 | plotModule.setTimeInterval(timeObj); |
236 | 237 | }, |
... | ... |
js/app/views/PlotTabResultUI.js
... | ... | @@ -84,6 +84,7 @@ Ext.define('amdaUI.PlotTabResultUI', { |
84 | 84 | |
85 | 85 | var me = this; |
86 | 86 | var insertIntervalItem = null; |
87 | + var plotFunctionItem = null; | |
87 | 88 | Ext.each(panelContext.plotArea.axes, function (axis) { |
88 | 89 | //Events for zoom on a time axis |
89 | 90 | var onMinTimeSelection = function (posX) { |
... | ... | @@ -158,7 +159,7 @@ Ext.define('amdaUI.PlotTabResultUI', { |
158 | 159 | scope: this |
159 | 160 | }); |
160 | 161 | //plotFunction Menu |
161 | - plotFunctionItem = { | |
162 | + /*plotFunctionItem = { | |
162 | 163 | text: 'Apply a Function on Interval', |
163 | 164 | handler: function (item, e) { |
164 | 165 | zoomPlugin.show(me.interactiveId, axis.id, panelContext.id, true); |
... | ... | @@ -166,7 +167,7 @@ Ext.define('amdaUI.PlotTabResultUI', { |
166 | 167 | me.panelImage.startZoom(true, 0, size.height, onMinTimeSelection, onMaxTimeSelection); |
167 | 168 | }, |
168 | 169 | scope: this |
169 | - }; | |
170 | + };*/ | |
170 | 171 | insertIntervalItem = { |
171 | 172 | text: 'Insert Interval in TimeTable or Catalog', |
172 | 173 | handler: function (item, e) { |
... | ... | @@ -332,8 +333,8 @@ Ext.define('amdaUI.PlotTabResultUI', { |
332 | 333 | handler: function () { |
333 | 334 | |
334 | 335 | var crtTime = new Date(crtTimestamp * 1000); |
335 | - crtTime = Ext.Date.add(crtTime, Ext.Date.MINUTE, crtTime.getTimezoneOffset()); | |
336 | - me.callInteractivePlot({ 'action': 'instant', 'interactiveId': this.interactiveId, 'panelId': panel.id, 'time': crtTime }); | |
336 | + //crtTime = Ext.Date.add(crtTime, Ext.Date.MINUTE, crtTime.getTimezoneOffset()); | |
337 | + me.callInteractivePlot({ 'action': 'instant', 'interactiveId': this.interactiveId, 'panelId': panel.id, 'time': crtTime.toISOString()}); | |
337 | 338 | }, |
338 | 339 | scope: me |
339 | 340 | }, |
... | ... | @@ -464,7 +465,7 @@ Ext.define('amdaUI.PlotTabResultUI', { |
464 | 465 | if (e.status) { |
465 | 466 | if (result) { |
466 | 467 | if (result.success) { |
467 | - plotModule.updateInteractiveSession(result, false); | |
468 | + plotModule.updateInteractiveSession(result, false, obj['panelId'], obj['time']); | |
468 | 469 | } |
469 | 470 | else |
470 | 471 | 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/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
... | ... | @@ -1218,9 +1218,14 @@ class AmdaAction |
1218 | 1218 | return $cacheMgr->modifyIntervalFromId($o->cacheId, $o->data); |
1219 | 1219 | } |
1220 | 1220 | |
1221 | - public function operationTTCacheIntervals($extendTime, $shiftTime) | |
1221 | + public function operationTTCacheIntervals($extendTime, $shiftTime, $isCat) | |
1222 | 1222 | { |
1223 | - $cacheMgr = new TimeTableCacheMgr(); | |
1223 | + if($isCat){ | |
1224 | + $cacheMgr = new CatalogCacheMgr(); | |
1225 | + } | |
1226 | + else{ | |
1227 | + $cacheMgr = new TimeTableCacheMgr(); | |
1228 | + } | |
1224 | 1229 | return $cacheMgr->operationIntervals($extendTime, $shiftTime); |
1225 | 1230 | } |
1226 | 1231 | |
... | ... |
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), |
... | ... |