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
|
|
|
|
|
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
|
|
|
|
|
<link href='//fonts.googleapis.com/css?family=Roboto:300,500&subset=latin,latin-ext' rel='stylesheet' type='text/css'>
|
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" />
|
2014-04-30 16:00:35 +02:00
|
|
|
|
2016-07-21 17:20:34 +02:00
|
|
|
<link rel="shortcut icon" type="image/x-icon" href="<?php echo APP_URL ?>favicon.ico">
|
|
|
|
<link rel="shortcut icon" type="image/png" href="<?php echo APP_URL ?>assets/img/favicon.png">
|
2014-04-30 16:00:35 +02:00
|
|
|
|
2016-07-21 17:20:34 +02:00
|
|
|
<script>window.APP_URL = <?php print json_encode(APP_URL) ?></script>
|
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>
|
2014-04-30 16:00:35 +02:00
|
|
|
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
|
|
|
|
|
2016-07-22 18:33:50 +02:00
|
|
|
<script src="<?php print APP_URL; ?>assets/vendor/admin-lte/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
|
|
|
|
<script src="<?php print APP_URL; ?>assets/vendor/admin-lte/plugins/jQueryUI/jquery-ui.min.js" type="text/javascript"></script>
|
2016-07-21 17:20:34 +02:00
|
|
|
<script src="<?php echo APP_URL ?>assets/js/class.js"></script>
|
2016-07-21 19:02:11 +02:00
|
|
|
<script src="<?php echo APP_URL ?>assets/js/app.js"></script>
|
2016-07-21 17:20:34 +02:00
|
|
|
<script src="<?php echo APP_URL ?>assets/js/init.js"></script>
|
2014-04-30 16:00:35 +02:00
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<div class="navbar navbar-fixed-top">
|
|
|
|
<div class="container">
|
2017-01-04 11:53:48 +01:00
|
|
|
<a class="navbar-brand" href="<?php echo APP_URL ?>">PHP Censor</a>
|
2014-04-30 16:00:35 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div id="content" class="container">
|
|
|
|
|
|
|
|
<h1><?php print $project->getTitle(); ?></h1>
|
|
|
|
<?php if (!empty($latest)): ?>
|
|
|
|
|
|
|
|
<?php
|
|
|
|
|
|
|
|
$statusClass = null;
|
|
|
|
$statusText = null;
|
|
|
|
|
|
|
|
switch ($latest->getStatus()) {
|
|
|
|
case 0:
|
|
|
|
$statusClass = 'info';
|
|
|
|
$statusText = 'Pending';
|
|
|
|
break;
|
|
|
|
case 1:
|
|
|
|
$statusClass = 'warning';
|
|
|
|
$statusText = 'Running';
|
|
|
|
break;
|
|
|
|
case 2:
|
|
|
|
$statusClass = 'success';
|
|
|
|
$statusText = 'Success';
|
|
|
|
break;
|
|
|
|
case 3:
|
|
|
|
$statusClass = 'danger';
|
|
|
|
$statusText = 'Failed';
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
?>
|
|
|
|
|
|
|
|
<!-- Latest Build -->
|
|
|
|
<div class="build-info-panel panel panel-<?php print $statusClass; ?>">
|
2014-07-10 15:49:55 +02:00
|
|
|
<img class="pull-left" src="//www.gravatar.com/avatar/<?php print md5($latest->getCommitterEmail()); ?>?d=mm">
|
2014-04-30 16:00:35 +02:00
|
|
|
|
2014-12-02 17:26:55 +01:00
|
|
|
<div class="box-header">
|
|
|
|
<h1 class="box-title">
|
2014-04-30 16:00:35 +02:00
|
|
|
<a href="/project/view/<?php print $latest->getProjectId(); ?>">
|
|
|
|
<?php print $latest->getProject()->getTitle(); ?></a>
|
|
|
|
<span>#<?php print $latest->getId(); ?></span>
|
|
|
|
|
|
|
|
<label class="pull-right label label-<?php print $statusClass; ?>"><?php print $statusText; ?></label>
|
|
|
|
</h1>
|
|
|
|
</div>
|
|
|
|
|
2014-12-02 17:26:55 +01:00
|
|
|
<div class="box-body">
|
2014-04-30 16:00:35 +02:00
|
|
|
<div id="build-info">
|
|
|
|
<?php if ($latest->getCommitMessage()): ?>
|
|
|
|
<div class="commit-message">
|
|
|
|
<?php print $latest->getCommitMessage(); ?>
|
|
|
|
</div>
|
|
|
|
<?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 ID: </strong> <?php print $latest->getCommitId(); ?><br>
|
|
|
|
<?php endif; ?>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<?php endif; ?>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- Recent builds: -->
|
2017-01-06 12:39:04 +01:00
|
|
|
<div class="box">
|
2014-12-02 17:26:55 +01:00
|
|
|
<div class="box-header"><h3 class="box-title">Builds</h3></div>
|
2014-04-30 16:00:35 +02:00
|
|
|
<table class="table table-striped table-bordered">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th>ID</th>
|
|
|
|
<th>Commit</th>
|
|
|
|
<th>Branch</th>
|
|
|
|
<th>Status</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody id="latest-builds">
|
|
|
|
|
|
|
|
|
|
|
|
<?php if(empty($builds) || !count($builds)): ?>
|
|
|
|
<tr class="">
|
|
|
|
<td colspan="6">No builds yet.</td>
|
|
|
|
</tr>
|
|
|
|
<?php endif; ?>
|
|
|
|
|
|
|
|
<?php foreach($builds as $build): ?>
|
|
|
|
|
|
|
|
<?php
|
|
|
|
switch($build->getStatus())
|
|
|
|
{
|
|
|
|
case 0:
|
|
|
|
$cls = 'active';
|
|
|
|
$subcls = 'info';
|
|
|
|
$status = 'Pending';
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 1:
|
|
|
|
$cls = 'warning';
|
|
|
|
$subcls = 'warning';
|
|
|
|
$status = 'Running';
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 2:
|
|
|
|
$cls = 'success';
|
|
|
|
$subcls = 'success';
|
|
|
|
$status = 'Success';
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 3:
|
|
|
|
$cls = 'danger';
|
|
|
|
$subcls = 'danger';
|
|
|
|
$status = 'Failed';
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
<tr class="<?php print $cls; ?>">
|
|
|
|
<td>#<?php print str_pad($build->getId(), 6, '0', STR_PAD_LEFT); ?></td>
|
|
|
|
|
|
|
|
<td>
|
|
|
|
<?php
|
|
|
|
if ($build->getCommitId() !== 'Manual') {
|
|
|
|
print '<a href="' . $build->getCommitLink() . '">';
|
|
|
|
}
|
|
|
|
print $build->getCommitId();
|
|
|
|
if ($build->getCommitId() !== 'Manual') {
|
|
|
|
print '</a>';
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
</td>
|
|
|
|
|
|
|
|
<td><a href="<?php print $build->getBranchLink(); ?>"><?php print $build->getBranch(); ?></a></td>
|
|
|
|
<td>
|
2014-07-29 17:18:36 +02:00
|
|
|
<span class='label label-<?php echo $subcls ?>'><?php echo $status ?></span>
|
2014-04-30 16:00:35 +02:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<?php endforeach; ?>
|
|
|
|
|
|
|
|
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</body>
|
|
|
|
</html>
|