xMember: Delete the absolete Member classes

This commit is contained in:
Alexander Fuhr 2015-06-24 15:34:24 +02:00
parent 33ea3a9b34
commit 330c7b825e
10 changed files with 0 additions and 384 deletions

View File

@ -56,29 +56,6 @@ class Director_ObjectController extends ActionController
$this->render('form');
}
public function hostgroupmemberAction()
{
$this->view->form = $this->loadForm('icingaHostGroupMember')
->setDb($this->db())
->setSuccessUrl('director/list/hostgroupmembers');
if (($host_id = $this->params->get('host_id'))
&& ($hostgroup_id = $this->params->get('hostgroup_id'))
) {
$this->view->form->loadObject(
array(
'host_id' => $host_id,
'hostgroup_id' => $hostgroup_id,
)
);
$this->view->title = $this->translate('Modify Icinga Hostgroup Member');
} else {
$this->view->title = $this->translate('Add new Icinga Hostgroup Member');
}
$this->view->form->handleRequest();
$this->render('form');
}
public function serviceAction()
{
$this->view->form = $this->loadForm('icingaService')
@ -111,29 +88,6 @@ class Director_ObjectController extends ActionController
$this->render('form');
}
public function servicegroupmemberAction()
{
$this->view->form = $this->loadForm('icingaServiceGroupMember')
->setDb($this->db())
->setSuccessUrl('director/list/servicegroupmembers');
if (($service_id = $this->params->get('service_id'))
&& ($servicegroup_id = $this->params->get('servicegroup_id'))
) {
$this->view->form->loadObject(
array(
'service_id' => $service_id,
'servicegroup_id' => $servicegroup_id,
)
);
$this->view->title = $this->translate('Modify Icinga Servicegroup Member');
} else {
$this->view->title = $this->translate('Add new Icinga Servicegroup Member');
}
$this->view->form->handleRequest();
$this->render('form');
}
public function servicevarAction()
{
$this->view->form = $this->loadForm('icingaServiceVar')
@ -218,29 +172,6 @@ class Director_ObjectController extends ActionController
$this->render('form');
}
public function usergroupmemberAction()
{
$this->view->form = $this->loadForm('icingaUserGroupMember')
->setDb($this->db())
->setSuccessUrl('director/list/usergroupmembers');
if (($user_id = $this->params->get('user_id'))
&& ($usergroup_id = $this->params->get('usergroup_id'))
) {
$this->view->form->loadObject(
array(
'user_id' => $user_id,
'usergroup_id' => $usergroup_id,
)
);
$this->view->title = $this->translate('Modify Icinga Usergroup Member');
} else {
$this->view->title = $this->translate('Add new Icinga Usergroup Member');
}
$this->view->form->handleRequest();
$this->render('form');
}
public function endpointAction()
{
$this->view->form = $this->loadForm('icingaEndpoint')

View File

@ -1,24 +0,0 @@
<?php
namespace Icinga\Module\Director\Forms;
use Icinga\Module\Director\Web\Form\DirectorObjectForm;
/**
* @deprecated
*/
class IcingaHostGroupMemberForm extends DirectorObjectForm
{
public function setup()
{
$this->addElement('select', 'hostgroup_id', array(
'label' => $this->translate('Hostgroup'),
'description' => $this->translate('The name of the hostgroup')
));
$this->addElement('select', 'host_id', array(
'label' => $this->translate('Host'),
'description' => $this->translate('The name of the host')
));
}
}

View File

@ -1,24 +0,0 @@
<?php
namespace Icinga\Module\Director\Forms;
use Icinga\Module\Director\Web\Form\DirectorObjectForm;
/**
* @deprecated
*/
class IcingaServiceGroupMemberForm extends DirectorObjectForm
{
public function setup()
{
$this->addElement('select', 'servicegroup_id', array(
'label' => $this->translate('Servicegroup'),
'description' => $this->translate('The name of the servicegroup')
));
$this->addElement('select', 'service_id', array(
'label' => $this->translate('Service'),
'description' => $this->translate('The name of the service')
));
}
}

View File

@ -1,24 +0,0 @@
<?php
namespace Icinga\Module\Director\Forms;
use Icinga\Module\Director\Web\Form\DirectorObjectForm;
/**
* @deprecated
*/
class IcingaUserGroupMemberForm extends DirectorObjectForm
{
public function setup()
{
$this->addElement('select', 'usergroup_id', array(
'label' => $this->translate('Usergroup'),
'description' => $this->translate('The name of the usergroup')
));
$this->addElement('select', 'user_id', array(
'label' => $this->translate('User'),
'description' => $this->translate('The name of the user')
));
}
}

View File

@ -1,54 +0,0 @@
<?php
namespace Icinga\Module\Director\Tables;
use Icinga\Module\Director\Web\Table\QuickTable;
class IcingaHostGroupMemberTable extends QuickTable
{
public function getColumns()
{
return array(
'hostgroup_id' => 'hg.id',
'host_id' => 'h.id',
'hostgroup' => 'hg.object_name',
'host' => 'h.object_name'
);
}
protected function getActionUrl($row)
{
return $this->url('director/object/hostgroupmember', array(
'hostgroup_id' => $row->hostgroup_id,
'host_id' => $row->host_id,
));
}
public function getTitles()
{
$view = $this->view();
return array(
'hostgroup' => $view->translate('Hostgroup'),
'host' => $view->translate('Member'),
);
}
public function fetchData()
{
$db = $this->connection()->getConnection();
$query = $db->select()->from(
array('hg' => 'icinga_hostgroup'),
$this->getColumns()
)->join(
array('hgh' => 'icinga_hostgroup_host'),
'hgh.hostgroup_id = hg.id',
array()
)->join(
array('h' => 'icinga_host'),
'hgh.host_id = h.id',
array()
);
return $db->fetchAll($query);
}
}

View File

@ -1,54 +0,0 @@
<?php
namespace Icinga\Module\Director\Tables;
use Icinga\Module\Director\Web\Table\QuickTable;
class IcingaServiceGroupMemberTable extends QuickTable
{
public function getColumns()
{
return array(
'servicegroup_id' => 'sg.id',
'service_id' => 's.id',
'servicegroup' => 'sg.object_name',
'service' => 's.object_name'
);
}
protected function getActionUrl($row)
{
return $this->url('director/object/servicegroupmember', array(
'servicegroup_id' => $row->servicegroup_id,
'service_id' => $row->service_id,
));
}
public function getTitles()
{
$view = $this->view();
return array(
'servicegroup' => $view->translate('Servicegroup'),
'service' => $view->translate('Member'),
);
}
public function fetchData()
{
$db = $this->connection()->getConnection();
$query = $db->select()->from(
array('sg' => 'icinga_servicegroup'),
$this->getColumns()
)->join(
array('sgs' => 'icinga_servicegroup_service'),
'sgs.servicegroup_id = sg.id',
array()
)->join(
array('s' => 'icinga_service'),
'sgs.service_id = s.id',
array()
);
return $db->fetchAll($query);
}
}

View File

@ -1,54 +0,0 @@
<?php
namespace Icinga\Module\Director\Tables;
use Icinga\Module\Director\Web\Table\QuickTable;
class IcingaUserGroupMemberTable extends QuickTable
{
public function getColumns()
{
return array(
'usergroup_id' => 'ug.id',
'user_id' => 'u.id',
'usergroup' => 'ug.object_name',
'user' => 'u.object_name'
);
}
protected function getActionUrl($row)
{
return $this->url('director/object/usergroupmember', array(
'usergroup_id' => $row->usergroup_id,
'user_id' => $row->user_id,
));
}
public function getTitles()
{
$view = $this->view();
return array(
'usergroup' => $view->translate('Usergroup'),
'user' => $view->translate('Member'),
);
}
public function fetchData()
{
$db = $this->connection()->getConnection();
$query = $db->select()->from(
array('ug' => 'icinga_usergroup'),
$this->getColumns()
)->join(
array('ugu' => 'icinga_usergroup_user'),
'ugu.usergroup_id = ug.id',
array()
)->join(
array('u' => 'icinga_user'),
'ugu.user_id = u.id',
array()
);
return $db->fetchAll($query);
}
}

View File

@ -1,27 +0,0 @@
<?php
namespace Icinga\Module\Director\Objects;
class IcingaHostGroupMember extends IcingaObject
{
protected $keyName = array('host_id', 'hostgroup_id');
protected $table = 'icinga_hostgroup_host';
protected $defaultProperties = array(
'hostgroup_id' => null,
'host_id' => null,
);
public function onInsert()
{
}
public function onUpdate()
{
}
public function onDelete()
{
}
}

View File

@ -1,27 +0,0 @@
<?php
namespace Icinga\Module\Director\Objects;
class IcingaServiceGroupMember extends IcingaObject
{
protected $keyName = array('service_id', 'servicegroup_id');
protected $table = 'icinga_servicegroup_service';
protected $defaultProperties = array(
'servicegroup_id' => null,
'service_id' => null,
);
public function onInsert()
{
}
public function onUpdate()
{
}
public function onDelete()
{
}
}

View File

@ -1,27 +0,0 @@
<?php
namespace Icinga\Module\Director\Objects;
class IcingaUserGroupMember extends IcingaObject
{
protected $keyName = array('user_id', 'usergroup_id');
protected $table = 'icinga_usergroup_user';
protected $defaultProperties = array(
'usergroup_id' => null,
'user_id' => null,
);
public function onInsert()
{
}
public function onUpdate()
{
}
public function onDelete()
{
}
}