-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into group-type-project
- Loading branch information
Showing
10 changed files
with
111 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Generated by Django 4.2.15 on 2024-10-25 19:31 | ||
|
||
from django.db import migrations | ||
from django.contrib.auth.models import Group | ||
|
||
|
||
def create_billing_team_group(apps, schema_editor): | ||
Group.objects.get_or_create(name="Billing Team") | ||
|
||
|
||
def reverse_create_billing_team_group(apps, schema_editor): | ||
Group.objects.filter(name="Billing Team").delete() | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("posthog", "0500_errortrackingsymbolset_errortrackingstackframe_and_more"), | ||
] | ||
|
||
operations = [ | ||
migrations.RunPython(create_billing_team_group, reverse_create_billing_team_group), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
posthog/templates/admin/posthog/organization/change_list.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{% extends "admin/change_list.html" %} | ||
{% load i18n admin_urls %} | ||
|
||
{% block object-tools-items %} | ||
{% if show_usage_report_button %} | ||
<li> | ||
<a href="{% url 'admin:send-usage-report' %}">Send Usage Report</a> | ||
</li> | ||
{% endif %} | ||
{{ block.super }} | ||
{% endblock %} |
24 changes: 24 additions & 0 deletions
24
posthog/templates/admin/posthog/organization/send_usage_report.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{% extends "admin/base_site.html" %} | ||
{% load i18n admin_urls %} | ||
|
||
{% block content %} | ||
<div id="content-main"> | ||
<form method="post"> | ||
<p>The date is the day that the usage report would have been run, so is one day past the date where usage reports are missing. | ||
<br/>For instance, if we had 0 usage reports on May 11, the date you'd use is actually May 12 (because usage reports are reporting usage for the previous day). | ||
<br/>Read more <b><a href="https://posthog.com/docs/advanced/usage-reports" target="_blank">here</a></b>.</p> | ||
{% csrf_token %} | ||
<fieldset class="module aligned"> | ||
{% for field in form %} | ||
<div class="form-row"> | ||
{{ field.errors }} | ||
{{ field.label_tag }} {{ field }} | ||
</div> | ||
{% endfor %} | ||
</fieldset> | ||
<div class="submit-row"> | ||
<input type="submit" value="Send Usage Report" class="default" name="_send_report"> | ||
</div> | ||
</form> | ||
</div> | ||
{% endblock %} |