Skip to content

Commit

Permalink
Add greencheckstats back
Browse files Browse the repository at this point in the history
  • Loading branch information
mrchrisadams committed Jul 1, 2024
1 parent f967574 commit 09584a1
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 17 deletions.
30 changes: 15 additions & 15 deletions apps/accounts/admin_site.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,21 +238,21 @@ def get_app_list(self, request, app_label=None):
if app_label:
return app_list

if flag_is_active(request, "provider_request"):
verification_request_item = {
"name": "New provider portal",
"app_label": "greencheck",
"app_url": reverse("provider_portal_home"),
"models": [
{
"name": "Move to a new version of provider portal",
"object_name": "greencheck_url",
"admin_url": reverse("provider_portal_home"),
"view_only": True,
}
],
}
app_list.insert(0, verification_request_item)

verification_request_item = {
"name": "New provider portal",
"app_label": "greencheck",
"app_url": reverse("provider_portal_home"),
"models": [
{
"name": "Move to a new version of provider portal",
"object_name": "greencheck_url",
"admin_url": reverse("provider_portal_home"),
"view_only": True,
}
],
}
app_list.insert(0, verification_request_item)

app_list += [
{
Expand Down
1 change: 0 additions & 1 deletion apps/greencheck/tests/models/test_greencheck_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
from django.core import management
from django.utils import timezone
from dramatiq.brokers import stub
from waffle.testutils import override_flag

from ....accounts import models as ac_models
from ... import choices as gc_choices
Expand Down
5 changes: 4 additions & 1 deletion apps/greencheck/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@

import django_filters

from waffle.mixins import WaffleFlagMixin

from apps.accounts.models.hosting import Hostingprovider
from apps.greencheck.models.checks import GreenDomain
from apps.greencheck.models.stats import DailyStat
Expand Down Expand Up @@ -59,8 +61,9 @@ def get_context_data(self, **kwargs):
return context


class GreencheckStatsView(TemplateView):
class GreencheckStatsView(WaffleFlagMixin, TemplateView):
template_name = "greencheck/stats_index.html"
waffle_flag = "greencheck-stats"

def _get_headline_counts(self, daily_stat_queryset=None):
"""
Expand Down

0 comments on commit 09584a1

Please sign in to comment.