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

[B5] Project Limits view migration #35459

Merged
merged 4 commits into from
Dec 3, 2024
Merged
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

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ <h1>{{ header }}</h1>
<td>{{ rate_info.key }}</td>
<td>
{{ rate_info.percent_usage }}%
<div class="progress"> {# todo B5: css-progress #}
<div class="progress-bar progress-bar-striped" style="width: {{ rate_info.percent_usage }}%"></div> {# todo B5: inline-style #}
<div class="progress" role="progressbar" aria-label="Percent Usage" aria-valuemin="0" aria-valuemax="100">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should "Percent Usage" be translated?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment in the template explained it is just for internal use so it won't be translated

<div class="progress-bar progress-bar-striped" style="width: {{ rate_info.percent_usage }}%"></div>
</div>
</td>
<td>{{ rate_info.current_usage }}</td>
Expand Down
5 changes: 3 additions & 2 deletions corehq/apps/domain/views/internal.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
BaseAdminProjectSettingsView,
BaseProjectSettingsView,
)
from corehq.apps.hqwebapp.decorators import use_jquery_ui, use_multiselect
from corehq.apps.hqwebapp.decorators import use_bootstrap5, use_jquery_ui, use_multiselect
from corehq.apps.hqwebapp.tasks import send_html_email_async, send_mail_async
from corehq.apps.hqwebapp.views import BasePageView
from corehq.apps.receiverwrapper.rate_limiter import domain_case_rate_limiter, submission_rate_limiter
Expand Down Expand Up @@ -286,10 +286,11 @@ def page_context(self):

@method_decorator(always_allow_project_access, name='dispatch')
@method_decorator(require_superuser, name='dispatch')
@method_decorator(use_bootstrap5, name='dispatch')
class ProjectLimitsView(BaseAdminProjectSettingsView):
urlname = 'internal_project_limits_summary'
page_title = gettext_lazy("Project Limits")
template_name = 'domain/admin/bootstrap3/project_limits.html'
template_name = 'domain/admin/project_limits.html'

@property
def page_context(self):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,12 @@
{% for header, rate_infos in project_limits %}
<h1>{{ header }}</h1>
<table class="table table-striped">
@@ -23,8 +23,8 @@
@@ -23,7 +23,7 @@
<td>{{ rate_info.key }}</td>
<td>
{{ rate_info.percent_usage }}%
- <div class="progress">
- <div class="progress-bar progress-bar-striped" style="width: {{ rate_info.percent_usage }}%"></div>
+ <div class="progress"> {# todo B5: css-progress #}
+ <div class="progress-bar progress-bar-striped" style="width: {{ rate_info.percent_usage }}%"></div> {# todo B5: inline-style #}
+ <div class="progress" role="progressbar" aria-label="Percent Usage" aria-valuemin="0" aria-valuemax="100">
<div class="progress-bar progress-bar-striped" style="width: {{ rate_info.percent_usage }}%"></div>
</div>
</td>
<td>{{ rate_info.current_usage }}</td>

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
"admin/case_search.html",
"admin/commtrack_settings.html",
"admin/partials/case_search_templates.html",
"admin/project_limits.html",
"admin/sms_settings.html"
]
},
Expand Down
Loading