Commit ecd5e5d0 authored by Leo Iannacone's avatar Leo Iannacone

regenerate data - send only data information I have requested

parent 8a6307f0
......@@ -129,6 +129,9 @@ function __watch_path_onsocket(event_name, socket, data, watch_path, updater) {
}
function __file_newcontent(event_name, socket, data) {
if(! utils.check_data_file(data))
return
data.file.content = null
socket.emit(event_name, data)
}
......
......@@ -36,8 +36,11 @@ var Page_Distrubion = {
get: function (data) {
if (! data)
data = Utils.from_hash_to_data()
if (Utils.check_data_distribution(data))
socket.emit("get_distribution_packages", data)
if (Utils.check_data_distribution(data)) {
new_data = {}
new_data.distribution = data.distribution
socket.emit("get_distribution_packages", new_data)
}
}
},
......@@ -86,8 +89,12 @@ var Page_Distrubion = {
get: function (data) {
if (! data)
data = Utils.from_hash_to_data()
if (Utils.check_data_package(data))
socket.emit("get_package_files_list", data)
if (Utils.check_data_package(data)) {
new_data = {}
new_data.distribution = data.distribution
new_data.package = data.package
socket.emit("get_package_files_list", new_data)
}
},
select: function(file) {
$("#logs li").removeClass('active')
......@@ -115,8 +122,14 @@ var Page_Distrubion = {
get: function(data) {
if (! data)
data = Utils.from_hash_to_data()
if (Utils.check_data_file(data))
socket.emit("get_file", data)
if (Utils.check_data_file(data)) {
new_data = {}
new_data.distribution = data.distribution
new_data.package = data.package
new_data.file = data.file
new_data.file.content = null
socket.emit("get_file", new_data)
}
}
},
......
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