composeui: Add UI to home page, add footer
This commit is contained in:
parent
7f3fa0d60b
commit
22df6f6175
@ -10,7 +10,7 @@
|
||||
$routeProvider.
|
||||
when('/', {
|
||||
templateUrl: 'partials/home.html',
|
||||
controller: 'rpmostreeRefsCtrl'
|
||||
controller: 'rpmostreeHomeCtrl'
|
||||
}).
|
||||
when('/repoweb', {
|
||||
templateUrl: 'partials/repoweb-overview.html',
|
||||
|
@ -3,6 +3,34 @@
|
||||
|
||||
var rpmostreeControllers = angular.module('rpmostreeControllers', []);
|
||||
|
||||
rpmostreeControllers.controller('rpmostreeHomeCtrl', function($scope, $http, $location) {
|
||||
var builds = [];
|
||||
|
||||
$http.get(window.location.pathname + '../autobuilder-status.json').success(function(status) {
|
||||
var text;
|
||||
if (status.running.length > 0)
|
||||
text = 'Running: ' + status.running.join(' ') + '; load=' + status.systemLoad[0];
|
||||
else
|
||||
text = 'Idle, awaiting packages';
|
||||
|
||||
$scope.runningState = text;
|
||||
});
|
||||
|
||||
var latestSmoketestPath = window.location.pathname + '../results/tasks/smoketest';
|
||||
var productsBuiltPath = latestSmoketestPath + '/products-built.json';
|
||||
console.log("Retrieving products-built.json");
|
||||
$http.get(productsBuiltPath).success(function(data) {
|
||||
var trees = data['trees'];
|
||||
for (var ref in trees) {
|
||||
var treeData = trees[ref];
|
||||
var refUnix = ref.replace(/\//g, '-');
|
||||
treeData.refUnix = refUnix;
|
||||
treeData.screenshotUrl = latestSmoketestPath + '/smoketest/work-' + refUnix + '/screenshot-final.png';
|
||||
}
|
||||
$scope.trees = trees;
|
||||
});
|
||||
});
|
||||
|
||||
rpmostreeControllers.controller('rpmostreeRefsCtrl', function($scope, $http, $location) {
|
||||
var builds = [];
|
||||
|
||||
|
@ -7,10 +7,6 @@ body {
|
||||
padding-top: 50px;
|
||||
}
|
||||
|
||||
footer {
|
||||
padding-top: 20px;
|
||||
}
|
||||
|
||||
/*
|
||||
* Global add-ons
|
||||
*/
|
||||
|
@ -35,14 +35,16 @@
|
||||
</div>
|
||||
<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
|
||||
<div ng-view class="content"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
<footer>
|
||||
This site is maintained in the <a href="https://github.com/cgwalters/rpm-ostree">rpm-ostree</a> git module.
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script src="jquery.min.js"></script>
|
||||
<script src="js/bootstrap.min.js"></script>
|
||||
</body>
|
||||
|
Loading…
Reference in New Issue
Block a user