mirror of https://github.com/zulip/zulip.git
stats: Fix types for upload_space_used, guest_users parameters.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
parent
b5702422ed
commit
a68c96231f
|
@ -2,8 +2,8 @@ import $ from "jquery";
|
||||||
|
|
||||||
export const page_params: {
|
export const page_params: {
|
||||||
data_url_suffix: string;
|
data_url_suffix: string;
|
||||||
guest_users: number;
|
guest_users: number | null;
|
||||||
upload_space_used: number;
|
upload_space_used: number | null;
|
||||||
} = $("#page-params").data("params");
|
} = $("#page-params").data("params");
|
||||||
|
|
||||||
if (!page_params) {
|
if (!page_params) {
|
||||||
|
|
|
@ -300,7 +300,7 @@ function get_thirty_days_messages_sent(data: DataByUserType<number[]>): void {
|
||||||
$("#id_thirty_days_messages_sent").closest("summary-stats").show();
|
$("#id_thirty_days_messages_sent").closest("summary-stats").show();
|
||||||
}
|
}
|
||||||
|
|
||||||
function set_storage_space_used_statistic(upload_space_used: number): void {
|
function set_storage_space_used_statistic(upload_space_used: number | null): void {
|
||||||
let space_used = "N/A";
|
let space_used = "N/A";
|
||||||
if (upload_space_used !== null) {
|
if (upload_space_used !== null) {
|
||||||
space_used = bytes_to_size(upload_space_used, true);
|
space_used = bytes_to_size(upload_space_used, true);
|
||||||
|
@ -310,7 +310,7 @@ function set_storage_space_used_statistic(upload_space_used: number): void {
|
||||||
$("#id_storage_space_used").closest("summary-stats").show();
|
$("#id_storage_space_used").closest("summary-stats").show();
|
||||||
}
|
}
|
||||||
|
|
||||||
function set_guest_users_statistic(guest_users: number): void {
|
function set_guest_users_statistic(guest_users: number | null): void {
|
||||||
let guest_users_string = "N/A";
|
let guest_users_string = "N/A";
|
||||||
if (guest_users !== null) {
|
if (guest_users !== null) {
|
||||||
guest_users_string = guest_users.toLocaleString();
|
guest_users_string = guest_users.toLocaleString();
|
||||||
|
|
Loading…
Reference in New Issue