Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 1512

Přidáno uživatelem David Raška před asi 12 roky(ů)

Upravy:
- Prejmenovane polozky sledovani stavu
- Pridana aktualizace stavu v ulog

Zobrazit rozdíly:

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ů.',
......
'log in to freenetis system' => 'Přihlásit do systému Freenetis',
'logged user' => 'Přihlášený uživatel',
'logging' => 'Logování',
'logging state' => 'Stav logování',
'login data' => 'Přihlašovací údaje',
'login logs' => 'Logy přihlášení',
'login logs of user' => 'Logy přihlášení uživatele',
......
'monitoring has been successfully deactivated' => 'Monitoring byl úspěšně deaktivován.',
'monitoring has been successfully updated' => 'Monitoring byl úspěšně aktualizován.',
'monitoring notice' => 'Monitoring oznámení',
'monitoring state' => 'Stav monitoringu',
'month' => 'Měsíc',
'month from' => 'Od měsíce (včetně)',
'monthly' => 'měsíčně',
......
'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/models/ulog2_ct.php
VALUES(_member_id, _download, _upload, _local_download, _local_upload, CURDATE())
ON DUPLICATE KEY
UPDATE download = download + _download, upload = upload + _upload, local_download = local_download + _local_download, local_upload = local_upload + _local_upload;
REPLACE `config` (`name`, `value`) VALUES ('logging_state', NOW());
RETURN _member_id;
END
");
freenetis/branches/testing/application/controllers/web_interface.php
}
// set state of module (last activation time)
Settings::set('device_monitoring_state', date('Y-m-d H:i:s'));
Settings::set('monitoring_state', date('Y-m-d H:i:s'));
}
/**
......
}
// set state of module (last activation time)
Settings::set('device_monitoring_state', date('Y-m-d H:i:s'));
Settings::set('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');
$data[__('Monitoring state')] = module_state::get_state('monitoring');
$data[__('Logging state')] = module_state::get_state('logging');
ob_start();
......
$view->content->current = 'logging';
$view->content->content = $this->form->html();
$view->content->headline = __('Logging');
$view->content->description = module_state::get_state('traffic_monitoring', TRUE);
$view->content->description = module_state::get_state('logging', 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);
$view->content->description = module_state::get_state('monitoring', TRUE);
if (!empty($message))
$view->content->message = $message;
freenetis/branches/testing/application/upgrade_sql/upgrade_sql.php
return $svnid;
}
$upgrade_sql[get_SVN_rev()] = array
(
"ALTER TABLE `ports` ADD `mode` INT( 11 ) NOT NULL ,
ADD `port_vlan_id` INT( 11 ) NOT NULL ,
ADD INDEX ( `port_vlan_id` )",
"ALTER TABLE `vlans` ADD UNIQUE (
`tag_802_1q`
)",
"INSERT INTO vlans(id, name, tag_802_1q, comment)
VALUES (NULL, 'Default VLAN', 1, 'Default VLAN')
ON DUPLICATE KEY
UPDATE name='Default VLAN', comment='Default VLAN';",
"ALTER TABLE `ports_vlans` ADD `tagged` BOOLEAN NOT NULL ",
"ALTER TABLE `segments` CHANGE `bitrate` `bitrate` BIGINT NULL DEFAULT NULL",
"UPDATE ports p,
(
SELECT port_id, vlan_id, IF(COUNT(*)=1, 1, 2) AS mode
FROM ports_vlans pv
GROUP BY pv.port_id
) pv
SET p.mode = pv.mode, p.port_vlan_id = pv.vlan_id
WHERE pv.port_id = p.id"
);
/**
* Recreate MySQL ulog2 functions, because logging state update code was addded
*
* @author David Raška
* @return boolean
*/
function upgrade_sql_after()
{
$user_model = new User_Model();
// check if user have permissions to create function
if (Settings::get('ulogd_enabled')
&& $user_model->check_permission("CREATE ROUTINE"))
{
// creates function for ulogd
Ulog2_ct_Model::create_functions();
}
else
Settings::set('ulogd_enabled', 0);
return true;
}
$upgrade_sql[get_SVN_rev()] = array();
freenetis/branches/testing/application/upgrade_sql/upgrade_sql_1397.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/
*
*/
$upgrade_sql[1397] = array
(
"ALTER TABLE `ports` ADD `mode` INT( 11 ) NOT NULL ,
ADD `port_vlan_id` INT( 11 ) NOT NULL ,
ADD INDEX ( `port_vlan_id` )",
"ALTER TABLE `vlans` ADD UNIQUE (
`tag_802_1q`
)",
"INSERT INTO vlans(id, name, tag_802_1q, comment)
VALUES (NULL, 'Default VLAN', 1, 'Default VLAN')
ON DUPLICATE KEY
UPDATE name='Default VLAN', comment='Default VLAN';",
"ALTER TABLE `ports_vlans` ADD `tagged` BOOLEAN NOT NULL ",
"ALTER TABLE `segments` CHANGE `bitrate` `bitrate` BIGINT NULL DEFAULT NULL",
"UPDATE ports p,
(
SELECT port_id, vlan_id, IF(COUNT(*)=1, 1, 2) AS mode
FROM ports_vlans pv
GROUP BY pv.port_id
) pv
SET p.mode = pv.mode, p.port_vlan_id = pv.vlan_id
WHERE pv.port_id = p.id"
);

Také k dispozici: Unified diff