sqlui 0.1.66 → 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7b3cb90804665afcc2bfbefe7729bc1c80e62db6848770ad4537cfac031aad1f
4
- data.tar.gz: 6fed2c90062a097f9ece30edc28dfcf0e32b72322bf7a94ebe40cdeaa22ad9d7
3
+ metadata.gz: 6a167a65032b5a64b37d6e25c6589669151951d75f3964be73d2f8e6ba9f0833
4
+ data.tar.gz: 0a25e8597d5955c1bd6c04cf31834d8666672662a49a646ee03a3d55d1e268bf
5
5
  SHA512:
6
- metadata.gz: 65bcb424d283e50825d1352889f61e02d2439281e01af02a63c980df5ca94f433569b13f6d7ea69b906f1647d452313ac96a2ae509af29009fa43d35a3864d6e
7
- data.tar.gz: b3663fe92817d2cbb195f758bea14a744081dbd56c415cd83a449f9fca70d04b9ffe8900d7a28970a6262641b3daf56f33fd9730003f4e1adc845ab801de3242
6
+ metadata.gz: 95d82ede6b694eef5cab00c48aae318dbf9e55ee0a20a1f41a40abc8013a4ea245cf0b530160da10e620e572e60ac1e696bb360d4fd2037a870b2ecf250e1ac4
7
+ data.tar.gz: d1b720a016ab0ed8716164aefc45b2a9db9c0aac876eda2f9210fda6184d739b6b7b3efd50a01e2d11bcf299906522a17994ffa90ea124c72ac1ca38dd536201
data/.release-version CHANGED
@@ -1 +1 @@
1
- 0.1.66
1
+ 0.1.68
@@ -10,6 +10,7 @@ class DatabaseMetadata
10
10
  def lookup(client, database_config)
11
11
  result = load_columns(client, database_config)
12
12
  load_stats(result, client, database_config)
13
+ load_tables(result, client, database_config)
13
14
 
14
15
  result
15
16
  end
@@ -91,7 +92,7 @@ class DatabaseMetadata
91
92
  from information_schema.statistics
92
93
  #{where_clause}
93
94
  order by table_schema, table_name, if(index_name = "PRIMARY", 0, index_name), seq_in_index;
94
- SQL
95
+ SQL
95
96
  )
96
97
  stats_result.each do |row|
97
98
  table_schema = row.shift
@@ -110,5 +111,81 @@ class DatabaseMetadata
110
111
  column[:column_name] = column_name
111
112
  end
112
113
  end
114
+
115
+ def load_tables(result, client, _database_config)
116
+ tables_result = client.query(
117
+ <<~SQL
118
+ SELECT
119
+ TABLE_SCHEMA,
120
+ TABLE_NAME,
121
+ CREATE_TIME,
122
+ UPDATE_TIME,
123
+ ENGINE,
124
+ TABLE_ROWS,
125
+ AVG_ROW_LENGTH,
126
+ DATA_LENGTH,
127
+ INDEX_LENGTH,
128
+ TABLE_COLLATION,
129
+ AUTO_INCREMENT
130
+ FROM information_schema.TABLES;
131
+ SQL
132
+ )
133
+ tables_hash = {}
134
+ tables_result.each do |row|
135
+ table_schema = row.shift
136
+ table_name = row.shift
137
+ tables_hash[table_schema] ||= {}
138
+ tables_hash[table_schema][table_name] = {
139
+ created_at: row.shift,
140
+ updated_at: row.shift,
141
+ engine: row.shift,
142
+ rows: add_thousands_separator(row.shift),
143
+ average_row_size: pretty_data_size(row.shift),
144
+ data_size: pretty_data_size(row.shift),
145
+ index_size: pretty_data_size(row.shift),
146
+ encoding: row.shift,
147
+ auto_increment: add_thousands_separator(row.shift)
148
+ }
149
+ end
150
+ result.each do |table_schema, schema_hash|
151
+ schema_hash[:tables].each do |table_name, table|
152
+ table[:info] = tables_hash[table_schema][table_name]
153
+ end
154
+ end
155
+ end
156
+
157
+ def pretty_data_size(size)
158
+ if size.nil?
159
+ return nil
160
+ elsif size < 1024
161
+ unit = "byte#{size == 1 ? '' : 's'}"
162
+ converted = size
163
+ elsif size < 1024 * 1024
164
+ unit = 'KiB'
165
+ converted = (size.to_f / 1024).round(2)
166
+ elsif size < 1024 * 1024 * 1024
167
+ unit = 'MiB'
168
+ converted = (size.to_f / (1024 * 1024)).round(2)
169
+ elsif size < 1024 * 1024 * 1024 * 1024
170
+ unit = 'GiB'
171
+ converted = (size.to_f / (1024 * 1024 * 1024)).round(2)
172
+ end
173
+
174
+ "#{add_thousands_separator(converted)} #{unit}"
175
+ end
176
+
177
+ def add_thousands_separator(value)
178
+ return nil if value.nil?
179
+
180
+ integer = value.round(1).floor
181
+ fractional = ((value.round(1) - integer) * 10).floor
182
+
183
+ with_commas = integer.to_s.reverse.scan(/.{1,3}/).join(',').reverse
184
+ if fractional.zero?
185
+ with_commas
186
+ else
187
+ "#{with_commas}.#{fractional}"
188
+ end
189
+ end
113
190
  end
114
191
  end
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|saved)/) do
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/sql_parser.rb CHANGED
@@ -40,10 +40,10 @@ class SqlParser
40
40
  multi_commented = true
41
41
  elsif multi_commented && char == '*' && scanner.peek(1) == '/'
42
42
  multi_commented = false
43
- elsif multi_commented
43
+ elsif multi_commented || (single_commented && char != "\n")
44
44
  next
45
45
  elsif !single_quoted && !double_quoted && !escaped && !multi_commented &&
46
- char == '-' && scanner.peek(1).match?(/-[ \n\t]/)
46
+ char == '-' && scanner.peek(2).match?(/-[ \n\t]/)
47
47
  current += scanner.getch
48
48
  single_commented = true
49
49
  elsif !single_quoted && !double_quoted && !escaped && !multi_commented && char == '#'
@@ -51,7 +51,7 @@ class SqlParser
51
51
  elsif single_commented && char == "\n"
52
52
  single_commented = false
53
53
  elsif single_commented
54
- single_quoted = false if char == "\n"
54
+ single_commented = false if char == "\n"
55
55
  elsif char == '\\'
56
56
  escaped = true
57
57
  elsif char == "'"
@@ -11,18 +11,6 @@
11
11
  margin: 0;
12
12
  }
13
13
 
14
- h1 {
15
- font-size: 22px;
16
- }
17
-
18
- h2 {
19
- font-size: 20px;
20
- }
21
-
22
- p {
23
- font-size: 18px;
24
- }
25
-
26
14
  .header-box {
27
15
  display: flex;
28
16
  flex-direction: row;
@@ -37,6 +25,12 @@
37
25
  align-items: center;
38
26
  justify-content: start;
39
27
  color: #333;
28
+ font-size: 22px;
29
+ }
30
+
31
+ .header {
32
+ font-weight: bold;
33
+ padding-left: 5px;
40
34
  }
41
35
 
42
36
  .server-name {
@@ -45,30 +39,28 @@
45
39
  font-weight: normal;
46
40
  }
47
41
 
48
- .name-and-links {
42
+ .links {
49
43
  display: flex;
50
44
  flex-direction: row;
51
45
  align-items: center;
46
+ margin-top: 5px;
52
47
  }
53
48
 
54
- .header {
55
- font-weight: bold;
56
- padding-left: 5px;
57
- }
58
-
59
- .database a {
60
- margin-right: 5px;
49
+ .link {
50
+ margin-right: 10px;
61
51
  color: darkblue;
62
- font-size: 16px;
52
+ font-size: 17px;
63
53
  text-decoration: none;
64
54
  }
65
55
 
66
- .database h2 {
67
- margin: 0 10px 0 0;
56
+ .name {
57
+ margin: 0 200px 0 0;
58
+ font-size: 20px;
68
59
  }
69
60
 
70
- .database p {
71
- margin: 10px 0 0;
61
+ .description {
62
+ margin: 20px 0 0;
63
+ font-size: 18px;
72
64
  }
73
65
 
74
66
  .database {
@@ -90,11 +82,11 @@
90
82
  </div>
91
83
  <% config.database_configs.each do |database_config| %>
92
84
  <div class="database">
93
- <div class="name-and-links">
94
- <h2 class='name'><%= database_config.display_name %></h2>
95
- <a class='query-link' href="<%= "#{config.base_url_path}/#{database_config.url_path}/query" %>">query</a>
96
- <a class='saved-link' href="<%= "#{config.base_url_path}/#{database_config.url_path}/saved" %>">saved</a>
97
- <a class='structure-link' href="<%= "#{config.base_url_path}/#{database_config.url_path}/structure" %>">structure</a>
85
+ <h2 class='name'><%= database_config.display_name %></h2>
86
+ <div class="links">
87
+ <a class='link query-link' href="<%= "#{config.base_url_path}/#{database_config.url_path}/query" %>">query</a>
88
+ <a class='link saved-link' href="<%= "#{config.base_url_path}/#{database_config.url_path}/saved" %>">saved</a>
89
+ <a class='link structure-link' href="<%= "#{config.base_url_path}/#{database_config.url_path}/structure" %>">structure</a>
98
90
  </div>
99
91
  <p class='description'>
100
92
  <%= database_config.description %>
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;">
@@ -84,10 +86,16 @@
84
86
 
85
87
  <div id="structure-box" class="tab-content-element structure-element" style="display: none;">
86
88
  <div class="structure-wrapper">
87
- <select id="schemas" size="4">
88
- </select>
89
- <select id="tables" size="4">
90
- </select>
89
+ <div id="schemas-tables-and-stats">
90
+ <div id="schemas-and-tables">
91
+ <select id="schemas" size="4">
92
+ </select>
93
+ <select id="tables" size="4">
94
+ </select>
95
+ </div>
96
+ <div id="stats">
97
+ </div>
98
+ </div>
91
99
  <div id="table-info">
92
100
  <div id="columns">
93
101
  </div>
@@ -97,6 +105,77 @@
97
105
  </div>
98
106
  </div>
99
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
+
100
179
  <div id="status-box">
101
180
  <div id="status-message"></div>
102
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
+ }
@@ -8,18 +8,6 @@ body {
8
8
  overflow: hidden;
9
9
  }
10
10
 
11
- h1 {
12
- font-size: 22px;
13
- }
14
-
15
- h2 {
16
- font-size: 20px;
17
- }
18
-
19
- p {
20
- font-size: 18px;
21
- }
22
-
23
11
  #loading-box {
24
12
  font-family: monospace;
25
13
  display: flex;
@@ -48,6 +36,7 @@ p {
48
36
  align-items: center;
49
37
  justify-content: start;
50
38
  color: #333;
39
+ font-size: 22px;
51
40
  }
52
41
 
53
42
  #header {
@@ -126,6 +115,7 @@ p {
126
115
  cursor: row-resize;
127
116
  flex-direction: column;
128
117
  align-items: center;
118
+ padding-left: 220px; /* To center the resizer icon. Ok, it's a hack. Get over it. */
129
119
  }
130
120
 
131
121
  #cancel-button {
@@ -135,7 +125,7 @@ p {
135
125
  border: 1px solid #888;
136
126
  height: 32px;
137
127
  font-size: 18px;
138
- margin: 0 220px 0 0; /* To center the resizer icon. Ok, it's a hack. Get over it. */
128
+ margin: 0;
139
129
  }
140
130
 
141
131
  #cancel-button-spacer {
@@ -252,17 +242,18 @@ p {
252
242
  text-overflow: ellipsis;
253
243
  }
254
244
 
255
- #result-box, #fetch-sql-box, #saved-box, #graph-box, #structure-box {
245
+ #result-box, #fetch-sql-box, #graph-box, #saved-box, #structure-box, #help-box {
256
246
  flex: 1;
257
247
  overflow: auto;
258
248
  display: flex;
259
249
  flex-direction: column;
260
250
  }
261
- table tbody tr td {
251
+
252
+ .resize-table tbody tr td {
262
253
  height: 21px;
263
254
  }
264
255
 
265
- #result-table tbody tr td abbr a {
256
+ .resize-table tbody tr td abbr a {
266
257
  color: #555;
267
258
  cursor: pointer;
268
259
  text-decoration: none;
@@ -274,7 +265,7 @@ table tbody tr td {
274
265
  user-select: none;
275
266
  }
276
267
 
277
- #result-table tbody tr td abbr {
268
+ .resize-table tbody tr td abbr {
278
269
  margin: 0 5px 0 0;
279
270
  text-decoration: none;
280
271
  position: relative;
@@ -290,53 +281,50 @@ table tbody tr td {
290
281
  padding: 20px;
291
282
  }
292
283
 
293
- table {
284
+ .resize-table {
294
285
  font-family: monospace;
295
286
  border-spacing: 0;
296
287
  color: #333;
297
288
  font-size: 18px;
298
289
  }
299
290
 
300
- table td:last-child, table th:last-child {
291
+ .resize-table td:last-child, .resize-table th:last-child {
301
292
  border-right: none !important;
293
+ max-width: none;
302
294
  }
303
295
 
304
- td, th {
296
+ .resize-table td, .resize-table th {
305
297
  font-weight: normal;
306
298
  white-space: nowrap;
307
299
  max-width: 500px;
308
300
  }
309
301
 
310
- td:last-child, th:last-child {
311
- max-width: none;
312
- }
313
-
314
- td {
302
+ .resize-table td {
315
303
  overflow: hidden;
316
304
  text-overflow: ellipsis;
317
305
  padding: 5px 10px;
318
306
  text-align: right;
319
307
  }
320
308
 
321
- #result-table tbody tr td .cell-content-wrapper {
309
+ .resize-table tbody tr td .cell-content-wrapper {
322
310
  display: flex;
323
311
  }
324
312
 
325
- #result-table tbody tr td .cell-value {
313
+ .resize-table tbody tr td .cell-value {
326
314
  flex: 1;
327
315
  }
328
316
 
329
- th {
317
+ .resize-table th {
330
318
  font-weight: bold;
331
319
  border-bottom: 1px solid #ddd;
332
320
  border-right: 1px solid #ddd;
333
321
  }
334
322
 
335
- th div.col-content-wrapper {
323
+ .resize-table th div.col-content-wrapper {
336
324
  display: flex;
337
325
  }
338
326
 
339
- th div.col-name {
327
+ .resize-table th div.col-name {
340
328
  overflow: hidden;
341
329
  text-overflow: ellipsis;
342
330
  flex: 1;
@@ -345,14 +333,14 @@ th div.col-name {
345
333
  padding: 5px 10px;
346
334
  }
347
335
 
348
- th div.col-resizer {
336
+ .resize-table th div.col-resizer {
349
337
  width: 7px;
350
338
  position: relative;
351
339
  left: 5px; /* center over the right border */
352
340
  cursor: col-resize;
353
341
  }
354
342
 
355
- thead {
343
+ .resize-table thead {
356
344
  padding: 0;
357
345
  background-color: #fff;
358
346
  position: -webkit-sticky;
@@ -384,16 +372,28 @@ thead {
384
372
  font-family: Helvetica, sans-serif;
385
373
  }
386
374
 
387
- #saved-box h2 {
388
- font-weight: bold;
375
+ .links {
376
+ display: flex;
377
+ flex-direction: row;
378
+ align-items: center;
379
+ margin-top: 5px;
389
380
  }
390
381
 
391
- .saved-list-item:last-child {
392
- border-top: none !important;
382
+ .link {
383
+ margin-right: 10px;
384
+ color: darkblue;
385
+ font-size: 17px;
386
+ text-decoration: none;
393
387
  }
394
388
 
395
- #saved-box p {
396
- margin: 0;
389
+ .name {
390
+ margin: 0 200px 0 0;
391
+ font-size: 20px;
392
+ }
393
+
394
+ .description {
395
+ margin: 20px 0 0;
396
+ font-size: 18px;
397
397
  }
398
398
 
399
399
  .saved-list-item {
@@ -402,25 +402,8 @@ thead {
402
402
  padding: 10px;
403
403
  }
404
404
 
405
- .saved-list-item h2 {
406
- margin: 0 10px 0 0;
407
- }
408
-
409
- .saved-list-item p {
410
- margin: 10px 0 0;
411
- }
412
-
413
- .name-and-links {
414
- display: flex;
415
- flex-direction: row;
416
- align-items: center;
417
- }
418
-
419
- .name-and-links a {
420
- margin-right: 5px;
421
- color: darkblue;
422
- font-size: 16px;
423
- text-decoration: none;
405
+ .saved-list-item:last-child {
406
+ border-bottom: none;
424
407
  }
425
408
 
426
409
  .cm-editor.cm-focused {
@@ -435,10 +418,49 @@ thead {
435
418
  height: 100%;
436
419
  }
437
420
 
421
+ #schemas-and-tables {
422
+ display: flex;
423
+ flex-direction: row;
424
+ flex: 1;
425
+ }
426
+
427
+ #schemas-tables-and-stats {
428
+ display: flex;
429
+ flex-direction: column;
430
+ border-right: 1px solid #ddd;
431
+ min-width: 400px;
432
+ }
433
+
434
+ #stats {
435
+ border-top: 1px solid #ddd;
436
+ padding: 5px 0;
437
+ }
438
+
439
+ #stats table {
440
+ width: 100%;
441
+ }
442
+
443
+ #stats table td {
444
+ padding: 2px 5px;
445
+ font-size: 18px;
446
+ color: #333;
447
+ }
448
+
449
+ #stats table td:nth-child(1) {
450
+ text-align: left;
451
+ font-family: Helvetica, sans-serif;
452
+ }
453
+
454
+ #stats table td:nth-child(2) {
455
+ text-align: right;
456
+ font-family: monospace;
457
+ }
458
+
438
459
  #schemas, #tables {
439
460
  border: none;
440
461
  display: flex;
441
- min-width: 200px;
462
+ flex: 1;
463
+ padding: 5px
442
464
  }
443
465
 
444
466
  #table-info {
@@ -531,3 +553,9 @@ select {
531
553
  .jump-button {
532
554
  font-size: 12px;
533
555
  }
556
+
557
+ #help-box {
558
+ font-family: Helvetica, sans-serif;
559
+ padding: 10px;
560
+ width: 100%;
561
+ }