-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathindex.js
More file actions
56 lines (49 loc) · 1.84 KB
/
index.js
File metadata and controls
56 lines (49 loc) · 1.84 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
// Include all CSS here
import "./styles/loader.css";
import "./js/webix/webix.css";
import "./js/webix/components/gantt/gantt.min.css";
import "./js/webix/components/reports/reports.min.css";
import "./js/webix/components/query/query.min.css";
import "./js/webix/components/scheduler/scheduler.min.css";
import "./js/webix/components/querybuilder/querybuilder.min.css";
import "./js/webix/components/hint/hint.css";
import "./styles/ui.css";
// NOTE: keep Font Awesome AFTER webix css so webix wont
// override our icon stylesimport "./styles/font-awesome.min.css";
import "./styles/font-awesome.min.css";
import performance from "./utils/performance";
performance.init();
import Bootstrap from "./init/Bootstrap.js";
// Bootstrap is responsible for initializing the platform.
// Import webix dynamically so we load it before we load other files that need it
const webixLoading = import(
/* webpackChunkName: "webix" */
/* webpackPreload: true */
"./js/webix/webix.min.js"
).then(async (webix) => {
// Make sure webix is global object
window.webix = webix;
// Now load additional webix resources
import(
/* webpackChunkName: "webix.resources" */
/* webpackPreload: true */
"./js/webix/webixResources"
);
});
// __AB_preload should be created by our /config/preload script that gets
// loaded on the initial page load.
Promise.all([window.__AB_preload, window.__AB_socketReady]).then(() => {
delete window.__AB_preload_resolve;
delete window.__AB_socketReady_resolve;
Bootstrap.init(webixLoading).catch((err) => {
// This is a known error that has already been handled.
if (err.code == "ENODEFS") return;
var errorMSG = err.toString();
Bootstrap.alert({
type: "alert-error",
title: "Error initializing Portal:",
text: errorMSG,
});
Bootstrap.error(err);
});
});