phpci/PHPCI/View/Home/index.phtml

80 lines
2.3 KiB
PHTML
Raw Normal View History

2013-05-10 13:28:43 +02:00
<div id="title">
2014-04-30 15:13:07 +02:00
<h1><i class="glyphicon glyphicon-home"></i> Dashboard</h1>
2013-05-10 13:28:43 +02:00
</div>
2014-04-30 15:13:07 +02:00
2013-05-03 17:02:53 +02:00
<div class="row">
<div class="col-lg-3">
2014-04-30 15:13:07 +02:00
<?php if (count($projects)): ?>
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">Projects</h4>
</div>
<div class="list-group">
<?php foreach($projects as $project): ?>
<a class="list-group-item" href="<?php echo PHPCI_URL ?>project/view/<?php print $project->getId(); ?>"><?php print htmlspecialchars($project->getTitle()); ?></a>
<?php endforeach; ?>
</div>
</div>
2013-05-10 13:28:43 +02:00
<?php endif; ?>
</div>
<div class="col-lg-9">
2014-04-30 15:13:07 +02:00
<div class="panel panel-default">
<div class="panel-heading"><h3 class="panel-title">Project Overview</h3></div>
<table class="table table-striped table-bordered">
<thead>
<tr>
<th>Health</th>
<th>Project</th>
<th>Last Success</th>
<th>Last Failure</th>
<th>Success/Failures</th>
<th style="width: 100px"></th>
</tr>
</thead>
<tbody id="project-overview">
<?php print $summary; ?>
</tbody>
</table>
</div>
2014-04-30 15:13:07 +02:00
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">Last 5 Builds</h3>
</div>
2013-05-10 13:28:43 +02:00
<table class="table table-striped table-bordered">
<thead>
2013-05-03 17:02:53 +02:00
<tr>
2013-05-10 13:28:43 +02:00
<th>ID</th>
2013-05-03 17:02:53 +02:00
<th>Project</th>
<th>Commit</th>
<th>Branch</th>
<th>Status</th>
2014-04-30 15:13:07 +02:00
<th style="width: 100px"></th>
2013-05-03 17:02:53 +02:00
</tr>
2013-05-10 13:28:43 +02:00
</thead>
<tbody id="latest-builds">
<?php print $builds; ?>
2013-05-10 13:28:43 +02:00
</tbody>
2013-05-03 17:02:53 +02:00
</table>
</div>
2013-05-03 17:02:53 +02:00
</div>
2013-05-10 13:28:43 +02:00
</div>
<script>
var refreshProjectData = function()
{
2014-01-28 22:27:39 +01:00
$('#latest-builds').load('<?php echo PHPCI_URL ?>home/latest', function () {
$('#latest-builds').trigger('latest-builds:reload');
});
$('#project-overview').load('<?php echo PHPCI_URL ?>home/summary', function () {
$('#project-overview').trigger('project-overview:reload');
});
};
setInterval(refreshProjectData, 10000);
2014-01-28 22:27:39 +01:00
</script>