-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.html
More file actions
148 lines (124 loc) · 5.19 KB
/
index.html
File metadata and controls
148 lines (124 loc) · 5.19 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
@{layout('')}
@{title(config.name)}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="robots" content="all,follow" />
<meta name="format-detection" content="telephone=no" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-title" content="QWS" />
<link rel="apple-touch-icon" href="/icon.png" />
<link href="https://cdn.componentator.com/spa.min@19.css" rel="stylesheet" />
<script src="https://cdn.componentator.com/spa.min@19.js"></script>
<script src="/js/3d-force-graph.min@1.73.2.js"></script>
@{if CONF.color}<style>:root{--color:@{CONF.color};}</style>@{fi}
@{import('meta', 'head', 'default.css + ui.css', 'favicon.ico')}
</head>
<body>
<ui-component name="autodarkmode"></ui-component>
<ui-component name="errorhandler"></ui-component>
<ui-component name="loading" config="style:2" class="hidden"></ui-component>
<ui-component name="locale" config="language:@{user.language}"></ui-component>
<ui-component name="exec"></ui-component>
<ui-component name="title" path="common.title"></ui-component>
<ui-component name="shortcuts"></ui-component>
<ui-component name="directory" config="placeholder:@(Search)"></ui-component>
<ui-component name="LAZY timepicker"></ui-component>
<ui-component name="LAZY colorpicker"></ui-component>
<ui-component name="LAZY approve"></ui-component>
<ui-component name="LAZY notify" config="position:bottom right"></ui-component>
<ui-component name="LAZY icons"></ui-component>
<ui-component name="LAZY menu" config="style:2"></ui-component>
<ui-component name="LAZY clipboard"></ui-component>
<div><ui-component name="page" path="common.page" config="if:graph;url:/pages/index.html;reload:?/reload" class="invisible hidden"></ui-component></div>
<ui-component name="importer" path="common.form" config="if:forminfrastructures;url:/forms/infrastructures.html"></ui-component>
<ui-component name="importer" path="common.form2" config="if:forminfrastructure;url:/forms/infrastructure.html"></ui-component>
<ui-component name="importer" path="common.form" config="if:formvariables;url:/forms/variables.html"></ui-component>
<ui-component name="importer" path="common.form2" config="if:formvariable;url:/forms/variable.html"></ui-component>
<ui-component name="importer" path="common.form" config="if:formcatalogs;url:/forms/catalogs.html"></ui-component>
<ui-component name="importer" path="common.form2" config="if:formcatalog;url:/forms/catalog.html"></ui-component>
<ui-component name="importer" path="common.form2" config="if:formcatalogfork;url:/forms/catalogfork.html"></ui-component>
<ui-component name="importer" path="common.form" config="if:formsoftwares;url:/forms/softwares.html"></ui-component>
<ui-component name="importer" path="common.form2" config="if:formsoftware;url:/forms/software.html"></ui-component>
<ui-component name="importer" path="common.form" config="if:formusers;url:/forms/users.html"></ui-component>
<ui-component name="importer" path="common.form2" config="if:formuser;url:/forms/user.html"></ui-component>
<ui-component name="importer" path="common.form" config="if:formprofile;url:/forms/profile.html"></ui-component>
<ui-component name="importer" path="common.form" config="if:formpassword;url:/forms/password.html"></ui-component>
<ui-component name="importer" path="common.form" config="if:formsettings;url:/forms/settings.html"></ui-component>
@{json(model, 'pluginsdata')}
<script>
ENVIRONMENT('ui');
var user = EMPTYOBJECT;
var common = {};
DEF.color = '#4285F4';
DEF.api = '/api/';
DEF.versionhtml = '@{CONF.version}';
DEF.languagehtml = '@{user.language}';
common.clientid = GUID(5) + Date.now().toString(36);
common.plugins = PARSE('#pluginsdata');
common.name = document.title;
NAV.clientside('.jR');
(function() {
ADD('websocket', { url: '/api/?id=' + common.clientid });
})();
PLUGIN('common', function(exports) {
var model = exports.model;
exports.version = function() {
exports.tapi('version', function(response) {
if (response.value !== DEF.versionhtml)
location.reload();
});
};
exports.on('service', function() {
exports.version();
});
});
ROUTE('/', function() {
SET('common.page', 'graph');
}, 'init');
SETTER(true, 'shortcuts/register', 'esc', function(e) {
if (common.form3) {
NULL('common.form3');
return;
}
if (common.form2) {
NULL('common.form2');
return;
}
if (common.form === 'formdetail') {
W.focus();
EXEC('formdetail/hide');
NULL('common.form', 200);
} else
NULL('common.form');
});
ON('message', function(msg) {
switch (msg.TYPE) {
case 'setter':
SETTER(msg.name, msg.value);
return;
case 'reload':
location.reload(true);
return;
case 'sync':
common.clients = msg.data;
UPD('common.clients');
break;
case 'close':
delete common.clients[msg.clientid];
UPD('common.clients');
break;
}
if (msg.TYPE === 'refresh') {
if (msg.markdown) {
if (common.form === 'formdetail' && msg.id === W.formdetail.id)
SET('formdetail.markdown', msg.markdown);
return;
}
}
});
</script>
</body>
</html>