Files
pi-control/resources/plugins/fritzbox/plugin.statistic.config.php
Gregor Schulte b303dd00d6 Init Repo
2021-06-17 12:24:22 +02:00

105 lines
2.3 KiB
PHP

<?php
if (!defined('PICONTROL')) exit();
(include_once LIBRARY_PATH.'main/main.function.php') or die('Error: 0x0001');
(include_once LIBRARY_PATH.'plugin/plugin.function.php') or die('Error: 0x0002');
initPluginConstants();
(include_once PLUGIN_PATH.'resources/library/main/main.function.php') or die('Error: 9x0001');
$fritzboxUnit = getPluginConfig('main:unit', 'mbit');
$units = getOptionsForConfigFromUnit($fritzboxUnit);
$statisticConfig = array(
'fritzbox.traffic-download' => array(
'title' => 'Auslastung Download',
'label' => 'Traffic ('.$units['unit'].')',
'unit' => $units['unit'],
'cycle' => 10,
'columns' => array(
array(
'label' => 'Zeit',
'type' => 'datetime',
'downloadTitle' => 'Datum'
),
array(
'label' => 'Maximal',
'type' => 'number',
'downloadTitle' => 'Maximal in Byte/s',
'division' => $units['division'],
'style' => array(
'color' => '#3366cc',
'type' => 'line',
'lineDashStyle' => 10
)
),
array(
'label' => 'Download',
'type' => 'number',
'downloadTitle' => 'Auslastung Download in Byte/s',
'division' => $units['division'],
'style' => array(
'color' => '#3366cc'
)
)
),
'limits' => array(
'min' => array(
'value' => 0.01,
'use' => 'fix',
'fix' => true
),
'max' => array(
'value' => 1.10,
'use' => 'multiply',
'fix' => false
)
)
),
'fritzbox.traffic-upload' => array(
'title' => 'Auslastung Upload',
'label' => 'Traffic ('.$units['unit'].')',
'unit' => $units['unit'],
'cycle' => 10,
'columns' => array(
array(
'label' => 'Zeit',
'type' => 'datetime',
'downloadTitle' => 'Datum'
),
array(
'label' => 'Maximal',
'type' => 'number',
'downloadTitle' => 'Maximal in Byte/s',
'division' => $units['division'],
'style' => array(
'color' => '#3366cc',
'type' => 'line',
'lineDashStyle' => 10
)
),
array(
'label' => 'Upload',
'type' => 'number',
'downloadTitle' => 'Auslastung Upload in Byte/s',
'division' => $units['division'],
'style' => array(
'color' => '#3366cc'
)
)
),
'limits' => array(
'min' => array(
'value' => 0.01,
'use' => 'fix',
'fix' => true
),
'max' => array(
'value' => 1.10,
'use' => 'multiply',
'fix' => false
)
)
)
);
?>