Revize 1509
Přidáno uživatelem David Raška před více než 12 roky(ů)
freenetis/branches/testing/application/i18n/cs_CZ/texts.php | ||
---|---|---|
'device list of user' => 'Seznam zařízení uživatele',
|
||
'device map' => 'Mapa zařízení',
|
||
'device monitoring' => 'Monitoring zařízení',
|
||
'device monitoring state' => 'Stav monitoringu zařízení',
|
||
'device name' => 'Název zařízení',
|
||
'device repayments' => 'Splátky zařízení',
|
||
'device repayments have been successfully recalculated, %d transfers deleted, %d new transfers created' => 'Splátky zařízení byly úspěšně přepočítány, smazáno %d převodů, vytvořeno %d nových převodů.',
|
||
... | ... | |
'lack of credit' => 'Nedostatek kreditu',
|
||
'language' => 'Jazyk',
|
||
'last' => 'Poslední',
|
||
'last active at' => 'Naposled aktivní v',
|
||
'last actualization at' => 'Poslední aktualizace v',
|
||
'last changed author' => 'Autor poslední úpravy',
|
||
'last changed date' => 'Datum poslední úpravy',
|
||
'last changed rev' => 'Revize poslední úpravy',
|
||
... | ... | |
'purchasers account' => 'Účet odběratelů',
|
||
'qos ceil' => 'Ceil (max-limit) pro QoS',
|
||
'qos rate' => 'Rate (limit-at) pro QoS',
|
||
'qos state' => 'Stav QoS',
|
||
'qos variables have been successfully updated' => 'Proměnné QoSu byly úspěšně aktualizovány. ',
|
||
'qualified majority' => 'Kvalifikovaná většina',
|
||
'quantity' => 'Množství',
|
||
... | ... | |
'redirection preview' => 'Náhled přesměrování',
|
||
'redirection records' => 'Záznamy přesměrování',
|
||
'redirection settings' => 'Nastavení přesměrování',
|
||
'redirection state' => 'Stav přesměrování',
|
||
'redirection type' => 'Typ přesměrování',
|
||
'reg' => 'Přih.',
|
||
'register' => 'Registrovat',
|
||
... | ... | |
'traffic of members' => 'Provoz členů',
|
||
'traffic of members in time' => 'Provoz členů v čase',
|
||
'traffic' => 'Provoz',
|
||
'traffic monitoring state' => 'Stav monitoringu provozu',
|
||
'transaction code' => 'Kód transakce',
|
||
'transfer' => 'Převod',
|
||
'transfer details' => 'Detaily převodu',
|
freenetis/branches/testing/application/helpers/module_state.php | ||
---|---|---|
<?php defined('SYSPATH') or die('No direct script access.');
|
||
/*
|
||
* This file is part of open source system FreeNetIS
|
||
* and it is released under GPLv3 licence.
|
||
*
|
||
* More info about licence can be found:
|
||
* http://www.gnu.org/licenses/gpl-3.0.html
|
||
*
|
||
* More info about project can be found:
|
||
* http://www.freenetis.org/
|
||
*
|
||
*/
|
||
|
||
/**
|
||
* Helper for indicating redirection and monitoring module states
|
||
*
|
||
* @author David Raška
|
||
* @package Helper
|
||
*/
|
||
class module_state
|
||
{
|
||
/*
|
||
* Function generates state icons for module
|
||
*
|
||
* @param $module
|
||
* @return HTML code
|
||
*/
|
||
public static function get_state($module = null, $add_text = false)
|
||
{
|
||
if ($module)
|
||
{
|
||
$module .= '_state';
|
||
$last_time = Settings::get($module);
|
||
$time_diff = time()-strtotime($last_time);
|
||
|
||
//inactive when time_diff > 10 minutes
|
||
if ($time_diff < 600)
|
||
{
|
||
$result = html::image(array
|
||
(
|
||
'src' => 'media/images/states/active.png',
|
||
'style' => 'margin-right: 0.5em',
|
||
'title' => __('active')
|
||
));
|
||
$text = ' '.__('Last actualization at');
|
||
}
|
||
else
|
||
{
|
||
$since = '';
|
||
|
||
if (!empty($last_time))
|
||
{
|
||
$since = ' '. strtolower(__('since')).' '.$last_time;
|
||
}
|
||
else
|
||
{
|
||
$add_text = FALSE;
|
||
}
|
||
$result = html::image(array
|
||
(
|
||
'src' => 'media/images/states/inactive.png',
|
||
'style' => 'margin-right: 0.5em',
|
||
'title' => __('inactive').$since
|
||
));
|
||
$text = __('Last active at');
|
||
}
|
||
|
||
if ($add_text)
|
||
{
|
||
$result .= $text.' '.$last_time;
|
||
}
|
||
|
||
return $result;
|
||
}
|
||
|
||
return '';
|
||
}
|
||
}
|
freenetis/branches/testing/application/controllers/web_interface.php | ||
---|---|---|
{
|
||
echo implode("\n", $items)."\n";
|
||
}
|
||
|
||
// set state of module (last activation time)
|
||
Settings::set('redirection_state', date('Y-m-d H:i:s'));
|
||
}
|
||
|
||
/**
|
||
... | ... | |
{
|
||
echo implode("\n", $items)."\n";
|
||
}
|
||
|
||
// set state of module (last activation time)
|
||
Settings::set('redirection_state', date('Y-m/d H:i:s'));
|
||
}
|
||
|
||
/**
|
||
... | ... | |
{
|
||
echo implode("\n", $items)."\n";
|
||
}
|
||
|
||
// set state of module (last activation time)
|
||
Settings::set('redirection_state', date('Y-m-d H:i:s'));
|
||
}
|
||
|
||
/**
|
||
... | ... | |
{
|
||
echo implode("\n", $items)."\n";
|
||
}
|
||
|
||
// set state of module (last activation time)
|
||
Settings::set('redirection_state', date('Y-m-d H:i:s'));
|
||
}
|
||
|
||
/**
|
||
... | ... | |
{
|
||
echo "$ip->ip_address\n";
|
||
}
|
||
|
||
// set state of module (last activation time)
|
||
Settings::set('traffic_monitoring_state', date('Y-m-d H:i:s'));
|
||
}
|
||
|
||
/**
|
||
... | ... | |
);
|
||
|
||
echo text::print_in_columns($data, $columns);
|
||
|
||
// set state of module (last activation time)
|
||
Settings::set('qos_state', date('Y-m-d H:i:s'));
|
||
}
|
||
|
||
/**
|
||
... | ... | |
$columns = array ("id", "ip_address");
|
||
|
||
echo text::print_in_columns($data, $columns);
|
||
|
||
// set state of module (last activation time)
|
||
Settings::set('qos_state', date('Y-m-d H:i:s'));
|
||
}
|
||
|
||
/**
|
||
... | ... | |
{
|
||
echo $host->ip_address."\n";
|
||
}
|
||
|
||
// set state of module (last activation time)
|
||
Settings::set('device_monitoring_state', date('Y-m-d H:i:s'));
|
||
}
|
||
|
||
/**
|
||
... | ... | |
{
|
||
$monitor_host_model->update_host($ip, Monitor_host_Model::get_state($states[$i]), $lats[$i]);
|
||
}
|
||
|
||
// set state of module (last activation time)
|
||
Settings::set('device_monitoring_state', date('Y-m-d H:i:s'));
|
||
}
|
||
|
||
/**
|
freenetis/branches/testing/application/controllers/settings.php | ||
---|---|---|
}
|
||
|
||
$data[__('DB schema revision')] = Settings::get('db_schema_version');
|
||
$data[__('Redirection state')] = module_state::get_state('redirection');
|
||
$data[__('QoS state')] = module_state::get_state('qos');
|
||
$data[__('Device monitoring state')] = module_state::get_state('device_monitoring');
|
||
$data[__('Traffic monitoring state')] = module_state::get_state('traffic_monitoring');
|
||
|
||
ob_start();
|
||
|
||
$html = '';
|
||
... | ... | |
|
||
// creating of new forge
|
||
$this->form = new Forge('settings/qos');
|
||
|
||
|
||
$this->form->group('Variables for QoS');
|
||
|
||
$this->form->checkbox('qos_enabled')
|
||
... | ... | |
$view->content->current = 'qos';
|
||
$view->content->content = $this->form->html();
|
||
$view->content->headline = __('QoS');
|
||
$view->content->description = module_state::get_state('qos', TRUE);
|
||
|
||
if (!empty($message))
|
||
$view->content->message = $message;
|
||
... | ... | |
$view->content->current = 'logging';
|
||
$view->content->content = $this->form->html();
|
||
$view->content->headline = __('Logging');
|
||
$view->content->description = module_state::get_state('traffic_monitoring', TRUE);
|
||
if (!empty($message))
|
||
$view->content->message = $message;
|
||
$view->render(TRUE);
|
||
... | ... | |
$view->content->current = 'monitoring';
|
||
$view->content->content = $this->form->html();
|
||
$view->content->headline = __('Monitoring');
|
||
$view->content->description = module_state::get_state('device_monitoring', TRUE);
|
||
|
||
if (!empty($message))
|
||
$view->content->message = $message;
|
freenetis/branches/testing/application/controllers/devices.php | ||
---|---|---|
|
||
$grid->add_new_button('devices/map', __('Show device map'));
|
||
|
||
if (Settings::get('monitoring_enabled') && server::query_string() != '')
|
||
if (Settings::get('monitoring_enabled') &&
|
||
count(explode('&', server::query_string())) > 1)
|
||
{
|
||
$grid->add_new_button(
|
||
'monitoring/action'.server::query_string(),
|
Také k dispozici: Unified diff
Upravy:
- Odstraneni tlacitka monitoringu, pokud neni pouzit filter
- #211 a #212: Pridano zobrazeni stavu presmerovani, QoS, monitoringu zarizeni a monitoringu provozu