This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
phptsmadmin/application/classes/Model/DB.php

61 lines
1.5 KiB
PHP
Raw Permalink Normal View History

<?php defined('SYSPATH') or die('No direct access allowed.');
/**
*
* @package PTA
* @subpackage Database
* @category Models
* @author Deon George
* @copyright (c) 2010 phpTSMadmin Development Team
* @license http://phptsmadmin.sf.net/license.html
*/
class Model_DB extends ORM_TSM {
protected $_table_name = 'DB';
protected $_primary_key = 'DATABASE_NAME';
protected $_sorting = array(
'DATABASE_NAME'=>'ASC',
);
protected $_display_filters = array(
'FREE_PAGES'=>array(
array('number_format',array(':value',0)),
),
'FREE_SPACE_MB'=>array(
array('number_format',array(':value',0)),
),
'LAST_REORG'=>array(
array('ORM_TSM::date',array(':value','d-M H:i')),
),
'LAST_BACKUP_DATE'=>array(
array('ORM_TSM::date',array(':value','d-M H:i')),
),
'TOTAL_BUFF_REQ'=>array(
array('number_format',array(':value',0)),
),
'TOT_FILE_SYSTEM_MB'=>array(
array('number_format',array(':value',0)),
),
'TOTAL_PAGES'=>array(
array('number_format',array(':value',0)),
),
'USED_DB_SPACE_MB'=>array(
array('number_format',array(':value',0)),
),
'USABLE_PAGES'=>array(
array('number_format',array(':value',0)),
),
'USED_PAGES'=>array(
array('number_format',array(':value',0)),
),
);
public function backups() {
return ORM::factory('VOLHISTORY')->where('TYPE','IN',Kohana::$config->load('config')->tsmdbtypes)->find_all();
}
public function vols() {
return ORM::factory('DBSPACE')->find_all();
}
}
?>