Skip to content

Commit

Permalink
Merge pull request #205 from Icinga/fix-expiration-widget
Browse files Browse the repository at this point in the history
ExpirationWidget: Cast progress ratio to string float correctly
  • Loading branch information
sukhwinder33445 authored Sep 1, 2023
2 parents 7cf61f5 + 8b516b8 commit 27c4a6b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/X509/ExpirationWidget.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ protected function assemble()
$progressBarStyle = (new Style())
->setModule('x509')
->setNonce(Csp::getStyleNonce())
->addFor($progressBar, ['width' => $ratio]);
->addFor($progressBar, ['width' => sprintf('%F%%', $ratio)]);

$this->addHtml(Html::tag('span', ['class' => 'progress-bar-label', 'title' => $dateTip], $message));
$this->addHtml($progressBarStyle, Html::tag('div', ['class' => 'progress-bar dont-print'], $progressBar));
Expand Down

0 comments on commit 27c4a6b

Please sign in to comment.