mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 05:53:43 +00:00
page_params: Add web/src/stats/page_params.ts for stat module
`stat.js` has its page params different from all other modules.
This commit is contained in:
11
web/src/stats/page_params.ts
Normal file
11
web/src/stats/page_params.ts
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
import $ from "jquery";
|
||||||
|
|
||||||
|
export const page_params: {
|
||||||
|
data_url_suffix: string;
|
||||||
|
guest_users: number;
|
||||||
|
upload_space_used: number;
|
||||||
|
} = $("#page-params").data("params");
|
||||||
|
|
||||||
|
if (!page_params) {
|
||||||
|
throw new Error("Missing page-params");
|
||||||
|
}
|
||||||
@@ -5,7 +5,8 @@ import PlotlyPie from "plotly.js/lib/pie";
|
|||||||
import tippy from "tippy.js";
|
import tippy from "tippy.js";
|
||||||
|
|
||||||
import {$t, $t_html} from "../i18n";
|
import {$t, $t_html} from "../i18n";
|
||||||
import {page_params} from "../page_params";
|
|
||||||
|
import {page_params} from "./page_params";
|
||||||
|
|
||||||
Plotly.register([PlotlyBar, PlotlyPie]);
|
Plotly.register([PlotlyBar, PlotlyPie]);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user