mirror of
https://github.com/zaphar/Heracles.git
synced 2025-07-23 12:39:50 -04:00
Turn our lib into an es6 module
This commit is contained in:
parent
fb48c6900c
commit
17e6ae81a0
@ -191,7 +191,7 @@ pub fn mk_ui_routes(config: Arc<Vec<Dashboard>>) -> Router<Config> {
|
|||||||
fn graph_lib_prelude() -> Markup {
|
fn graph_lib_prelude() -> Markup {
|
||||||
html! {
|
html! {
|
||||||
script src="/js/plotly.js" { }
|
script src="/js/plotly.js" { }
|
||||||
script defer src="/js/lib.js" { }
|
script type="module" defer src="/js/lib.js" { }
|
||||||
link rel="stylesheet" href="/static/site.css" { }
|
link rel="stylesheet" href="/static/site.css" { }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -55,7 +55,7 @@ function getCssVariableValue(variableName) {
|
|||||||
*
|
*
|
||||||
* @extends HTMLElement
|
* @extends HTMLElement
|
||||||
*/
|
*/
|
||||||
class GraphPlot extends HTMLElement {
|
export class GraphPlot extends HTMLElement {
|
||||||
/** @type {?string} */
|
/** @type {?string} */
|
||||||
#uri;
|
#uri;
|
||||||
/** @type {?number} */
|
/** @type {?number} */
|
||||||
@ -457,7 +457,7 @@ class GraphPlot extends HTMLElement {
|
|||||||
GraphPlot.registerElement();
|
GraphPlot.registerElement();
|
||||||
|
|
||||||
/** Custom Element for selecting a timespan for the dashboard. */
|
/** Custom Element for selecting a timespan for the dashboard. */
|
||||||
class SpanSelector extends HTMLElement {
|
export class SpanSelector extends HTMLElement {
|
||||||
/** @type {HTMLElement} */
|
/** @type {HTMLElement} */
|
||||||
#targetNode = null;
|
#targetNode = null;
|
||||||
/** @type {HTMLInputElement} */
|
/** @type {HTMLInputElement} */
|
||||||
@ -518,3 +518,4 @@ class SpanSelector extends HTMLElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
SpanSelector.registerElement();
|
SpanSelector.registerElement();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user