mirror of
https://github.com/zaphar/Heracles.git
synced 2025-07-23 04:29:48 -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 {
|
||||
html! {
|
||||
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" { }
|
||||
}
|
||||
}
|
||||
|
@ -55,7 +55,7 @@ function getCssVariableValue(variableName) {
|
||||
*
|
||||
* @extends HTMLElement
|
||||
*/
|
||||
class GraphPlot extends HTMLElement {
|
||||
export class GraphPlot extends HTMLElement {
|
||||
/** @type {?string} */
|
||||
#uri;
|
||||
/** @type {?number} */
|
||||
@ -457,7 +457,7 @@ class GraphPlot extends HTMLElement {
|
||||
GraphPlot.registerElement();
|
||||
|
||||
/** Custom Element for selecting a timespan for the dashboard. */
|
||||
class SpanSelector extends HTMLElement {
|
||||
export class SpanSelector extends HTMLElement {
|
||||
/** @type {HTMLElement} */
|
||||
#targetNode = null;
|
||||
/** @type {HTMLInputElement} */
|
||||
@ -518,3 +518,4 @@ class SpanSelector extends HTMLElement {
|
||||
}
|
||||
|
||||
SpanSelector.registerElement();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user