DeploymentLog: table styling and cleanup
This commit is contained in:
parent
2f55884aa9
commit
9b2fde48e8
|
@ -14,15 +14,31 @@ class DeploymentLogTable extends QuickTable
|
|||
return $this;
|
||||
}
|
||||
|
||||
protected function listTableClasses()
|
||||
{
|
||||
return array_merge(array('deployment-log'), parent::listTableClasses());
|
||||
}
|
||||
|
||||
protected function getRowClasses($row)
|
||||
{
|
||||
if ($row->startup_succeeded === 'y') {
|
||||
$classes = array('succeeded');
|
||||
} elseif ($row->startup_succeeded === 'n') {
|
||||
$classes = array('failed');
|
||||
} elseif ($row->dump_succeeded === 'y') {
|
||||
$classes = array('sent');
|
||||
} else {
|
||||
// TODO: does this ever be stored?
|
||||
$classes = array('notsent');
|
||||
}
|
||||
|
||||
if ($this->activeStageName !== null
|
||||
&& $row->stage_name === $this->activeStageName)
|
||||
{
|
||||
return 'running';
|
||||
$classes[] = 'running';
|
||||
}
|
||||
|
||||
return false;
|
||||
return $classes;
|
||||
}
|
||||
|
||||
public function getColumns()
|
||||
|
@ -55,10 +71,8 @@ class DeploymentLogTable extends QuickTable
|
|||
{
|
||||
$view = $this->view();
|
||||
return array(
|
||||
'peer_identity' => $view->translate('Peer'),
|
||||
'peer_identity' => $view->translate('Icinga Node'),
|
||||
'start_time' => $view->translate('Time'),
|
||||
'dump_succeeded' => $view->translate('Sent'),
|
||||
'startup_succeeded' => $view->translate('Loaded'),
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -331,10 +331,6 @@ table.tinystats {
|
|||
|
||||
/* Simple table, test */
|
||||
|
||||
tr.running {
|
||||
color: green;
|
||||
}
|
||||
|
||||
table.syncstate {
|
||||
tr td:first-child {
|
||||
padding-left: 2em;
|
||||
|
@ -401,21 +397,47 @@ table.icinga-objects {
|
|||
|
||||
}
|
||||
|
||||
/* Temp for deployment state */
|
||||
table.simple {
|
||||
td.ok {
|
||||
background-color: @colorOk;
|
||||
table.deployment-log {
|
||||
|
||||
tr td:nth-child(2), tr th:nth-child(2) {
|
||||
text-align: right;
|
||||
padding-right: 1em;
|
||||
}
|
||||
|
||||
td.nok {
|
||||
background-color: @colorCritical;
|
||||
tr th:first-child {
|
||||
padding-left: 2em;
|
||||
}
|
||||
|
||||
tr td:first-child {
|
||||
padding-left: 2em;
|
||||
&::before {
|
||||
font-family: 'ifont';
|
||||
// icon-help:
|
||||
content: '\e85b';
|
||||
float: left;
|
||||
font-weight: bold;
|
||||
margin-left: -1.5em;
|
||||
line-height: 1.5em;
|
||||
}
|
||||
}
|
||||
|
||||
tr.succeeded td:first-child::before {
|
||||
// icon-ok
|
||||
color: @color-ok;
|
||||
content: '\e803';
|
||||
}
|
||||
|
||||
tr.failed td:first-child::before {
|
||||
// icon-ok
|
||||
color: @color-critical;
|
||||
content: '\e804';
|
||||
}
|
||||
|
||||
tr.running td, tr.running td a {
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* END of Simple table, test */
|
||||
|
||||
.tree li a {
|
||||
display: inline-block;
|
||||
padding-left: 2.4em;
|
||||
|
|
Loading…
Reference in New Issue