mirror of
https://github.com/OpenBankProject/API-Manager.git
synced 2026-02-06 18:56:48 +00:00
Merge pull request #282 from Reena-cell/develop
Bugfix/ Custom in Metric
This commit is contained in:
commit
742d2bb463
@ -134,7 +134,7 @@
|
||||
<p class="text-muted">
|
||||
<a title="API ROOT" href="{{ API_ROOT }}">API ROOT: {{ API_ROOT }}</a> |
|
||||
<a title="Open Bank Project" href="https://openbankproject.com?locale=en_GB">Open Bank Project</a> | Powered by <a title="TESOBE" href="http://tesobe.com">TESOBE</a> |
|
||||
<small>Copyright © 2016 - 2020</small>
|
||||
<small>Copyright © 2016 - 2023</small>
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
|
||||
{% block nav_tabs %}
|
||||
<li><a href="{% url 'api-metrics' %}?{{ request.GET.urlencode }}">{% trans "List" %}</a></li>
|
||||
<li><a href="{% url 'api-metrics-summary-partial-function' %}?{{ request.GET.urlencode }}">{% trans "Summary by Partial Function" %}</a></li>
|
||||
<li><a href="{% url 'api-metrics-summary-partial-function' %}?{{ request.GET.urlencode }}">{% trans "Summary by Partial Function" %}</a></li>
|
||||
{% endblock nav_tabs %}
|
||||
|
||||
{% block tab_content %}
|
||||
|
||||
@ -200,13 +200,13 @@ class MonthlyMetricsSummaryView(LoginRequiredMixin, TemplateView):
|
||||
template_name = 'metrics/monthly_summary.html'
|
||||
api_urlpath = None
|
||||
|
||||
def get_form(self, web_page_type = ""):
|
||||
def get_form(self):
|
||||
"""
|
||||
Get bound form either from request.GET or initials
|
||||
We need a bound form because we already send a request to the API
|
||||
without user intervention on initial request
|
||||
"""
|
||||
if (self.request.GET) or (web_page_type == SummaryType.CUSTOM):
|
||||
if self.request.GET:
|
||||
data = self.request.GET
|
||||
else:
|
||||
fields = self.form_class.declared_fields
|
||||
@ -261,7 +261,7 @@ class MonthlyMetricsSummaryView(LoginRequiredMixin, TemplateView):
|
||||
urlpath = urlpath + '?from_date={}&to_date={}&app_name={}'.format(from_date, to_date, API_EXPLORER_APP_NAME)
|
||||
elif ((not only_show_api_explorer_metrics) and (not is_included_obp_apps)):
|
||||
urlpath = urlpath + '?from_date={}&to_date={}&exclude_app_names={}&exclude_implemented_by_partial_functions={}&exclude_url_pattern={}'.format(
|
||||
from_date, to_date, ",".join(local_settings.EXCLUDE_APPS),",".join(EXCLUDE_FUNCTIONS), ",".join(EXCLUDE_URL_PATTERN))
|
||||
from_date, to_date, ",".join(local_settings.EXCLUDE_APPS),",".join(local_settings.EXCLUDE_FUNCTIONS), ",".join(local_settings.EXCLUDE_URL_PATTERN))
|
||||
else:
|
||||
urlpath = urlpath + '?from_date={}&to_date={}'.format(from_date, to_date)
|
||||
cache_key = get_cache_key_for_current_call(self.request, urlpath)
|
||||
@ -774,7 +774,7 @@ class MonthlyMetricsSummaryView(LoginRequiredMixin, TemplateView):
|
||||
|
||||
def prepare_general_context(self, web_page_type, **kwargs):
|
||||
try:
|
||||
form = self.get_form(web_page_type)
|
||||
form = self.get_form()
|
||||
per_day_chart=[]
|
||||
calls_per_month_list=[]
|
||||
per_month_chart=[]
|
||||
|
||||
Loading…
Reference in New Issue
Block a user