mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-30 07:59:35 +00:00
Possible fix for issue #6962
This commit is contained in:
parent
05e5b50662
commit
b7cb9a3481
3 changed files with 11 additions and 4 deletions
|
|
@ -66,6 +66,13 @@ rsp["series"] = series
|
|||
rsp["labels"] = labels
|
||||
rsp["colors"] = colors
|
||||
|
||||
-- Just in case no data were found put an empty serie
|
||||
if table.len(rsp["series"]) == 0 then
|
||||
rsp["series"] = { 0 }
|
||||
rsp["labels"] = { i18n('no_data_available') }
|
||||
rsp["colors"] = { graph_utils.get_html_color(#colors + 1) }
|
||||
end
|
||||
|
||||
-- ##################################
|
||||
|
||||
rest_utils.answer(rest_utils.consts.success.ok, rsp)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue