2014-12-04 12:14:04 +01:00
|
|
|
<?php use PHPCI\Helper\Lang; ?>
|
2013-05-03 17:02:53 +02:00
|
|
|
<div class="row">
|
2013-05-10 13:28:43 +02:00
|
|
|
|
2014-12-02 17:26:55 +01:00
|
|
|
<div class="col-sm-5">
|
2015-10-08 17:33:01 +02:00
|
|
|
<?php foreach ($groups as $group): ?>
|
|
|
|
<div class="box box-primary">
|
|
|
|
<div class="box-header">
|
|
|
|
<h3 class="box-title"><?php print $group['title']; ?></h3>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="box-body">
|
|
|
|
<?php print $group['summary']; ?>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<?php endforeach; ?>
|
2013-08-01 12:55:10 +02:00
|
|
|
</div>
|
2013-05-22 18:15:02 +02:00
|
|
|
|
2014-12-02 17:26:55 +01:00
|
|
|
<div class="col-sm-7 pull-left">
|
|
|
|
<div class="box box-primary">
|
|
|
|
<div class="box-header">
|
2014-12-04 12:14:04 +01:00
|
|
|
<h3 class="box-title"><?php Lang::out('latest_builds'); ?></h3>
|
2014-04-30 15:13:07 +02:00
|
|
|
</div>
|
|
|
|
|
2014-12-02 17:26:55 +01:00
|
|
|
<div class="box-body">
|
|
|
|
<ul class="timeline">
|
|
|
|
<?php $last = new \DateTime('-1 Year'); ?>
|
2013-05-10 13:28:43 +02:00
|
|
|
|
2014-12-02 17:26:55 +01:00
|
|
|
<?php
|
|
|
|
foreach ($builds as $build):
|
|
|
|
switch ($build->getStatus()) {
|
|
|
|
case \PHPCI\Model\Build::STATUS_NEW:
|
|
|
|
$updated = $build->getCreated();
|
2014-12-04 13:19:06 +01:00
|
|
|
$label = Lang::get('pending');
|
2014-12-02 17:26:55 +01:00
|
|
|
$color = 'blue';
|
|
|
|
break;
|
2014-07-30 15:32:38 +02:00
|
|
|
|
2014-12-02 17:26:55 +01:00
|
|
|
case \PHPCI\Model\Build::STATUS_RUNNING:
|
|
|
|
$updated = $build->getStarted();
|
2014-12-04 13:19:06 +01:00
|
|
|
$label = Lang::get('running');
|
2014-12-02 17:26:55 +01:00
|
|
|
$color = 'yellow';
|
|
|
|
break;
|
2014-04-30 16:24:55 +02:00
|
|
|
|
2014-12-02 17:26:55 +01:00
|
|
|
case \PHPCI\Model\Build::STATUS_SUCCESS:
|
|
|
|
$updated = $build->getFinished();
|
2014-12-04 12:14:04 +01:00
|
|
|
$label = Lang::get('successful');
|
2014-12-02 17:26:55 +01:00
|
|
|
$color = 'green';
|
|
|
|
break;
|
2014-07-30 15:32:38 +02:00
|
|
|
|
2014-12-02 17:26:55 +01:00
|
|
|
case \PHPCI\Model\Build::STATUS_FAILED:
|
|
|
|
$updated = $build->getFinished();
|
2014-12-04 12:14:04 +01:00
|
|
|
$label = Lang::get('failed');
|
2014-12-02 17:26:55 +01:00
|
|
|
$color = 'red';
|
|
|
|
break;
|
|
|
|
}
|
2014-07-30 15:32:38 +02:00
|
|
|
|
2015-02-12 14:17:42 +01:00
|
|
|
if (!$updated) {
|
|
|
|
$updated = $build->getCreated();
|
|
|
|
}
|
|
|
|
|
2014-12-02 17:26:55 +01:00
|
|
|
if ($updated->format('Y-m-d') != $last->format('Y-m-d')): $last = $updated;
|
|
|
|
?>
|
|
|
|
<li class="time-label">
|
|
|
|
<span class="bg-gray">
|
2015-01-09 08:51:35 +01:00
|
|
|
<?php print Lang::formatDateTime($last, 'll'); ?>
|
2014-12-02 17:26:55 +01:00
|
|
|
</span>
|
|
|
|
</li>
|
|
|
|
<?php endif; ?>
|
2013-11-27 15:09:14 +01:00
|
|
|
|
2014-12-02 17:26:55 +01:00
|
|
|
<!-- /.timeline-label -->
|
|
|
|
<!-- timeline item -->
|
|
|
|
<li>
|
|
|
|
<i class="fa fa-<?php print $build->getProject()->getIcon(); ?> bg-<?php print $color; ?>"></i>
|
|
|
|
<div class="timeline-item">
|
2015-01-09 08:51:35 +01:00
|
|
|
<span class="time"><i class="fa fa-clock-o"></i> <?php print Lang::formatDateTime($updated, 'LT'); ?></span>
|
2014-12-02 17:26:55 +01:00
|
|
|
<h3 class="timeline-header">
|
|
|
|
<a href="<?php print PHPCI_URL; ?>project/view/<?php print $build->getProjectId(); ?>">
|
|
|
|
<?php print $build->getProject()->getTitle(); ?>
|
|
|
|
</a>
|
|
|
|
-
|
|
|
|
<a href="<?php print PHPCI_URL; ?>build/view/<?php print $build->getId(); ?>">
|
|
|
|
Build #<?php print $build->getId(); ?>
|
|
|
|
</a>
|
|
|
|
-
|
|
|
|
<?php print $label; ?>
|
|
|
|
</h3>
|
|
|
|
|
|
|
|
<div class="timeline-body">
|
|
|
|
<?php
|
|
|
|
if ($build->getCommitId() !== 'Manual') {
|
|
|
|
print sprintf(
|
|
|
|
'<a href="%s" target="_blank">%s (%s)</a>',
|
|
|
|
$build->getCommitLink(),
|
|
|
|
substr($build->getCommitId(), 0, 7),
|
|
|
|
$build->getCommitterEmail()
|
|
|
|
);
|
|
|
|
} else {
|
2014-12-04 13:19:06 +01:00
|
|
|
print Lang::get('manual_build');
|
2014-12-02 17:26:55 +01:00
|
|
|
}
|
|
|
|
?>
|
|
|
|
- <?php print $build->getCommitMessage(); ?>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</li>
|
|
|
|
<!-- END timeline item -->
|
|
|
|
|
|
|
|
<?php endforeach; ?>
|
|
|
|
|
|
|
|
<li>
|
|
|
|
<i class="fa fa-clock-o"></i>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|