Commit 98dc1124 authored by Leo Iannacone's avatar Leo Iannacone

for now do not handle building packages - take care only of which ones are already built

parent 2eb94188
...@@ -28,14 +28,13 @@ if (window.location.pathname == config.paths.preferences) { ...@@ -28,14 +28,13 @@ if (window.location.pathname == config.paths.preferences) {
real_email = '<a href="mailto:' + real_email + subject + '">' + label + '</a>'; real_email = '<a href="mailto:' + real_email + subject + '">' + label + '</a>';
$(this).html(real_email); $(this).html(real_email);
}); });
} else if (window.location.pathname == config.paths.history) {
new Page_History();
} }
var socket = io.connect('/'); var socket = io.connect('/');
page_generic.start(socket); page_generic.start(socket);
if (window.location.pathname == config.paths.distribution) { if (window.location.pathname == config.paths.distribution) {
new Page_Distrubion(socket).start(); new Page_Distrubion(socket).start();
} else if (window.location.pathname == config.paths.history) {
new Page_History().start(socket);
} }
...@@ -30,6 +30,8 @@ function Page_History() { ...@@ -30,6 +30,8 @@ function Page_History() {
function _add_row(package_status) { function _add_row(package_status) {
var p = package_status; var p = package_status;
if (!p.hasOwnProperty('success'))
return;
var info = Utils.get_status_icon_and_class(p); var info = Utils.get_status_icon_and_class(p);
var label = info.label || 'building'; var label = info.label || 'building';
var distribution_url = Utils.get_url_to_package({ var distribution_url = Utils.get_url_to_package({
...@@ -139,6 +141,12 @@ function Page_History() { ...@@ -139,6 +141,12 @@ function Page_History() {
Chartist.Line('#days-chart', days_data); Chartist.Line('#days-chart', days_data);
} }
this.start = function (socket) {
socket.on(config.events.broadcast.status_update, function (socket_data) {
// TODO - implements _update_table
});
};
// init table and some objects // init table and some objects
for (var i = 0; i < dom_history.length; i++) { for (var i = 0; i < dom_history.length; i++) {
......
...@@ -260,7 +260,7 @@ footer .info { ...@@ -260,7 +260,7 @@ footer .info {
.ct-chart { .ct-chart {
height: 180px; height: 180px;
width: 45%; width: 50%;
float: left; float: left;
margin-bottom: 30px; margin-bottom: 30px;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment