mirror of
https://github.com/OpenBankProject/API-Manager.git
synced 2026-02-06 16:46:57 +00:00
Merge pull request #351 from hongwei1/develop
refactor/display milliseconds instead of microseconds for metric page
This commit is contained in:
commit
5482acb258
@ -170,7 +170,7 @@
|
||||
<td>{{ metric.url }}</td>
|
||||
<td>{{ metric.source_ip}}</td>
|
||||
<td>{{ metric.target_ip }}</td>
|
||||
<td>{{ metric.date|date:"Y-m-d H:i:s.u" }}</td>
|
||||
<td>{{ metric.date}}</td>
|
||||
<td>{{ metric.duration }}</td>
|
||||
</tr>
|
||||
|
||||
|
||||
@ -115,7 +115,7 @@ class MetricsView(LoginRequiredMixin, TemplateView):
|
||||
"""
|
||||
for metric in metrics:
|
||||
metric['date'] = datetime.datetime.strptime(
|
||||
metric['date'], settings.API_DATE_FORMAT_WITH_SECONDS )
|
||||
metric['date'], settings.API_DATE_FORMAT_WITH_MILLISECONDS).isoformat(timespec='milliseconds')
|
||||
return metrics
|
||||
|
||||
def to_api(self, cleaned_data):
|
||||
|
||||
Loading…
Reference in New Issue
Block a user