|
@@ -2,27 +2,15 @@
|
|
|
|
|
|
|
|
namespace ThurData\Servers\KerioEmail\App\UI\Client\Ressource\Pages;
|
|
namespace ThurData\Servers\KerioEmail\App\UI\Client\Ressource\Pages;
|
|
|
|
|
|
|
|
-use ThurData\Servers\KerioEmail\App\Helpers\BuildUrlExtended;
|
|
|
|
|
-use ThurData\Servers\KerioEmail\App\Helpers\KerioManager;
|
|
|
|
|
-use ThurData\Servers\KerioEmail\App\Libs\Product\ProductManager;
|
|
|
|
|
-use ThurData\Servers\KerioEmail\App\Libs\Kerio\Components\Api\Soap\Connection;
|
|
|
|
|
-use ThurData\Servers\KerioEmail\App\Libs\Kerio\Components\Api\Soap\Helpers\RessourceHelper;
|
|
|
|
|
-use ThurData\Servers\KerioEmail\App\Libs\Kerio\Components\Api\Soap\Models\Ressource;
|
|
|
|
|
-use ThurData\Servers\KerioEmail\App\Libs\Kerio\Components\Api\Soap\Repository\ClassOfServices;
|
|
|
|
|
-use ThurData\Servers\KerioEmail\App\Libs\Kerio\Components\Filters\Ressources\FilterByCosId;
|
|
|
|
|
use ThurData\Servers\KerioEmail\App\UI\Admin\Custom\Fields\EnabledField;
|
|
use ThurData\Servers\KerioEmail\App\UI\Admin\Custom\Fields\EnabledField;
|
|
|
use ThurData\Servers\KerioEmail\App\UI\Client\Ressource\Buttons\AddRessourceButton;
|
|
use ThurData\Servers\KerioEmail\App\UI\Client\Ressource\Buttons\AddRessourceButton;
|
|
|
-use ThurData\Servers\KerioEmail\App\UI\Client\Ressource\Buttons\ChangePasswordButton;
|
|
|
|
|
use ThurData\Servers\KerioEmail\App\UI\Client\Ressource\Buttons\ChangeStatusButton;
|
|
use ThurData\Servers\KerioEmail\App\UI\Client\Ressource\Buttons\ChangeStatusButton;
|
|
|
use ThurData\Servers\KerioEmail\App\UI\Client\Ressource\Buttons\DeleteRessourceButton;
|
|
use ThurData\Servers\KerioEmail\App\UI\Client\Ressource\Buttons\DeleteRessourceButton;
|
|
|
use ThurData\Servers\KerioEmail\App\UI\Client\Ressource\Buttons\EditRessourceButton;
|
|
use ThurData\Servers\KerioEmail\App\UI\Client\Ressource\Buttons\EditRessourceButton;
|
|
|
-use ThurData\Servers\KerioEmail\App\UI\Client\Ressource\Buttons\LoginToPanelButton;
|
|
|
|
|
use ThurData\Servers\KerioEmail\App\UI\Client\Ressource\Buttons\MassChangeStatusButton;
|
|
use ThurData\Servers\KerioEmail\App\UI\Client\Ressource\Buttons\MassChangeStatusButton;
|
|
|
use ThurData\Servers\KerioEmail\App\UI\Client\Ressource\Buttons\MassDeleteRessourceButton;
|
|
use ThurData\Servers\KerioEmail\App\UI\Client\Ressource\Buttons\MassDeleteRessourceButton;
|
|
|
use ThurData\Servers\KerioEmail\App\UI\Client\Ressource\Buttons\SpanDropdownButton;
|
|
use ThurData\Servers\KerioEmail\App\UI\Client\Ressource\Buttons\SpanDropdownButton;
|
|
|
use function ThurData\Servers\KerioEmail\Core\Helper\di;
|
|
use function ThurData\Servers\KerioEmail\Core\Helper\di;
|
|
|
-use ThurData\Servers\KerioEmail\Core\Models\Whmcs\Hosting;
|
|
|
|
|
-use ThurData\Servers\KerioEmail\Core\UI\Widget\Buttons\DropdawnButtonWrappers\ButtonDropdown;
|
|
|
|
|
use ThurData\Servers\KerioEmail\Core\UI\Widget\DataTable\Column;
|
|
use ThurData\Servers\KerioEmail\Core\UI\Widget\DataTable\Column;
|
|
|
use ThurData\Servers\KerioEmail\Core\UI\Widget\DataTable\DataProviders\DataProvider;
|
|
use ThurData\Servers\KerioEmail\Core\UI\Widget\DataTable\DataProviders\DataProvider;
|
|
|
use ThurData\Servers\KerioEmail\Core\UI\Interfaces\ClientArea;
|
|
use ThurData\Servers\KerioEmail\Core\UI\Interfaces\ClientArea;
|
|
@@ -46,11 +34,7 @@ class Ressources extends DataTable implements ClientArea
|
|
|
*/
|
|
*/
|
|
|
const STATUS_LABEL = [
|
|
const STATUS_LABEL = [
|
|
|
'active' => 'success',
|
|
'active' => 'success',
|
|
|
- 'locked' => 'default',
|
|
|
|
|
- 'maintenance' => 'warning',
|
|
|
|
|
'closed' => 'default',
|
|
'closed' => 'default',
|
|
|
- 'lockout' => 'info',
|
|
|
|
|
- 'pending' => 'warning',
|
|
|
|
|
'default' => 'default'
|
|
'default' => 'default'
|
|
|
];
|
|
];
|
|
|
|
|
|
|
@@ -123,9 +107,6 @@ class Ressources extends DataTable implements ClientArea
|
|
|
*/
|
|
*/
|
|
|
public function initContent()
|
|
public function initContent()
|
|
|
{
|
|
{
|
|
|
- $productManager = new ProductManager();
|
|
|
|
|
- $productManager->loadByHostingId($this->getRequestValue('id'));
|
|
|
|
|
-
|
|
|
|
|
$this->addMassActionButton(new MassChangeStatusButton());
|
|
$this->addMassActionButton(new MassChangeStatusButton());
|
|
|
$this->addMassActionButton(new MassDeleteRessourceButton());
|
|
$this->addMassActionButton(new MassDeleteRessourceButton());
|
|
|
|
|
|
|
@@ -147,11 +128,6 @@ class Ressources extends DataTable implements ClientArea
|
|
|
*/
|
|
*/
|
|
|
public function loadData()
|
|
public function loadData()
|
|
|
{
|
|
{
|
|
|
- /**
|
|
|
|
|
- * load hosting
|
|
|
|
|
- */
|
|
|
|
|
- $hosting = Hosting::where('id', $this->getRequestValue('id'))->first();
|
|
|
|
|
-
|
|
|
|
|
$api = new KerioWhmcs('whmcsKerioEmail', 'Thurdata', '1.0');
|
|
$api = new KerioWhmcs('whmcsKerioEmail', 'Thurdata', '1.0');
|
|
|
try {
|
|
try {
|
|
|
$api->login($this->getWhmcsParamByKey('serverhostname'), $this->getWhmcsParamByKey('serverusername'), $this->getWhmcsParamByKey('serverpassword'));
|
|
$api->login($this->getWhmcsParamByKey('serverhostname'), $this->getWhmcsParamByKey('serverusername'), $this->getWhmcsParamByKey('serverpassword'));
|