sqlui 0.1.19 → 0.1.21
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.version +1 -1
- data/app/args.rb +33 -0
- data/app/database_config.rb +7 -7
- data/app/database_metadata.rb +116 -0
- data/app/deep.rb +58 -0
- data/app/mysql_types.rb +33 -0
- data/app/server.rb +125 -217
- data/app/sqlui.rb +36 -0
- data/app/sqlui_config.rb +11 -16
- data/app/views/databases.erb +70 -38
- data/bin/sqlui +3 -1
- data/client/resources/sqlui.css +288 -242
- data/client/resources/sqlui.html +8 -5
- data/client/resources/sqlui.js +168 -82
- metadata +7 -2
data/client/resources/sqlui.css
CHANGED
@@ -1,242 +1,288 @@
|
|
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
|
-
|
1
|
+
body {
|
2
|
+
margin: 0;
|
3
|
+
}
|
4
|
+
|
5
|
+
h1 {
|
6
|
+
font-size: 22px;
|
7
|
+
}
|
8
|
+
|
9
|
+
h2 {
|
10
|
+
font-size: 20px;
|
11
|
+
}
|
12
|
+
|
13
|
+
p {
|
14
|
+
font-size: 18px;
|
15
|
+
}
|
16
|
+
|
17
|
+
.loading-box {
|
18
|
+
font-family: monospace;
|
19
|
+
display: flex;
|
20
|
+
flex-direction: column;
|
21
|
+
flex: 1;
|
22
|
+
margin: 0;
|
23
|
+
height: 100%;
|
24
|
+
min-height: 100%;
|
25
|
+
align-items: start;
|
26
|
+
justify-content: start;
|
27
|
+
padding: 10px;
|
28
|
+
color: #333;
|
29
|
+
}
|
30
|
+
|
31
|
+
.main-box {
|
32
|
+
display: flex;
|
33
|
+
flex-direction: column;
|
34
|
+
flex: 1;
|
35
|
+
margin: 0;
|
36
|
+
height: 100%;
|
37
|
+
min-height: 100%;
|
38
|
+
}
|
39
|
+
|
40
|
+
.header, .server-name {
|
41
|
+
display: flex;
|
42
|
+
align-items: center;
|
43
|
+
justify-content: start;
|
44
|
+
color: #333;
|
45
|
+
}
|
46
|
+
|
47
|
+
.header {
|
48
|
+
font-weight: bold;
|
49
|
+
padding-left: 5px;
|
50
|
+
}
|
51
|
+
|
52
|
+
.header a {
|
53
|
+
text-decoration: none;
|
54
|
+
color: #333
|
55
|
+
}
|
56
|
+
|
57
|
+
.server-name {
|
58
|
+
flex: 1;
|
59
|
+
padding-left: 15px;
|
60
|
+
font-weight: normal;
|
61
|
+
}
|
62
|
+
|
63
|
+
.tabs-box {
|
64
|
+
display: flex;
|
65
|
+
flex-direction: row;
|
66
|
+
border-bottom: 1px solid #ddd;
|
67
|
+
height: 36px;
|
68
|
+
font-family: Helvetica, sans-serif;
|
69
|
+
}
|
70
|
+
|
71
|
+
.tab-button, .selected-tab-button {
|
72
|
+
border: none;
|
73
|
+
outline: none;
|
74
|
+
cursor: pointer;
|
75
|
+
width: 150px;
|
76
|
+
padding: 2px;
|
77
|
+
margin: 0;
|
78
|
+
display: flex;
|
79
|
+
justify-content: center;
|
80
|
+
background-color: #fff;
|
81
|
+
font-size: 18px;
|
82
|
+
}
|
83
|
+
|
84
|
+
.tab-button {
|
85
|
+
color: #888;
|
86
|
+
}
|
87
|
+
|
88
|
+
.tab-button:hover {
|
89
|
+
color: #333;
|
90
|
+
}
|
91
|
+
|
92
|
+
.selected-tab-button {
|
93
|
+
color: #333;
|
94
|
+
font-weight: bold;
|
95
|
+
}
|
96
|
+
|
97
|
+
.tab-content-element {
|
98
|
+
display: none;
|
99
|
+
}
|
100
|
+
|
101
|
+
.query-box {
|
102
|
+
display: flex;
|
103
|
+
flex-direction: column;
|
104
|
+
}
|
105
|
+
|
106
|
+
.query {
|
107
|
+
display: flex;
|
108
|
+
flex: 1;
|
109
|
+
}
|
110
|
+
|
111
|
+
.submit-box {
|
112
|
+
display: flex;
|
113
|
+
border-top: 1px solid #ddd;
|
114
|
+
justify-content: right;
|
115
|
+
}
|
116
|
+
|
117
|
+
.submit-button {
|
118
|
+
cursor: pointer;
|
119
|
+
margin: 5px;
|
120
|
+
border: 1px solid #888;
|
121
|
+
background: none;
|
122
|
+
padding: 5px;
|
123
|
+
font-size: 18px;
|
124
|
+
color: #333;
|
125
|
+
}
|
126
|
+
|
127
|
+
.status {
|
128
|
+
display: flex;
|
129
|
+
justify-content: center;
|
130
|
+
align-content: center;
|
131
|
+
flex-direction: column;
|
132
|
+
font-family: Helvetica, sans-serif;
|
133
|
+
white-space: nowrap;
|
134
|
+
overflow: hidden;
|
135
|
+
font-size: 18px;
|
136
|
+
color: #333;
|
137
|
+
}
|
138
|
+
|
139
|
+
.result-box, .saved-box, .graph-box, .structure-box {
|
140
|
+
flex: 1;
|
141
|
+
overflow: auto;
|
142
|
+
display: flex;
|
143
|
+
flex-direction: column;
|
144
|
+
}
|
145
|
+
|
146
|
+
.graph-box, .result-box {
|
147
|
+
border-top: 1px solid #ddd;
|
148
|
+
}
|
149
|
+
|
150
|
+
.graph-box {
|
151
|
+
padding: 20px;
|
152
|
+
}
|
153
|
+
|
154
|
+
table {
|
155
|
+
font-family: monospace;
|
156
|
+
flex: 1;
|
157
|
+
border-spacing: 0;
|
158
|
+
display: flex;
|
159
|
+
width: 100%;
|
160
|
+
color: #333;
|
161
|
+
}
|
162
|
+
|
163
|
+
table td:last-child, table th:last-child {
|
164
|
+
width: 100%;
|
165
|
+
border-right: none !important;
|
166
|
+
}
|
167
|
+
|
168
|
+
td, th {
|
169
|
+
padding: 5px 20px 5px 5px;
|
170
|
+
font-weight: normal;
|
171
|
+
white-space: nowrap;
|
172
|
+
max-width: 500px;
|
173
|
+
overflow: hidden;
|
174
|
+
text-overflow: ellipsis;
|
175
|
+
}
|
176
|
+
|
177
|
+
td {
|
178
|
+
text-align: right;
|
179
|
+
}
|
180
|
+
|
181
|
+
th {
|
182
|
+
text-align: left;
|
183
|
+
font-weight: bold;
|
184
|
+
border-bottom: 1px solid #ddd;
|
185
|
+
border-right: 1px solid #ddd;
|
186
|
+
}
|
187
|
+
|
188
|
+
table {
|
189
|
+
display: block;
|
190
|
+
}
|
191
|
+
|
192
|
+
thead {
|
193
|
+
padding: 0;
|
194
|
+
background-color: #fff;
|
195
|
+
position: -webkit-sticky;
|
196
|
+
position: sticky;
|
197
|
+
top: 0;
|
198
|
+
z-index: 100;
|
199
|
+
table-layout: fixed;
|
200
|
+
}
|
201
|
+
|
202
|
+
.highlighted-row {
|
203
|
+
background: #eee;
|
204
|
+
}
|
205
|
+
|
206
|
+
.status-box {
|
207
|
+
padding: 5px;
|
208
|
+
display: flex;
|
209
|
+
flex-direction: row;
|
210
|
+
justify-content: space-between;
|
211
|
+
border-top: 1px solid #ddd;
|
212
|
+
height: 30px;
|
213
|
+
}
|
214
|
+
|
215
|
+
.CodeMirror pre.CodeMirror-placeholder {
|
216
|
+
color: #999;
|
217
|
+
}
|
218
|
+
|
219
|
+
.tabs-box {
|
220
|
+
display: flex;
|
221
|
+
}
|
222
|
+
|
223
|
+
.saved-box {
|
224
|
+
font-family: Helvetica, sans-serif;
|
225
|
+
}
|
226
|
+
|
227
|
+
.saved-box h2 {
|
228
|
+
margin: 0;
|
229
|
+
font-weight: bold;
|
230
|
+
}
|
231
|
+
|
232
|
+
.saved-list-item:last-child {
|
233
|
+
border-top: none !important;
|
234
|
+
}
|
235
|
+
|
236
|
+
.saved-box p {
|
237
|
+
margin: 0;
|
238
|
+
}
|
239
|
+
|
240
|
+
.saved-list-item {
|
241
|
+
cursor: pointer;
|
242
|
+
border-bottom: 1px solid #eeeeee;
|
243
|
+
margin: 0;
|
244
|
+
padding: 10px;
|
245
|
+
}
|
246
|
+
|
247
|
+
.saved-list-item h2 {
|
248
|
+
margin: 0 0 5px;
|
249
|
+
}
|
250
|
+
|
251
|
+
.saved-box div:hover {
|
252
|
+
background: #eee;
|
253
|
+
}
|
254
|
+
|
255
|
+
.cm-editor.cm-focused {
|
256
|
+
outline: none !important;
|
257
|
+
}
|
258
|
+
|
259
|
+
.schemas, .tables {
|
260
|
+
border: none;
|
261
|
+
display: flex;
|
262
|
+
min-width: 200px;
|
263
|
+
}
|
264
|
+
|
265
|
+
.table-info {
|
266
|
+
display: grid;
|
267
|
+
grid-template-rows: 0.5fr 0.5fr;
|
268
|
+
justify-items: stretch;
|
269
|
+
flex: 1;
|
270
|
+
}
|
271
|
+
|
272
|
+
.columns {
|
273
|
+
border-bottom: 1px solid #ddd;
|
274
|
+
overflow: auto;
|
275
|
+
grid-column: 1;
|
276
|
+
grid-row: 1;
|
277
|
+
}
|
278
|
+
|
279
|
+
.indexes {
|
280
|
+
overflow: auto;
|
281
|
+
grid-column: 1;
|
282
|
+
grid-row: 2;
|
283
|
+
}
|
284
|
+
|
285
|
+
select {
|
286
|
+
outline: none;
|
287
|
+
color: #333;
|
288
|
+
}
|
data/client/resources/sqlui.html
CHANGED
@@ -8,9 +8,13 @@
|
|
8
8
|
</head>
|
9
9
|
|
10
10
|
<body>
|
11
|
-
<div class="
|
11
|
+
<div id="loading-box" class="loading-box">
|
12
|
+
</div>
|
13
|
+
|
14
|
+
<div id="main-box" class="main-box" style="display:none">
|
12
15
|
<div class="tabs-box">
|
13
|
-
<
|
16
|
+
<h1 class="header"><a href="/sqlui">SQLUI</a></h1>
|
17
|
+
<h1 id="server-name" class="server-name"></h1>
|
14
18
|
<input id="query-tab-button" class="tab-button" type="button" value="Query" onclick="sqlui.selectTab('query')"></input>
|
15
19
|
<input id="graph-tab-button" class="tab-button" type="button" value="Graph" onclick="sqlui.selectTab('graph')"></input>
|
16
20
|
<input id="saved-tab-button" class="tab-button" type="button" value="Saved" onclick="sqlui.selectTab('saved')"></input>
|
@@ -21,11 +25,10 @@
|
|
21
25
|
<div id="query"></div>
|
22
26
|
</div>
|
23
27
|
|
24
|
-
<!--
|
25
28
|
<div id="submit-box" class="submit-box tab-content-element graph-element query-element" style="display: none;">
|
26
|
-
<input id="submit-button" class="submit-button" type="button" value="
|
29
|
+
<input id="submit-all-button" class="submit-button" type="button" value="execute (ctrl-shift-enter)" onclick="sqlui.submitAll();"></input>
|
30
|
+
<input id="submit-current-button" class="submit-button" type="button" value="execute selection (ctrl-enter)" onclick="sqlui.submitCurrent();"></input>
|
27
31
|
</div>
|
28
|
-
-->
|
29
32
|
|
30
33
|
<div id="result-box" class="result-box tab-content-element query-element" style="display: none;">
|
31
34
|
</div>
|