mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-30 07:59:35 +00:00
add missing username for blog notifications (#5422)
The notifications backend it worked fine, but the frontend was missing the username variable to be in able to display the 'New' badge correctly
This commit is contained in:
parent
7d51eb47f7
commit
24f054f009
6 changed files with 39 additions and 35 deletions
|
|
@ -82,10 +82,14 @@ print[[
|
|||
window.unchangable_pool_names = [
|
||||
'Jailed hosts pool'
|
||||
]
|
||||
|
||||
|
||||
window.__IS_PRO__ = ]] print(ntop.isPro()) print[[;
|
||||
window.__CSRF_DATATABLE__ = `]] print(ntop.getRandomCSRFValue()) print[[`;
|
||||
window.__BLOG_NOTIFICATION_CSRF__ = `]] print(ntop.getRandomCSRFValue()) print[[`;
|
||||
|
||||
if(document.cookie.indexOf("tzoffset=") < 0) {
|
||||
|
||||
if (document.cookie.indexOf("tzoffset=") < 0) {
|
||||
// Tell the server the client timezone
|
||||
document.cookie = "tzoffset=" + (new Date().getTimezoneOffset() * 60 * -1);
|
||||
}
|
||||
|
|
@ -1070,7 +1074,8 @@ if (not info.oem) then
|
|||
local posts, new_posts_counter = blog_utils.readPostsFromRedis(username)
|
||||
template_utils.render("pages/components/blog-dropdown.template", {
|
||||
posts = posts,
|
||||
new_posts_counter = new_posts_counter
|
||||
new_posts_counter = new_posts_counter,
|
||||
username = username
|
||||
})
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue