| 1 |
<?php |
|---|
| 2 |
error_reporting(E_ALL ^ E_NOTICE); |
|---|
| 3 |
|
|---|
| 4 |
$SETUP_MULTI_MODE = true; |
|---|
| 5 |
|
|---|
| 6 |
$ADEI_RELEASE = false; |
|---|
| 7 |
|
|---|
| 8 |
$TITLE = "ADEI"; |
|---|
| 9 |
|
|---|
| 10 |
$DEFAULT_MODULE = "graph"; |
|---|
| 11 |
|
|---|
| 12 |
$MODULES = array("config", "graph", "alarms", "logs", "help"); |
|---|
| 13 |
$POPUPS = array("source", "controls"); |
|---|
| 14 |
$CONTROLS = array("export", "aggregator", "searchtab", false, "virtual"); |
|---|
| 15 |
|
|---|
| 16 |
/* more specific configs should go after less specific ones */ |
|---|
| 17 |
$OPTIONS = array ( |
|---|
| 18 |
"default" => array( |
|---|
| 19 |
"min_resolution" => 600, |
|---|
| 20 |
// "cache_config" => $ADEI_CACHE // alter default cache timing configuration |
|---|
| 21 |
"ignore_subseconds" => true, |
|---|
| 22 |
"omit_raw_cache" => false, |
|---|
| 23 |
"fill_raw_first" => false, |
|---|
| 24 |
"optimize_empty_cache" => false, |
|---|
| 25 |
"use_cache_timewindow" => true, |
|---|
| 26 |
"use_cache_reader" => false, |
|---|
| 27 |
"overcome_reader_faults" => false, |
|---|
| 28 |
"optimize_time_axes" => true, |
|---|
| 29 |
"use_md5_postfix" => false, |
|---|
| 30 |
"null_value" => 0, |
|---|
| 31 |
"disable_caching" => false, |
|---|
| 32 |
"channel_uids" => false, |
|---|
| 33 |
) |
|---|
| 34 |
); |
|---|
| 35 |
|
|---|
| 36 |
|
|---|
| 37 |
$ADEI_DB = array ( |
|---|
| 38 |
"host" => "localhost", |
|---|
| 39 |
"port" => 0, |
|---|
| 40 |
"database" => "adei", |
|---|
| 41 |
"user" => "adei", |
|---|
| 42 |
"password" => "adei" |
|---|
| 43 |
); |
|---|
| 44 |
|
|---|
| 45 |
|
|---|
| 46 |
|
|---|
| 47 |
|
|---|
| 48 |
|
|---|
| 49 |
|
|---|
| 50 |
|
|---|
| 51 |
|
|---|
| 52 |
|
|---|
| 53 |
|
|---|
| 54 |
|
|---|
| 55 |
|
|---|
| 56 |
$BACKUP_DB = array ( |
|---|
| 57 |
"driver" => "mysql", |
|---|
| 58 |
"host" => "localhost", |
|---|
| 59 |
"port" => 0, |
|---|
| 60 |
"user" => "zeus", |
|---|
| 61 |
"password" => "zeus" |
|---|
| 62 |
); |
|---|
| 63 |
|
|---|
| 64 |
$ADEI_TIMINGS = array ( |
|---|
| 65 |
_("1 Year") => 31536000, |
|---|
| 66 |
_("1 Month") => 2592000, |
|---|
| 67 |
_("1 Week") => 604800, |
|---|
| 68 |
_("1 Day") => 86400, |
|---|
| 69 |
_("6 Hours") => 21600, |
|---|
| 70 |
_("1 Hour") => 3600, |
|---|
| 71 |
_("15 Min") => 900, |
|---|
| 72 |
_("5 Min") => 300 |
|---|
| 73 |
); |
|---|
| 74 |
|
|---|
| 75 |
|
|---|
| 76 |
$ADEI_CACHE = array ( |
|---|
| 77 |
"min" => 31536000, "res" => 43200), |
|---|
| 78 |
array("min" => 2592000, "res" => 3600), |
|---|
| 79 |
array("min" => 604800, "res" => 600), |
|---|
| 80 |
array("min" => 86400, "res" => 60), |
|---|
| 81 |
array("min" => 7200, "res" => 10), |
|---|
| 82 |
|
|---|
| 83 |
); |
|---|
| 84 |
|
|---|
| 85 |
|
|---|
| 86 |
$ADEI_VIRTUAL_READERS = array( |
|---|
| 87 |
"virtual_vg" => array( |
|---|
| 88 |
"title" => _("User Groups"), |
|---|
| 89 |
"reader"=> "VGReader" |
|---|
| 90 |
), |
|---|
| 91 |
"virtual" => array( |
|---|
| 92 |
"title" => _("Virtual"), |
|---|
| 93 |
"reader" => "VIRTUALReader" |
|---|
| 94 |
) |
|---|
| 95 |
|
|---|
| 96 |
|
|---|
| 97 |
$ADEI_AXES = array( |
|---|
| 98 |
"temperature" => array( |
|---|
| 99 |
"axis_units" => _("C"), |
|---|
| 100 |
"axis_name" => _("Temperature"), |
|---|
| 101 |
"axis_mode" => "STANDARD", |
|---|
| 102 |
"axis_range" => false |
|---|
| 103 |
), |
|---|
| 104 |
"voltage" => array( |
|---|
| 105 |
"axis_units" => _("V"), |
|---|
| 106 |
"axis_name" => _("Voltage"), |
|---|
| 107 |
"axis_mode" => "STANDARD", |
|---|
| 108 |
"axis_range" => false |
|---|
| 109 |
) |
|---|
| 110 |
|
|---|
| 111 |
|
|---|
| 112 |
$DEFAULT_MISSING_VALUE = NULL; |
|---|
| 113 |
|
|---|
| 114 |
$EXPORT_DEFAULT_FORMAT = "csv"; |
|---|
| 115 |
|
|---|
| 116 |
|
|---|
| 117 |
|
|---|
| 118 |
|
|---|
| 119 |
|
|---|
| 120 |
|
|---|
| 121 |
|
|---|
| 122 |
|
|---|
| 123 |
|
|---|
| 124 |
|
|---|
| 125 |
|
|---|
| 126 |
|
|---|
| 127 |
|
|---|
| 128 |
|
|---|
| 129 |
|
|---|
| 130 |
|
|---|
| 131 |
|
|---|
| 132 |
|
|---|
| 133 |
|
|---|
| 134 |
|
|---|
| 135 |
|
|---|
| 136 |
$ADEI_SYSTEM_FORMATS = array ( |
|---|
| 137 |
"labview32" => array( |
|---|
| 138 |
'title' => "LabVIEW array", |
|---|
| 139 |
'handler' => "LABVIEW", |
|---|
| 140 |
'hidden' => true, |
|---|
| 141 |
'type' => "streamarray" |
|---|
| 142 |
) |
|---|
| 143 |
|
|---|
| 144 |
|
|---|
| 145 |
$EXPORT_FORMATS = array ( |
|---|
| 146 |
"csv" => array( |
|---|
| 147 |
'title' => "CSV", |
|---|
| 148 |
'accept_null_values' => true |
|---|
| 149 |
), |
|---|
| 150 |
"xls" => array( |
|---|
| 151 |
'title' => "Excel", |
|---|
| 152 |
'handler' => "EXCEL", |
|---|
| 153 |
|
|---|
| 154 |
|
|---|
| 155 |
|
|---|
| 156 |
|
|---|
| 157 |
|
|---|
| 158 |
|
|---|
| 159 |
|
|---|
| 160 |
|
|---|
| 161 |
|
|---|
| 162 |
|
|---|
| 163 |
|
|---|
| 164 |
|
|---|
| 165 |
), |
|---|
| 166 |
"root" => array( |
|---|
| 167 |
'title' => "ROOT", |
|---|
| 168 |
'filter' => array ( |
|---|
| 169 |
'app' => "csv2root", |
|---|
| 170 |
'opts' => "--file @TMPFILE@ ?{@BLOCK_NUMBER@===0?--overwrite} ?{@EXPECTED_BLOCKS@!=1?--group @BLOCK_TITLE@}", |
|---|
| 171 |
'joiner' => true, |
|---|
| 172 |
'groupmode' => true, |
|---|
| 173 |
'extension' => "root" |
|---|
| 174 |
) |
|---|
| 175 |
|
|---|
| 176 |
"root_hist" => array( |
|---|
| 177 |
'title' => "ROOT+Hist", |
|---|
| 178 |
'filter' => array( |
|---|
| 179 |
'app' => "csv2root", |
|---|
| 180 |
'opts' => "--file @TMPFILE@ ?{@BLOCK_NUMBER@===0?--overwrite} ?{@EXPECTED_BLOCKS@!=1?--group @BLOCK_TITLE@} --save-histograms ?{@ROOT__COMBHIST@?--combined-histogram}", |
|---|
| 181 |
'joiner' => true, |
|---|
| 182 |
'groupmode' => true, |
|---|
| 183 |
'extension' => "root" |
|---|
| 184 |
) |
|---|
| 185 |
|
|---|
| 186 |
"tdms" => array( |
|---|
| 187 |
'title' => "TDMS", |
|---|
| 188 |
'handler' => "LABVIEW", |
|---|
| 189 |
'type' => "tdms" |
|---|
| 190 |
) |
|---|
| 191 |
|
|---|
| 192 |
|
|---|
| 193 |
$EXPORT_SAMPLING_RATES = array ( |
|---|
| 194 |
_("Hourly") => 3600, |
|---|
| 195 |
_("Minutely") => 60, |
|---|
| 196 |
_("1 Hz") => 1, |
|---|
| 197 |
_("1000 Hz") => 0.001 |
|---|
| 198 |
); |
|---|
| 199 |
|
|---|
| 200 |
$SEARCH_ENGINES = array ( |
|---|
| 201 |
"ITEMSearch" => array() |
|---|
| 202 |
|
|---|
| 203 |
|
|---|
| 204 |
|
|---|
| 205 |
$ADEI_ID_DELIMITER = "__"; |
|---|
| 206 |
|
|---|
| 207 |
$LOGGER_LOG_REQUESTS = false; |
|---|
| 208 |
$LOGGER_LOG_OUTPUT = false; |
|---|
| 209 |
|
|---|
| 210 |
|
|---|
| 211 |
|
|---|
| 212 |
|
|---|
| 213 |
|
|---|
| 214 |
$MYSQL_FORCE_INDEXES = true; |
|---|
| 215 |
|
|---|
| 216 |
$CACHE_PRECISE_GAPS = false; |
|---|
| 217 |
|
|---|
| 218 |
$AJAX_UPDATE_RATE = 60; |
|---|
| 219 |
$AJAX_WINDOW_BORDER = 10; |
|---|
| 220 |
$AJAX_PARSE_DELAY = 100; |
|---|
| 221 |
|
|---|
| 222 |
$SOURCE_KEEP_WINDOW = false; |
|---|
| 223 |
|
|---|
| 224 |
|
|---|
| 225 |
$DHTMLX_SKIN = "standard"; |
|---|
| 226 |
|
|---|
| 227 |
$DHTMLX_ICONSET = "csh_bluefolders"; |
|---|
| 228 |
$MENU_SHOW_ITEMS = false; |
|---|
| 229 |
$MENU_SCROLL_LIMIT = 10; |
|---|
| 230 |
|
|---|
| 231 |
$JPGRAPH_PATH="/usr/share/php5/jpgraph"; |
|---|
| 232 |
$EXCEL_WRITER_PATH =""; |
|---|
| 233 |
$TMP_PATH=$ADEI_ROOTDIR . "tmp"; |
|---|
| 234 |
|
|---|
| 235 |
$ADEI_ROOT_STORAGE = "$ADEI_ROOTDIR/storage/"; |
|---|
| 236 |
|
|---|
| 237 |
$ADEI_APP_PATH = array ( |
|---|
| 238 |
"default" => "/usr/bin/" |
|---|
| 239 |
); |
|---|
| 240 |
|
|---|
| 241 |
$CSV_SEPARATOR = ","; |
|---|
| 242 |
$CSV_DATE_FORMAT = "d-M-y H:i:s"; |
|---|
| 243 |
$EXCEL_DATE_FORMAT = "DD.MM.YYYY hh:mm:ss"; |
|---|
| 244 |
$EXCEL_SUBSEC_FORMAT = "DD.MM.YYYY hh:mm:ss.000;@"; |
|---|
| 245 |
|
|---|
| 246 |
|
|---|
| 247 |
$ROOT_COMBIHIST_LIMIT = 604800; |
|---|
| 248 |
|
|---|
| 249 |
|
|---|
| 250 |
$STATUS_DEFAULT_DURATION = 2000; |
|---|
| 251 |
|
|---|
| 252 |
|
|---|
| 253 |
$GRAPH_DEFAULT_HEIGHT = 768; |
|---|
| 254 |
$GRAPH_DEFAULT_WIDTH = 1024; |
|---|
| 255 |
|
|---|
| 256 |
|
|---|
| 257 |
|
|---|
| 258 |
$GRAPH_MAX_POINTS_PER_GRAPH = 5000; |
|---|
| 259 |
|
|---|
| 260 |
|
|---|
| 261 |
|
|---|
| 262 |
$GRAPH_MAX_APPROXIMATION_INTERVAL = 10; |
|---|
| 263 |
|
|---|
| 264 |
$GRAPH_AUTOAGGREGATION_MINMAX_THRESHOLD = 10; |
|---|
| 265 |
|
|---|
| 266 |
$GRAPH_INTERPOLATE_DATA_GAPS = false; |
|---|
| 267 |
|
|---|
| 268 |
|
|---|
| 269 |
|
|---|
| 270 |
$GRAPH_MAX_CACHE_GAP = 0; |
|---|
| 271 |
|
|---|
| 272 |
|
|---|
| 273 |
$GRAPH_ZOOM_RATIO = 2.; |
|---|
| 274 |
$GRAPH_DEEPZOOM_AREA = 10; |
|---|
| 275 |
$GRAPH_STEP_RATIO = 5.; |
|---|
| 276 |
$GRAPH_EDGE_RATIO = 6; |
|---|
| 277 |
|
|---|
| 278 |
$GRAPH_DELTA_SIZE = 10; |
|---|
| 279 |
$GRAPH_MARGINS = array ( |
|---|
| 280 |
"left" => 50, |
|---|
| 281 |
"top" => 20, |
|---|
| 282 |
"right" => 220, |
|---|
| 283 |
"bottom" => 30 |
|---|
| 284 |
); |
|---|
| 285 |
$GRAPH_SELECTION = array ( |
|---|
| 286 |
"min_width" => 20, |
|---|
| 287 |
"min_height" => 20 |
|---|
| 288 |
); |
|---|
| 289 |
|
|---|
| 290 |
|
|---|
| 291 |
$GRAPH_LINE_WEIGHT = 2; |
|---|
| 292 |
|
|---|
| 293 |
|
|---|
| 294 |
|
|---|
| 295 |
$GRAPH_ACCURACY_MARKS_OUTSET = 14; |
|---|
| 296 |
$GRAPH_ACCURACY_MARKS_MULTIOUTSET = 49; |
|---|
| 297 |
$GRAPH_ACCURACY_MARKS_IF_GAPS = false; |
|---|
| 298 |
$GRAPH_ACCURACY_MARKS_COLOR = "blue"; |
|---|
| 299 |
|
|---|
| 300 |
$GRAPH_ACCURACY_MARKS_SIZE = 3; |
|---|
| 301 |
|
|---|
| 302 |
|
|---|
| 303 |
|
|---|
| 304 |
|
|---|
| 305 |
|
|---|
| 306 |
|
|---|
| 307 |
|
|---|
| 308 |
|
|---|
| 309 |
|
|---|
| 310 |
|
|---|
| 311 |
|
|---|
| 312 |
|
|---|
| 313 |
|
|---|
| 314 |
|
|---|
| 315 |
$GRAPH_INDICATE_DATA_DENSITY = 'SHOW_NONE'; |
|---|
| 316 |
|
|---|
| 317 |
|
|---|
| 318 |
$GRAPH_DENSITY_PLOT_INVALID_SIZE = 3; |
|---|
| 319 |
$GRAPH_DENSITY_PLOT_INVALID_COLOR = 'red'; |
|---|
| 320 |
|
|---|
| 321 |
$GRAPH_DENSITY_PLOT_VALID_SIZE = 0; |
|---|
| 322 |
$GRAPH_DENSITY_PLOT_VALID_COLOR = 'green'; |
|---|
| 323 |
|
|---|
| 324 |
$GRAPH_DENSITY_POINTS_TYPE = 'MARK_FILLEDCIRCLE'; |
|---|
| 325 |
$GRAPH_DENSITY_POINTS_SIZE = 1; |
|---|
| 326 |
$GRAPH_DENSITY_POINTS_COLOR = 'green'; |
|---|
| 327 |
$GRAPH_DENSITY_POINTS_OUTLINE = 'black'; |
|---|
| 328 |
|
|---|
| 329 |
|
|---|
| 330 |
|
|---|
| 331 |
$GRAPH_SUBSECOND_THRESHOLD = 5; |
|---|
| 332 |
|
|---|
| 333 |
|
|---|
| 334 |
|
|---|
| 335 |
$GRAPH_COLORS = array("#000000","#006400","#000080","#0B0000","#00008B","#8B0000","#8B008B","#8B8B00","#0F0F0F","#F0F0F0"); |
|---|
| 336 |
|
|---|
| 337 |
|
|---|
| 338 |
|
|---|
| 339 |
|
|---|
| 340 |
|
|---|
| 341 |
|
|---|
| 342 |
|
|---|
| 343 |
|
|---|
| 344 |
|
|---|
| 345 |
if (file_exists("config.actual.php")) { |
|---|
| 346 |
"config.actual.php"); |
|---|
| 347 |
|
|---|
| 348 |
$ADEI_SETUP = "all"; |
|---|
| 349 |
|
|---|
| 350 |
|
|---|
| 351 |
|
|---|
| 352 |
$SETUP_MULTI_MODE) { |
|---|
| 353 |
$_GET['setup']) { |
|---|
| 354 |
$ADEI_SETUP = $_GET['setup']; |
|---|
| 355 |
$_GET['setup']); |
|---|
| 356 |
|
|---|
| 357 |
$params = sizeof($_SERVER['argv']); |
|---|
| 358 |
$params>1) { |
|---|
| 359 |
$pos = array_search("-setup", $_SERVER['argv']); |
|---|
| 360 |
$pos)&&(($pos + 1) < $params)) $ADEI_SETUP = $_SERVER['argv'][$pos + 1]; |
|---|
| 361 |
$SETUP_MULTI_MODE = 0; |
|---|
| 362 |
$SETUP_MULTI_MODE = 0; |
|---|
| 363 |
|
|---|
| 364 |
|
|---|
| 365 |
|
|---|
| 366 |
$SETUP_CONFIG = "setups/$ADEI_SETUP/config.php"; |
|---|
| 367 |
$SETUP_CSS = "setups/$ADEI_SETUP/$ADEI_SETUP.css"; |
|---|
| 368 |
|
|---|
| 369 |
file_exists("config.php")) { |
|---|
| 370 |
$curdir = getcwd(); |
|---|
| 371 |
preg_match("/(services|admin|system|test)$/", $curdir)) chdir(".."); |
|---|
| 372 |
file_exists("config.php")) { |
|---|
| 373 |
preg_match("/tmp\/admin$/", $curdir)) chdir(".."); |
|---|
| 374 |
|
|---|
| 375 |
|
|---|
| 376 |
|
|---|
| 377 |
file_exists($SETUP_CONFIG)) require($SETUP_CONFIG); |
|---|
| 378 |
|
|---|
| 379 |
file_exists("config.override.php")) require("config.override.php"); |
|---|
| 380 |
?> |
|---|