adhoq 0.5.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/app/assets/javascripts/adhoq/current_tables.js +23 -0
- data/app/assets/javascripts/adhoq/previewer.js +52 -0
- data/app/models/adhoq/time_based_orders.rb +1 -1
- data/app/views/adhoq/application/_global_nav.html.erb +18 -0
- data/app/views/adhoq/current_tables/index.html.erb +53 -0
- data/app/views/adhoq/explains/create.html.erb +1 -0
- data/app/views/adhoq/explains/statement_invalid.html.erb +5 -0
- data/app/views/adhoq/previews/create.html.erb +21 -0
- data/app/views/adhoq/previews/statement_invalid.html.erb +4 -0
- data/app/views/adhoq/queries/_current_tables_leftbar.html.erb +14 -0
- data/app/views/adhoq/queries/_execution.html.erb +10 -0
- data/app/views/adhoq/queries/_form.html.erb +124 -0
- data/app/views/adhoq/queries/_queries.html.erb +16 -0
- data/app/views/adhoq/queries/_query.html.erb +67 -0
- data/app/views/adhoq/queries/edit.html.erb +13 -0
- data/app/views/adhoq/queries/index.html.erb +15 -0
- data/app/views/adhoq/queries/new.html.erb +12 -0
- data/app/views/adhoq/queries/show.html.erb +14 -0
- data/app/views/layouts/adhoq/application.html.erb +18 -0
- data/lib/adhoq/engine.rb +0 -1
- data/lib/adhoq/version.rb +1 -1
- metadata +26 -54
- data/app/assets/javascripts/adhoq/current_tables.js.coffee +0 -18
- data/app/assets/javascripts/adhoq/previewer.js.coffee +0 -34
- data/app/views/adhoq/application/_global_nav.html.slim +0 -12
- data/app/views/adhoq/current_tables/index.html.slim +0 -35
- data/app/views/adhoq/explains/create.html.slim +0 -2
- data/app/views/adhoq/explains/statement_invalid.html.slim +0 -5
- data/app/views/adhoq/previews/create.html.slim +0 -12
- data/app/views/adhoq/previews/statement_invalid.html.slim +0 -5
- data/app/views/adhoq/queries/_current_tables_leftbar.html.slim +0 -9
- data/app/views/adhoq/queries/_execution.html.slim +0 -10
- data/app/views/adhoq/queries/_form.html.slim +0 -93
- data/app/views/adhoq/queries/_queries.html.slim +0 -14
- data/app/views/adhoq/queries/_query.html.slim +0 -48
- data/app/views/adhoq/queries/edit.html.slim +0 -11
- data/app/views/adhoq/queries/index.html.slim +0 -11
- data/app/views/adhoq/queries/new.html.slim +0 -10
- data/app/views/adhoq/queries/show.html.slim +0 -11
- data/app/views/layouts/adhoq/application.html.slim +0 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 54dfe744cc178115d6846d1c01a2948bb2a55e55674bf2c52423766152134c7f
|
4
|
+
data.tar.gz: e6c0eadc5918995c9f91d7503d5c673b3ac6669c41304b1dad974cc3484be37c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b42c3dc8d00aae8d02ed3bf9dbc718ea4d7ec85a42f92752f50a6e7ea5c65befee8630ad981c8a2c43b303505758f003caf4820e794d9d35eebe89f1ecb7a5ba
|
7
|
+
data.tar.gz: 00bbd3f4200be29dc67ae6a905a267ca63a59821023eebfca11a51af82cc98d6408d33e6c6232cfd62a5519bae530d18485c926f87a8fff547f3b5b5bc6255ed
|
data/README.md
CHANGED
@@ -0,0 +1,23 @@
|
|
1
|
+
(function($) {
|
2
|
+
var loadCurrentTableTabOnce = function($el) {
|
3
|
+
$el.load($el.find('a.loading').attr('href'));
|
4
|
+
};
|
5
|
+
|
6
|
+
Adhoq.toggleCurrentTables = function(action, elements){
|
7
|
+
loadCurrentTableTabOnce($('#current-tables'));
|
8
|
+
|
9
|
+
var $main = $(elements.main);
|
10
|
+
var $tables = $(elements.tables);
|
11
|
+
|
12
|
+
if (action === 'show') {
|
13
|
+
$main.addClass('col-md-6').removeClass('col-md-12');
|
14
|
+
$tables.addClass('col-md-6').show();
|
15
|
+
} else {
|
16
|
+
$main.addClass('col-md-12').removeClass('col-md-6');
|
17
|
+
$tables.addClass('col-md-6').hide();
|
18
|
+
}
|
19
|
+
|
20
|
+
return true;
|
21
|
+
};
|
22
|
+
})(jQuery);
|
23
|
+
|
@@ -0,0 +1,52 @@
|
|
1
|
+
(function($) {
|
2
|
+
var Previewer = function(el) {
|
3
|
+
this.el = el;
|
4
|
+
}
|
5
|
+
|
6
|
+
Previewer.prototype.init = function() {
|
7
|
+
var self = this;
|
8
|
+
this.el.on('adhoq:updatePreview', function() {
|
9
|
+
self.update()
|
10
|
+
});
|
11
|
+
|
12
|
+
return this.el.on('click', function() {
|
13
|
+
self.el.trigger('adhoq:updatePreview');
|
14
|
+
return false;
|
15
|
+
});
|
16
|
+
}
|
17
|
+
|
18
|
+
Previewer.prototype.update = function() {
|
19
|
+
var self = this;
|
20
|
+
return jQuery.ajax({
|
21
|
+
type: this.el.data('method'),
|
22
|
+
url: this.el.attr('href'),
|
23
|
+
data: {query: this.source()},
|
24
|
+
complete: function(xhr) {
|
25
|
+
return self.result().html(xhr.responseText);
|
26
|
+
}
|
27
|
+
});
|
28
|
+
}
|
29
|
+
|
30
|
+
Previewer.prototype.source = function() {
|
31
|
+
return $(this.el.data('source')).val();
|
32
|
+
}
|
33
|
+
|
34
|
+
Previewer.prototype.result = function() {
|
35
|
+
return $(this.el.data('result'));
|
36
|
+
}
|
37
|
+
|
38
|
+
Adhoq.enablePreview = function($el) {
|
39
|
+
(new Previewer($el)).init()
|
40
|
+
}
|
41
|
+
|
42
|
+
Adhoq.enablePreviewKeybordShortCut = function($textarea, previewSelector) {
|
43
|
+
$textarea.on('keyup', function(ev){
|
44
|
+
if(ev.ctrlKey && (ev.keyCode === 82)) {
|
45
|
+
$(previewSelector).trigger('adhoq:updatePreview');
|
46
|
+
}
|
47
|
+
|
48
|
+
return false;
|
49
|
+
})
|
50
|
+
}
|
51
|
+
})(jQuery);
|
52
|
+
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<nav class="navbar navbar-default" id="global-nav" role="navigation">
|
2
|
+
<div class="container-fluid">
|
3
|
+
<div class="navbar-header">
|
4
|
+
<%= link_to 'Adhoq', root_path, class: 'navbar-brand' %>
|
5
|
+
</div>
|
6
|
+
<div class="navbar-collapse collapse">
|
7
|
+
<ul class="nav navbar-nav navbar-right">
|
8
|
+
<% if main_app.respond_to?(:root_path) %>
|
9
|
+
<li>
|
10
|
+
<%= link_to main_app.root_path do %>
|
11
|
+
<i class="fa fa-arrow-circle-right fa-pad-r"></i>Main app
|
12
|
+
<% end %>
|
13
|
+
</li>
|
14
|
+
<% end %>
|
15
|
+
</ul>
|
16
|
+
</div>
|
17
|
+
</div>
|
18
|
+
</nav>
|
@@ -0,0 +1,53 @@
|
|
1
|
+
<h3>
|
2
|
+
<i class="fa fa-database fa-pad-r" />Current tables
|
3
|
+
<small><%= "Version #{schema_version}" %></small>
|
4
|
+
<div class="pull-right">
|
5
|
+
<button class="close" data-trigger="toggleCurrentTables" role="close">
|
6
|
+
<span aria-hidden="">×</span>
|
7
|
+
</button>
|
8
|
+
</div>
|
9
|
+
</h3>
|
10
|
+
|
11
|
+
<ul class="list-unstyled tables">
|
12
|
+
<% @ar_classes.each do |ar_class| %>
|
13
|
+
<% first_record = ar_class.unscoped.order(table_order_key(ar_class)).first %>
|
14
|
+
|
15
|
+
<li class="ar_class" data-table-name="<%= ar_class.table_name %>">
|
16
|
+
<table class="table table-striped table-hover table-bordered">
|
17
|
+
<caption>
|
18
|
+
<span class="name"><%= ar_class.table_name %></span>
|
19
|
+
<% unless Adhoq.config.hide_rows_count %>
|
20
|
+
<small class="count"><%= ar_class.unscoped.count %> rows</small>
|
21
|
+
<% end %>
|
22
|
+
</caption>
|
23
|
+
<thead>
|
24
|
+
<tr>
|
25
|
+
<th class="col-sm-1 pk">PK</th>
|
26
|
+
<th class="col-sm-3 name"> Name</th>
|
27
|
+
<th class="col-sm-2 type"> Type</th>
|
28
|
+
<th class="col-sm-1 null"> Non-Null</th>
|
29
|
+
<th class="col-sm-2 limit">Limit</th>
|
30
|
+
<th class="col-sm-3 default"> Default</th>
|
31
|
+
</tr>
|
32
|
+
</thead>
|
33
|
+
<tbody>
|
34
|
+
<% ar_class.columns.each do |column| %>
|
35
|
+
<tr>
|
36
|
+
<td class="pk icon"><%= column.name == ar_class.primary_key ? icon_fa('check-circle') : '' %>
|
37
|
+
</td>
|
38
|
+
<td class="monospace"><%= column.name %>
|
39
|
+
</td>
|
40
|
+
<td><%= column.type %>
|
41
|
+
</td>
|
42
|
+
<td class="null icon"><%= column.null ? '' : icon_fa('check') %>
|
43
|
+
</td>
|
44
|
+
<td class="limit number"><%= column.limit %>
|
45
|
+
</td>
|
46
|
+
<td><%= column.default %></td>
|
47
|
+
</tr>
|
48
|
+
<% end %>
|
49
|
+
</tbody>
|
50
|
+
</table>
|
51
|
+
</li>
|
52
|
+
<% end %>
|
53
|
+
</ul>
|
@@ -0,0 +1 @@
|
|
1
|
+
<pre><%= @result %></pre>
|
@@ -0,0 +1,21 @@
|
|
1
|
+
<p class="note">
|
2
|
+
<%= @result.rows.size %> rows
|
3
|
+
</p>
|
4
|
+
<table class="table table-striped table-focus">
|
5
|
+
<thead>
|
6
|
+
<tr>
|
7
|
+
<% @result.header.each do |column| %>
|
8
|
+
<th><%= column %></th>
|
9
|
+
<% end %>
|
10
|
+
</tr>
|
11
|
+
</thead>
|
12
|
+
<tbody>
|
13
|
+
<% @result.rows.take(100).each do |row| %>
|
14
|
+
<tr>
|
15
|
+
<% row.each do |val| %>
|
16
|
+
<td><%= val %></td>
|
17
|
+
<% end %>
|
18
|
+
</tr>
|
19
|
+
<% end %>
|
20
|
+
</tbody>
|
21
|
+
</table>
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<div id="current-tables">
|
2
|
+
<a class="loading" href="<%= current_tables_path %>"></a>
|
3
|
+
</div>
|
4
|
+
<script>
|
5
|
+
$(function() {
|
6
|
+
|
7
|
+
$(document).on('click', '[data-trigger="toggleCurrentTables"]', function($ev) {
|
8
|
+
|
9
|
+
Adhoq.toggleCurrentTables($($ev.target).attr('role'), {main: '#main', tables: '#current-tables'});
|
10
|
+
|
11
|
+
})
|
12
|
+
|
13
|
+
});
|
14
|
+
</script>
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<tr exec="">
|
2
|
+
<td class="wip"></td>
|
3
|
+
<td class="created_at"><%= exec.created_at.localtime.iso8601 %></td>
|
4
|
+
<td class="status"><%= exec.status_label %></td>
|
5
|
+
<td class="report">
|
6
|
+
<% if exec.success? %>
|
7
|
+
<%= link_to(query_execution_path(query, exec, format: exec.report_format), class: 'btn btn-sm btn-default') do %>
|
8
|
+
<i class="fa fa-download fa-pad-r"></i><%= exec.report_format %>
|
9
|
+
<% end %>
|
10
|
+
<% end %>
|
@@ -0,0 +1,124 @@
|
|
1
|
+
<%= form_for query, html: {class: 'form query-form', role: 'form'} do |f| %>
|
2
|
+
<div class="page-header">
|
3
|
+
<h1>
|
4
|
+
<%= f.label :query, title, class: 'control-label' %>
|
5
|
+
<div class="pull-right">
|
6
|
+
<a href="#" class="btn btn-default btn-sm" data-trigger="toggleCurrentTables" role="show">
|
7
|
+
<i class="fa fa-database fa-pad-r"></i> Show tables
|
8
|
+
</a>
|
9
|
+
</div>
|
10
|
+
</h1>
|
11
|
+
</div>
|
12
|
+
|
13
|
+
<div class="form-group">
|
14
|
+
<%= f.text_area :query, class: 'form-control', rows: 15, required: true %>
|
15
|
+
</div>
|
16
|
+
|
17
|
+
<div class="modal fade" id="nameAndDesc" role="dialog">
|
18
|
+
<div class="modal-dialog">
|
19
|
+
<div class="modal-content">
|
20
|
+
<div class="modal-header">
|
21
|
+
<button class="close" data-dismiss="modal" aria-label="close" />
|
22
|
+
<button class="close" type="button" data-dismiss="modal" aria-label="close">
|
23
|
+
<span aria-hidden="true">×</span>
|
24
|
+
</button>
|
25
|
+
|
26
|
+
<h4>Add name and description to query</h4>
|
27
|
+
</div>
|
28
|
+
<div class="modal-body">
|
29
|
+
<div class="form-horizontal">
|
30
|
+
<div class="form-group">
|
31
|
+
<%= f.label :name, class: 'control-label col-sm-2' %>
|
32
|
+
<div class="col-sm-8">
|
33
|
+
<%= f.text_field :name, class: 'form-control', required: true %>
|
34
|
+
</div>
|
35
|
+
</div>
|
36
|
+
<div class="form-group">
|
37
|
+
<%= f.label :description, class: 'control-label col-sm-2' %>
|
38
|
+
<div class="col-sm-8">
|
39
|
+
<%= f.text_area :description, class: 'form-control', required: true %>
|
40
|
+
</div>
|
41
|
+
</div>
|
42
|
+
</div>
|
43
|
+
</div>
|
44
|
+
<div class="modal-footer">
|
45
|
+
<button class="btn btn-primary center-block">
|
46
|
+
<i class="fa fa-floppy-o fa-pad-r"></i>Save
|
47
|
+
</button>
|
48
|
+
</div>
|
49
|
+
</div>
|
50
|
+
</div>
|
51
|
+
</div>
|
52
|
+
|
53
|
+
<div class="actions">
|
54
|
+
<% if query.persisted? %>
|
55
|
+
<%= link_to query do %>
|
56
|
+
<i class="fa fa-arrow-left fa-pad-r"></i>Cancel
|
57
|
+
<% end %>
|
58
|
+
<% else %>
|
59
|
+
<%= link_to :queries do %>
|
60
|
+
<i class="fa fa-arrow-left fa-pad-r"></i>Back to Index
|
61
|
+
<% end %>
|
62
|
+
<% end %>
|
63
|
+
|
64
|
+
<div class="pull-right">
|
65
|
+
<%= link_to '#nameAndDesc', class: 'btn btn-default btn-sm', data: {toggle: 'modal', target: '#nameAndDesc'} do %>
|
66
|
+
<i class="fa fa-floppy-o fa-pad-r"></i>Save as...
|
67
|
+
<% end %>
|
68
|
+
</div>
|
69
|
+
</div>
|
70
|
+
|
71
|
+
<% end %>
|
72
|
+
|
73
|
+
<ul class="nav nav-tabs" role="tablist">
|
74
|
+
<li class="active">
|
75
|
+
<a data-toggle="tab" href="#preview" role="tab">
|
76
|
+
<i class="fa fa-eye fa-pad-r"></i>Preview
|
77
|
+
</a>
|
78
|
+
</li>
|
79
|
+
<li>
|
80
|
+
<a data-toggle="tab" href="#explain" role="tab">
|
81
|
+
<i class="fa fa-info fa-pad-r"></i>Explain
|
82
|
+
</a>
|
83
|
+
</li>
|
84
|
+
</ul>
|
85
|
+
|
86
|
+
<div class="tab-content" id="previews">
|
87
|
+
<div class="tab-pane active" id="preview">
|
88
|
+
<h3>Query preview
|
89
|
+
<small>
|
90
|
+
<%= link_to preview_path, class: 'js-preview-button', data: {source: '#query_query', result: '.js-preview-result', remote: true, method: 'POST'} do %>
|
91
|
+
<i class="fa fa-refresh fa-pad-r" data-title="Refresh preview"></i> Refresh
|
92
|
+
<% end %>
|
93
|
+
</small>
|
94
|
+
</h3>
|
95
|
+
<div class="js-preview-result">
|
96
|
+
<div class="alert alert-info">Preview is shown here</div>
|
97
|
+
</div>
|
98
|
+
</div>
|
99
|
+
<div class="tab-pane" id="explain">
|
100
|
+
<h3>Query explain
|
101
|
+
<small>
|
102
|
+
<%= link_to explain_path, class: 'js-explain-button', data: {source: '#query_query', result: '.js-explain-result', remote: true, method: 'POST'} do %>
|
103
|
+
<i class="fa fa-refresh fa-pad-r" data-title="Refresh explain"></i> Refresh
|
104
|
+
<% end %>
|
105
|
+
</small>
|
106
|
+
</h3>
|
107
|
+
<div class="js-explain-result">
|
108
|
+
<div class="alert alert-info">Explain result is shown here</div>
|
109
|
+
</div>
|
110
|
+
</div>
|
111
|
+
</div>
|
112
|
+
<script>
|
113
|
+
$(function() {
|
114
|
+
|
115
|
+
Adhoq.enablePreview($('#preview a.js-preview-button'));
|
116
|
+
|
117
|
+
Adhoq.enablePreview($('#explain a.js-explain-button'));
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
Adhoq.enablePreviewKeybordShortCut($('#query_query'), '#previews .tab-pane.active a:has(".fa-refresh")')
|
122
|
+
|
123
|
+
});
|
124
|
+
</script>
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<% highlight ||= nil %>
|
2
|
+
<section>
|
3
|
+
<%= link_to :root, class: 'btn btn-default new-query btn-sm center-block' do %>
|
4
|
+
<i class="fa fa-plus-square fa-pad-r"></i>New query
|
5
|
+
<% end %>
|
6
|
+
<ol class="queries-index list-unstyled">
|
7
|
+
<% queries.each do |query| %>
|
8
|
+
<li class="panel <%= query == highlight ? 'panel-success' : 'panel-default' %>">
|
9
|
+
<div class="panel-heading">
|
10
|
+
<h2><%= link_to query.name, query_path(query) %></h2>
|
11
|
+
</div>
|
12
|
+
<p class="panel-body description"><%= query.description %></p>
|
13
|
+
</li>
|
14
|
+
<% end %>
|
15
|
+
</ol>
|
16
|
+
</section>
|
@@ -0,0 +1,67 @@
|
|
1
|
+
<section class="query">
|
2
|
+
<div class="page-header">
|
3
|
+
<h1>
|
4
|
+
<%= query.name %>
|
5
|
+
<div class="pull-right">
|
6
|
+
<%= link_to [:edit, query], class: 'btn btn-default btn-sm' do %>
|
7
|
+
<i class="fa fa-pencil fa-pad-r" ></i> Edit
|
8
|
+
<% end %>
|
9
|
+
</div>
|
10
|
+
<div class="pull-right">
|
11
|
+
<%= link_to 'Delete', query, class: 'btn btn-default btn-sm', method: :delete, data: { confirm: 'Are you sure?' } %>
|
12
|
+
</div>
|
13
|
+
<div class="clearfix" />
|
14
|
+
<small><%= "Updated at #{l(query.updated_at, format: :short)}" %></small>
|
15
|
+
</h1>
|
16
|
+
</div>
|
17
|
+
|
18
|
+
<p class="description"><%= query.description %></p>
|
19
|
+
<style type="text/css">
|
20
|
+
<%= Rouge::Themes::Github.render(scope: '.highlight') %>
|
21
|
+
</style>
|
22
|
+
|
23
|
+
<%= raw query.query_with_highlight %>
|
24
|
+
|
25
|
+
<section class="new-execution">
|
26
|
+
<h2>Create report</h2>
|
27
|
+
<%= form_for [query, query.executions.build], html: {role: 'form'} do |f| %>
|
28
|
+
<div class="form-inline form-group report_format">
|
29
|
+
<%= f.label :report_format %>
|
30
|
+
<%= f.select :report_format, f.object.supported_formats, {}, class: 'form-control' %>
|
31
|
+
<% if query.parameters.present? %>
|
32
|
+
<h4>Query parameters</h4>
|
33
|
+
<div class="form-group query_parameters">
|
34
|
+
<% query.parameters.each do |param_name| %>
|
35
|
+
<div class="form-inline query_parameter">
|
36
|
+
<%= label_tag "parameters_#{param_name}", "#{param_name}" %>
|
37
|
+
<%= query_parameter_field(param_name) %>
|
38
|
+
</div>
|
39
|
+
<% end %>
|
40
|
+
</div>
|
41
|
+
<% end %>
|
42
|
+
<div class="form-group">
|
43
|
+
<%= f.submit 'Create report', class: 'btn btn-default' %>
|
44
|
+
</div>
|
45
|
+
</div>
|
46
|
+
<% end %>
|
47
|
+
</section>
|
48
|
+
<section class="past-executions">
|
49
|
+
<h2>Reports</h2>
|
50
|
+
<table class="executions table table-striped table-hover">
|
51
|
+
<thead>
|
52
|
+
<tr>
|
53
|
+
<th class="wip"> </th>
|
54
|
+
<th class="created_at"><%= human(Adhoq::Execution, :created_at) %></th>
|
55
|
+
<th class="status"><%= human(Adhoq::Execution, :status) %></th>
|
56
|
+
<th class="report"></th>
|
57
|
+
</tr>
|
58
|
+
</thead>
|
59
|
+
<tbody>
|
60
|
+
<% query.executions.recent_first.preload(:report).each do |exec| %>
|
61
|
+
<% next if exec.report.try(:on_the_fly?) %>
|
62
|
+
<%= render 'execution', query: query, exec: exec %>
|
63
|
+
<% end %>
|
64
|
+
</tbody>
|
65
|
+
</table>
|
66
|
+
</section>
|
67
|
+
</section>
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<div class="col-md-12">
|
2
|
+
<ol class="breadcrumb">
|
3
|
+
<li><%= link_to 'Index', :queries %></li>
|
4
|
+
<li><%= link_to query_friendly_name(@query), @query %></li>
|
5
|
+
<li class="active"> Edit</li>
|
6
|
+
</ol>
|
7
|
+
</div>
|
8
|
+
<div class="col-md-12" id="main">
|
9
|
+
<section class="edit-query">
|
10
|
+
<%= render 'form', query: @query, title: "Edit query > #{query_friendly_name(@query)}" %>
|
11
|
+
</section>
|
12
|
+
</div>
|
13
|
+
<%= render 'current_tables_leftbar' %>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<div class="col-md-12">
|
2
|
+
<ol class="breadcrumb">
|
3
|
+
<li class="active">Index</li>
|
4
|
+
</ol>
|
5
|
+
</div>
|
6
|
+
<div class="col-md-3" id="queries">
|
7
|
+
<section class="queries">
|
8
|
+
<%= render 'queries', queries: @queries %>
|
9
|
+
</section>
|
10
|
+
</div>
|
11
|
+
<div class="col-md-9" id="the-query">
|
12
|
+
<% if first_query = @queries.first %>
|
13
|
+
<%= render 'query', query: first_query %>
|
14
|
+
<% end %>
|
15
|
+
</div>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<div class="col-md-12">
|
2
|
+
<ol class="breadcrumb">
|
3
|
+
<li><%= link_to 'Index', :queries %></li>
|
4
|
+
<li class="active"> New query</li>
|
5
|
+
</ol>
|
6
|
+
</div>
|
7
|
+
<div class="col-md-12" id="main">
|
8
|
+
<section class="new-query">
|
9
|
+
<%= render 'form', query: @query, title: 'New query' %>
|
10
|
+
</section>
|
11
|
+
</div>
|
12
|
+
<%= render 'current_tables_leftbar' %>
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<div class="col-md-12">
|
2
|
+
<ol class="breadcrumb">
|
3
|
+
<li><%= link_to 'Index', :queries %></li>
|
4
|
+
<li class="active"><%= query_friendly_name(@query) %></li>
|
5
|
+
</ol>
|
6
|
+
</div>
|
7
|
+
<div class="col-md-3" id="queries">
|
8
|
+
<section class="queries">
|
9
|
+
<%= render 'queries', queries: ::Adhoq::Query.recent_first, highlight: @query %>
|
10
|
+
</section>
|
11
|
+
</div>
|
12
|
+
<div class="col-md-9" id="the-query">
|
13
|
+
<%= render 'query', query: @query %>
|
14
|
+
</div>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>Adhoq</title>
|
5
|
+
<%= stylesheet_link_tag 'adhoq/application', media: 'all' %>
|
6
|
+
<%= javascript_include_tag 'adhoq/application' %>
|
7
|
+
<%= csrf_meta_tags %>
|
8
|
+
</head>
|
9
|
+
<body>
|
10
|
+
<div class="container">
|
11
|
+
<%= render 'global_nav' %>
|
12
|
+
|
13
|
+
<div class="row" id="contents">
|
14
|
+
<%= yield %>
|
15
|
+
</div>
|
16
|
+
</div>
|
17
|
+
</body>
|
18
|
+
</html>
|
data/lib/adhoq/engine.rb
CHANGED
data/lib/adhoq/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: adhoq
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kyosuke MOROHASHI
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-04-
|
11
|
+
date: 2019-04-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '5.1'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '5.1'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: axlsx
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -38,20 +38,6 @@ dependencies:
|
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '2.0'
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: coffee-rails
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - ">="
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: '0'
|
48
|
-
type: :runtime
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - ">="
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: '0'
|
55
41
|
- !ruby/object:Gem::Dependency
|
56
42
|
name: fog-aws
|
57
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -122,20 +108,6 @@ dependencies:
|
|
122
108
|
- - ">="
|
123
109
|
- !ruby/object:Gem::Version
|
124
110
|
version: '0'
|
125
|
-
- !ruby/object:Gem::Dependency
|
126
|
-
name: slim-rails
|
127
|
-
requirement: !ruby/object:Gem::Requirement
|
128
|
-
requirements:
|
129
|
-
- - ">="
|
130
|
-
- !ruby/object:Gem::Version
|
131
|
-
version: '0'
|
132
|
-
type: :runtime
|
133
|
-
prerelease: false
|
134
|
-
version_requirements: !ruby/object:Gem::Requirement
|
135
|
-
requirements:
|
136
|
-
- - ">="
|
137
|
-
- !ruby/object:Gem::Version
|
138
|
-
version: '0'
|
139
111
|
- !ruby/object:Gem::Dependency
|
140
112
|
name: active_decorator
|
141
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -196,16 +168,16 @@ dependencies:
|
|
196
168
|
name: factory_bot_rails
|
197
169
|
requirement: !ruby/object:Gem::Requirement
|
198
170
|
requirements:
|
199
|
-
- - "
|
171
|
+
- - "~>"
|
200
172
|
- !ruby/object:Gem::Version
|
201
|
-
version:
|
173
|
+
version: 4.11.1
|
202
174
|
type: :development
|
203
175
|
prerelease: false
|
204
176
|
version_requirements: !ruby/object:Gem::Requirement
|
205
177
|
requirements:
|
206
|
-
- - "
|
178
|
+
- - "~>"
|
207
179
|
- !ruby/object:Gem::Version
|
208
|
-
version:
|
180
|
+
version: 4.11.1
|
209
181
|
- !ruby/object:Gem::Dependency
|
210
182
|
name: launchy
|
211
183
|
requirement: !ruby/object:Gem::Requirement
|
@@ -329,8 +301,8 @@ files:
|
|
329
301
|
- app/assets/javascripts/adhoq/bootstrap/tab.js
|
330
302
|
- app/assets/javascripts/adhoq/bootstrap/tooltip.js
|
331
303
|
- app/assets/javascripts/adhoq/bootstrap/transition.js
|
332
|
-
- app/assets/javascripts/adhoq/current_tables.js
|
333
|
-
- app/assets/javascripts/adhoq/previewer.js
|
304
|
+
- app/assets/javascripts/adhoq/current_tables.js
|
305
|
+
- app/assets/javascripts/adhoq/previewer.js
|
334
306
|
- app/assets/stylesheets/adhoq/_bootstrap-compass.scss
|
335
307
|
- app/assets/stylesheets/adhoq/_bootstrap-mincer.scss
|
336
308
|
- app/assets/stylesheets/adhoq/_bootstrap-sprockets.scss
|
@@ -422,22 +394,22 @@ files:
|
|
422
394
|
- app/models/adhoq/query.rb
|
423
395
|
- app/models/adhoq/report.rb
|
424
396
|
- app/models/adhoq/time_based_orders.rb
|
425
|
-
- app/views/adhoq/application/_global_nav.html.
|
426
|
-
- app/views/adhoq/current_tables/index.html.
|
427
|
-
- app/views/adhoq/explains/create.html.
|
428
|
-
- app/views/adhoq/explains/statement_invalid.html.
|
429
|
-
- app/views/adhoq/previews/create.html.
|
430
|
-
- app/views/adhoq/previews/statement_invalid.html.
|
431
|
-
- app/views/adhoq/queries/_current_tables_leftbar.html.
|
432
|
-
- app/views/adhoq/queries/_execution.html.
|
433
|
-
- app/views/adhoq/queries/_form.html.
|
434
|
-
- app/views/adhoq/queries/_queries.html.
|
435
|
-
- app/views/adhoq/queries/_query.html.
|
436
|
-
- app/views/adhoq/queries/edit.html.
|
437
|
-
- app/views/adhoq/queries/index.html.
|
438
|
-
- app/views/adhoq/queries/new.html.
|
439
|
-
- app/views/adhoq/queries/show.html.
|
440
|
-
- app/views/layouts/adhoq/application.html.
|
397
|
+
- app/views/adhoq/application/_global_nav.html.erb
|
398
|
+
- app/views/adhoq/current_tables/index.html.erb
|
399
|
+
- app/views/adhoq/explains/create.html.erb
|
400
|
+
- app/views/adhoq/explains/statement_invalid.html.erb
|
401
|
+
- app/views/adhoq/previews/create.html.erb
|
402
|
+
- app/views/adhoq/previews/statement_invalid.html.erb
|
403
|
+
- app/views/adhoq/queries/_current_tables_leftbar.html.erb
|
404
|
+
- app/views/adhoq/queries/_execution.html.erb
|
405
|
+
- app/views/adhoq/queries/_form.html.erb
|
406
|
+
- app/views/adhoq/queries/_queries.html.erb
|
407
|
+
- app/views/adhoq/queries/_query.html.erb
|
408
|
+
- app/views/adhoq/queries/edit.html.erb
|
409
|
+
- app/views/adhoq/queries/index.html.erb
|
410
|
+
- app/views/adhoq/queries/new.html.erb
|
411
|
+
- app/views/adhoq/queries/show.html.erb
|
412
|
+
- app/views/layouts/adhoq/application.html.erb
|
441
413
|
- config/routes.rb
|
442
414
|
- db/migrate/20141003095645_create_adhoq_queries.rb
|
443
415
|
- db/migrate/20141006014750_create_adhoq_executions.rb
|
@@ -1,18 +0,0 @@
|
|
1
|
-
loadCurrentTableTabOnce = ($el)->
|
2
|
-
$el.load($el.find('a.loading').attr('href'))
|
3
|
-
|
4
|
-
Adhoq.toggleCurrentTables = (action, elements)->
|
5
|
-
loadCurrentTableTabOnce($('#current-tables'))
|
6
|
-
|
7
|
-
$main = $(elements.main)
|
8
|
-
$tables = $(elements.tables)
|
9
|
-
|
10
|
-
if action is 'show'
|
11
|
-
$main.addClass('col-md-6').removeClass('col-md-12')
|
12
|
-
$tables.addClass('col-md-6').show()
|
13
|
-
else
|
14
|
-
$main.addClass('col-md-12').removeClass('col-md-6')
|
15
|
-
$tables.addClass('col-md-6').hide()
|
16
|
-
|
17
|
-
true
|
18
|
-
|
@@ -1,34 +0,0 @@
|
|
1
|
-
class Previewer
|
2
|
-
constructor: (@el)->
|
3
|
-
|
4
|
-
init: ->
|
5
|
-
@el.on 'adhoq:updatePreview', => @update()
|
6
|
-
|
7
|
-
@el.on 'click', =>
|
8
|
-
@el.trigger 'adhoq:updatePreview'
|
9
|
-
false
|
10
|
-
|
11
|
-
update: ->
|
12
|
-
jQuery.ajax(
|
13
|
-
type: @el.data('method'),
|
14
|
-
url: @el.attr('href'),
|
15
|
-
data: {query: @source()},
|
16
|
-
complete: (xhr)=>
|
17
|
-
@result().html(xhr.responseText)
|
18
|
-
)
|
19
|
-
|
20
|
-
source: ->
|
21
|
-
$(@el.data('source')).val()
|
22
|
-
|
23
|
-
result: ->
|
24
|
-
$(@el.data('result'))
|
25
|
-
|
26
|
-
Adhoq.enablePreview = ($el)->
|
27
|
-
(new Previewer($el)).init()
|
28
|
-
|
29
|
-
Adhoq.enablePreviewKeybordShortCut= ($textarea, previewSelector)->
|
30
|
-
$textarea.on 'keyup', (ev)->
|
31
|
-
if(ev.ctrlKey && ev.keyCode is 82)
|
32
|
-
$(previewSelector).trigger('adhoq:updatePreview')
|
33
|
-
|
34
|
-
false
|
@@ -1,12 +0,0 @@
|
|
1
|
-
nav#global-nav.navbar.navbar-default(role='navigation')
|
2
|
-
.container-fluid
|
3
|
-
.navbar-header
|
4
|
-
= link_to 'Adhoq', root_path, class: 'navbar-brand'
|
5
|
-
.navbar-collapse.collapse
|
6
|
-
ul.nav.navbar-nav.navbar-right
|
7
|
-
- if main_app.respond_to?(:root_path)
|
8
|
-
li
|
9
|
-
= link_to main_app.root_path do
|
10
|
-
i.fa.fa-arrow-circle-right.fa-pad-r
|
11
|
-
| Main app
|
12
|
-
|
@@ -1,35 +0,0 @@
|
|
1
|
-
h3
|
2
|
-
i.fa.fa-database.fa-pad-r
|
3
|
-
| Current tables
|
4
|
-
small= "Version #{schema_version}"
|
5
|
-
.pull-right
|
6
|
-
button.close[data-trigger="toggleCurrentTables" role='close']
|
7
|
-
span[aria-hidden=true] ×
|
8
|
-
|
9
|
-
ul.list-unstyled.tables
|
10
|
-
- @ar_classes.each do |ar_class|
|
11
|
-
- first_record = ar_class.unscoped.order(table_order_key(ar_class)).first
|
12
|
-
|
13
|
-
li.ar_class data-table-name=ar_class.table_name
|
14
|
-
table.table.table-striped.table-hover.table-bordered
|
15
|
-
caption
|
16
|
-
span.name= ar_class.table_name
|
17
|
-
- unless Adhoq.config.hide_rows_count
|
18
|
-
small.count #{ar_class.unscoped.count} rows
|
19
|
-
thead
|
20
|
-
tr
|
21
|
-
th.col-sm-1.pk PK
|
22
|
-
th.col-sm-3.name Name
|
23
|
-
th.col-sm-2.type Type
|
24
|
-
th.col-sm-1.null Non-Null
|
25
|
-
th.col-sm-2.limit Limit
|
26
|
-
th.col-sm-3.default Default
|
27
|
-
tbody
|
28
|
-
- ar_class.columns.each do |column|
|
29
|
-
tr
|
30
|
-
td.pk.icon= column.name == ar_class.primary_key ? icon_fa('check-circle') : ''
|
31
|
-
td.monospace= column.name
|
32
|
-
td= column.type
|
33
|
-
td.null.icon= column.null ? '' : icon_fa('check')
|
34
|
-
td.limit.number= column.limit
|
35
|
-
td= column.default
|
@@ -1,9 +0,0 @@
|
|
1
|
-
#current-tables
|
2
|
-
a.loading[href=current_tables_path]
|
3
|
-
|
4
|
-
javascript:
|
5
|
-
$(function() {
|
6
|
-
$(document).on('click', '[data-trigger="toggleCurrentTables"]', function($ev) {
|
7
|
-
Adhoq.toggleCurrentTables($($ev.target).attr('role'), {main: '#main', tables: '#current-tables'});
|
8
|
-
})
|
9
|
-
});
|
@@ -1,10 +0,0 @@
|
|
1
|
-
tr[exec]
|
2
|
-
td.wip
|
3
|
-
td.created_at= exec.created_at.localtime.iso8601
|
4
|
-
td.status
|
5
|
-
= exec.status_label
|
6
|
-
td.report
|
7
|
-
- if exec.success?
|
8
|
-
= link_to(query_execution_path(query, exec, format: exec.report_format), class: 'btn btn-sm btn-default') do
|
9
|
-
i.fa.fa-download.fa-pad-r
|
10
|
-
= exec.report_format
|
@@ -1,93 +0,0 @@
|
|
1
|
-
= form_for query, html: {class: 'form query-form', role: 'form'} do |f|
|
2
|
-
.page-header
|
3
|
-
h1
|
4
|
-
= f.label :query, title, class: 'control-label'
|
5
|
-
.pull-right
|
6
|
-
a.btn.btn-default.btn-sm[href='#' data-trigger='toggleCurrentTables' role='show']
|
7
|
-
i.fa.fa-database.fa-pad-r
|
8
|
-
| Show tables
|
9
|
-
|
10
|
-
.form-group
|
11
|
-
= f.text_area :query, class: 'form-control', rows: 15, required: true
|
12
|
-
|
13
|
-
.modal.fade#nameAndDesc[role='dialog']
|
14
|
-
.modal-dialog
|
15
|
-
.modal-content
|
16
|
-
.modal-header
|
17
|
-
button.close[data-dismiss='modal' aria-label='Close']
|
18
|
-
button.close[type='button' data-dismiss='modal' aria-label='Close']
|
19
|
-
span[aria-hidden='true'] ×
|
20
|
-
|
21
|
-
h4 Add name and description to query
|
22
|
-
.modal-body
|
23
|
-
.form-horizontal
|
24
|
-
.form-group
|
25
|
-
= f.label :name, class: 'control-label col-sm-2'
|
26
|
-
.col-sm-8
|
27
|
-
= f.text_field :name, class: 'form-control', required: true
|
28
|
-
|
29
|
-
.form-group
|
30
|
-
= f.label :description, class: 'control-label col-sm-2'
|
31
|
-
.col-sm-8
|
32
|
-
= f.text_area :description, class: 'form-control', required: true
|
33
|
-
.modal-footer
|
34
|
-
button.btn.btn-primary.center-block
|
35
|
-
i.fa.fa-floppy-o.fa-pad-r
|
36
|
-
| Save
|
37
|
-
|
38
|
-
.actions
|
39
|
-
- if query.persisted?
|
40
|
-
= link_to query do
|
41
|
-
i.fa.fa-arrow-left.fa-pad-r
|
42
|
-
| Cancel
|
43
|
-
- else
|
44
|
-
= link_to :queries do
|
45
|
-
i.fa.fa-arrow-left.fa-pad-r
|
46
|
-
| Back to Index
|
47
|
-
|
48
|
-
.pull-right
|
49
|
-
= link_to '#nameAndDesc', class: 'btn btn-default btn-sm', data: {toggle: 'modal', target: '#nameAndDesc'} do
|
50
|
-
i.fa.fa-floppy-o.fa-pad-r
|
51
|
-
| Save as...
|
52
|
-
|
53
|
-
ul.nav.nav-tabs[role='tablist']
|
54
|
-
li.active
|
55
|
-
a[role='tab' data-toggle='tab' href='#preview' ]
|
56
|
-
i.fa.fa-eye.fa-pad-r
|
57
|
-
| Preview
|
58
|
-
li
|
59
|
-
a[role='tab' data-toggle='tab' href='#explain' ]
|
60
|
-
i.fa.fa-info.fa-pad-r
|
61
|
-
| Explain
|
62
|
-
|
63
|
-
#previews.tab-content
|
64
|
-
#preview.tab-pane.active
|
65
|
-
h3
|
66
|
-
| Query preview
|
67
|
-
small
|
68
|
-
= link_to preview_path, class: 'js-preview-button', data: {source: '#query_query', result: '.js-preview-result', remote: true, method: 'POST'} do
|
69
|
-
i.fa.fa-refresh.fa-pad-r[data-title='Refresh preview']
|
70
|
-
| Refresh
|
71
|
-
|
72
|
-
.js-preview-result
|
73
|
-
.alert.alert-info Preview is shown here
|
74
|
-
|
75
|
-
#explain.tab-pane
|
76
|
-
h3
|
77
|
-
| Query explain
|
78
|
-
small
|
79
|
-
= link_to explain_path, class: 'js-explain-button', data: {source: '#query_query', result: '.js-explain-result', remote: true, method: 'POST'} do
|
80
|
-
i.fa.fa-refresh.fa-pad-r[data-title='Refresh explain']
|
81
|
-
| Refresh
|
82
|
-
|
83
|
-
.js-explain-result
|
84
|
-
.alert.alert-info Explain result is shown here
|
85
|
-
|
86
|
-
javascript:
|
87
|
-
$(function() {
|
88
|
-
Adhoq.enablePreview($('#preview a.js-preview-button'));
|
89
|
-
Adhoq.enablePreview($('#explain a.js-explain-button'));
|
90
|
-
|
91
|
-
Adhoq.enablePreviewKeybordShortCut($('#query_query'), '#previews .tab-pane.active a:has(".fa-refresh")')
|
92
|
-
});
|
93
|
-
|
@@ -1,14 +0,0 @@
|
|
1
|
-
- highlight ||= nil
|
2
|
-
section
|
3
|
-
= link_to :root, class: 'btn btn-default new-query btn-sm center-block' do
|
4
|
-
i.fa.fa-plus-square.fa-pad-r
|
5
|
-
| New query
|
6
|
-
|
7
|
-
ol.queries-index.list-unstyled
|
8
|
-
- queries.each do |query|
|
9
|
-
- css = (query == highlight) ? 'panel-success' : 'panel-default'
|
10
|
-
li.panel[query, class= css]
|
11
|
-
.panel-heading
|
12
|
-
h2= link_to query.name, query_path(query)
|
13
|
-
p.panel-body.description= query.description
|
14
|
-
|
@@ -1,48 +0,0 @@
|
|
1
|
-
section.query
|
2
|
-
.page-header
|
3
|
-
h1
|
4
|
-
= query.name
|
5
|
-
.pull-right
|
6
|
-
= link_to [:edit, query], class: 'btn btn-default btn-sm' do
|
7
|
-
i.fa.fa-pencil.fa-pad-r
|
8
|
-
| Edit
|
9
|
-
.pull-right
|
10
|
-
= link_to 'Delete', query, class: 'btn btn-default btn-sm', :method => :delete, data: { confirm: 'Are you sure?' }
|
11
|
-
.clearfix
|
12
|
-
small= "Updated at #{l(query.updated_at, format: :short)}"
|
13
|
-
p.description= query.description
|
14
|
-
|
15
|
-
css:
|
16
|
-
#{Rouge::Themes::Github.render(scope: '.highlight')}
|
17
|
-
|
18
|
-
= raw query.query_with_highlight
|
19
|
-
|
20
|
-
section.new-execution
|
21
|
-
h2 Create report
|
22
|
-
= form_for [query, query.executions.build], html: {role: 'form'} do |f|
|
23
|
-
.form-inline.form-group.report_format
|
24
|
-
= f.label :report_format
|
25
|
-
= f.select :report_format, f.object.supported_formats, {}, class: 'form-control'
|
26
|
-
- if query.parameters.present?
|
27
|
-
h4 Query parameters
|
28
|
-
.form-group.query_parameters
|
29
|
-
- query.parameters.each do |param_name|
|
30
|
-
.form-inline.query_parameter
|
31
|
-
= label_tag "parameters_#{param_name}", "#{param_name}"
|
32
|
-
= query_parameter_field(param_name)
|
33
|
-
.form-group
|
34
|
-
= f.submit 'Create report', class: 'btn btn-default'
|
35
|
-
|
36
|
-
section.past-executions
|
37
|
-
h2 Reports
|
38
|
-
table.executions.table.table-striped.table-hover
|
39
|
-
thead
|
40
|
-
tr
|
41
|
-
th.wip
|
42
|
-
th.created_at= human(Adhoq::Execution, :created_at)
|
43
|
-
th.status= human(Adhoq::Execution, :status)
|
44
|
-
th.report
|
45
|
-
tbody
|
46
|
-
- query.executions.recent_first.preload(:report).each do |exec|
|
47
|
-
- next if exec.report.try(:on_the_fly?)
|
48
|
-
= render 'execution', query: query, exec: exec
|
@@ -1,11 +0,0 @@
|
|
1
|
-
.col-md-12
|
2
|
-
ol.breadcrumb
|
3
|
-
li= link_to 'Index', :queries
|
4
|
-
li= link_to query_friendly_name(@query), @query
|
5
|
-
li.active Edit
|
6
|
-
|
7
|
-
#main.col-md-12
|
8
|
-
section.edit-query
|
9
|
-
= render 'form', query: @query, title: "Edit query > #{query_friendly_name(@query)}"
|
10
|
-
|
11
|
-
= render 'current_tables_leftbar'
|
@@ -1,11 +0,0 @@
|
|
1
|
-
.col-md-12
|
2
|
-
ol.breadcrumb
|
3
|
-
li= link_to 'Index', :queries
|
4
|
-
li.active= query_friendly_name(@query)
|
5
|
-
|
6
|
-
#queries.col-md-3
|
7
|
-
section.queries
|
8
|
-
= render 'queries', queries: Adhoq::Query.recent_first, highlight: @query
|
9
|
-
|
10
|
-
#the-query.col-md-9
|
11
|
-
= render 'query', query: @query
|