Commit a20c2d81 authored by Leo Iannacone's avatar Leo Iannacone

warn user if no package in distribution

parent 30bb1af2
...@@ -90,6 +90,7 @@ function Page_Distrubion(socket) ...@@ -90,6 +90,7 @@ function Page_Distrubion(socket)
var tmp = Utils.clone(socket_data) var tmp = Utils.clone(socket_data)
tmp.file = null tmp.file = null
view.packages = {} view.packages = {}
if (socket_data.distribution.packages && socket_data.distribution.packages.length > 0) {
socket_data.distribution.packages.forEach(function(p){ socket_data.distribution.packages.forEach(function(p){
tmp.package = p tmp.package = p
// get datestamp if package is clicked // get datestamp if package is clicked
...@@ -97,6 +98,10 @@ function Page_Distrubion(socket) ...@@ -97,6 +98,10 @@ function Page_Distrubion(socket)
view.packages[p.orig_name] = Utils.clone(p) view.packages[p.orig_name] = Utils.clone(p)
}) })
packages.select() packages.select()
}
else {
$('#packages ul').append('<li class="text-muted">No packages yet</li>')
}
}, },
clean: function () { clean: function () {
......
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