update listing, collections and callbacks
This commit is contained in:
@@ -16,6 +16,10 @@
|
||||
*
|
||||
*/
|
||||
|
||||
use Froxlor\UI\Callbacks\ProgressBar;
|
||||
use Froxlor\UI\Callbacks\Text;
|
||||
use Froxlor\UI\Listing;
|
||||
|
||||
return [
|
||||
'admin_list' => [
|
||||
'title' => $lng['admin']['admin'],
|
||||
@@ -37,25 +41,27 @@ return [
|
||||
],
|
||||
'customers_used' => [
|
||||
'label' => $lng['admin']['customers'],
|
||||
'column' => 'customers_used'
|
||||
'column' => 'customers_used',
|
||||
'class' => 'text-center',
|
||||
],
|
||||
'diskspace' => [
|
||||
'label' => $lng['customer']['diskspace'],
|
||||
'column' => 'diskspace',
|
||||
'format_callback' => [\Froxlor\UI\Callbacks\ProgressBar::class, 'diskspace'],
|
||||
'format_callback' => [ProgressBar::class, 'diskspace'],
|
||||
],
|
||||
'traffic' => [
|
||||
'label' => $lng['customer']['traffic'],
|
||||
'column' => 'traffic',
|
||||
'format_callback' => [\Froxlor\UI\Callbacks\ProgressBar::class, 'traffic'],
|
||||
'format_callback' => [ProgressBar::class, 'traffic'],
|
||||
],
|
||||
'deactivated' => [
|
||||
'label' => $lng['admin']['deactivated'],
|
||||
'column' => 'deactivated',
|
||||
'format_callback' => [\Froxlor\UI\Callbacks\Text::class, 'boolean'],
|
||||
'class' => 'text-center',
|
||||
'format_callback' => [Text::class, 'boolean'],
|
||||
],
|
||||
],
|
||||
'visible_columns' => \Froxlor\UI\Listing::getVisibleColumnsForListing('admin_list', [
|
||||
'visible_columns' => Listing::getVisibleColumnsForListing('admin_list', [
|
||||
'loginname',
|
||||
'name',
|
||||
'customers_used',
|
||||
@@ -64,24 +70,25 @@ return [
|
||||
'deactivated',
|
||||
]),
|
||||
'actions' => [
|
||||
'delete' => [
|
||||
'icon' => 'fa fa-trash',
|
||||
'href' => [
|
||||
'section' => 'admins',
|
||||
'page' => 'admins',
|
||||
'action' => 'delete',
|
||||
'id' => ':adminid'
|
||||
],
|
||||
],
|
||||
'edit' => [
|
||||
'text' => 'Edit',
|
||||
'icon' => 'fa fa-edit',
|
||||
'href' => [
|
||||
'section' => 'admins',
|
||||
'page' => 'admins',
|
||||
'action' => 'edit',
|
||||
'id' => ':adminid'
|
||||
],
|
||||
]
|
||||
],
|
||||
'delete' => [
|
||||
'icon' => 'fa fa-trash',
|
||||
'class' => 'text-danger',
|
||||
'href' => [
|
||||
'section' => 'admins',
|
||||
'page' => 'admins',
|
||||
'action' => 'delete',
|
||||
'id' => ':adminid'
|
||||
],
|
||||
],
|
||||
],
|
||||
'contextual_class' => [
|
||||
'deactivated' => [
|
||||
@@ -16,6 +16,10 @@
|
||||
*
|
||||
*/
|
||||
|
||||
use Froxlor\UI\Callbacks\Impersonate;
|
||||
use Froxlor\UI\Callbacks\ProgressBar;
|
||||
use Froxlor\UI\Listing;
|
||||
|
||||
return [
|
||||
'customer_list' => [
|
||||
'title' => $lng['admin']['customers'],
|
||||
@@ -24,10 +28,12 @@ return [
|
||||
'c.loginname' => [
|
||||
'label' => $lng['login']['username'],
|
||||
'column' => 'loginname',
|
||||
'format_callback' => [Impersonate::class, 'customer'],
|
||||
],
|
||||
'a.loginname' => [
|
||||
'label' => $lng['admin']['admin'],
|
||||
'column' => 'admin.loginname',
|
||||
'format_callback' => [Impersonate::class, 'admin'],
|
||||
],
|
||||
'c.name' => [
|
||||
'label' => $lng['customer']['name'],
|
||||
@@ -48,15 +54,15 @@ return [
|
||||
'c.diskspace' => [
|
||||
'label' => $lng['customer']['diskspace'],
|
||||
'column' => 'diskspace',
|
||||
'format_callback' => [\Froxlor\UI\Callbacks\ProgressBar::class, 'diskspace'],
|
||||
'format_callback' => [ProgressBar::class, 'diskspace'],
|
||||
],
|
||||
'c.traffic' => [
|
||||
'label' => $lng['customer']['traffic'],
|
||||
'column' => 'traffic',
|
||||
'format_callback' => [\Froxlor\UI\Callbacks\ProgressBar::class, 'traffic'],
|
||||
'format_callback' => [ProgressBar::class, 'traffic'],
|
||||
],
|
||||
],
|
||||
'visible_columns' => \Froxlor\UI\Listing::getVisibleColumnsForListing('customer_list', [
|
||||
'visible_columns' => Listing::getVisibleColumnsForListing('customer_list', [
|
||||
'c.loginname',
|
||||
'a.loginname',
|
||||
'c.email',
|
||||
@@ -66,8 +72,18 @@ return [
|
||||
'c.traffic',
|
||||
]),
|
||||
'actions' => [
|
||||
'edit' => [
|
||||
'icon' => 'fa fa-edit',
|
||||
'href' => [
|
||||
'section' => 'customers',
|
||||
'page' => 'customers',
|
||||
'action' => 'edit',
|
||||
'id' => ':customerid'
|
||||
],
|
||||
],
|
||||
'delete' => [
|
||||
'icon' => 'fa fa-trash',
|
||||
'class' => 'text-danger',
|
||||
'href' => [
|
||||
'section' => 'customers',
|
||||
'page' => 'customers',
|
||||
@@ -75,15 +91,6 @@ return [
|
||||
'id' => ':customerid'
|
||||
],
|
||||
],
|
||||
'edit' => [
|
||||
'text' => 'Edit',
|
||||
'href' => [
|
||||
'section' => 'customers',
|
||||
'page' => 'customers',
|
||||
'action' => 'edit',
|
||||
'id' => ':customerid'
|
||||
],
|
||||
]
|
||||
],
|
||||
]
|
||||
];
|
||||
@@ -16,6 +16,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
use Froxlor\UI\Callbacks\Impersonate;
|
||||
use Froxlor\UI\Listing;
|
||||
|
||||
return [
|
||||
'domain_list' => [
|
||||
'title' => $lng['admin']['domains'],
|
||||
@@ -40,13 +43,14 @@ return [
|
||||
'c.loginname' => [
|
||||
'label' => $lng['login']['username'],
|
||||
'column' => 'customer.loginname',
|
||||
'format_callback' => [Impersonate::class, 'customer'],
|
||||
],
|
||||
'd.aliasdomain' => [
|
||||
'label' => $lng['domains']['aliasdomain'],
|
||||
'column' => 'aliasdomain',
|
||||
],
|
||||
],
|
||||
'visible_columns' => \Froxlor\UI\Listing::getVisibleColumnsForListing('domain_list', [
|
||||
'visible_columns' => Listing::getVisibleColumnsForListing('domain_list', [
|
||||
'd.domain_ace',
|
||||
'c.name',
|
||||
'c.firstname',
|
||||
@@ -55,17 +59,8 @@ return [
|
||||
'd.aliasdomain',
|
||||
]),
|
||||
'actions' => [
|
||||
'delete' => [
|
||||
'icon' => 'fa fa-trash',
|
||||
'href' => [
|
||||
'section' => 'domains',
|
||||
'page' => 'domains',
|
||||
'action' => 'delete',
|
||||
'id' => ':id'
|
||||
],
|
||||
],
|
||||
'edit' => [
|
||||
'text' => 'Edit',
|
||||
'icon' => 'fa fa-edit',
|
||||
'href' => [
|
||||
'section' => 'domains',
|
||||
'page' => 'domains',
|
||||
@@ -88,7 +83,17 @@ return [
|
||||
'page' => 'domaindnseditor',
|
||||
'domain_id' => ':id'
|
||||
],
|
||||
]
|
||||
],
|
||||
'delete' => [
|
||||
'icon' => 'fa fa-trash',
|
||||
'class' => 'text-danger',
|
||||
'href' => [
|
||||
'section' => 'domains',
|
||||
'page' => 'domains',
|
||||
'action' => 'delete',
|
||||
'id' => ':id'
|
||||
],
|
||||
],
|
||||
]
|
||||
]
|
||||
];
|
||||
@@ -16,6 +16,10 @@
|
||||
*
|
||||
*/
|
||||
|
||||
use Froxlor\Settings;
|
||||
use Froxlor\UI\Callbacks\Text;
|
||||
use Froxlor\UI\Listing;
|
||||
|
||||
return [
|
||||
'ipsandports_list' => [
|
||||
'title' => $lng['admin']['ipsandports']['ipsandports'],
|
||||
@@ -28,42 +32,49 @@ return [
|
||||
'port' => [
|
||||
'label' => $lng['admin']['ipsandports']['port'],
|
||||
'column' => 'port',
|
||||
'class' => 'text-center',
|
||||
],
|
||||
'listen' => [
|
||||
'label' => 'Listen',
|
||||
'column' => 'listen_statement',
|
||||
'format_callback' => [\Froxlor\UI\Callbacks\Text::class, 'boolean'],
|
||||
'visible' => \Froxlor\Settings::Get('system.webserver') != 'nginx'
|
||||
'class' => 'text-center',
|
||||
'format_callback' => [Text::class, 'boolean'],
|
||||
'visible' => Settings::Get('system.webserver') != 'nginx'
|
||||
],
|
||||
'namevirtualhost' => [
|
||||
'label' => 'NameVirtualHost',
|
||||
'column' => 'namevirtualhost_statement',
|
||||
'format_callback' => [\Froxlor\UI\Callbacks\Text::class, 'boolean'],
|
||||
'visible' => \Froxlor\Settings::Get('system.webserver') == 'apache2' && (int) \Froxlor\Settings::Get('system.apache24') == 0
|
||||
'class' => 'text-center',
|
||||
'format_callback' => [Text::class, 'boolean'],
|
||||
'visible' => Settings::Get('system.webserver') == 'apache2' && (int) Settings::Get('system.apache24') == 0
|
||||
],
|
||||
'vhostcontainer' => [
|
||||
'label' => 'vHost-Container',
|
||||
'column' => 'vhostcontainer',
|
||||
'format_callback' => [\Froxlor\UI\Callbacks\Text::class, 'boolean']
|
||||
'class' => 'text-center',
|
||||
'format_callback' => [Text::class, 'boolean']
|
||||
],
|
||||
'specialsettings' => [
|
||||
'label' => 'Specialsettings',
|
||||
'column' => 'specialsettings',
|
||||
'format_callback' => [\Froxlor\UI\Callbacks\Text::class, 'boolean']
|
||||
'class' => 'text-center',
|
||||
'format_callback' => [Text::class, 'boolean']
|
||||
],
|
||||
'servername' => [
|
||||
'label' => 'ServerName',
|
||||
'column' => 'vhostcontainer_servername_statement',
|
||||
'format_callback' => [\Froxlor\UI\Callbacks\Text::class, 'boolean'],
|
||||
'visible' => \Froxlor\Settings::Get('system.webserver') == 'apache2'
|
||||
'class' => 'text-center',
|
||||
'format_callback' => [Text::class, 'boolean'],
|
||||
'visible' => Settings::Get('system.webserver') == 'apache2'
|
||||
],
|
||||
'ssl' => [
|
||||
'label' => 'SSL',
|
||||
'column' => 'ssl',
|
||||
'format_callback' => [\Froxlor\UI\Callbacks\Text::class, 'boolean']
|
||||
'class' => 'text-center',
|
||||
'format_callback' => [Text::class, 'boolean']
|
||||
],
|
||||
],
|
||||
'visible_columns' => \Froxlor\UI\Listing::getVisibleColumnsForListing('ipsandports_list', [
|
||||
'visible_columns' => Listing::getVisibleColumnsForListing('ipsandports_list', [
|
||||
'ip',
|
||||
'port',
|
||||
'listen',
|
||||
@@ -73,5 +84,26 @@ return [
|
||||
'servername',
|
||||
'ssl'
|
||||
]),
|
||||
'actions' => [
|
||||
'edit' => [
|
||||
'icon' => 'fa fa-edit',
|
||||
'href' => [
|
||||
'section' => 'ipsandports',
|
||||
'page' => 'ipsandports',
|
||||
'action' => 'edit',
|
||||
'id' => ':id'
|
||||
],
|
||||
],
|
||||
'delete' => [
|
||||
'icon' => 'fa fa-trash',
|
||||
'class' => 'text-danger',
|
||||
'href' => [
|
||||
'section' => 'ipsandports',
|
||||
'page' => 'ipsandports',
|
||||
'action' => 'delete',
|
||||
'id' => ':id'
|
||||
],
|
||||
],
|
||||
]
|
||||
]
|
||||
];
|
||||
|
||||
72
lib/tablelisting/admin/tablelisting.plans.php
Normal file
72
lib/tablelisting/admin/tablelisting.plans.php
Normal file
@@ -0,0 +1,72 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the Froxlor project.
|
||||
* Copyright (c) 2010 the Froxlor Team (see authors).
|
||||
*
|
||||
* For the full copyright and license information, please view the COPYING
|
||||
* file that was distributed with this source code. You can also view the
|
||||
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
|
||||
*
|
||||
* @copyright (c) the authors
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @author Maurice Preuß <hello@envoyr.com>
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Tabellisting
|
||||
*
|
||||
*/
|
||||
|
||||
use Froxlor\Settings;
|
||||
use Froxlor\UI\Listing;
|
||||
|
||||
return [
|
||||
'plan_list' => [
|
||||
'title' => $lng['domains']['ssl_certificates'],
|
||||
'icon' => 'fa-solid fa-user',
|
||||
'columns' => [
|
||||
'p.name' => [
|
||||
'label' => $lng['admin']['plans']['name'],
|
||||
'column' => 'name',
|
||||
],
|
||||
'p.description' => [
|
||||
'label' => $lng['admin']['plans']['description'],
|
||||
'column' => 'description',
|
||||
],
|
||||
'p.adminname' => [
|
||||
'label' => $lng['admin']['admin'],
|
||||
'column' => 'adminname',
|
||||
],
|
||||
'p.ts' => [
|
||||
'label' => $lng['admin']['plans']['last_update'],
|
||||
'column' => 'ts',
|
||||
],
|
||||
],
|
||||
'visible_columns' => Listing::getVisibleColumnsForListing('sslcertificates_list', [
|
||||
'p.name',
|
||||
'p.description',
|
||||
'p.adminname',
|
||||
'p.ts',
|
||||
]),
|
||||
'actions' => [
|
||||
'edit' => [
|
||||
'icon' => 'fa fa-edit',
|
||||
'href' => [
|
||||
'section' => 'plans',
|
||||
'page' => 'overview',
|
||||
'action' => 'edit',
|
||||
'id' => ':id'
|
||||
],
|
||||
],
|
||||
'delete' => [
|
||||
'icon' => 'fa fa-trash',
|
||||
'class' => 'text-danger',
|
||||
'href' => [
|
||||
'section' => 'plans',
|
||||
'page' => 'overview',
|
||||
'action' => 'delete',
|
||||
'id' => ':id'
|
||||
],
|
||||
],
|
||||
]
|
||||
]
|
||||
];
|
||||
78
lib/tablelisting/admin/tablelisting.sslcertificates.php
Normal file
78
lib/tablelisting/admin/tablelisting.sslcertificates.php
Normal file
@@ -0,0 +1,78 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the Froxlor project.
|
||||
* Copyright (c) 2010 the Froxlor Team (see authors).
|
||||
*
|
||||
* For the full copyright and license information, please view the COPYING
|
||||
* file that was distributed with this source code. You can also view the
|
||||
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
|
||||
*
|
||||
* @copyright (c) the authors
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
* @author Maurice Preuß <hello@envoyr.com>
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Tabellisting
|
||||
*
|
||||
*/
|
||||
|
||||
use Froxlor\Settings;
|
||||
use Froxlor\UI\Callbacks\Text;
|
||||
use Froxlor\UI\Listing;
|
||||
|
||||
return [
|
||||
'sslcertificates_list' => [
|
||||
'title' => $lng['domains']['ssl_certificates'],
|
||||
'icon' => 'fa-solid fa-user',
|
||||
'columns' => [
|
||||
'd.domain' => [
|
||||
'label' => $lng['domains']['domainname'],
|
||||
'column' => 'domain',
|
||||
],
|
||||
'c.domain' => [
|
||||
'label' => $lng['ssl_certificates']['certificate_for'],
|
||||
'column' => 'domain',
|
||||
'format_callback' => [Text::class, 'domainWithSan'],
|
||||
],
|
||||
'c.issuer' => [
|
||||
'label' => $lng['ssl_certificates']['issuer'],
|
||||
'column' => 'issuer',
|
||||
],
|
||||
'c.validfromdate' => [
|
||||
'label' => $lng['ssl_certificates']['valid_from'],
|
||||
'column' => 'validfromdate',
|
||||
],
|
||||
'c.validtodate' => [
|
||||
'label' => $lng['ssl_certificates']['valid_until'],
|
||||
'column' => 'validtodate',
|
||||
],
|
||||
'c.letsencrypt' => [
|
||||
'label' => $lng['panel']['letsencrypt'],
|
||||
'column' => 'letsencrypt',
|
||||
'class' => 'text-center',
|
||||
'format_callback' => [Text::class, 'boolean'],
|
||||
'visible' => Settings::Get('system.le_froxlor_enabled'),
|
||||
],
|
||||
],
|
||||
'visible_columns' => Listing::getVisibleColumnsForListing('sslcertificates_list', [
|
||||
'd.domain',
|
||||
'c.domain',
|
||||
'c.issuer',
|
||||
'c.validfromdate',
|
||||
'c.validtodate',
|
||||
'c.letsencrypt',
|
||||
]),
|
||||
'actions' => [
|
||||
'delete' => [
|
||||
'icon' => 'fa fa-trash',
|
||||
'class' => 'text-danger',
|
||||
'href' => [
|
||||
'section' => 'domains',
|
||||
'page' => 'sslcertificates',
|
||||
'action' => 'delete',
|
||||
'id' => ':id'
|
||||
],
|
||||
],
|
||||
]
|
||||
]
|
||||
];
|
||||
Reference in New Issue
Block a user