Commit 2bf064e2 authored by Leo Iannacone's avatar Leo Iannacone

set package status

parent 449f9e8a
......@@ -4,8 +4,4 @@ new Page_Generic().init(socket)
if (window.location.pathname == config.paths.distribution) {
new Page_Distrubion(socket).start()
}
socket.on(config.events.client.distribution_packages.status, function(data){
console.log(data)
})
\ No newline at end of file
}
\ No newline at end of file
......@@ -65,6 +65,11 @@ function Page_Distrubion(socket)
},
unselect: function() {
$('#packages li').removeClass('active')
},
set_status: function (status_data) {
var p_html = $("#packages li[id='package-"+ status_data.package + "'] a")
p_html.find('span.icon').remove()
p_html.html(p_html.html() + ' ' + Utils.get_status_icon_html(status_data))
}
}
......@@ -272,6 +277,14 @@ function Page_Distrubion(socket)
packages.set(socket_data)
})
socket.on(events.distribution_packages.status, function(socket_data){
packages.set_status(socket_data)
})
socket.on(config.events.broadcast.status_update, function(socket_data){
packages.set_status(socket_data)
})
socket.on(events.package_files_list.set, function(socket_data){
files.set(socket_data)
})
......
......@@ -29,6 +29,11 @@ footer {
border-top: 1px solid #f0f0f0;
}
#packages li .icon {
float: right;
margin-top: -3px;
}
#status span {
font-weight: bold;
font-size: small;
......
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