From 5e6d074fdd7ea83e13ced9bc5f3a9a991ea74deb Mon Sep 17 00:00:00 2001
From: Elena.Budnik <ebudnik@irap.omp.eu>
Date: Tue, 11 Dec 2018 15:23:37 +0100
Subject: [PATCH] infobull for param construction

---
 help/constructParameter     | 10 ++++++++++
 help/dataGap                |  9 +++++++++
 help/plotSaveRequest        |  2 +-
 help/resamplingStep         |  4 ++++
 js/app/views/ParameterUI.js | 27 +++++++++++++++++++++------
 js/app/views/SearchUI.js    | 27 +++++++++++++++++++++------
 6 files changed, 66 insertions(+), 13 deletions(-)
 create mode 100644 help/constructParameter
 create mode 100644 help/dataGap
 create mode 100644 help/resamplingStep

diff --git a/help/constructParameter b/help/constructParameter
new file mode 100644
index 0000000..4ad22c7
--- /dev/null
+++ b/help/constructParameter
@@ -0,0 +1,10 @@
+<h3>Construct Parameter / Data Mining Condition</h3>
+	All AMDA parameters used in the expression are resampled with Time Step (defined in the corresponding field) before calculations.
+	<br/>
+	Note that sampling time of the output of Statistics "non-sliding" functions (<i>mean_(), min_(), max_()...</i>) is the "averaging time". 
+	So such an output can not be used in the combination with the other parameters directly.
+	<br/>
+	In order to combine it with the other parameters create "intermediate" derived parameter and use <b>it</b> in the expession.
+	The "intermediate" derived parameter will be properly resampled before calculations.
+<br/>
+
diff --git a/help/dataGap b/help/dataGap
new file mode 100644
index 0000000..4d6867f
--- /dev/null
+++ b/help/dataGap
@@ -0,0 +1,9 @@
+<h3>Data Gap</h3>
+  Every parameter from the expression is preprocessed before expression evaluation. 
+  It is resampled (averaged or interpolated) with taking into account possible absence of data (data gaps).
+  Here you may define 'gap threshold'.
+  It is expressed in the parameter 'sampling times.
+  If data is absent for time interval greater than this threshold the interval is treated as 'gap', 
+  otherwise the interval is filled with the interpolated data. 
+<br/>
+
diff --git a/help/plotSaveRequest b/help/plotSaveRequest
index c76bc07..7018087 100644
--- a/help/plotSaveRequest
+++ b/help/plotSaveRequest
@@ -1,5 +1,5 @@
 <h3>Save Plot Request[s]</h3>
-You can save you plot request to use it in the next AMDA sessions. 
+You can save your plot request to use it in the next AMDA sessions. 
 Two options are possible:
 <ul>
 <li>Save current active plot tab request only (<i>All Plot Tabs</i> checkbox <b>unchecked</b>)
diff --git a/help/resamplingStep b/help/resamplingStep
new file mode 100644
index 0000000..39fd180
--- /dev/null
+++ b/help/resamplingStep
@@ -0,0 +1,4 @@
+<h3>Time Step</h3>
+ All AMDA parameters used in your expression are resampled (averaged/interpolated) with <b>this time step</b> before calculations.
+<br/>
+
diff --git a/js/app/views/ParameterUI.js b/js/app/views/ParameterUI.js
index 0b8b52f..b22e923 100755
--- a/js/app/views/ParameterUI.js
+++ b/js/app/views/ParameterUI.js
@@ -253,10 +253,10 @@ Ext.define('amdaUI.ParameterUI',
 	{		
 		this.fieldName = new Ext.form.field.Text({
 				labelAlign: 'top', itemId: 'formParamName',
-				fieldLabel: 'Parameter Name*',
+				fieldLabel: 'Parameter Name',
 				name : 'name',
 				allowBlank : false, //blankText : 'Name is required',
-				emptyText: 'Please only low case here!',
+				emptyText: 'Please only low case!',
 				width: 150,
 				validateOnChange: false,
 				validateOnBlur: false,
@@ -279,7 +279,7 @@ Ext.define('amdaUI.ParameterUI',
 		this.constructionField = new extensions.SelectableTextArea({
 			labelAlign: 'top',
 			itemId: 'formParamConstructParameter',
-			fieldLabel:'Construct Parameter*',
+			fieldLabel:'<img amda_clicktip="constructParameter"  src="js/resources/images/16x16/info_mini.png"/>&nbsp;Construct Parameter',
 		 	allowBlank : false, blankText : 'Construct Parameter is required',
 			name : 'buildchain',
 			flex: 0.9,
@@ -428,7 +428,7 @@ Ext.define('amdaUI.ParameterUI',
 							},
 							{
 								xtype : 'numberfield',
-								itemId: 'formParamTimeStep', fieldLabel: 'Time Step (sec)*', labelAlign: 'top',
+								itemId: 'formParamTimeStep', fieldLabel: '<img amda_clicktip="resamplingStep" src="js/resources/images/16x16/info_mini.png"/>&nbsp;Time Step (sec)', labelAlign: 'top',
 								allowBlank : false, blankText : 'Time Step is required',
 								name : 'timestep',
 								minValue : 0.001,
@@ -557,9 +557,24 @@ Ext.define('amdaUI.ParameterUI',
 				plugins: [ 
 						{ptype: 'calculator', myBtns:[], context: 'Parameter' }, 
 						{ptype: 'paramArgumentsPlugin', pluginId: 'derived-param-arguments-plugin'}
-				]
+				],
+				listeners:{
+					click: {
+						element: 'el',
+						fn: function(e,t) { 
+							var me = t,
+							text = me.getAttribute('amda_clicktip');
+							if (text) {
+								e.preventDefault();
+								AmdaAction.getInfo({name : text}, function(res,e) {					    					   
+									if (res.success) myDesktopApp.infoMsg(res.result);
+								}); 
+							}
+						}
+					}
+				}
 			};
-	              
+						
 			Ext.apply(this, Ext.apply(arguments, myConf));
 	}
 });
diff --git a/js/app/views/SearchUI.js b/js/app/views/SearchUI.js
index acd457e..fac613b 100755
--- a/js/app/views/SearchUI.js
+++ b/js/app/views/SearchUI.js
@@ -308,7 +308,7 @@ Ext.define('amdaUI.SearchUI',
 
 		this.fieldName = new Ext.form.field.Text({
 				labelAlign: 'top', itemId: 'formParamName',
-				fieldLabel: 'Request Name<b>*</b>',
+				fieldLabel: 'Request Name',
 				name : 'name',
 				width: 375,
 				colspan: 3,
@@ -327,7 +327,7 @@ Ext.define('amdaUI.SearchUI',
 		{
 				labelAlign: 'top',
 				itemId: 'formSearchCondition',
-				fieldLabel:'Data Mining Condition<b>*</b>',
+				fieldLabel:'<img amda_clicktip="constructParameter" src="js/resources/images/16x16/info_mini.png"/>&nbsp;Data Mining Condition',
 				allowBlank : false, blankText : 'Condition expression is required',
 				name: 'expression',
 				validateOnChange: false,
@@ -473,18 +473,18 @@ Ext.define('amdaUI.SearchUI',
 								{
 									xtype :'displayfield', width: 165,
 									hideLabel: true, 
-									value: '<b>Averaging/Interpolation</b>'
+									value: '<b>Averaging/Interpolation</b>&nbsp;<img amda_clicktip="resamplingStep" src="js/resources/images/16x16/info_mini.png"/>'
 								},
 								{ xtype: 'component', width: 45 },
 								{
 									xtype :'displayfield', width: 165,
 									hideLabel: true, 
-									value: '<b>Data Gap</b>'
+									value: '<b>Data Gap</b>&nbsp;<img amda_clicktip="dataGap" src="js/resources/images/16x16/info_mini.png"/>'
 								},
 								{
 									xtype: 'numberfield', name: 'sampling',
 									allowBlank : false, blankText : 'Time Step is required',
-									fieldLabel: 'Sampling Time Step (sec)*', minValue : 0.001,
+									fieldLabel: 'Time Step (sec)', minValue : 0.001,
 									labelAlign: 'top', hideTrigger: true, width: 165,
 									validateOnBlur: false
 								},
@@ -617,7 +617,22 @@ Ext.define('amdaUI.SearchUI',
 			plugins: [ 
 				{ptype: 'calculator', myBtns:[], context: 'Condition'}, 
 				{ptype: 'paramArgumentsPlugin', pluginId: 'search-param-components-plugin'}
-			]
+			],
+			listeners:{
+				click: {
+					element: 'el',
+					fn: function(e,t) { 
+						var me = t,
+						text = me.getAttribute('amda_clicktip');
+						if (text) {
+							e.preventDefault();
+							AmdaAction.getInfo({name : text}, function(res,e) {					    					   
+								if (res.success) myDesktopApp.infoMsg(res.result);
+							}); 
+						}
+					}
+				}
+			}
 		};
 
 		Ext.apply(this, Ext.apply(arguments, myConf));	    	    
--
libgit2 0.21.2