mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-02 08:50:12 +00:00
parent
7a8e0cf53f
commit
a9f859dc7f
4 changed files with 36 additions and 3 deletions
|
|
@ -82,6 +82,17 @@ local function create_contribute_notification_ui(notification)
|
|||
return notification_ui:create(notification.id, title, description, NotificationLevels.INFO, action, notification.dismissable)
|
||||
end
|
||||
|
||||
|
||||
-- ###############################################################
|
||||
|
||||
local function create_forced_community_notification(notification)
|
||||
|
||||
local title = i18n("about.licence")
|
||||
local description = i18n("about.forced_community_notification")
|
||||
|
||||
return notification_ui:create(notification.id, title, description, NotificationLevels.INFO, nil --[[ no action --]], notification.dismissable)
|
||||
end
|
||||
|
||||
-- ###############################################################
|
||||
|
||||
local function create_tempdir_notification_ui(notification)
|
||||
|
|
@ -456,4 +467,15 @@ end
|
|||
|
||||
-- ###############################################
|
||||
|
||||
return predicates
|
||||
--- Create an instance for forced community notification
|
||||
--- @param notification table The notification is the logic model defined in defined_notifications
|
||||
--- @param container table Is the table where to put the new notification ui
|
||||
function predicates.forced_community(notification, container)
|
||||
if ntop.getInfo()["pro.forced_community"] then
|
||||
table.insert(container, create_forced_community_notification(notification))
|
||||
end
|
||||
end
|
||||
|
||||
-- ###############################################
|
||||
|
||||
return predicates
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue