mirror of https://github.com/zulip/zulip.git
remote-support: Add CSS grid for remote server and remote realms.
This commit is contained in:
parent
439e88e251
commit
8c5325fc2c
|
@ -1,78 +1,84 @@
|
|||
<div class="remote-realm-information">
|
||||
<span class="label">remote realm</span>
|
||||
<h3>{{ remote_realm.name }}</h3>
|
||||
{% if remote_realm.realm_locally_deleted %}
|
||||
<h4>Remote realm is locally deleted 🛑</h4>
|
||||
<div class="remote-realm-container">
|
||||
<div class="remote-realm-information">
|
||||
<span class="label">remote realm</span>
|
||||
<h3>{{ remote_realm.name }}</h3>
|
||||
{% if remote_realm.realm_locally_deleted %}
|
||||
<h4>Remote realm is locally deleted 🛑</h4>
|
||||
{% endif %}
|
||||
{% if remote_realm.registration_deactivated %}
|
||||
<h4>Remote realm registration deactivated 🛑</h4>
|
||||
{% endif %}
|
||||
{% if remote_realm.realm_deactivated %}
|
||||
<h4>Remote realm is deactivated on remote server 🛑</h4>
|
||||
{% endif %}
|
||||
{% if remote_realm.plan_type == SPONSORED_PLAN_TYPE %}
|
||||
<h4>On 100% sponsored Zulip Community plan 🎉</h4>
|
||||
{% endif %}
|
||||
{% if support_data[remote_realm.id].sponsorship_data.default_discount %}
|
||||
<h4>Has a discount 💸</h4>
|
||||
{% endif %}
|
||||
<b>Remote realm host:</b> {{ remote_realm.host }}<br />
|
||||
<b>Date created</b>: {{ support_data[remote_realm.id].date_created.strftime('%d %B %Y') }}<br />
|
||||
<b>Org type</b>: {{ get_org_type_display_name(remote_realm.org_type) }}<br />
|
||||
<b>Plan type</b>: {{ get_plan_type_name(remote_realm.plan_type) }}<br />
|
||||
<b>Non-guest user count</b>: {{ support_data[remote_realm.id].user_data.non_guest_user_count }}<br />
|
||||
<b>Guest user count</b>: {{ support_data[remote_realm.id].user_data.guest_user_count }}<br />
|
||||
<br />
|
||||
<b>Mobile user count</b>: {{ support_data[remote_realm.id].mobile_push_data.total_mobile_users }}<br />
|
||||
<b>7-day mobile pushes count</b>: {{ support_data[remote_realm.id].mobile_push_data.mobile_pushes_forwarded }}<br />
|
||||
<b>Last push notification date</b>: {{ support_data[remote_realm.id].mobile_push_data.last_mobile_push_sent }}<br />
|
||||
</div>
|
||||
|
||||
{% if remote_realm.plan_type != SPONSORED_PLAN_TYPE %}
|
||||
<div>
|
||||
{% with %}
|
||||
{% set sponsorship_data = support_data[remote_realm.id].sponsorship_data %}
|
||||
{% set remote_id = remote_realm.id %}
|
||||
{% set remote_type = "remote_realm_id" %}
|
||||
{% set format_discount = format_discount %}
|
||||
{% set has_fixed_price = support_data[remote_realm.id].plan_data.has_fixed_price %}
|
||||
{% include 'corporate/support/sponsorship_forms_support.html' %}
|
||||
{% endwith %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if remote_realm.registration_deactivated %}
|
||||
<h4>Remote realm registration deactivated 🛑</h4>
|
||||
|
||||
{% if support_data[remote_realm.id].plan_data.current_plan %}
|
||||
<div>
|
||||
{% with %}
|
||||
{% set plan_data = support_data[remote_realm.id].plan_data %}
|
||||
{% set format_discount = format_discount %}
|
||||
{% set dollar_amount = dollar_amount %}
|
||||
{% include 'corporate/support/current_plan_details.html' %}
|
||||
{% endwith %}
|
||||
|
||||
{% with %}
|
||||
{% set current_plan = support_data[remote_realm.id].plan_data.current_plan %}
|
||||
{% set remote_id = remote_realm.id %}
|
||||
{% set remote_type = "remote_realm_id" %}
|
||||
{% include 'corporate/support/current_plan_forms_support.html' %}
|
||||
{% endwith %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if remote_realm.realm_deactivated %}
|
||||
<h4>Remote realm is deactivated on remote server 🛑</h4>
|
||||
|
||||
{% if support_data[remote_realm.id].plan_data.next_plan %}
|
||||
<div>
|
||||
{% with %}
|
||||
{% set plan_data = support_data[remote_realm.id].plan_data %}
|
||||
{% set format_discount = format_discount %}
|
||||
{% set dollar_amount = dollar_amount %}
|
||||
{% set remote_id = remote_realm.id %}
|
||||
{% set remote_type = "remote_realm_id" %}
|
||||
{% include 'corporate/support/next_plan_details.html' %}
|
||||
{% endwith %}
|
||||
</div>
|
||||
{% else %}
|
||||
<div>
|
||||
{% with %}
|
||||
{% set is_current_plan_billable = support_data[remote_realm.id].plan_data.is_current_plan_billable %}
|
||||
{% set remote_id = remote_realm.id %}
|
||||
{% set remote_type = "remote_realm_id" %}
|
||||
{% include 'corporate/support/next_plan_forms_support.html' %}
|
||||
{% endwith %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if remote_realm.plan_type == SPONSORED_PLAN_TYPE %}
|
||||
<h4>On 100% sponsored Zulip Community plan 🎉</h4>
|
||||
{% endif %}
|
||||
{% if support_data[remote_realm.id].sponsorship_data.default_discount %}
|
||||
<h4>Has a discount 💸</h4>
|
||||
{% endif %}
|
||||
<b>Remote realm host:</b> {{ remote_realm.host }}<br />
|
||||
<b>Date created</b>: {{ support_data[remote_realm.id].date_created.strftime('%d %B %Y') }}<br />
|
||||
<b>Org type</b>: {{ get_org_type_display_name(remote_realm.org_type) }}<br />
|
||||
<b>Plan type</b>: {{ get_plan_type_name(remote_realm.plan_type) }}<br />
|
||||
<b>Non-guest user count</b>: {{ support_data[remote_realm.id].user_data.non_guest_user_count }}<br />
|
||||
<b>Guest user count</b>: {{ support_data[remote_realm.id].user_data.guest_user_count }}<br />
|
||||
<br />
|
||||
<b>Mobile user count</b>: {{ support_data[remote_realm.id].mobile_push_data.total_mobile_users }}<br />
|
||||
<b>7-day mobile pushes count</b>: {{ support_data[remote_realm.id].mobile_push_data.mobile_pushes_forwarded }}<br />
|
||||
<b>Last push notification date</b>: {{ support_data[remote_realm.id].mobile_push_data.last_mobile_push_sent }}<br />
|
||||
</div>
|
||||
|
||||
{% if remote_realm.plan_type != SPONSORED_PLAN_TYPE %}
|
||||
{% with %}
|
||||
{% set sponsorship_data = support_data[remote_realm.id].sponsorship_data %}
|
||||
{% set remote_id = remote_realm.id %}
|
||||
{% set remote_type = "remote_realm_id" %}
|
||||
{% set format_discount = format_discount %}
|
||||
{% set has_fixed_price = support_data[remote_realm.id].plan_data.has_fixed_price %}
|
||||
{% include 'corporate/support/sponsorship_forms_support.html' %}
|
||||
{% endwith %}
|
||||
{% endif %}
|
||||
|
||||
{% if support_data[remote_realm.id].plan_data.current_plan %}
|
||||
<div class="remote-realm-information">
|
||||
{% with %}
|
||||
{% set plan_data = support_data[remote_realm.id].plan_data %}
|
||||
{% set format_discount = format_discount %}
|
||||
{% set dollar_amount = dollar_amount %}
|
||||
{% include 'corporate/support/current_plan_details.html' %}
|
||||
{% endwith %}
|
||||
</div>
|
||||
|
||||
{% with %}
|
||||
{% set current_plan = support_data[remote_realm.id].plan_data.current_plan %}
|
||||
{% set remote_id = remote_realm.id %}
|
||||
{% set remote_type = "remote_realm_id" %}
|
||||
{% include 'corporate/support/current_plan_forms_support.html' %}
|
||||
{% endwith %}
|
||||
{% endif %}
|
||||
|
||||
{% if support_data[remote_realm.id].plan_data.next_plan %}
|
||||
<div class="remote-realm-information">
|
||||
{% with %}
|
||||
{% set plan_data = support_data[remote_realm.id].plan_data %}
|
||||
{% set format_discount = format_discount %}
|
||||
{% set dollar_amount = dollar_amount %}
|
||||
{% set remote_id = remote_realm.id %}
|
||||
{% set remote_type = "remote_realm_id" %}
|
||||
{% include 'corporate/support/next_plan_details.html' %}
|
||||
{% endwith %}
|
||||
</div>
|
||||
{% else %}
|
||||
{% with %}
|
||||
{% set is_current_plan_billable = support_data[remote_realm.id].plan_data.is_current_plan_billable %}
|
||||
{% set remote_id = remote_realm.id %}
|
||||
{% set remote_type = "remote_realm_id" %}
|
||||
{% include 'corporate/support/next_plan_forms_support.html' %}
|
||||
{% endwith %}
|
||||
{% endif %}
|
||||
|
|
|
@ -33,102 +33,115 @@
|
|||
|
||||
<div id="remote-server-query-results">
|
||||
{% for remote_server in remote_servers %}
|
||||
<div class="support-query-result">
|
||||
<div class="remote-server-information">
|
||||
<span class="label">remote server</span>
|
||||
<h3>{{ remote_server.hostname }} {{ server_analytics_link(remote_server.id ) }}</h3>
|
||||
{% if remote_server.plan_type == SPONSORED_PLAN_TYPE %}
|
||||
<h4>On 100% sponsored Zulip Community plan 🎉</h4>
|
||||
<div class="remote-support-query-result">
|
||||
<div class="remote-server-section">
|
||||
<div class="remote-server-information">
|
||||
<span class="label">remote server</span>
|
||||
<h3>{{ remote_server.hostname }} {{ server_analytics_link(remote_server.id ) }}</h3>
|
||||
{% if remote_server.plan_type == SPONSORED_PLAN_TYPE %}
|
||||
<h4>On 100% sponsored Zulip Community plan 🎉</h4>
|
||||
{% endif %}
|
||||
{% if remote_servers_support_data[remote_server.id].sponsorship_data.default_discount %}
|
||||
<h4>Has a discount 💸</h4>
|
||||
{% endif %}
|
||||
<b>Contact email</b>: {{ remote_server.contact_email }}
|
||||
<a title="Copy email" class="copy-button" data-copytext="{{ remote_server.contact_email }}">
|
||||
<i class="fa fa-copy"></i>
|
||||
</a>
|
||||
<br />
|
||||
<b>UUID</b>: {{ remote_server.uuid }}<br />
|
||||
<b>Date created</b>: {{ remote_servers_support_data[remote_server.id].date_created.strftime('%d %B %Y') }}<br />
|
||||
<b>Zulip version</b>: {{ remote_server.last_version }}<br />
|
||||
<b>Has remote realms</b>: {{ remote_realms[remote_server.id] != [] }}<br />
|
||||
<br />
|
||||
<b>Max monthly messages</b>: {{ remote_server_to_max_monthly_messages[remote_server.id] }}<br />
|
||||
<b>Last audit log update (UTC)</b>: {{ format_optional_datetime(remote_server.last_audit_log_update, True) }}<br />
|
||||
<b>Plan type</b>: {{ get_plan_type_name(remote_server.plan_type) }}<br />
|
||||
<b>Non-guest user count</b>: {{ remote_servers_support_data[remote_server.id].user_data.non_guest_user_count }}<br />
|
||||
<b>Guest user count</b>: {{ remote_servers_support_data[remote_server.id].user_data.guest_user_count }}<br />
|
||||
<br />
|
||||
<b>Total mobile user count</b>: {{ remote_servers_support_data[remote_server.id].mobile_push_data.total_mobile_users }}<br />
|
||||
{% if remote_realms[remote_server.id] != [] %}
|
||||
<b>Uncategorized mobile user count:</b> {{ remote_servers_support_data[remote_server.id].mobile_push_data.uncategorized_mobile_users }}<br />
|
||||
{% endif %}
|
||||
<b>7-day mobile pushes count</b>: {{ remote_servers_support_data[remote_server.id].mobile_push_data.mobile_pushes_forwarded }}<br />
|
||||
<b>Last push notification date</b>: {{ remote_servers_support_data[remote_server.id].mobile_push_data.last_mobile_push_sent }}<br />
|
||||
</div>
|
||||
|
||||
{% if remote_server.plan_type != SPONSORED_PLAN_TYPE %}
|
||||
<div>
|
||||
{% with %}
|
||||
{% set sponsorship_data = remote_servers_support_data[remote_server.id].sponsorship_data %}
|
||||
{% set remote_id = remote_server.id %}
|
||||
{% set remote_type = "remote_server_id" %}
|
||||
{% set format_discount = format_discount %}
|
||||
{% set has_fixed_price = remote_servers_support_data[remote_server.id].plan_data.has_fixed_price %}
|
||||
{% include 'corporate/support/sponsorship_forms_support.html' %}
|
||||
{% endwith %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if remote_servers_support_data[remote_server.id].sponsorship_data.default_discount %}
|
||||
<h4>Has a discount 💸</h4>
|
||||
|
||||
{% if remote_servers_support_data[remote_server.id].plan_data.current_plan %}
|
||||
<div>
|
||||
{% with %}
|
||||
{% set plan_data = remote_servers_support_data[remote_server.id].plan_data %}
|
||||
{% set format_discount = format_discount %}
|
||||
{% set dollar_amount = dollar_amount %}
|
||||
{% include 'corporate/support/current_plan_details.html' %}
|
||||
{% endwith %}
|
||||
|
||||
{% with %}
|
||||
{% set current_plan = remote_servers_support_data[remote_server.id].plan_data.current_plan %}
|
||||
{% set remote_id = remote_server.id %}
|
||||
{% set remote_type = "remote_server_id" %}
|
||||
{% include 'corporate/support/current_plan_forms_support.html' %}
|
||||
{% endwith %}
|
||||
</div>
|
||||
{% endif %}
|
||||
<b>Contact email</b>: {{ remote_server.contact_email }}
|
||||
<a title="Copy email" class="copy-button" data-copytext="{{ remote_server.contact_email }}">
|
||||
<i class="fa fa-copy"></i>
|
||||
</a>
|
||||
<br />
|
||||
<b>UUID</b>: {{ remote_server.uuid }}<br />
|
||||
<b>Date created</b>: {{ remote_servers_support_data[remote_server.id].date_created.strftime('%d %B %Y') }}<br />
|
||||
<b>Zulip version</b>: {{ remote_server.last_version }}<br />
|
||||
<b>Has remote realms</b>: {{ remote_realms[remote_server.id] != [] }}<br />
|
||||
<br />
|
||||
<b>Max monthly messages</b>: {{ remote_server_to_max_monthly_messages[remote_server.id] }}<br />
|
||||
<b>Last audit log update (UTC)</b>: {{ format_optional_datetime(remote_server.last_audit_log_update, True) }}<br />
|
||||
<b>Plan type</b>: {{ get_plan_type_name(remote_server.plan_type) }}<br />
|
||||
<b>Non-guest user count</b>: {{ remote_servers_support_data[remote_server.id].user_data.non_guest_user_count }}<br />
|
||||
<b>Guest user count</b>: {{ remote_servers_support_data[remote_server.id].user_data.guest_user_count }}<br />
|
||||
<br />
|
||||
<b>Total mobile user count</b>: {{ remote_servers_support_data[remote_server.id].mobile_push_data.total_mobile_users }}<br />
|
||||
{% if remote_realms[remote_server.id] != [] %}
|
||||
<b>Uncategorized mobile user count:</b> {{ remote_servers_support_data[remote_server.id].mobile_push_data.uncategorized_mobile_users }}<br />
|
||||
|
||||
{% if remote_servers_support_data[remote_server.id].plan_data.next_plan %}
|
||||
<div>
|
||||
{% with %}
|
||||
{% set plan_data = remote_servers_support_data[remote_server.id].plan_data %}
|
||||
{% set format_discount = format_discount %}
|
||||
{% set dollar_amount = dollar_amount %}
|
||||
{% set remote_id = remote_server.id %}
|
||||
{% set remote_type = "remote_server_id" %}
|
||||
{% include 'corporate/support/next_plan_details.html' %}
|
||||
{% endwith %}
|
||||
</div>
|
||||
{% else %}
|
||||
<div>
|
||||
{% with %}
|
||||
{% set is_current_plan_billable = remote_servers_support_data[remote_server.id].plan_data.is_current_plan_billable %}
|
||||
{% set remote_id = remote_server.id %}
|
||||
{% set remote_type = "remote_server_id" %}
|
||||
{% include 'corporate/support/next_plan_forms_support.html' %}
|
||||
{% endwith %}
|
||||
</div>
|
||||
{% endif %}
|
||||
<b>7-day mobile pushes count</b>: {{ remote_servers_support_data[remote_server.id].mobile_push_data.mobile_pushes_forwarded }}<br />
|
||||
<b>Last push notification date</b>: {{ remote_servers_support_data[remote_server.id].mobile_push_data.last_mobile_push_sent }}<br />
|
||||
</div>
|
||||
|
||||
{% if remote_server.plan_type != SPONSORED_PLAN_TYPE %}
|
||||
{% with %}
|
||||
{% set sponsorship_data = remote_servers_support_data[remote_server.id].sponsorship_data %}
|
||||
{% set remote_id = remote_server.id %}
|
||||
{% set remote_type = "remote_server_id" %}
|
||||
{% set format_discount = format_discount %}
|
||||
{% set has_fixed_price = remote_servers_support_data[remote_server.id].plan_data.has_fixed_price %}
|
||||
{% include 'corporate/support/sponsorship_forms_support.html' %}
|
||||
{% endwith %}
|
||||
{% endif %}
|
||||
|
||||
{% if remote_servers_support_data[remote_server.id].plan_data.current_plan %}
|
||||
<div class="remote-server-information">
|
||||
{% with %}
|
||||
{% set plan_data = remote_servers_support_data[remote_server.id].plan_data %}
|
||||
{% set format_discount = format_discount %}
|
||||
{% set dollar_amount = dollar_amount %}
|
||||
{% include 'corporate/support/current_plan_details.html' %}
|
||||
{% endwith %}
|
||||
<div class="remote-realms-section">
|
||||
{% if remote_realms[remote_server.id] == [] %}
|
||||
<div>
|
||||
<span class="label">remote realm</span>
|
||||
<h3>None</h3>
|
||||
</div>
|
||||
{% else %}
|
||||
{% for remote_realm in remote_realms[remote_server.id] %}
|
||||
<div>
|
||||
{% with %}
|
||||
{% set support_data = remote_realms_support_data %}
|
||||
{% set get_plan_type_name = get_plan_type_name %}
|
||||
{% set format_discount = format_discount %}
|
||||
{% set format_optional_datetime = format_optional_datetime %}
|
||||
{% set dollar_amount = dollar_amount %}
|
||||
{% include "corporate/support/remote_realm_details.html" %}
|
||||
{% endwith %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% with %}
|
||||
{% set current_plan = remote_servers_support_data[remote_server.id].plan_data.current_plan %}
|
||||
{% set remote_id = remote_server.id %}
|
||||
{% set remote_type = "remote_server_id" %}
|
||||
{% include 'corporate/support/current_plan_forms_support.html' %}
|
||||
{% endwith %}
|
||||
{% endif %}
|
||||
|
||||
{% if remote_servers_support_data[remote_server.id].plan_data.next_plan %}
|
||||
<div class="remote-server-information">
|
||||
{% with %}
|
||||
{% set plan_data = remote_servers_support_data[remote_server.id].plan_data %}
|
||||
{% set format_discount = format_discount %}
|
||||
{% set dollar_amount = dollar_amount %}
|
||||
{% set remote_id = remote_server.id %}
|
||||
{% set remote_type = "remote_server_id" %}
|
||||
{% include 'corporate/support/next_plan_details.html' %}
|
||||
{% endwith %}
|
||||
</div>
|
||||
{% else %}
|
||||
{% with %}
|
||||
{% set is_current_plan_billable = remote_servers_support_data[remote_server.id].plan_data.is_current_plan_billable %}
|
||||
{% set remote_id = remote_server.id %}
|
||||
{% set remote_type = "remote_server_id" %}
|
||||
{% include 'corporate/support/next_plan_forms_support.html' %}
|
||||
{% endwith %}
|
||||
{% endif %}
|
||||
|
||||
{% for remote_realm in remote_realms[remote_server.id] %}
|
||||
<hr />
|
||||
<div>
|
||||
{% with %}
|
||||
{% set support_data = remote_realms_support_data %}
|
||||
{% set get_plan_type_name = get_plan_type_name %}
|
||||
{% set format_discount = format_discount %}
|
||||
{% set format_optional_datetime = format_optional_datetime %}
|
||||
{% set dollar_amount = dollar_amount %}
|
||||
{% include "corporate/support/remote_realm_details.html" %}
|
||||
{% endwith %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
|
|
@ -108,10 +108,10 @@ tr.admin td:first-child {
|
|||
color: hsl(0deg 100% 39%);
|
||||
}
|
||||
|
||||
.support-query-result {
|
||||
background-color: hsl(210deg 100% 97%);
|
||||
padding-left: 15px;
|
||||
padding-top: 14px;
|
||||
.support-query-result,
|
||||
.remote-support-query-result {
|
||||
background-color: hsl(60deg 12% 94%);
|
||||
padding: 10px;
|
||||
border-radius: 7px;
|
||||
box-shadow: 0 10px 7px -6px hsl(0deg 2% 45%);
|
||||
margin-bottom: 10px;
|
||||
|
@ -324,3 +324,35 @@ tr.admin td:first-child {
|
|||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.remote-support-query-result {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
grid-auto-rows: minmax(100px, auto);
|
||||
grid-template-areas: "server realms";
|
||||
}
|
||||
|
||||
.remote-server-section {
|
||||
grid-area: server;
|
||||
}
|
||||
|
||||
.remote-realms-section {
|
||||
grid-area: realms;
|
||||
}
|
||||
|
||||
.remote-realms-section,
|
||||
.remote-server-section {
|
||||
border: 2px solid hsl(330deg 3% 40%);
|
||||
border-radius: 4px;
|
||||
padding: 10px;
|
||||
}
|
||||
.remote-server-section {
|
||||
background-color: hsl(60deg 11% 86%);
|
||||
}
|
||||
.remote-realms-section {
|
||||
background-color: hsl(60deg 12% 90%);
|
||||
}
|
||||
|
||||
.remote-realm-container {
|
||||
padding-bottom: 25px;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue