2014-04-30 16:00:35 +02:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html>
|
|
|
|
<head>
|
2016-07-19 20:28:11 +02:00
|
|
|
<title><?php print $project->getTitle(); ?> - PHP Censor</title>
|
2014-04-30 16:00:35 +02:00
|
|
|
|
2017-01-06 18:34:19 +01:00
|
|
|
<meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
|
2014-04-30 16:00:35 +02:00
|
|
|
|
2016-07-22 18:33:50 +02:00
|
|
|
<link href="<?php print APP_URL; ?>assets/vendor/admin-lte/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
|
2017-01-06 18:34:19 +01:00
|
|
|
<link href="<?php print APP_URL; ?>assets/vendor/admin-lte/dist/css/AdminLTE.min.css" rel="stylesheet" type="text/css" />
|
|
|
|
<link href="<?php print APP_URL; ?>assets/css/ansi-colors.css" rel="stylesheet" type="text/css" />
|
|
|
|
<link href="<?php print APP_URL; ?>assets/css/main.css" rel="stylesheet" type="text/css" />
|
2014-04-30 16:00:35 +02:00
|
|
|
|
2017-01-06 18:34:19 +01:00
|
|
|
<link href="<?php print APP_URL; ?>assets/vendor/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
|
|
|
|
<link href="<?php print APP_URL; ?>assets/vendor/ion-icons/css/ionicons.min.css" rel="stylesheet" type="text/css" />
|
2014-04-30 16:00:35 +02:00
|
|
|
|
2016-07-22 18:33:50 +02:00
|
|
|
<script src="<?php print APP_URL; ?>assets/vendor/admin-lte/plugins/jQuery/jquery-2.2.3.min.js"></script>
|
2017-01-06 18:34:19 +01:00
|
|
|
<script src="<?php print APP_URL; ?>assets/js/class.js"></script>
|
|
|
|
<script src="<?php print APP_URL; ?>assets/vendor/sprintf-js/dist/sprintf.min.js"></script>
|
|
|
|
<script src="<?php print APP_URL; ?>assets/js/app.js" type="text/javascript"></script>
|
2014-04-30 16:00:35 +02:00
|
|
|
</head>
|
2017-01-06 18:34:19 +01:00
|
|
|
<body class="hold-transition skin-black layout-top-nav">
|
|
|
|
<div class="wrapper">
|
|
|
|
<header class="main-header">
|
|
|
|
<nav class="navbar navbar-static-top">
|
|
|
|
<div class="container">
|
|
|
|
<div class="navbar-header">
|
|
|
|
<a href="<?php print APP_URL; ?>" class="logo" style="background-color: #222d32; text-align: left;">PHP Censor</a>
|
2014-04-30 16:00:35 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
2017-01-06 18:34:19 +01:00
|
|
|
</nav>
|
|
|
|
</header>
|
|
|
|
<div class="content-wrapper">
|
|
|
|
<div class="container">
|
|
|
|
<section class="content">
|
|
|
|
<?php if (!empty($latest)): ?>
|
2014-04-30 16:00:35 +02:00
|
|
|
|
|
|
|
<?php
|
|
|
|
|
2017-01-06 18:34:19 +01:00
|
|
|
$statusClass = null;
|
|
|
|
$statusText = null;
|
2014-04-30 16:00:35 +02:00
|
|
|
|
2017-01-06 18:34:19 +01:00
|
|
|
switch ($latest->getStatus()) {
|
|
|
|
case 0:
|
|
|
|
$statusClass = 'blue';
|
|
|
|
$statusText = 'Pending';
|
|
|
|
break;
|
2014-04-30 16:00:35 +02:00
|
|
|
case 1:
|
2017-01-06 18:34:19 +01:00
|
|
|
$statusClass = 'yellow';
|
|
|
|
$statusText = 'Running';
|
2014-04-30 16:00:35 +02:00
|
|
|
break;
|
|
|
|
case 2:
|
2017-01-06 18:34:19 +01:00
|
|
|
$statusClass = 'green';
|
|
|
|
$statusText = 'Success';
|
2014-04-30 16:00:35 +02:00
|
|
|
break;
|
|
|
|
case 3:
|
2017-01-06 18:34:19 +01:00
|
|
|
$statusClass = 'red';
|
|
|
|
$statusText = 'Failed';
|
2014-04-30 16:00:35 +02:00
|
|
|
break;
|
|
|
|
}
|
2017-01-06 18:34:19 +01:00
|
|
|
|
2014-04-30 16:00:35 +02:00
|
|
|
?>
|
|
|
|
|
2017-01-06 18:34:19 +01:00
|
|
|
<div class="small-box small-box-full bg-<?= $statusClass; ?>">
|
|
|
|
<div class="inner">
|
|
|
|
<h3 class="box-title">
|
|
|
|
<?php print $latest->getProject()->getTitle(); ?> #<?php print $latest->getId(); ?> (<?= $statusText; ?>)
|
|
|
|
</h3>
|
|
|
|
<p>
|
|
|
|
<?php if ($latest->getCommitMessage()): ?>
|
|
|
|
<?php print $latest->getCommitMessage(); ?><br /><br />
|
|
|
|
<?php endif; ?>
|
|
|
|
|
|
|
|
<strong>Branch: </strong> <?php print $latest->getBranch(); ?><br />
|
|
|
|
<strong>Committer: </strong> <?php print $latest->getCommitterEmail(); ?>
|
|
|
|
|
|
|
|
<?php if ($latest->getCommitId() != 'Manual'): ?>
|
|
|
|
<br /><strong>Commit: </strong> <?php print $latest->getCommitId(); ?><br>
|
|
|
|
<?php endif; ?>
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
<div class="icon">
|
|
|
|
<i class="fa fa-<?php print $project->getIcon(); ?>"></i>
|
|
|
|
</div>
|
|
|
|
<div style="clear: both;"></div>
|
|
|
|
</div>
|
|
|
|
<?php endif; ?>
|
|
|
|
|
|
|
|
<div class="box">
|
|
|
|
<div class="box-header"><h3 class="box-title">Builds</h3></div>
|
|
|
|
<table class="table table-striped table-bordered">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th>ID</th>
|
2017-06-03 09:12:52 +02:00
|
|
|
<th>Status</th>
|
|
|
|
<th>Date</th>
|
2017-01-06 18:34:19 +01:00
|
|
|
<th>Commit</th>
|
|
|
|
<th>Branch</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody id="latest-builds">
|
|
|
|
|
2014-04-30 16:00:35 +02:00
|
|
|
|
2017-01-06 18:34:19 +01:00
|
|
|
<?php if(empty($builds) || !count($builds)): ?>
|
|
|
|
<tr class="">
|
|
|
|
<td colspan="6">No builds yet.</td>
|
|
|
|
</tr>
|
|
|
|
<?php endif; ?>
|
2014-04-30 16:00:35 +02:00
|
|
|
|
2017-01-06 18:34:19 +01:00
|
|
|
<?php foreach($builds as $build): ?>
|
2014-04-30 16:00:35 +02:00
|
|
|
|
2017-01-06 18:34:19 +01:00
|
|
|
<?php
|
|
|
|
switch($build->getStatus())
|
|
|
|
{
|
|
|
|
case 0:
|
|
|
|
$class = 'info';
|
|
|
|
$status = 'Pending';
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 1:
|
|
|
|
$class = 'warning';
|
|
|
|
$status = 'Running';
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 2:
|
|
|
|
$class = 'success';
|
|
|
|
$status = 'Success';
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 3:
|
|
|
|
$class = 'danger';
|
|
|
|
$status = 'Failed';
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
<tr>
|
2017-06-03 09:12:52 +02:00
|
|
|
<td><a href="<?php echo APP_URL ?>build/view/<?php print $build->getId(); ?>">#<?php print str_pad($build->getId(), 6, '0', STR_PAD_LEFT); ?></a></td>
|
|
|
|
<td>
|
|
|
|
<span class='label label-<?php echo $class ?>'><?php echo $status ?></span>
|
|
|
|
</td>
|
|
|
|
<td><?= $build->getCreated()->format('Y-m-d H:i:s'); ?></td>
|
2017-01-06 18:34:19 +01:00
|
|
|
<td>
|
|
|
|
<?php
|
|
|
|
if ($build->getCommitId() !== 'Manual') {
|
2017-06-03 09:12:52 +02:00
|
|
|
echo sprintf(
|
|
|
|
'<a href="%s" target="_blank">%s (%s)</a> — %s',
|
|
|
|
$build->getCommitLink(),
|
|
|
|
substr($build->getCommitId(), 0, 7),
|
|
|
|
$build->getCommitterEmail(),
|
|
|
|
$build->getCommitMessage()
|
|
|
|
);
|
|
|
|
} else {
|
|
|
|
echo $build->getCommitId();
|
2017-01-06 18:34:19 +01:00
|
|
|
}
|
|
|
|
?>
|
|
|
|
</td>
|
|
|
|
|
|
|
|
<td>
|
2017-06-03 09:12:52 +02:00
|
|
|
<?php $branches = $build->getExtra('branches'); ?>
|
|
|
|
<a href="<?= $build->getBranchLink();?>"><i class="fa fa-code-fork"></i> <?php echo $build->getBranch(); ?></a>
|
|
|
|
<?= $branches ? ' + '.implode(', ', $branches) : ''; ?>
|
|
|
|
<?php if ($tag = $build->getTag()): ?> /
|
|
|
|
<a href="<?= $build->getTagLink(); ?>" target="_blank">
|
|
|
|
<i class="fa fa-tag"></i> <?= $tag; ?>
|
|
|
|
</a>
|
|
|
|
<?php endif; ?>
|
2017-01-06 18:34:19 +01:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<?php endforeach; ?>
|
|
|
|
|
|
|
|
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
</section>
|
2014-04-30 16:00:35 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
2017-01-06 18:34:19 +01:00
|
|
|
<!--<footer class="main-footer">
|
|
|
|
<div class="container">
|
|
|
|
</div>
|
|
|
|
</footer>-->
|
|
|
|
</div>
|
2014-04-30 16:00:35 +02:00
|
|
|
</body>
|
|
|
|
</html>
|