style apikeys and integrity-check
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
@@ -29,6 +29,11 @@ class Style
|
||||
return $attributes['fields']['deactivated'] ? 'bg-danger' : '';
|
||||
}
|
||||
|
||||
public static function resultIntegrityBad(array $attributes): string
|
||||
{
|
||||
return $attributes['fields']['result'] ? '' : 'bg-warning';
|
||||
}
|
||||
|
||||
public static function invalidApiKey(array $attributes): string
|
||||
{
|
||||
// check whether the api key is not valid anymore
|
||||
|
||||
@@ -93,7 +93,7 @@ return [
|
||||
],
|
||||
],
|
||||
],
|
||||
'callback' => [
|
||||
'format_callback' => [
|
||||
[Style::class, 'deactivated'],
|
||||
[Style::class, 'diskspaceWarning'],
|
||||
[Style::class, 'trafficWarning']
|
||||
|
||||
50
lib/tablelisting/admin/tablelisting.integrity.php
Normal file
50
lib/tablelisting/admin/tablelisting.integrity.php
Normal file
@@ -0,0 +1,50 @@
|
||||
<?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-)
|
||||
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
|
||||
* @package Tabellisting
|
||||
*
|
||||
*/
|
||||
|
||||
use Froxlor\UI\Callbacks\Text;
|
||||
use Froxlor\UI\Callbacks\Style;
|
||||
use Froxlor\UI\Listing;
|
||||
|
||||
return [
|
||||
'integrity_list' => [
|
||||
'title' => $lng['admin']['integritycheck'],
|
||||
'icon' => 'fa-solid fa-circle-check',
|
||||
'columns' => [
|
||||
'displayid' => [
|
||||
'label' => $lng['admin']['integrityid'],
|
||||
'field' => 'displayid'
|
||||
],
|
||||
'checkdesc' => [
|
||||
'label' => $lng['admin']['integrityname'],
|
||||
'field' => 'checkdesc'
|
||||
],
|
||||
'result' => [
|
||||
'label' => $lng['admin']['integrityresult'],
|
||||
'field' => 'result',
|
||||
'callback' => [Text::class, 'boolean']
|
||||
]
|
||||
],
|
||||
'visible_columns' => Listing::getVisibleColumnsForListing('integrity_list', [
|
||||
'displayid',
|
||||
'checkdesc',
|
||||
'result'
|
||||
]),
|
||||
'format_callback' => [
|
||||
[Style::class, 'resultIntegrityBad']
|
||||
]
|
||||
]
|
||||
];
|
||||
@@ -62,6 +62,7 @@ return [
|
||||
'icon' => 'fa fa-eye',
|
||||
'title' => $lng['apikeys']['clicktoview'],
|
||||
'href' => [
|
||||
'section' => 'index',
|
||||
'page' => 'apikeys',
|
||||
'action' => '#',
|
||||
'id' => ':id'
|
||||
@@ -72,13 +73,14 @@ return [
|
||||
'title' => $lng['panel']['delete'],
|
||||
'class' => 'text-danger',
|
||||
'href' => [
|
||||
'section' => 'index',
|
||||
'page' => 'apikeys',
|
||||
'action' => 'delete',
|
||||
'id' => ':id'
|
||||
],
|
||||
],
|
||||
],
|
||||
'callback' => [
|
||||
'format_callback' => [
|
||||
[Style::class, 'invalidApiKey']
|
||||
]
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user