Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add custom cert expiry notification message #2066

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion api/tacticalrmm/core/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,11 @@ def clear_cache(request):
@api_view()
def dashboard_info(request):
from core.utils import token_is_expired
from tacticalrmm.utils import get_latest_trmm_ver, runcmd_placeholder_text
from tacticalrmm.utils import (
get_latest_trmm_ver,
runcmd_placeholder_text,
certexpiry_notification_text,
)

core_settings = get_core_settings()
return Response(
Expand Down Expand Up @@ -135,6 +139,7 @@ def dashboard_info(request):
"dash_negative_color": request.user.dash_negative_color,
"dash_warning_color": request.user.dash_warning_color,
"run_cmd_placeholder_text": runcmd_placeholder_text(),
"certexpiry_notification_text": certexpiry_notification_text(),
"server_scripts_enabled": core_settings.server_scripts_enabled,
"web_terminal_enabled": core_settings.web_terminal_enabled,
}
Expand Down
4 changes: 4 additions & 0 deletions api/tacticalrmm/tacticalrmm/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -468,3 +468,7 @@ def runcmd_placeholder_text() -> dict[str, str]:
),
}
return ret


def certexpiry_notification_text() -> str:
return getattr(settings, "CERTEXPIRY_NOTIFICATION_TEXT", "")
Loading