-
-
Notifications
You must be signed in to change notification settings - Fork 217
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
Added security watchtower page #35400
Conversation
The breadcrumbs should be updated to show
And relatedly
See this utility
(not a blocker: can be part of this or a small followup PR) |
@@ -191,30 +191,35 @@ hqDefine("enterprise/js/enterprise_dashboard", [ | |||
} | |||
|
|||
$(function () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would be nice to make this an es6 / esm module and use js_entry
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, since this entry point will be used for both enterprise_dashboard
and security_watchtower
, would be good to rename the file so that it's clear it's not specific to either. e.g. enterprise_dashboard
=> enterprise_report_tiles
?
Alternative...rename enterprise dashboard page to project health metrics?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or "Project Overview"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or "Enterprise Overview"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed in f35b96f
@@ -2,7 +2,7 @@ | |||
{% load hq_shared_tags %} | |||
{% load i18n %} | |||
|
|||
{% block page_title %}{{ account.name }}{% endblock %} | |||
{% block page_title %}{{ header_title }}{% endblock %} | |||
|
|||
{% requirejs_main_b5 'enterprise/js/enterprise_dashboard' %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please migrate to webpack thank you!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
requirejs_main_b5
=> js_entry
and then
import 'commcarehq`;
at the top of the esm module
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given work like #35409, this is going to cause conflicts. I think we should handle this as a separate PR
const maxDateRangeDays = initialPageData.get("max_date_range_days"); | ||
dateRangeModal = DateRangeModal(datePicker, dateRangePresetOptions, maxDateRangeDays, formSubmissionsDisplay); | ||
|
||
$("#dateRangeDisplay").koApplyBindings(formSubmissionsDisplay); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$("#dateRangeDisplay").koApplyBindings(formSubmissionsDisplay); | |
$dateRangeDisplay.koApplyBindings(formSubmissionsDisplay); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed in 9519faf
corehq/apps/enterprise/views.py
Outdated
if not has_privilege(request, privileges.PROJECT_ACCESS): | ||
return HttpResponseRedirect(reverse(EnterpriseBillingStatementsView.urlname, args=(domain,))) | ||
|
||
context = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would be good to use
def get_page_context(page_title, page_url, page_name=None, parent_pages=None, domain=None, section=None): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use page_title
and page_name
page_name
is "Security Watchtower for <request.account.name>"
and then specify a Section
so the breadcrumbs work properly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed in 54bb2aa
@@ -2,7 +2,7 @@ | |||
{% load hq_shared_tags %} | |||
{% load i18n %} | |||
|
|||
{% block page_title %}{{ account.name }}{% endblock %} | |||
{% block page_title %}{{ header_title }}{% endblock %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
current_page.name
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed in 54bb2aa
@mjriley All changes looks good |
@mjriley Thank you! Since data range modal is only used in tile, should it be moved into the partial template too? Is there anything below can be moved to the partial template?
|
I think that might create undesired behavior? The template is going to be included for every report. If we were to include the modal or register the URLs within this partial template, I believe that would cause us to generate a separate modal and register separate URLs for each time the partial was included. |
@mjriley Interesting! I didn't think about that! Thank you! |
Product Description
Added a new page for the security watchtower
Technical Summary
This is currently an empty page. It is awaiting new tiles that will be implemented as part of our enterprise console improvements.
Feature Flag
This is hidden behind the
ENTERPRISE_DASHBOARD_IMPROVEMENTS
feature flag.Safety Assurance
Safety story
This is currently an empty page hidden behind a user flag that no users should have enabled. I verified the changes to the enterprise console page locally, testing that the page continued to display correctly and also verified generating the domain report.
Automated test coverage
No tests
QA Plan
No QA
Rollback instructions
Labels & Review