PlotObjectConfig.js
1.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
/**
* Project : AMDA-NG
* Name : PlotObjectConfig.js
* @class amdaPlotObj.PlotObjectConfig
* @extends Ext.data.Model
* @brief Plot Request object configuration
* @author Benjamin Renard
* @version $Id: PlotObjectConfig.js benjamin $
******************************************************************************
* FT Id : Date : Name - Description
******************************************************************************
* : :21/07/2015: BRE - file creation
*/
Ext.define('amdaPlotObj.PlotObjectConfig', {
singleton: true,
getValueByKey: function (dataList, key) {
var value = '';
Ext.each(dataList, function (data) {
if (data.key == key) {
value = data.value;
return;
}
});
return value;
},
fieldComboBox: {
key: 'key',
value: 'value'
},
bgSubstraction: {
tableName: "channels-param-info",
tableChannels: "channels",
tableRelatedDim: 'relatedDim',
name: 'Background Substraction',
type: {
label: "Type ",
key: "background_sub_type",
values: {
bychannel: "By Channel",
fixedvalue: "Fixed Value"
}
},
value: {
textinputlabel: "Fixed value ",
key: "background_sub_value",
textinputkey: "background_sub_by_value",
dimlabel: 'Dim ',
dimkey: 'background_sub_dim',
dimNullValue: "-1"
}
},
getParamConfig: function (paramId, onParamConfigLoaded) {
AmdaAction.getParamPlotInit({ "paramId": paramId }, function (result, e) {
onParamConfigLoaded(result.success, result.data);
});
}
});