-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.html
283 lines (242 loc) · 10 KB
/
index.html
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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<script src="vis/vis.js"></script>
<link href="vis/vis-timeline-graph2d.min.css" rel="stylesheet" type="text/css" />
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon"/>
<script src="lib/dbreportapp.js"></script>
<script src="lib/dbreport.js"></script>
<script src="lib/dbanalyzer.js"></script>
<script src="lib/dbmodel.js"></script>
<script src="lib/dbtools.js"></script>
<script src="lib/livecount.js"></script>
<!-- https://unpkg.com/[email protected]/lib/browser/neo4j-web.min.js -->
<!--<script src="https://unpkg.com/[email protected]/lib/browser/neo4j-web.min.js"></script>-->
<script src="lib/neo4j-web.min.js"></script>
<script src="lib/NeoAccessor.js"></script>
<link rel="stylesheet" type="text/css" href="semanticui/semantic.css">
<script src="jquery/jquery-3.1.1.min.js"></script>
<script src="semanticui/semantic.js"></script>
<link href="c3/c3.min.css" rel="stylesheet">
<!-- Load d3.js and c3.js -->
<script src="d3/d3.min.js" charset="utf-8"></script>
<script src="c3/c3.min.js"></script>
<title>Neo4j Database Analyzer</title>
<!-- Report formatting styles-->
<style type="text/css">
.tooltip { /* hide and position tooltip */
top:30px;
background-color:lemonchiffon;
color:black;
border-radius:5px;
padding-left: 5px;
padding-right: 5px;
opacity:0;
position:absolute;
-webkit-transition: opacity 0.5s;
-moz-transition: opacity 0.5s;
-ms-transition: opacity 0.5s;
-o-transition: opacity 0.5s;
transition: opacity 0.5s;
}
.tooltipth { /* hide and position tooltip */
top:-60px;
background-color:lemonchiffon;
color:black;
border-radius:5px;
padding-left: 5px;
padding-right: 5px;
opacity:0;
position:absolute;
-webkit-transition: opacity 0.5s;
-moz-transition: opacity 0.5s;
-ms-transition: opacity 0.5s;
-o-transition: opacity 0.5s;
transition: opacity 0.5s;
}
.hover:hover .tooltip { /* display tooltip on hover */
opacity:1;
}
.hover:hover .tooltipth { /* display tooltip on hover */
opacity:1;
}
:focus { /* get rid if browser behaviour blue line around select element for instance the network canvas */
outline: 0;
}
.ui.fullscreen.modal {/* Fix the center alignment of fullscreen modal */
left: 2.5% !important;
}
</style>
</head>
<body>
<!-- Main Tab -->
<div class="container" style="max-width: 99%; margin: 1em auto;">
<div id="appContainer" style="alignment: left"></div>
<div class="item" style="font-size: .7em">Neo4j Database Analyzer version 1.0.4 <a href="https://github.com/kvegter/dbreportapp/blob/master/README.md" target="_new" class="ui mini blue circular label">i</a></div>
</div>
<!-- Modal Containers -->
<!-- Generic Modal Container -->
<div class="ui modal" id="simpleModal">
<div class="header" id="modalHeader"></div>
<div class="content" id="modalContent"></div>
<div class="actions">
<div class="ui approve button">Close</div>
</div>
</div>
<!-- Error Warning modal the actions will be dynamic here before use set the appropriate action first-->
<div class="ui modal" id="errorModal">
<div class="header" id="errorHeader"></div>
<div class="content" id="errorContent"></div>
<div class="actions" id="errorActions">
<div class="ui approve button">Close</div>
</div>
</div>
<!-- Yes No Modal Containter -->
<div class="ui modal" id="simpleYesNoModal">
<div class="header" id="simpleYesNoModalHeader"></div>
<div class="content" id="simpleYesNodModalContent"></div>
<div class="actions">
<div class="ui red approve inverted button" id="simpleYesNoModalOk">Ok</div>
<div class="ui green cancel inverted button">Cancel</div>
</div>
</div>
<!-- Connect to Graph Form used by NeoAccessor -->
<div class="ui tiny modal" id="connectModal" style="margin-top: 0px;">
<div class="header">Connect to a graph</div>
<div class="content">
<div style="display: block; width: 320px; margin-left: auto; margin-right: auto;">
<img class="ui small image" alt="Neo4j Graph Database" src="neo4j-icon-color.png" style="display: inline;">
<img class="ui small image" alt="Neo4j db analyzer" src="dbcountreport_icon.png" style="display: inline;">
</div>
<form class="ui form" onkeydown="nac.onFormChange();">
<div class="required field"><label>Host</label>
<div class="field">
<div class="ui input">
<input id="f_host" placeholder="Host" type="text" value="">
</div>
</div>
<div class="ui warning message"></div>
</div>
<div class="required field"><label>Port</label>
<div class="field">
<div class="ui input">
<input id="f_port" placeholder="Port" required="" type="text" value="7687">
</div>
</div>
<div class="ui warning message"></div>
</div>
<!-- <div class="required field"><label>Scheme</label>
<div class="field">
<div class="ui input">
<input id="f_scheme" placeholder="Scheme" required="" type="text" value="neo4j">
</div>
</div>
<div class="ui warning message"></div>
</div>
-->
<div class="field"><label>database name (neo4j version 4+) </label>
<div class="field">
<div class="ui input">
<input id="f_dbname" placeholder="dbname version 4 and higher" required="" type="text" value="">
</div>
</div>
</div>
<div class="required field"><label>Username</label>
<div class="required field">
<div class="ui input">
<input id="f_username" placeholder="Username" required="" type="text" value="neo4j">
</div>
</div>
<div class="ui warning message"></div>
</div>
<div class="required field"><label>Password</label>
<div class="field">
<div class="ui input">
<input id="f_password" placeholder="Password" type="password" value="">
</div>
</div>
<div class="ui warning message"></div>
</div>
<div class="field">
<div class="ui checkbox">
<input name="encrypted" id="f_cbencrypted" tabindex="0" type="checkbox" value=""><label>Encrypt Connection</label>
</div>
</div>
</form>
</div>
<div class="actions">
<button class="ui icon positive disabled right labeled button" id="connectButton" role="button" tabindex="-1" onclick="nac.processConnectForm()"><i aria-hidden="false" class="right arrow icon"></i>Connect</button>
</div>
</div>
<script>
var dbreportApp = new DBReportApp(window.neo4jDesktopApi);
var nac = new NeoAccessor(window.neo4jDesktopApi, dbreportApp);
// var lcm;
// var dbmodel;
// var livecount;
// activating tab menu's
// $('.menu .item')
// .tab({'onLoad':function(e){if (e.startsWith( "modelwalker")) { alert(e); } }})
// ;
// // activating accordion
// $('.ui.accordion')
// .accordion()
// ;
async function initApp() {
// lcm = new LabelColorMap();
await nac.init();
// document.title = "Neo4j Database Analyzer 1.0.1";
// if (window.neo4jDesktopApi) {
// dbreport = new DBReport(window.neo4jDesktopApi);
// let dummy = await dbreport.init();
// if (dbreport.graphdb) {
// document.title = "Neo4j Database Analyzer for database server: " + dbreport.graphdb.name;
// // initialize the DBModel
// dbreport._initModules(window.neo4jDesktopApi);
// //dbtools = new DBTools();
// } else {
// document.getElementById("appSummary").innerHTML = "<div class='ui warning message'><div class='header'>WARNING</div><p>No active Database, start a database in the Neo4j Desktop first</p></div>";
// }
// } else {
// // dbreport = new DBReport();
// // let dummy = await dbreport.init();
// dbreportApp.init();
// }
}
initApp();
</script>
<style>
/*
needed for wrapping tab's when you have a lot of databases.
*/
#qj-tabs {
display: flex !important; /* Will not work unless defined as display: flex */
flex-direction: row !important;
flex-wrap: wrap !important;
}
#qj-tabs .item {
border-radius: 5px 5px 0px 0px !important;
border-top-color: lightgray !important;
border-top-style: solid !important;
border-top-width: 1px !important;
border-right-color: lightgray !important;
border-right-style: solid !important;
border-right-width: 1px !important;
border-left-color: lightgray !important;
border-left-style: solid !important;
border-left-width: 1px !important;
border-image-source: initial !important;
border-image-slice: initial !important;
border-image-width: initial !important;
border-image-outset: initial !important;
border-image-repeat: initial !important;
border-bottom: 0px;
margin: 0 2px 2px 0 !important;
}
#qj-tabs .active.item {
background-color: #e5ecfc;
}
</style>
</body>
</html>