Rename view mode 'compact' to 'minimal'

This commit is contained in:
Eric Lippmann 2019-11-05 12:15:32 +01:00
parent 6139d69eb3
commit ab69fa2a5f
9 changed files with 22 additions and 22 deletions

View file

@ -56,7 +56,7 @@ class HostController extends Controller
public function indexAction()
{
$this->addControl((new HostList([$this->host]))->setViewMode('compact'));
$this->addControl((new HostList([$this->host]))->setViewMode('minimal'));
$this->addControl(new QuickActions($this->host));
$this->addContent(new ObjectDetail($this->host));
@ -66,7 +66,7 @@ class HostController extends Controller
{
$this->setTitle($this->translate('Comments'));
$this->addControl((new HostList([$this->host]))->setViewMode('compact'));
$this->addControl((new HostList([$this->host]))->setViewMode('minimal'));
$comments = $this->host->comment;
@ -85,7 +85,7 @@ class HostController extends Controller
{
$this->setTitle($this->translate('Downtimes'));
$this->addControl((new HostList([$this->host]))->setViewMode('compact'));
$this->addControl((new HostList([$this->host]))->setViewMode('minimal'));
$downtimes = $this->host->downtime;
@ -102,7 +102,7 @@ class HostController extends Controller
public function historyAction()
{
$this->addControl((new HostList([$this->host]))->setViewMode('compact'));
$this->addControl((new HostList([$this->host]))->setViewMode('minimal'));
$db = $this->getDb();
@ -135,7 +135,7 @@ class HostController extends Controller
public function servicesAction()
{
$this->addControl((new HostList([$this->host]))->setViewMode('compact'));
$this->addControl((new HostList([$this->host]))->setViewMode('minimal'));
$db = $this->getDb();

View file

@ -63,7 +63,7 @@ class ServiceController extends Controller
public function indexAction()
{
$this->addControl((new ServiceList([$this->service]))->setViewMode('compact'));
$this->addControl((new ServiceList([$this->service]))->setViewMode('minimal'));
$this->addControl(new QuickActions($this->service));
$this->addContent(new ObjectDetail($this->service));
@ -73,7 +73,7 @@ class ServiceController extends Controller
{
$this->setTitle($this->translate('Comments'));
$this->addControl((new ServiceList([$this->service]))->setViewMode('compact'));
$this->addControl((new ServiceList([$this->service]))->setViewMode('minimal'));
$comments = $this->service->comment;
@ -92,7 +92,7 @@ class ServiceController extends Controller
{
$this->setTitle($this->translate('Downtimes'));
$this->addControl((new ServiceList([$this->service]))->setViewMode('compact'));
$this->addControl((new ServiceList([$this->service]))->setViewMode('minimal'));
$downtimes = $this->service->downtime;
@ -109,7 +109,7 @@ class ServiceController extends Controller
public function historyAction()
{
$this->addControl((new ServiceList([$this->service]))->setViewMode('compact'));
$this->addControl((new ServiceList([$this->service]))->setViewMode('minimal'));
$db = $this->getDb();

View file

@ -4,7 +4,7 @@ namespace Icinga\Module\Icingadb\Common;
use ipl\Html\BaseHtmlElement;
trait ListItemCompactLayout
trait ListItemMinimalLayout
{
protected function assembleHeader(BaseHtmlElement $header)
{

View file

@ -11,8 +11,8 @@ class HostList extends StateList
protected function getItemClass()
{
if ($this->getViewMode() === 'compact') {
return HostListItemCompact::class;
if ($this->getViewMode() === 'minimal') {
return HostListItemMinimal::class;
}
return HostListItem::class;

View file

@ -2,12 +2,12 @@
namespace Icinga\Module\Icingadb\Widget;
use Icinga\Module\Icingadb\Common\ListItemCompactLayout;
use Icinga\Module\Icingadb\Common\ListItemMinimalLayout;
use ipl\Web\Widget\StateBall;
class HostListItemCompact extends BaseHostListItem
class HostListItemMinimal extends BaseHostListItem
{
use ListItemCompactLayout;
use ListItemMinimalLayout;
protected function getStateBallSize()
{

View file

@ -8,8 +8,8 @@ class ServiceList extends StateList
protected function getItemClass()
{
if ($this->getViewMode() === 'compact') {
return ServiceListItemCompact::class;
if ($this->getViewMode() === 'minimal') {
return ServiceListItemMinimal::class;
}
return ServiceListItem::class;

View file

@ -2,12 +2,12 @@
namespace Icinga\Module\Icingadb\Widget;
use Icinga\Module\Icingadb\Common\ListItemCompactLayout;
use Icinga\Module\Icingadb\Common\ListItemMinimalLayout;
use ipl\Web\Widget\StateBall;
class ServiceListItemCompact extends BaseServiceListItem
class ServiceListItemMinimal extends BaseServiceListItem
{
use ListItemCompactLayout;
use ListItemMinimalLayout;
protected function getStateBallSize()
{

View file

@ -14,7 +14,7 @@ class ViewModeSwitcher extends BaseHtmlElement
/** @var array View mode-icon pairs */
public static $viewModes = [
'compact' => 'chat-empty',
'minimal' => 'chat-empty',
'common' => 'th-list',
'detailed' => 'chat'
];

View file

@ -104,7 +104,7 @@
}
}
.compact .list-item {
.minimal .list-item {
header {
max-width: 100%;
overflow: hidden;