/dev/trunk

To get this branch, use:
bzr branch http://darksoft.org/webbzr/dev/trunk
1 by Suren A. Chilingaryan
Initial import
1
<?php
308 by Suren A. Chilingaryan
Prevent deprecation and strict-mode errors
2
    error_reporting(E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED);
243 by Suren A. Chilingaryan
Move timezone setup into the config.php
3
    date_default_timezone_set("UTC");
1 by Suren A. Chilingaryan
Initial import
4
5
    $SETUP_MULTI_MODE = true;
80 by Suren A. Chilingaryan
Few steps on source tree integration in javascript frontend
6
    
7
    $ADEI_RELEASE = false;
1 by Suren A. Chilingaryan
Initial import
8
9
    $TITLE = "ADEI";
10
96 by Suren A. Chilingaryan
WiKi integration
11
    $DEFAULT_MODULE = "wiki";
253 by Suren A. Chilingaryan
Initial support of secondary views
12
344 by Suren A. Chilingaryan
Disable control and alarms pages in the default configuration
13
    $MODULES = array(/*"slowcontrol", "alarms",*/ "infopage", "graph", "download", "wiki");
12 by Suren A. Chilingaryan
Layout redesign: search tab, controls, menu
14
    $POPUPS = array("source", "controls");
100 by Suren A. Chilingaryan
Initial SEARCH implementation
15
253 by Suren A. Chilingaryan
Initial support of secondary views
16
    $CONTROLS = array("infotab", "searchtab", "virtual", false, "export", "aggregator", "plot"); // false/null indicates line break
239 by Suren A. Chilingaryan
Basic implementation of TANGOReader
17
    
18
    $ADEI_SRCTREE_EXTRA = array();
253 by Suren A. Chilingaryan
Initial support of secondary views
19
    $ADEI_INFO_MODULES = array(
20
        "legend" => array(
21
            'title' => _("Channel Overview"),
22
            'handler' => "CHANNELView",
23
            'opts' => array()
24
        ),
25
        "scatter" => array(
26
            'title' => _("Scatter Plot"),
27
            'handler' => "SCATTERView",
28
            'opts' => array()
311 by Suren A. Chilingaryan
Histogram view (based on the code by Hovhannes)
29
        ),
30
        "histogram" => array(
31
            'title' => _("Histogram"),
32
            'handler' => "histogramview",
33
            'opts' => array(
34
		'bins' => array(0, 5, 10, 20, 50)
35
            )
36
        ),
253 by Suren A. Chilingaryan
Initial support of secondary views
37
    );
38
1 by Suren A. Chilingaryan
Initial import
39
40
	/* more specific configs should go after less specific ones */
41
    $OPTIONS = array (
42
	"default" => array( 
43
	    "min_resolution" => 600, 		// in db config could be array by id
44
//	    "cache_config" => $ADEI_CACHE	// alter default cache timing configuration
45
	    "ignore_subseconds" => true,	// Timestamps with second precision
46
	    "omit_raw_cache" => false,		// Use data source instead of cache0 tables
47
	    "fill_raw_first" => false,		// Fill RAW cache table completely prior to processing agregating cache tables
48
	    "optimize_empty_cache" => false,	// Do not fill lower resolution cache intervals if encompassing one is empty
49
	    "use_cache_timewindow" => true,	// Shrink time window to currently cached data
50
	    "use_cache_reader" => false,	// Do not access data source while reading cache
51
	    "overcome_reader_faults" => false,	// Use CACHE if connection to reader is failed
52
	    "optimize_time_axes" => false,	// Limit window size by available data
53
	    "use_md5_postfix" => false,		// Use md5 for table name postfixes
71 by Suren A. Chilingaryan
Fast data support in TESTReader
54
	    "null_value" => 0,			// The numeric value to use instead of NULL (missing data) when needed
81 by Suren A. Chilingaryan
Better handling of axes in base classes, the real implementation is not here yet
55
	    "disable_caching" => false,		// The CACHE should not be generated, Item for RT display only
56
	    "channel_uids" => false,		// If channels have unique identifactors within ADEI setup
263 by Suren A. Chilingaryan
Support private source axes
57
	    "private_axes" => false,            // The READER has his own set of axes which shall not be mixed with global ones
1 by Suren A. Chilingaryan
Initial import
58
	)
59
    );
60
    
61
62
    $ADEI_DB = array (
63
	"host" => "localhost",
64
	"port" => 0,
65
	"database" => "adei",
66
	"user" => "adei",
67
	"password" => "adei"
68
    );
69
70
/*
71
    The TSQLFile support in ROOT is not mature enough    
72
    $ROOT_DB = array (
73
	"driver" => "mysql",
74
	"host" => "localhost",
75
	"port" => 0,
76
	"user" => "zeus",
77
	"password" => "zeus"
78
    );
79
*/
80
    
81
    $BACKUP_DB = array (
82
	"driver" => "mysql",
83
	"host" => "localhost",
84
	"port" => 0,
85
	"user" => "zeus",
86
	"password" => "zeus"
87
    );
88
89
    $ADEI_TIMINGS = array (
90
	_("1 Year") => 31536000,
91
	_("1 Month") => 2592000,
92
	_("1 Week") => 604800,
93
	_("1 Day") => 86400,
94
	_("6 Hours") => 21600,
95
	_("1 Hour") => 3600,
96
	_("15 Min") => 900,
97
	_("5 Min") => 300
98
    );
99
    
100
    
101
    $ADEI_CACHE = array (
102
	array("min" => 31536000, "res" => 43200), /* year - 12 hour data, 730 points min */
103
	array("min" => 2592000, "res" => 3600), /* month - 1 hour data, 720 - 8760 data points */
104
	array("min" => 604800, "res" => 600), /* week - 10 min data, 1008 - 4320 data points */
105
	array("min" => 86400, "res" => 60), /* day - 1 min data, 1440 - 10080 data points */
106
	array("min" => 7200, "res" => 10), /* 2 hours - 10 s, 720 - 8640 data points */
107
	/* 1 - 7200 data points */
108
    );
69 by Suren A. Chilingaryan
Fist step of importing infrastracture fro VIRTUAL data sources and COMPLEX LogGroups
109
    
110
    
111
    $ADEI_VIRTUAL_READERS = array(
83 by Suren A. Chilingaryan
Initial support for alarms in backend, DB retries on link failures, more on axis
112
/*	"virtual_vg" => array(
113
	    "title" => _("User Groups"),
114
	    "reader"=> "VGReader"
115
	),*/
80 by Suren A. Chilingaryan
Few steps on source tree integration in javascript frontend
116
	"virtual" => array(
117
	    "title" => _("Virtual"),
118
	    "reader" => "VIRTUALReader"
83 by Suren A. Chilingaryan
Initial support for alarms in backend, DB retries on link failures, more on axis
119
	)
69 by Suren A. Chilingaryan
Fist step of importing infrastracture fro VIRTUAL data sources and COMPLEX LogGroups
120
    );
1 by Suren A. Chilingaryan
Initial import
121
81 by Suren A. Chilingaryan
Better handling of axes in base classes, the real implementation is not here yet
122
    $ADEI_AXES = array(
114 by Suren A. Chilingaryan
Massive rewrite of DRAW (unfinished): multiple groups and axis
123
/*	"0" => array(
124
	),*/
193 by Suren A. Chilingaryan
Few fixes and setup for ASEC installation
125
	"countrate" => array(
126
	    "axis_name" => _("Count Rate"),
127
	    "axis_units" => false,
329 by Suren A. Chilingaryan
Fix axis_mode naming
128
	    "axis_mode" => "STD",
193 by Suren A. Chilingaryan
Few fixes and setup for ASEC installation
129
	    "axis_range" => false
130
	),    
322 by Suren A. Chilingaryan
Define more axes and improvements to KATRIN naming scheme
131
	"percent" => array(
132
	    "axis_name" => false,
133
	    "axis_units" => _("%"),
329 by Suren A. Chilingaryan
Fix axis_mode naming
134
	    "axis_mode" => "STD",
322 by Suren A. Chilingaryan
Define more axes and improvements to KATRIN naming scheme
135
	    "axis_range" => false
136
	),    
81 by Suren A. Chilingaryan
Better handling of axes in base classes, the real implementation is not here yet
137
	"temperature" => array(
138
	    "axis_units" => _("C"),
139
	    "axis_name" => _("Temperature"),
329 by Suren A. Chilingaryan
Fix axis_mode naming
140
	    "axis_mode" => "STD",
81 by Suren A. Chilingaryan
Better handling of axes in base classes, the real implementation is not here yet
141
	    "axis_range" => false
142
	),
322 by Suren A. Chilingaryan
Define more axes and improvements to KATRIN naming scheme
143
	"temperature/kelvin" => array(
149 by Suren A. Chilingaryan
Y-axis labeling fixes (specially case xxxxxxxx.000001)
144
	    "axis_units" => _("K"),
145
	    "axis_name" => _("Temperature"),
329 by Suren A. Chilingaryan
Fix axis_mode naming
146
	    "axis_mode" => "STD",
149 by Suren A. Chilingaryan
Y-axis labeling fixes (specially case xxxxxxxx.000001)
147
	    "axis_range" => false
148
	),
81 by Suren A. Chilingaryan
Better handling of axes in base classes, the real implementation is not here yet
149
	"voltage" => array(
150
	    "axis_units" => _("V"),
151
	    "axis_name" => _("Voltage"),
329 by Suren A. Chilingaryan
Fix axis_mode naming
152
	    "axis_mode" => "STD",
81 by Suren A. Chilingaryan
Better handling of axes in base classes, the real implementation is not here yet
153
	    "axis_range" => false
149 by Suren A. Chilingaryan
Y-axis labeling fixes (specially case xxxxxxxx.000001)
154
	),
322 by Suren A. Chilingaryan
Define more axes and improvements to KATRIN naming scheme
155
	"voltage/kilo" => array(
156
	    "axis_units" => _("kV"),
157
	    "axis_name" => _("Voltage"),
329 by Suren A. Chilingaryan
Fix axis_mode naming
158
	    "axis_mode" => "STD",
322 by Suren A. Chilingaryan
Define more axes and improvements to KATRIN naming scheme
159
	    "axis_range" => false
160
	),
149 by Suren A. Chilingaryan
Y-axis labeling fixes (specially case xxxxxxxx.000001)
161
	"current" => array(
162
	    "axis_units" => _("A"),
163
	    "axis_name" => _("Current"),
329 by Suren A. Chilingaryan
Fix axis_mode naming
164
	    "axis_mode" => "STD",
149 by Suren A. Chilingaryan
Y-axis labeling fixes (specially case xxxxxxxx.000001)
165
	    "axis_range" => false
166
	),
317 by Suren A. Chilingaryan
Revise global axes
167
	"current/micro" => array(
182 by Suren A. Chilingaryan
New TOSKA configuration
168
	    "axis_units" => _("uA"),
169
	    "axis_name" => _("Current"),
329 by Suren A. Chilingaryan
Fix axis_mode naming
170
	    "axis_mode" => "STD",
182 by Suren A. Chilingaryan
New TOSKA configuration
171
	    "axis_range" => false
172
	),
317 by Suren A. Chilingaryan
Revise global axes
173
	"current/nano" => array(
174
	    "axis_units" => _("nA"),
175
	    "axis_name" => _("Current"),
329 by Suren A. Chilingaryan
Fix axis_mode naming
176
	    "axis_mode" => "STD",
317 by Suren A. Chilingaryan
Revise global axes
177
	    "axis_range" => false
178
	),
149 by Suren A. Chilingaryan
Y-axis labeling fixes (specially case xxxxxxxx.000001)
179
	"resistance" => array(
180
	    "axis_units" => _("Ohm"),
181
	    "axis_name" => _("Resistance"),
329 by Suren A. Chilingaryan
Fix axis_mode naming
182
	    "axis_mode" => "STD",
149 by Suren A. Chilingaryan
Y-axis labeling fixes (specially case xxxxxxxx.000001)
183
	    "axis_range" => false
184
	), 
185
	"pressure" => array(
186
	    "axis_units" => _("bar"),
187
	    "axis_name" => _("Pressure"),
329 by Suren A. Chilingaryan
Fix axis_mode naming
188
	    "axis_mode" => "STD",
149 by Suren A. Chilingaryan
Y-axis labeling fixes (specially case xxxxxxxx.000001)
189
	    "axis_range" => false
190
	),
322 by Suren A. Chilingaryan
Define more axes and improvements to KATRIN naming scheme
191
	"pressure/psi" => array(
192
	    "axis_units" => _("psi"),
193
	    "axis_name" => _("Pressure"),
329 by Suren A. Chilingaryan
Fix axis_mode naming
194
	    "axis_mode" => "STD",
322 by Suren A. Chilingaryan
Define more axes and improvements to KATRIN naming scheme
195
	    "axis_range" => false
196
	),
317 by Suren A. Chilingaryan
Revise global axes
197
	"pressure/milli" => array(
198
	    "axis_units" => _("millibar"),
199
	    "axis_name" => _("Pressure"),
329 by Suren A. Chilingaryan
Fix axis_mode naming
200
	    "axis_mode" => "STD",
149 by Suren A. Chilingaryan
Y-axis labeling fixes (specially case xxxxxxxx.000001)
201
	    "axis_range" => false
202
	),
322 by Suren A. Chilingaryan
Define more axes and improvements to KATRIN naming scheme
203
	"pressure/hpa" => array(
204
	    "axis_units" => _("hPa"),
205
	    "axis_name" => _("Pressure"),
329 by Suren A. Chilingaryan
Fix axis_mode naming
206
	    "axis_mode" => "STD",
322 by Suren A. Chilingaryan
Define more axes and improvements to KATRIN naming scheme
207
	    "axis_range" => false
208
	),
149 by Suren A. Chilingaryan
Y-axis labeling fixes (specially case xxxxxxxx.000001)
209
	"mass" => array(
210
	    "axis_units" => _("kg"),
211
	    "axis_name" => _("Mass"),
329 by Suren A. Chilingaryan
Fix axis_mode naming
212
	    "axis_mode" => "STD",
149 by Suren A. Chilingaryan
Y-axis labeling fixes (specially case xxxxxxxx.000001)
213
	    "axis_range" => false
214
	),
317 by Suren A. Chilingaryan
Revise global axes
215
	"rpm" => array(
216
	    "axis_units" => _("rpm"),
335 by Suren A. Chilingaryan
Prevent overgrowing of source popup due to hoardes of axes
217
	    "axis_name" => _("RPM"),
329 by Suren A. Chilingaryan
Fix axis_mode naming
218
	    "axis_mode" => "STD",
317 by Suren A. Chilingaryan
Revise global axes
219
	    "axis_range" => false
220
	),
221
	"volume-flow" => array(
222
	    "axis_units" => _("m3/s"),
223
	    "axis_name" => _("Flow"),
329 by Suren A. Chilingaryan
Fix axis_mode naming
224
	    "axis_mode" => "STD",
317 by Suren A. Chilingaryan
Revise global axes
225
	    "axis_range" => false
226
	),
149 by Suren A. Chilingaryan
Y-axis labeling fixes (specially case xxxxxxxx.000001)
227
	"mass-flow" => array(
228
	    "axis_units" => _("g/s"),
229
	    "axis_name" => _("Mass-flow"),
329 by Suren A. Chilingaryan
Fix axis_mode naming
230
	    "axis_mode" => "STD",
149 by Suren A. Chilingaryan
Y-axis labeling fixes (specially case xxxxxxxx.000001)
231
	    "axis_range" => false
232
	),
317 by Suren A. Chilingaryan
Revise global axes
233
	"power" => array(
234
	    "axis_units" => _("W"),
235
	    "axis_name" => _("Power"),
329 by Suren A. Chilingaryan
Fix axis_mode naming
236
	    "axis_mode" => "STD",
149 by Suren A. Chilingaryan
Y-axis labeling fixes (specially case xxxxxxxx.000001)
237
	    "axis_range" => false
322 by Suren A. Chilingaryan
Define more axes and improvements to KATRIN naming scheme
238
	),
239
	"magnetic_field" => array(
240
	    "axis_units" => _("T"),
241
	    "axis_name" => _("Magnetic field"),
329 by Suren A. Chilingaryan
Fix axis_mode naming
242
	    "axis_mode" => "STD",
322 by Suren A. Chilingaryan
Define more axes and improvements to KATRIN naming scheme
243
	    "axis_range" => false
81 by Suren A. Chilingaryan
Better handling of axes in base classes, the real implementation is not here yet
244
	)
245
    );
246
23 by Suren A. Chilingaryan
Administrative interface and better handling of missing group channels
247
    $DEFAULT_MISSING_VALUE = NULL;	/* Value to use instead of NULL values */
1 by Suren A. Chilingaryan
Initial import
248
249
    $EXPORT_DEFAULT_FORMAT = "csv";
250
    
251
    /* Joiner/Filter: Joiner is a filter supporting multiple groups. From the
252
    software point of view there is no difference and both are implemented 
253
    using the same base class. It is possible to have arbitrary sequence of
254
    enclosed filters/joiners within format configuration.
255
    Only joiner or filter should be specified on the one level, if both
256
    are specified the filter will be used.
257
    
258
	@PROP@ 			- replaced by passed value
259
	?{@PROP@?@PROP@:nothing}
260
261
      Default:
262
	@TMPFILE@
263
	@BLOCK_TITLE@
264
	@EXPECTED_BLOCKS@
265
	@BLOCK_NUMBER@
266
267
268
	@ROOT__COMBHIST@	
269
    */
270
    
53 by Suren A. Chilingaryan
fixups and some search hooks (incomplete)
271
    $ADEI_SYSTEM_FORMATS = array (
272
	"labview32" => array(
273
	    'title' => "LabVIEW array",
274
	    'handler' => "LABVIEW",
275
	    'hidden' => true,
276
	    'type' => "streamarray"
277
	)
278
    );
279
    
1 by Suren A. Chilingaryan
Initial import
280
    $EXPORT_FORMATS = array (
281
	"csv" => array(
282
	    'title' => "CSV",
43 by Suren A. Chilingaryan
Data filtering support
283
	    'accept_null_values' => true
1 by Suren A. Chilingaryan
Initial import
284
	),
195 by Suren A. Chilingaryan
Image Export by Arsen Sogomonyan
285
     	"image" => array(
286
    	    'title' => "PNG Image",
287
            'handler' => 'Image',
288
 	    'type' => 'image'
289
     	),
1 by Suren A. Chilingaryan
Initial import
290
	"xls" => array(
291
	    'title' => "Excel",
292
	    'handler' => "EXCEL",
293
//	    subsec_format => "DD.MM.YYYY hh:mm:ss.000;@"
294
//	    subsec_format => "text()" /* Use text (CSV) */
295
//	    subsec_format => "text(format)" /* Use text (format) */
296
//	    subsec_format => "DD.MM.YYYY hh:mm:ss.000000;@" /* HP, OpenOffice */
297
//	    subsec_width => 26
298
//	    date_format => "DD.MM.YYYY hh:mm:ss"
299
//	    date_width => 20
300
//	    value_format => "0.0000E+##"
301
//	    value_width => 12
302
/*	    filter => array (
303
		"type" => "ZIP"
304
	    )*/
305
	),
310 by Suren A. Chilingaryan
Disable ROOT export in default configuration
306
/*	"root" => array(
1 by Suren A. Chilingaryan
Initial import
307
	    'title' => "ROOT",
308
	    'filter' => array (
309
		'app' => "csv2root",
310
		'opts' => "--file @TMPFILE@ ?{@BLOCK_NUMBER@===0?--overwrite} ?{@EXPECTED_BLOCKS@!=1?--group @BLOCK_TITLE@}",
311
		'joiner' => true,
310 by Suren A. Chilingaryan
Disable ROOT export in default configuration
312
		'groupmode' => true,	// Run filter app for each group
1 by Suren A. Chilingaryan
Initial import
313
	        'extension' => "root"
314
	    )
315
	),
316
	"root_hist" => array(
317
	    'title' => "ROOT+Hist",
318
	    'filter' => array(
319
		'app' => "csv2root",
320
		'opts' => "--file @TMPFILE@ ?{@BLOCK_NUMBER@===0?--overwrite} ?{@EXPECTED_BLOCKS@!=1?--group @BLOCK_TITLE@} --save-histograms ?{@ROOT__COMBHIST@?--combined-histogram}",
321
		'joiner' => true,
310 by Suren A. Chilingaryan
Disable ROOT export in default configuration
322
		'groupmode' => true,	// Run filter app for each block
1 by Suren A. Chilingaryan
Initial import
323
		'extension' => "root"
324
	    )
310 by Suren A. Chilingaryan
Disable ROOT export in default configuration
325
	),*/
43 by Suren A. Chilingaryan
Data filtering support
326
	"tdms" => array(
327
	    'title' => "TDMS",
328
	    'handler' => "LABVIEW",
329
	    'type' => "tdms"
1 by Suren A. Chilingaryan
Initial import
330
	)
331
    );
332
    
333
    $EXPORT_SAMPLING_RATES = array (
334
	_("Hourly") => 3600,
335
	_("Minutely") => 60,
336
	_("1 Hz") => 1,
337
	_("1000 Hz") => 0.001
338
    );
339
    
53 by Suren A. Chilingaryan
fixups and some search hooks (incomplete)
340
    $SEARCH_ENGINES = array (
100 by Suren A. Chilingaryan
Initial SEARCH implementation
341
	"ITEMSearch" => array(),
101 by Suren A. Chilingaryan
Further search improvements, support for custom properties (config)
342
	"INTERVALSearch" => array(),
343
	"PROXYSearch" => array()
53 by Suren A. Chilingaryan
fixups and some search hooks (incomplete)
344
    );
345
    
79 by Suren A. Chilingaryan
New version of dhtmlxmenu and dhtmlxtree is added
346
    
347
    $ADEI_ID_DELIMITER = "__";
348
    
53 by Suren A. Chilingaryan
fixups and some search hooks (incomplete)
349
    $LOGGER_LOG_REQUESTS = false;	/* Log all ADEI requests */
350
    $LOGGER_LOG_OUTPUT = false;		/* Log output of ADEI requests */
290 by Suren A. Chilingaryan
Limit size of log files unless config option is specified
351
    $LOGGER_STORE_OBJECTS = false;	/* Will produce big, but very detailed logs */
32 by Suren A. Chilingaryan
Option to force MySQL optimizer to use INDEXEs on queries involving huge rowsets. Use unbuffered mysql queries on RAWPoint cache requests
352
353
/* This forces MySQL to use INDEXes while SELECT queries returning huge 
354
rowsets are executed. After certain threshold, MySQL optimizator stops
355
using INDEXes what bringing to huge slowdown. This option is intended
356
to fix this behaviour. */
210.1.2 by Suren A. Chilingaryan
Download manager by Aki Rimpelainen
357
    
32 by Suren A. Chilingaryan
Option to force MySQL optimizer to use INDEXEs on queries involving huge rowsets. Use unbuffered mysql queries on RAWPoint cache requests
358
    $MYSQL_FORCE_INDEXES = true;	
24 by Suren A. Chilingaryan
Logger subsystem
359
    
1 by Suren A. Chilingaryan
Initial import
360
    $CACHE_PRECISE_GAPS = false;	/* Enables more precise maxgap calculation in DATAInterval */
361
    
362
    $AJAX_UPDATE_RATE = 60; 		/* in seconds */
363
    $AJAX_WINDOW_BORDER = 10; 		/* in pixels */
364
    $AJAX_PARSE_DELAY = 100; 		/* html, in milliseconds */
365
366
    $SOURCE_KEEP_WINDOW = false;	/* Preserve time range when group is changed */
367
    
80 by Suren A. Chilingaryan
Few steps on source tree integration in javascript frontend
368
79 by Suren A. Chilingaryan
New version of dhtmlxmenu and dhtmlxtree is added
369
    $DHTMLX_SKIN = "standard";
80 by Suren A. Chilingaryan
Few steps on source tree integration in javascript frontend
370
//    $DHTMLX_SKIN="dhx_blue";
79 by Suren A. Chilingaryan
New version of dhtmlxmenu and dhtmlxtree is added
371
    $DHTMLX_ICONSET = "csh_bluefolders";
1 by Suren A. Chilingaryan
Initial import
372
    $MENU_SHOW_ITEMS = false;		/* Show separate items in popup menu */
80 by Suren A. Chilingaryan
Few steps on source tree integration in javascript frontend
373
    $MENU_SCROLL_LIMIT = 10;		/* Add scrolling if more than that items present */
1 by Suren A. Chilingaryan
Initial import
374
    
210.1.2 by Suren A. Chilingaryan
Download manager by Aki Rimpelainen
375
    $PHP_BINARY = "/usr/bin/php";
376
    $DOWNLOAD_DECAY_TIME = 72000;       /*  Time after unused download is removed from server*/
377
  
290 by Suren A. Chilingaryan
Limit size of log files unless config option is specified
378
    $JPGRAPH_PATH = "/usr/share/php5/jpgraph";
1 by Suren A. Chilingaryan
Initial import
379
    $EXCEL_WRITER_PATH ="";
24 by Suren A. Chilingaryan
Logger subsystem
380
    $TMP_PATH=$ADEI_ROOTDIR . "tmp";
53 by Suren A. Chilingaryan
fixups and some search hooks (incomplete)
381
382
    $ADEI_ROOT_STORAGE = "$ADEI_ROOTDIR/storage/";
1 by Suren A. Chilingaryan
Initial import
383
    
384
    $ADEI_APP_PATH = array (
53 by Suren A. Chilingaryan
fixups and some search hooks (incomplete)
385
	"default" => "/usr/bin/"
1 by Suren A. Chilingaryan
Initial import
386
    );
387
    
388
    $CSV_SEPARATOR = ",";
389
    $CSV_DATE_FORMAT = "d-M-y H:i:s";
390
    $EXCEL_DATE_FORMAT = "DD.MM.YYYY hh:mm:ss";
391
    $EXCEL_SUBSEC_FORMAT = "DD.MM.YYYY hh:mm:ss.000;@"; /* 
392
	    Unfortunately Excel doesn't support more than 3 digits,
393
	    OpenOffice does */
394
    $ROOT_COMBIHIST_LIMIT = 604800; /* No more, than 1 week */
395
396
14 by Suren A. Chilingaryan
Some minimal information on status bar
397
    $STATUS_DEFAULT_DURATION = 2000;	/* in milliseconds */
398
399
1 by Suren A. Chilingaryan
Initial import
400
    $GRAPH_DEFAULT_HEIGHT = 768; /* in pixels */
401
    $GRAPH_DEFAULT_WIDTH = 1024; /* in pixels */
402
/* Maximal number of points (all plots) on Graph, this allows us to produce 
403
rough multiplots to sustain high update rate (most of resources are used to 
404
graph->Stroke()) */
405
    $GRAPH_MAX_POINTS_PER_GRAPH = 5000;
406
/* Maximal approximation interval (in pixels). I.e. maximal distance between
407
to approximation points. This option have a priority over MAX_POINTS_PER_GRAPH
408
option. */
409
    $GRAPH_MAX_APPROXIMATION_INTERVAL = 10; /* in pixels */
410
411
    $GRAPH_AUTOAGGREGATION_MINMAX_THRESHOLD = 10; /* in precision, approx. px/2 */
412
413
    $GRAPH_INTERPOLATE_DATA_GAPS = false; /* Do not indicate missing data */
414
415
/* Maximal distance between currently CACHEd data and the data available in the
416
data source, measured in seconds. 0 means - unlimited */
417
    $GRAPH_MAX_CACHE_GAP = 0;
418
11 by Suren A. Chilingaryan
Graph navigation: mouse wheel, modifier keys, etc.
419
    
420
    $GRAPH_ZOOM_RATIO = 2.;	// This coeficent defines product of division of original window by zoomed window
421
    $GRAPH_DEEPZOOM_AREA = 10;	// In pixels (actual interval is 2x)
422
    $GRAPH_STEP_RATIO = 5.;	// This coeficent defines product of division of original window by step
423
    $GRAPH_EDGE_RATIO = 6;	// Product of division of while window by edge size
1 by Suren A. Chilingaryan
Initial import
424
425
    $GRAPH_DELTA_SIZE = 10; /* delta neighborhood size, in pixels */
426
    $GRAPH_MARGINS = array (
115 by Suren A. Chilingaryan
Further drawing improvements: legend, gaps, source tree
427
	"left" => 0,
1 by Suren A. Chilingaryan
Initial import
428
	"top" => 20,
429
	"right" => 20,
114 by Suren A. Chilingaryan
Massive rewrite of DRAW (unfinished): multiple groups and axis
430
	"bottom" => 30,
149 by Suren A. Chilingaryan
Y-axis labeling fixes (specially case xxxxxxxx.000001)
431
	"axis" => 80
1 by Suren A. Chilingaryan
Initial import
432
    );
433
    $GRAPH_SELECTION = array (
434
	"min_width" => 20,
435
	"min_height" => 20
436
    );
437
438
439
    $GRAPH_LINE_WEIGHT = 2;
440
/* Enables approximation point marks starting with accuracy greater than the
441
specified number of pixels. 0 - to disable. Significatly degradate performance
442
if used */
443
    $GRAPH_ACCURACY_MARKS_OUTSET = 14;
444
    $GRAPH_ACCURACY_MARKS_MULTIOUTSET = 49;
445
    $GRAPH_ACCURACY_MARKS_IF_GAPS = false;	// Force if data gaps are found
446
    $GRAPH_ACCURACY_MARKS_COLOR = "blue";
447
#   $GRAPH_ACCURACY_MARKS_TYPE = MARK_FILLEDCIRCLE;
448
    $GRAPH_ACCURACY_MARKS_SIZE = 3;
449
    
450
/* Display a bar on top of the graph, indicating the density of the data. The
451
four modes are supported:
452
    SHOW_NONE: do not show
453
    SHOW_EMPTY: show only if missing (due to inavalability of the data) points 
454
    are available on the graph
455
    SHOW_POINTS: Indicate all set points on the graph (somehow duplicates 
456
    'GRAPH_ACCURACY_MARKS' functionality, but displayed even if precision is 
457
    high and GRAP_ACCURACY_MARKS are disable by OUTSET
458
    SHOW_GAPS: Will display information on data gaps. Even if point placed on
459
    the graph, but there is less data than expected, all such points will be
460
    indicated on the bar 
461
*/
462
463
    $GRAPH_INDICATE_DATA_DENSITY = 'SHOW_NONE';
11 by Suren A. Chilingaryan
Graph navigation: mouse wheel, modifier keys, etc.
464
//    $GRAPH_INDICATE_DATA_DENSITY = SHOW_POINTS;//SHOW_GAPS;
1 by Suren A. Chilingaryan
Initial import
465
466
    $GRAPH_DENSITY_PLOT_INVALID_SIZE = 3;
467
    $GRAPH_DENSITY_PLOT_INVALID_COLOR = 'red';
468
469
    $GRAPH_DENSITY_PLOT_VALID_SIZE = 0;
470
    $GRAPH_DENSITY_PLOT_VALID_COLOR = 'green';
471
    
472
    $GRAPH_DENSITY_POINTS_TYPE = 'MARK_FILLEDCIRCLE';
473
    $GRAPH_DENSITY_POINTS_SIZE = 1;
474
    $GRAPH_DENSITY_POINTS_COLOR = 'green';
475
    $GRAPH_DENSITY_POINTS_OUTLINE = 'black';
476
    
117 by Suren A. Chilingaryan
Multiple axis support in JavaScript, multiple fixups in source tree handling
477
    $GRAPH_FAST_LEGEND = false;		// Inpricese in rapidly changing data    
138 by Suren A. Chilingaryan
Reuse generated png files in low precision mode (to speedup wiki)
478
479
    $GRAPH_LOWPRECISION_UPDATE_RATE = 10800; // How often we should update low precision graphs
1 by Suren A. Chilingaryan
Initial import
480
    
481
    $GRAPH_SUBSECOND_THRESHOLD = 5;	/* in seconds, for shorter intervals the subsecond handling is performed */
482
483
/* This option defines a plot colors (used sequently), comment out to use black
484
only */
485
    $GRAPH_COLORS =  array("black", "blue", "orange", "brown",
486
	    "#90EE90", "#ADD8E6", "#FFC0CB", "#A020F0", "#1E90FF");
114 by Suren A. Chilingaryan
Massive rewrite of DRAW (unfinished): multiple groups and axis
487
488
    $AXES_COLORS = array(
489
	array("black"),
490
	array("blue"),
119 by Suren A. Chilingaryan
New way of service handling (mod_rewrite), Various fixups, katrin stuff moved to SETUP directory
491
	array("#f800e9"),
114 by Suren A. Chilingaryan
Massive rewrite of DRAW (unfinished): multiple groups and axis
492
	array("green"),
119 by Suren A. Chilingaryan
New way of service handling (mod_rewrite), Various fixups, katrin stuff moved to SETUP directory
493
	array("yellow")
114 by Suren A. Chilingaryan
Massive rewrite of DRAW (unfinished): multiple groups and axis
494
    );
1 by Suren A. Chilingaryan
Initial import
495
/*
496
    $GRAPH_COLORS =  array("black", "#483D8B","#2F4F4F","#00CED1","#9400D3","#FF1493","#00BFFF","#696969","#1E90FF","#D19275","#B22222","#FFFAF0","#228B22","#FF00FF","#DCDCDC",
497
	    "#808080","#008000","#ADFF2F","#F0FFF0","#FF69B4","#CD5C5C","#4B0082","#FFFFF0","#F0E68C","#E6E6FA","#FFF0F5","#7CFC00","#FFFACD","#ADD8E6",
498
	    "#D3D3D3","#90EE90","#FFB6C1","#FFA07A","#20B2AA","#87CEFA","#8470FF","#778899","#B0C4DE","#FFFFE0","#00FF00","#32CD32","#FAF0E6","#FF00FF",
499
	    "#BA55D3","#9370D8","#3CB371","#7B68EE","#00FA9A","#48D1CC","#C71585","#191970","#F5FFFA","#FFE4E1","#FFE4B5","#FFDEAD","#000080","#FDF5E6",
500
	    "#FF4500","#DA70D6","#EEE8AA","#98FB98","#AFEEEE","#D87093","#FFEFD5","#FFDAB9","#CD853F","#FFC0CB","#DDA0DD","#B0E0E6","#800080","#FF0000",
501
	    "#FA8072","#F4A460","#2E8B57","#FFF5EE","#A0522D","#C0C0C0","#87CEEB","#6A5ACD","#708090","#FFFAFA","#00FF7F","#4682B4","#D2B48C","#008080");
502
*/
503
264 by Suren A. Chilingaryan
Allow to override ADEI_SETUP in the scripts
504
    if (!$ADEI_SETUP) {
505
        if (file_exists("config.actual.php")) {
506
	    require("config.actual.php");
507
        } else {
508
	    $ADEI_SETUP = "all";
509
        }
53 by Suren A. Chilingaryan
fixups and some search hooks (incomplete)
510
    }
1 by Suren A. Chilingaryan
Initial import
511
512
513
    if ($SETUP_MULTI_MODE) {
514
	if ($_GET['setup']) {
24 by Suren A. Chilingaryan
Logger subsystem
515
	    $ADEI_SETUP = $_GET['setup'];
1 by Suren A. Chilingaryan
Initial import
516
	    unset($_GET['setup']);
517
	} else {
518
	    $params = sizeof($_SERVER['argv']);
519
    	    if ($params>1) {
520
		$pos = array_search("-setup", $_SERVER['argv']);
24 by Suren A. Chilingaryan
Logger subsystem
521
		if (($pos)&&(($pos + 1) < $params)) $ADEI_SETUP =  $_SERVER['argv'][$pos + 1];
1 by Suren A. Chilingaryan
Initial import
522
		else $SETUP_MULTI_MODE = 0;
523
	    } else $SETUP_MULTI_MODE = 0;
524
	}
525
    }
526
24 by Suren A. Chilingaryan
Logger subsystem
527
    $SETUP_CONFIG = "setups/$ADEI_SETUP/config.php";
528
    $SETUP_CSS = "setups/$ADEI_SETUP/$ADEI_SETUP.css";
1 by Suren A. Chilingaryan
Initial import
529
    
530
    if (!file_exists("config.php")) {
531
        $curdir = getcwd();
23 by Suren A. Chilingaryan
Administrative interface and better handling of missing group channels
532
	if (preg_match("/(services|admin|system|test)$/", $curdir)) chdir("..");
533
	if (!file_exists("config.php")) {
534
	    if (preg_match("/tmp\/admin$/", $curdir)) chdir("..");
535
	}
1 by Suren A. Chilingaryan
Initial import
536
    }
537
    
538
    if (file_exists($SETUP_CONFIG)) require($SETUP_CONFIG);
33 by Suren A. Chilingaryan
Documentation and configuration updates
539
    
540
    if (file_exists("config.override.php")) require("config.override.php");
195 by Suren A. Chilingaryan
Image Export by Arsen Sogomonyan
541
?>