Skip to content

Commit

Permalink
Merge pull request #35459 from dimagi/jc/b5-domain-project-limits
Browse files Browse the repository at this point in the history
[B5] Project Limits view migration
  • Loading branch information
jingcheng16 authored Dec 3, 2024
2 parents 661fe90 + 9c6bbc2 commit f2911d0
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 34 deletions.

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">
<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

0 comments on commit f2911d0

Please sign in to comment.