a3a65fd7b5
This is somewhat similar to what we've been doing with Continuous; we take the manifest.json, and turn it into a "snapshot". Except here there is a notion of inheritance. This gets stored into the tree as /usr/share/rpm-ostree/treefile.json. Additionally, it goes into the autobuilder directory in products-built.json. Though really we should split up that file, since it will be kind of...large.
35 lines
1.1 KiB
JavaScript
35 lines
1.1 KiB
JavaScript
(function(exports) {
|
|
'use strict';
|
|
|
|
var rpmostreeControllers = angular.module('rpmostreeControllers', []);
|
|
|
|
var ROOT = '/';
|
|
|
|
rpmostreeControllers.controller('rpmostreeHomeCtrl', function($scope, $http) {
|
|
var builds = [];
|
|
|
|
$http.get(ROOT + '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 productsBuiltPath = ROOT + 'results/tasks/build/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.screenshotUrl = '/results/tasks/smoketest/smoketest/work-' + refUnix + '/screenshot-final.png';
|
|
}
|
|
$scope.trees = trees;
|
|
});
|
|
});
|
|
|
|
})(window);
|