sqlui 0.1.67 → 0.1.68
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.release-version +1 -1
- data/app/server.rb +1 -1
- data/app/views/sqlui.erb +73 -0
- data/client/resources/help.css +30 -0
- data/client/resources/sqlui.css +24 -21
- data/client/resources/sqlui.js +889 -500
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6a167a65032b5a64b37d6e25c6589669151951d75f3964be73d2f8e6ba9f0833
|
4
|
+
data.tar.gz: 0a25e8597d5955c1bd6c04cf31834d8666672662a49a646ee03a3d55d1e268bf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 95d82ede6b694eef5cab00c48aae318dbf9e55ee0a20a1f41a40abc8013a4ea245cf0b530160da10e620e572e60ac1e696bb360d4fd2037a870b2ecf250e1ac4
|
7
|
+
data.tar.gz: d1b720a016ab0ed8716164aefc45b2a9db9c0aac876eda2f9210fda6184d739b6b7b3efd50a01e2d11bcf299906522a17994ffa90ea124c72ac1ca38dd536201
|
data/.release-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.68
|
data/app/server.rb
CHANGED
@@ -255,7 +255,7 @@ class Server < Sinatra::Base
|
|
255
255
|
end
|
256
256
|
end
|
257
257
|
|
258
|
-
get(/#{Regexp.escape("#{config.base_url_path}/#{database.url_path}/")}(query|graph|structure|
|
258
|
+
get(/#{Regexp.escape("#{config.base_url_path}/#{database.url_path}/")}(query|graph|saved|structure|help)/) do
|
259
259
|
status 200
|
260
260
|
headers 'Cache-Control' => 'no-cache'
|
261
261
|
client_config = config.airbrake[:client] || {}
|
data/app/views/sqlui.erb
CHANGED
@@ -22,6 +22,7 @@
|
|
22
22
|
<script type="text/javascript" src="<%= resource_path_map['sqlui.js'] %>"></script>
|
23
23
|
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
|
24
24
|
<link rel="stylesheet" href="<%= resource_path_map['sqlui.css'] %>">
|
25
|
+
<link rel="stylesheet" href="<%= resource_path_map['help.css'] %>">
|
25
26
|
</head>
|
26
27
|
|
27
28
|
<body>
|
@@ -36,6 +37,7 @@
|
|
36
37
|
<a id="graph-tab-button" class="tab-button">Graph</a>
|
37
38
|
<a id="saved-tab-button" class="tab-button">Saved</a>
|
38
39
|
<a id="structure-tab-button" class="tab-button">Structure</a>
|
40
|
+
<a id="help-tab-button" class="tab-button">Help</a>
|
39
41
|
</div>
|
40
42
|
|
41
43
|
<div id="query-box" class="tab-content-element graph-element query-element" style="display: none;">
|
@@ -103,6 +105,77 @@
|
|
103
105
|
</div>
|
104
106
|
</div>
|
105
107
|
|
108
|
+
<div id="help-box" class="tab-content-element" style="display: none;">
|
109
|
+
<h2>Keyboard Shortcuts</h2>
|
110
|
+
<table id="keyboard-shortcuts">
|
111
|
+
<tbody>
|
112
|
+
<tr class="keyboard-shortcut-section"><td colspan="3">App Shortcuts</td></tr>
|
113
|
+
<tr class="keyboard-shortcut-header"><td> Mac</td><td>Windows</td><td>Action</td></tr>
|
114
|
+
<tr><td>Escape</td><td>Escape</td><td>Focus editor, Close popup</td></tr>
|
115
|
+
|
116
|
+
<tr class="keyboard-shortcut-section"><td colspan="3">Editor Submit Shortcuts</td></tr>
|
117
|
+
<tr class="keyboard-shortcut-header"><td> Mac</td><td>Windows</td><td>Action</td></tr>
|
118
|
+
<tr><td>Cmd+Enter</td><td>Ctrl+Enter</td><td>Execute query at cursor / selection</td></tr>
|
119
|
+
<tr><td>Cmd+Shift+Enter</td><td>Ctrl+Shift+Enter</td><td>Execute entire editor</td></tr>
|
120
|
+
|
121
|
+
<tr class="keyboard-shortcut-section"><td colspan="3">Editor Standard Shortcuts</td></tr>
|
122
|
+
<tr class="keyboard-shortcut-header"><td> Mac</td><td>Windows</td><td>Action</td></tr>
|
123
|
+
<tr><td>ArrowLeft</td><td>ArrowLeft</td><td>Move cursor left one character</td></tr>
|
124
|
+
<tr><td>ArrowRight</td><td>ArrowRight</td><td>Move cursor right one character</td></tr>
|
125
|
+
<tr><td>Alt+ArrowLeft</td><td>Ctrl+ArrowLeft</td><td>Move cursor one group left</td></tr>
|
126
|
+
<tr><td>Alt+ArrowRight</td><td>Ctrl+ArrowRight</td><td>Move cursor one group right</td></tr>
|
127
|
+
<tr><td>Cmd+ArrowLeft</td><td></td><td>Move cursor to start of line</td></tr>
|
128
|
+
<tr><td>Cmd+ArrowRight</td><td></td><td>Move cursor to end of line</td></tr>
|
129
|
+
<tr><td>ArrowUp</td><td>ArrowUp</td><td>Move cursor up one line</td></tr>
|
130
|
+
<tr><td>ArrowDown</td><td>ArrowDown</td><td>Move cursor down one line</td></tr>
|
131
|
+
<tr><td>Cmd+ArrowUp</td><td></td><td>Move cursor to start of document</td></tr>
|
132
|
+
<tr><td>Cmd+ArrowDown</td><td></td><td>Move cursor to end of document</td></tr>
|
133
|
+
<tr><td>Cmd+End</td><td>Ctrl+End</td><td>Move cursor to start of document</td></tr>
|
134
|
+
<tr><td>Cmd+Home</td><td>Ctrl+Home</td><td>Move cursor to end of document</td></tr>
|
135
|
+
<tr><td>PageUp</td><td>PageUp</td><td>Move cursor one page up</td></tr>
|
136
|
+
<tr><td>PageDown</td><td>PageDown</td><td>Move cursor one page down</td></tr>
|
137
|
+
<tr><td>Home</td><td>Home</td><td>Move cursor to previous line boundary</td></tr>
|
138
|
+
<tr><td>End</td><td>End</td><td>Move cursor to next line boundary</td></tr>
|
139
|
+
<tr><td>Enter</td><td>Enter</td><td>Insert new line and indent</td></tr>
|
140
|
+
<tr><td>Cmd+a</td><td>Ctrl+a</td><td>Select all</td></tr>
|
141
|
+
<tr><td>Backspace</td><td>Backspace</td><td>Delete previous character</td></tr>
|
142
|
+
<tr><td>Delete</td><td>Delete</td><td>Delete next character</td></tr>
|
143
|
+
<tr><td>Alt+Backspace</td><td>Ctrl+Backspace</td><td>Delete previous group</td></tr>
|
144
|
+
<tr><td>Alt+Delete</td><td>Ctrl+Delete</td><td>Delete next group</td></tr>
|
145
|
+
<tr><td>Cmd+Backspace</td><td></td><td>Delete to start of line</td></tr>
|
146
|
+
<tr><td>Cmd+Delete</td><td></td><td>Delete to end of line</td></tr>
|
147
|
+
|
148
|
+
<tr class="keyboard-shortcut-section"><td colspan="3">Editor Default Shortcuts</td></tr>
|
149
|
+
<tr class="keyboard-shortcut-header"><td> Mac</td><td>Windows</td><td>Action</td></tr>
|
150
|
+
<tr><td>Alt+ArrowUp</td><td>Alt+ArrowUp</td><td>Move line up</td></tr>
|
151
|
+
<tr><td>Alt+ArrowDown</td><td>Alt+ArrowDown</td><td>Move line down</td></tr>
|
152
|
+
<tr><td>Shift+Alt+ArrowUp</td><td>Shift+Alt+ArrowUp</td><td>Copy line up</td></tr>
|
153
|
+
<tr><td>Shift+Alt+ArrowDown</td><td>Shift+Alt+ArrowDown</td><td>Copy line down</td></tr>
|
154
|
+
<tr><td>Escape</td><td>Escape</td><td>Simplify selection</td></tr>
|
155
|
+
<tr><td>Shift+Enter</td><td>Shift+Enter</td><td>Insert blank line</td></tr>
|
156
|
+
<tr><td>Ctrl+l</td><td>Alt+l</td><td>Select line</td></tr>
|
157
|
+
<tr><td>Cmd+i</td><td>Ctrl+i</td><td>Expand current selection</td></tr>
|
158
|
+
<tr><td>Cmd+[</td><td>Ctrl+[</td><td>Decrease indent</td></tr>
|
159
|
+
<tr><td>Cmd+]</td><td>Ctrl+]</td><td>Increase indent</td></tr>
|
160
|
+
<tr><td>Cmd+Alt+\</td><td>Ctrl+Alt+\</td><td>Indent selection</td></tr>
|
161
|
+
<tr><td>Shift+Cmd+k</td><td>Shift+Ctrl+k</td><td>Delete line</td></tr>
|
162
|
+
<tr><td>Shift+Cmd+\</td><td>Shift+Ctrl+\</td><td>cursorMatchingBracket</td></tr>
|
163
|
+
<tr><td>Cmd+/</td><td>Ctrl+/</td><td>Toggle comment</td></tr>
|
164
|
+
<tr><td>Shift+Alt+a</td><td>Shift+Alt+a</td><td>Toggle comment</td></tr>
|
165
|
+
|
166
|
+
<tr class="keyboard-shortcut-section"><td colspan="3">Editor Completion Shortcuts</td></tr>
|
167
|
+
<tr class="keyboard-shortcut-header"><td> Mac</td><td>Windows</td><td>Action</td></tr>
|
168
|
+
<tr><td>Ctrl+Space</td><td>Ctrl+Space</td><td>Start completion</td></tr>
|
169
|
+
<tr><td>Escape</td><td>Escape</td><td>Close completion</td></tr>
|
170
|
+
<tr><td>ArrowUp</td><td>ArrowUp</td><td>Move selection up</td></tr>
|
171
|
+
<tr><td>ArrowDown</td><td>ArrowDown</td><td>Move selection down</td></tr>
|
172
|
+
<tr><td>PageUp</td><td>PageUp</td><td>Move selection page up</td></tr>
|
173
|
+
<tr><td>PageDown</td><td>PageDown</td><td>Move selection page down</td></tr>
|
174
|
+
<tr><td>Enter</td><td>Enter</td><td>Accept completion</td></tr>
|
175
|
+
</tbody>
|
176
|
+
</table>
|
177
|
+
</div>
|
178
|
+
|
106
179
|
<div id="status-box">
|
107
180
|
<div id="status-message"></div>
|
108
181
|
<div style="flex: 1;"></div>
|
@@ -0,0 +1,30 @@
|
|
1
|
+
#help-box h2 {
|
2
|
+
font-size: 22px;
|
3
|
+
margin: 10px 0 20px 0;
|
4
|
+
}
|
5
|
+
#help-box table#keyboard-shortcuts {
|
6
|
+
border-collapse: collapse;
|
7
|
+
}
|
8
|
+
|
9
|
+
#help-box table#keyboard-shortcuts tr.keyboard-shortcut-header {
|
10
|
+
font-weight: bold;
|
11
|
+
background: #efefef;
|
12
|
+
}
|
13
|
+
|
14
|
+
#help-box table#keyboard-shortcuts td, #help-box table#keyboard-shortcuts tr.keyboard-shortcut-header {
|
15
|
+
text-align: left;
|
16
|
+
border: 1px solid #ddd;
|
17
|
+
padding: 10px;
|
18
|
+
font-size: 14px;
|
19
|
+
}
|
20
|
+
|
21
|
+
#help-box table#keyboard-shortcuts .keyboard-shortcut-section td {
|
22
|
+
border: none;
|
23
|
+
font-weight: bold;
|
24
|
+
padding: 20px 5px 5px 0;
|
25
|
+
font-size: 16px;
|
26
|
+
}
|
27
|
+
|
28
|
+
#help-box table#keyboard-shortcuts tr.keyboard-shortcut-section:first-child td {
|
29
|
+
padding-top: 0;
|
30
|
+
}
|
data/client/resources/sqlui.css
CHANGED
@@ -242,18 +242,18 @@ body {
|
|
242
242
|
text-overflow: ellipsis;
|
243
243
|
}
|
244
244
|
|
245
|
-
#result-box, #fetch-sql-box, #
|
245
|
+
#result-box, #fetch-sql-box, #graph-box, #saved-box, #structure-box, #help-box {
|
246
246
|
flex: 1;
|
247
247
|
overflow: auto;
|
248
248
|
display: flex;
|
249
249
|
flex-direction: column;
|
250
250
|
}
|
251
251
|
|
252
|
-
table tbody tr td {
|
252
|
+
.resize-table tbody tr td {
|
253
253
|
height: 21px;
|
254
254
|
}
|
255
255
|
|
256
|
-
|
256
|
+
.resize-table tbody tr td abbr a {
|
257
257
|
color: #555;
|
258
258
|
cursor: pointer;
|
259
259
|
text-decoration: none;
|
@@ -265,7 +265,7 @@ table tbody tr td {
|
|
265
265
|
user-select: none;
|
266
266
|
}
|
267
267
|
|
268
|
-
|
268
|
+
.resize-table tbody tr td abbr {
|
269
269
|
margin: 0 5px 0 0;
|
270
270
|
text-decoration: none;
|
271
271
|
position: relative;
|
@@ -281,53 +281,50 @@ table tbody tr td {
|
|
281
281
|
padding: 20px;
|
282
282
|
}
|
283
283
|
|
284
|
-
table {
|
284
|
+
.resize-table {
|
285
285
|
font-family: monospace;
|
286
286
|
border-spacing: 0;
|
287
287
|
color: #333;
|
288
288
|
font-size: 18px;
|
289
289
|
}
|
290
290
|
|
291
|
-
table td:last-child, table th:last-child {
|
291
|
+
.resize-table td:last-child, .resize-table th:last-child {
|
292
292
|
border-right: none !important;
|
293
|
+
max-width: none;
|
293
294
|
}
|
294
295
|
|
295
|
-
td, th {
|
296
|
+
.resize-table td, .resize-table th {
|
296
297
|
font-weight: normal;
|
297
298
|
white-space: nowrap;
|
298
299
|
max-width: 500px;
|
299
300
|
}
|
300
301
|
|
301
|
-
|
302
|
-
max-width: none;
|
303
|
-
}
|
304
|
-
|
305
|
-
td {
|
302
|
+
.resize-table td {
|
306
303
|
overflow: hidden;
|
307
304
|
text-overflow: ellipsis;
|
308
305
|
padding: 5px 10px;
|
309
306
|
text-align: right;
|
310
307
|
}
|
311
308
|
|
312
|
-
|
309
|
+
.resize-table tbody tr td .cell-content-wrapper {
|
313
310
|
display: flex;
|
314
311
|
}
|
315
312
|
|
316
|
-
|
313
|
+
.resize-table tbody tr td .cell-value {
|
317
314
|
flex: 1;
|
318
315
|
}
|
319
316
|
|
320
|
-
th {
|
317
|
+
.resize-table th {
|
321
318
|
font-weight: bold;
|
322
319
|
border-bottom: 1px solid #ddd;
|
323
320
|
border-right: 1px solid #ddd;
|
324
321
|
}
|
325
322
|
|
326
|
-
th div.col-content-wrapper {
|
323
|
+
.resize-table th div.col-content-wrapper {
|
327
324
|
display: flex;
|
328
325
|
}
|
329
326
|
|
330
|
-
th div.col-name {
|
327
|
+
.resize-table th div.col-name {
|
331
328
|
overflow: hidden;
|
332
329
|
text-overflow: ellipsis;
|
333
330
|
flex: 1;
|
@@ -336,14 +333,14 @@ th div.col-name {
|
|
336
333
|
padding: 5px 10px;
|
337
334
|
}
|
338
335
|
|
339
|
-
th div.col-resizer {
|
336
|
+
.resize-table th div.col-resizer {
|
340
337
|
width: 7px;
|
341
338
|
position: relative;
|
342
339
|
left: 5px; /* center over the right border */
|
343
340
|
cursor: col-resize;
|
344
341
|
}
|
345
342
|
|
346
|
-
thead {
|
343
|
+
.resize-table thead {
|
347
344
|
padding: 0;
|
348
345
|
background-color: #fff;
|
349
346
|
position: -webkit-sticky;
|
@@ -449,12 +446,12 @@ thead {
|
|
449
446
|
color: #333;
|
450
447
|
}
|
451
448
|
|
452
|
-
table td:nth-child(1) {
|
449
|
+
#stats table td:nth-child(1) {
|
453
450
|
text-align: left;
|
454
451
|
font-family: Helvetica, sans-serif;
|
455
452
|
}
|
456
453
|
|
457
|
-
table td:nth-child(2) {
|
454
|
+
#stats table td:nth-child(2) {
|
458
455
|
text-align: right;
|
459
456
|
font-family: monospace;
|
460
457
|
}
|
@@ -556,3 +553,9 @@ select {
|
|
556
553
|
.jump-button {
|
557
554
|
font-size: 12px;
|
558
555
|
}
|
556
|
+
|
557
|
+
#help-box {
|
558
|
+
font-family: Helvetica, sans-serif;
|
559
|
+
padding: 10px;
|
560
|
+
width: 100%;
|
561
|
+
}
|