Commit Graph

176 Commits

Author SHA1 Message Date
Lauryn Menard 89c2740342 support: Fix references to remote server in `remote_realm_details.html`. 2023-12-12 08:04:02 -08:00
Lauryn Menard 144b2a9988 support: Add forms for current plan actions to remote realms.
Pulls the forms for updating the billing collection method and
generally modifying the current plan to a separate template.

Uses the shared template to render these forms for both the
remote server and any attached remote realms.
2023-12-11 10:33:50 -08:00
Lauryn Menard 6f3e1cf653 support: Add remote realm current plan data to support view. 2023-12-11 10:33:50 -08:00
Lauryn Menard 7186f75b58 support: Add sponsorship/discount support forms to remote realms.
If there are remote realms attached to the remote server, adds
the forms to be able to update sponsorship requests, approve
sponsorship and update a discount.
2023-12-11 10:33:50 -08:00
Lauryn Menard 2684c21cca support: Create separate template for remote sponsorship/discounts.
Creates a separate template for the forms related to sponsorship
and discounts on the remote support view.
2023-12-11 10:33:50 -08:00
Lauryn Menard c2a76ccb3e support: Clean up template variables for remote server support. 2023-12-11 10:33:50 -08:00
Lauryn Menard ea725aaaf3 support: Handle missing current licenses data for support views. 2023-12-06 11:01:26 -08:00
Lauryn Menard d079a13760 support: Use shared template for current plan details on support views.
Moves the section in support views for any current plan details
to a new template: `templates/analytics/current_plan_details.html`.

Also, updates the PlanData dataclass to have a boolean that checks
if the current plan tier is the self-hosted legacy plan.
2023-12-06 11:01:26 -08:00
Lauryn Menard ba3279e959 support: Add remote realm stub to remote server information.
Adds a small section for any remote realms attached to the remote
server in the support view.
2023-12-05 12:48:42 -08:00
Lauryn Menard cfd61669e0 support: Add plan type to remote server information.
Updates `get_plan_type_string` for RemoteZulipServer plan types and
capitalizes the strings used for Realm plan types.

Also changes the string for Realm.PLAN_TYPE_STANDARD_FREE to be
"Standard free" instead of "open source" as that is used for any
100% sponsored organization, which is not restricted to open-source
projects.
2023-12-05 12:48:42 -08:00
Lauryn Menard 6c5b419267 support: Add downgrade current plan actions to remote servers. 2023-12-05 12:48:42 -08:00
Lauryn Menard f5ab9419d2 support: Update billing modality for remote server current plan. 2023-12-05 12:48:42 -08:00
Lauryn Menard 9f8fe7989a support: Add current plan information for remote servers.
For remote servers with a current legacy customer plan,
only the plan name, status and end date are displayed.
2023-12-05 12:48:42 -08:00
Lauryn Menard c457ef2a07 support: Remove discount/sponsorship actions if remote server sponsored.
Removes the support actions for changing a remote server's default
discount and sponsorship pending states if the remote server is on
the sponsored plan type.
2023-12-03 14:27:07 -08:00
Lauryn Menard 69f6d3dcb1 support: Approve sponsorship for remote server customer.
Adds ability to approve a sponsorship request for a customer
attached to a remote server via the remote server support view.
2023-12-03 14:27:07 -08:00
Lauryn Menard 2218e667a6 support: Update remote server customer sponsorship pending status.
Adds ability to update the sponsorship pending status of a customer
attached to a remote server via the remote server support view.
2023-12-03 14:27:07 -08:00
Lauryn Menard 4250e9c1c9 support: Update remote server customer default discount.
Adds ability to update the default discount for a customer attached
to a remote server via the remote server support view.
2023-12-03 14:27:07 -08:00
Lauryn Menard 1d685bd198 support: Add success message to remote servers support view context. 2023-12-03 14:27:07 -08:00
Lauryn Menard 8d992405a6 analytics: Get customer discount for support views. 2023-12-03 14:27:07 -08:00
Lauryn Menard 6621de6f07 analytics: Add copy email button for remote server support view. 2023-12-03 14:27:07 -08:00
Lauryn Menard 5135acd9e3 support: Use process_support_view_request for plan modifications.
Updates the support view to use process_support_view_request to
process upgrade or downgrade modifications currently implemented
for active plans.
2023-12-03 14:27:07 -08:00
Lauryn Menard 0679bc044a corporate: Make references to billing modality consistent.
The "send_invoice" and "charge_automatically" strings used by stripe
for the `collection_method` are referred to both as the "billing
method" and "billing modality" in the billing code.

Because we send this as data to stripe as either `collection_method`
or `billing_modality`, renames any references that are any form of
"billing method".
2023-12-03 14:27:07 -08:00
Tim Abbott 610338d192 billing: Add BILLING_SCHEDULE_ prefix to values. 2023-11-29 23:32:56 -08:00
Lauryn Menard 81a5977a6e analytics: Adjust width and margin CSS for activity pages. 2023-11-29 11:52:36 -08:00
Lauryn Menard 26168728ca analytics: Add chart key to remote activity page.
Adds a chart key to the top of the remote activity page.

Also, combines the support and stats links for a remote server into
one column.
2023-11-29 11:41:35 -08:00
Lauryn Menard 4e577119b4 analytics: Use gear icon as realm support link on installation activity. 2023-11-28 09:20:45 -08:00
Mateusz Mandera 3cafdbdc1e counts: Add function compute_max_monthly_messages for remote servers.
This calculates the largest amount of messages sent within a month for
the last 3 months. The query is targeted for the specific use-case in
this function - for finding the count for a specific server. For
calculating this in bulk for a large number of remote server an
adapted, bulk query will be needed - rather than running this one in a
loop, which would likely be very inefficient.
2023-11-08 09:45:49 -08:00
Lauryn Menard 1112cbc822 analytics: Use activity_details_template.html for installation page. 2023-11-01 10:31:04 -07:00
Lauryn Menard b19a7a8b8a analytics: Remove Durations tab and hourly columns. 2023-10-27 12:19:13 -07:00
Lauryn Menard 40e6455579 analytics: Move integrations by client to separate activity page.
Moves the tab in the main installation activity page to be a
separate page: "/activity/integrations".
2023-10-05 12:31:57 -07:00
Mateusz Mandera f71e2c8247 support: Add basic support endpoint for remote servers. 2023-10-04 16:55:47 -07:00
Lauryn Menard afc1d2a409 activity: Add separate page for remote server information/table.
Moves the "Remote Zulip servers" tab in the "/activity" page for
an installation to a separate page, "/activity/remote".

Prototype for moving other tabs in "/activity" to separate pages.
2023-10-04 12:48:39 -07:00
Sahil Batra 29ce34020d portico: Re-add bootstrap CSS for tables with "table-bordered" class.
This commit re-adds required bootstrap CSS rules defined with
"table-bordered" class to the specific files.

This is a prep commit to remove bootstrap CSS for tables.
2023-08-06 18:13:33 -07:00
Mateusz Mandera 632e856240 support: Add option to delete user from /activity/support. 2023-05-16 12:38:12 -07:00
Mateusz Mandera 24d9d3d90c support: Add option to upgrade an org to Plus plan on /activity/support.
This is so that we don't need ops to run the
manage.py switch_realm_from_standard_to_plus_plan command on the server
to handle these upgrades.
2023-04-10 17:32:45 -07:00
Mateusz Mandera 1a15449e16 support: Rename "downgrade plan" to "modify plan".
Just a naming change to facilitate adding more options to that <select>
- mainly, an option to upgrade the plan to Plus.
2023-04-10 17:32:45 -07:00
Lauryn Menard b686e6ce9e analytics-realm-activity: Add link to realm's stats page.
Adds the  pie chart icon stats page link to the realm_activity
page header.
2022-12-02 17:30:30 -08:00
Lauryn Menard c05c25e742 analytics-activity: Fix UTC timezone and adjust header type.
Fixes an error with how the `utctime` was being generated and makes
the header on the summary table the same type as the other tabs.
2022-12-02 17:30:30 -08:00
Lauryn Menard c75e5c8ba6 analytics-activity: Add links for realm's Zulip and support page. 2022-12-02 17:30:30 -08:00
Lauryn Menard 90d0531e20 analytics-activity: Remove link with realm owners emails.
Note that a link to copy these emails to the clipboard is still
availabe on the realm's support page.
2022-12-02 17:30:30 -08:00
Lauryn Menard a3f6220fe4 analytics: Add summary statistic for guest users in realm.
Adds the count of users with the role of guest to the stats view
`page_params` via a database query. This information is then added
to the summary statistics section of the analytics page after being
formatted by `stats.js`.

Creates Bassanio as a guest user in the database for the analytics
realm.

Fixes #20162.
2022-10-17 11:53:59 -07:00
Lauryn Menard aaefe700b9 analytics: Remove help link at bottom of `/stats/` page.
Removes the help center article linked to on the `/stats/` page,
because it doesn't have any useful information once the user is
already viewing the analytics page.
2022-10-11 10:47:58 -07:00
Lauryn Menard fdc1335e3a analytics: Move range selector buttons and hover information.
Because some button text is much longer in different languages,
there is an existing  bug when the charts are rendered with the
range selector buttons positioned on the right side of the chart.

This positions the range selector buttons to the left side of the
chart and the hover information to the right side of the chart.

For the pie charts and horizontal bar chart, the grouping buttons
labeled "Me" and "Everyone" are moved to the top of the chart, which
matches the grouping buttons on the vertical bar charts.

Adjusts some chart margins for new positioning of buttons and hover
information. Deduplicates some shared code for rangeselector buttons
in `stats.js` for the three vertical bar charts.
2022-10-07 11:34:01 -07:00
Lauryn Menard 6c48475e3e analytics: Make the "Me" hover consistent with other categories.
The text for hovering over "Bot" or "Everyone" in the bar charts are
`<b>` HTML elements. This makes the "Me" hover consistent with the
other categories.
2022-10-07 11:34:01 -07:00
Lauryn Menard cdcef8b814 analytics: Remove "Aggregation" labels from stats page. 2022-10-07 11:34:01 -07:00
Lauryn Menard df7a1cec93 analytics: Add summary statistic for upload/storage space in use.
Adds the realm's used storage space for attachments to the stats
view `page_params`. This information is then added to the summary
statistics section of the analytics page after being formatted by
`stats.js`.

Uses the emoji test image to create an `Attachment` in the database
for the analytics realm. Even though it doesn't create a message
to claim the attachment, it still is sent as storage space used
data for the analytics `/stats/` page.
2022-10-07 10:08:09 -07:00
Lauryn Menard 842da9e10a analytics: Add messages sent in last 30 days summary statistic. 2022-09-29 09:06:29 -07:00
Lauryn Menard 954b0475fe analytics: Add total messages sent summary statistic. 2022-09-29 09:06:29 -07:00
Lauryn Menard 7f1a060c4d analytics: Add summary statistics section and user statstics.
Adds a section to the top of the stats page for organization
summary statistics. Also, adds the first two statistics to that
section for total users in the organization and users that have
been active in the past 15 days.
2022-09-29 09:06:29 -07:00
Lauryn Menard 06445dc5e1 analytics: Use flexbox for charts in stats page.
Reworks the stats page to use CSS Flexbox. Also centers the main
page header and reorganizes the order of the charts on the page.
2022-09-29 09:06:29 -07:00