2022-02-26 21:58:51 +00:00
|
|
|
"use strict";
|
|
|
|
|
2022-02-24 03:08:21 +00:00
|
|
|
import SystemQueryClient from './js/SystemQueryClient.mjs';
|
2022-02-22 03:01:39 +00:00
|
|
|
import make_router from './js/routes_client.mjs';
|
|
|
|
|
2022-02-26 21:58:51 +00:00
|
|
|
import TableView from './js/TableView.mjs';
|
|
|
|
|
2022-02-24 03:08:21 +00:00
|
|
|
window.addEventListener("load", async (_event) => {
|
2022-02-26 21:58:51 +00:00
|
|
|
const el_version = document.querySelector(".version");
|
|
|
|
const el_table = document.querySelector("main");
|
|
|
|
|
2022-02-24 03:08:21 +00:00
|
|
|
globalThis.sysquery = new SystemQueryClient();
|
2022-02-22 03:01:39 +00:00
|
|
|
globalThis.sysquery_router = make_router();
|
2022-02-26 21:58:51 +00:00
|
|
|
globalThis.sysui = {
|
|
|
|
tableview: new TableView(el_table)
|
|
|
|
}
|
2022-02-22 03:01:39 +00:00
|
|
|
|
2022-02-24 03:08:21 +00:00
|
|
|
|
|
|
|
|
|
|
|
const status = await globalThis.sysquery.status();
|
|
|
|
|
|
|
|
el_version.replaceChildren(
|
|
|
|
document.createTextNode(status.version)
|
|
|
|
);
|
|
|
|
|
|
|
|
|
2022-02-22 03:01:39 +00:00
|
|
|
globalThis.sysquery_router.navigate_current_hash();
|
|
|
|
});
|