mirror of https://github.com/zulip/zulip.git
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:
parent
ab897fa3b9
commit
640de3ad29
|
@ -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]);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue