mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-31 01:34:09 +02:00
Add extra collapsible container around error section
This commit is contained in:
parent
ad02431bd1
commit
a00f094e10
@ -78,14 +78,6 @@ class MigrationListItemMinimal extends BaseListItem
|
|||||||
$caption->addHtml(Text::create($this->translate('No description provided.')));
|
$caption->addHtml(Text::create($this->translate('No description provided.')));
|
||||||
}
|
}
|
||||||
|
|
||||||
$wrapper = new HtmlElement(
|
|
||||||
'div',
|
|
||||||
Attributes::create([
|
|
||||||
'class' => ['errors-section', 'collapsible'],
|
|
||||||
'data-visible-height' => 150,
|
|
||||||
])
|
|
||||||
);
|
|
||||||
|
|
||||||
$scriptPath = $migration->getScriptPath();
|
$scriptPath = $migration->getScriptPath();
|
||||||
/** @var string $parentDirs */
|
/** @var string $parentDirs */
|
||||||
$parentDirs = substr($scriptPath, (int) strpos($scriptPath, 'schema'));
|
$parentDirs = substr($scriptPath, (int) strpos($scriptPath, 'schema'));
|
||||||
@ -106,14 +98,21 @@ class MigrationListItemMinimal extends BaseListItem
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
$wrapper->addHtml(
|
$error = new HtmlElement('div', Attributes::create([
|
||||||
|
'class' => 'collapsible',
|
||||||
|
'data-visible-height' => 150,
|
||||||
|
]));
|
||||||
|
$error->addHtml(new HtmlElement('pre', null, new HtmlString(Html::escape($migration->getLastState()))));
|
||||||
|
|
||||||
|
$errorSection = new HtmlElement('div', Attributes::create(['class' => 'errors-section',]));
|
||||||
|
$errorSection->addHtml(
|
||||||
new Icon('circle-xmark'),
|
new Icon('circle-xmark'),
|
||||||
new HtmlElement('header', null, $title),
|
new HtmlElement('header', null, $title),
|
||||||
$caption,
|
$caption,
|
||||||
new HtmlElement('pre', null, new HtmlString(Html::escape($migration->getLastState())))
|
$error
|
||||||
);
|
);
|
||||||
|
|
||||||
$caption->prependWrapper($wrapper);
|
$caption->prependWrapper($errorSection);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user