Merged
Merge Request #52
·
created by
Fer 5119
From
FER_5119
into
develop
-
Status changed to merged
-
mentioned in commit 831a82fa40eb3bddc8e796491d1586aa151738c6
21 Nov, 2022
1 commit
Showing
11 changed files
Show diff stats
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/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/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/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/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/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; | ... | ... |