|
@@ -47,23 +47,23 @@
|
|
|
</div>
|
|
</div>
|
|
|
</fieldset>
|
|
</fieldset>
|
|
|
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
<div class="actions">
|
|
<div class="actions">
|
|
|
<a id="executeQuery" class="btn primary">Execute</a>
|
|
<a id="executeQuery" class="btn primary">Execute</a>
|
|
|
% if design and not design.is_auto and design.name:
|
|
% if design and not design.is_auto and design.name:
|
|
|
<a id="saveQuery" class="btn">Save</a>
|
|
<a id="saveQuery" class="btn">Save</a>
|
|
|
% endif
|
|
% endif
|
|
|
<a id="saveQueryAs" class="btn">Save as...</a>
|
|
<a id="saveQueryAs" class="btn">Save as...</a>
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
<a id="explainQuery" class="btn">Explain</a>
|
|
<a id="explainQuery" class="btn">Explain</a>
|
|
|
or <a href="${ url('beeswax.views.execute_query') }">create a new query</a>
|
|
or <a href="${ url('beeswax.views.execute_query') }">create a new query</a>
|
|
|
</div>
|
|
</div>
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
|
- <!--
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ <!--
|
|
|
<a href="#settings">see the advanced settings</a>
|
|
<a href="#settings">see the advanced settings</a>
|
|
|
<div>
|
|
<div>
|
|
|
${comps.field(form.saveform['name'])}
|
|
${comps.field(form.saveform['name'])}
|
|
@@ -86,7 +86,7 @@ ${layout.menubar(section='query')}
|
|
|
% if i > 0:
|
|
% if i > 0:
|
|
|
<hr/>
|
|
<hr/>
|
|
|
% endif
|
|
% endif
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
<div class="clearfix">
|
|
<div class="clearfix">
|
|
|
${comps.label(f['key'])}
|
|
${comps.label(f['key'])}
|
|
|
<div class="input">
|
|
<div class="input">
|
|
@@ -96,7 +96,7 @@ ${layout.menubar(section='query')}
|
|
|
))}
|
|
))}
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
<div class="clearfix">
|
|
<div class="clearfix">
|
|
|
${comps.label(f['value'])}
|
|
${comps.label(f['value'])}
|
|
|
<div class="input">
|
|
<div class="input">
|
|
@@ -111,7 +111,7 @@ ${layout.menubar(section='query')}
|
|
|
type="submit",
|
|
type="submit",
|
|
|
title="Delete this setting",
|
|
title="Delete this setting",
|
|
|
klass="btn small danger settingsDelete"
|
|
klass="btn small danger settingsDelete"
|
|
|
- ), value=True)}
|
|
|
|
|
|
|
+ ), value=True)}
|
|
|
</div>
|
|
</div>
|
|
|
${comps.field(f['_exists'], hidden=True)}
|
|
${comps.field(f['_exists'], hidden=True)}
|
|
|
% endfor
|
|
% endfor
|
|
@@ -119,7 +119,7 @@ ${layout.menubar(section='query')}
|
|
|
<a class="btn small" data-form-prefix="settings">Add</a>
|
|
<a class="btn small" data-form-prefix="settings">Add</a>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
<h6>File Resources</h6>
|
|
<h6>File Resources</h6>
|
|
|
% for i, f in enumerate(form.file_resources.forms):
|
|
% for i, f in enumerate(form.file_resources.forms):
|
|
|
% if i > 0:
|
|
% if i > 0:
|
|
@@ -134,7 +134,7 @@ ${layout.menubar(section='query')}
|
|
|
))}
|
|
))}
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
<div class="clearfix">
|
|
<div class="clearfix">
|
|
|
${comps.label(f['path'])}
|
|
${comps.label(f['path'])}
|
|
|
<div class="input">
|
|
<div class="input">
|
|
@@ -152,7 +152,7 @@ ${layout.menubar(section='query')}
|
|
|
title="Delete this setting",
|
|
title="Delete this setting",
|
|
|
klass="btn small danger file_resourcesDelete"
|
|
klass="btn small danger file_resourcesDelete"
|
|
|
), value=True)}
|
|
), value=True)}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
${comps.field(f['_exists'], hidden=True)}
|
|
${comps.field(f['_exists'], hidden=True)}
|
|
|
</div>
|
|
</div>
|
|
|
% endfor
|
|
% endfor
|
|
@@ -192,18 +192,18 @@ ${layout.menubar(section='query')}
|
|
|
klass="btn small danger"
|
|
klass="btn small danger"
|
|
|
), value=True)}
|
|
), value=True)}
|
|
|
</div>
|
|
</div>
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
${comps.field(f['_exists'], hidden=True)}
|
|
${comps.field(f['_exists'], hidden=True)}
|
|
|
% endfor
|
|
% endfor
|
|
|
<div class="clearfix">
|
|
<div class="clearfix">
|
|
|
<a class="btn small" data-form-prefix="functions">Add</a>
|
|
<a class="btn small" data-form-prefix="functions">Add</a>
|
|
|
</div>
|
|
</div>
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
<h6>Parametrization</h6>
|
|
<h6>Parametrization</h6>
|
|
|
${comps.field(form.query["is_parameterized"],
|
|
${comps.field(form.query["is_parameterized"],
|
|
|
notitle = True,
|
|
notitle = True,
|
|
|
tag = "checkbox",
|
|
tag = "checkbox",
|
|
|
- button_text = "Enable Parameterization",
|
|
|
|
|
|
|
+ button_text = "Enable Parameterization",
|
|
|
help = "If checked (the default), you can include parameters like $parameter_name in your query, and users will be prompted for a value when the query is run.",
|
|
help = "If checked (the default), you can include parameters like $parameter_name in your query, and users will be prompted for a value when the query is run.",
|
|
|
help_attrs= dict(
|
|
help_attrs= dict(
|
|
|
data_help_direction='11'
|
|
data_help_direction='11'
|
|
@@ -235,7 +235,7 @@ ${layout.menubar(section='query')}
|
|
|
% endif
|
|
% endif
|
|
|
</div>
|
|
</div>
|
|
|
% endif
|
|
% endif
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
% if on_success_url:
|
|
% if on_success_url:
|
|
|
<input type="hidden" name="on_success_url" value="${on_success_url}"/>
|
|
<input type="hidden" name="on_success_url" value="${on_success_url}"/>
|
|
|
% endif
|
|
% endif
|
|
@@ -253,7 +253,7 @@ ${layout.menubar(section='query')}
|
|
|
</a></li>
|
|
</a></li>
|
|
|
% endif
|
|
% endif
|
|
|
</ul>
|
|
</ul>
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
<div class="tab-content">
|
|
<div class="tab-content">
|
|
|
<div class="active tab-pane" id="queryPane">
|
|
<div class="active tab-pane" id="queryPane">
|
|
|
${query()}
|
|
${query()}
|
|
@@ -279,7 +279,7 @@ ${layout.menubar(section='query')}
|
|
|
<a href="#" class="close">×</a>
|
|
<a href="#" class="close">×</a>
|
|
|
<h3>Choose a file</h3>
|
|
<h3>Choose a file</h3>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="modal-body">
|
|
|
|
|
|
|
+ <div class="modal-body">
|
|
|
<div id="filechooser">
|
|
<div id="filechooser">
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -303,7 +303,7 @@ ${layout.menubar(section='query')}
|
|
|
});
|
|
});
|
|
|
// hack!!!
|
|
// hack!!!
|
|
|
$("select").addClass("span3");
|
|
$("select").addClass("span3");
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
$("a[data-form-prefix]").each(function(){
|
|
$("a[data-form-prefix]").each(function(){
|
|
|
var _prefix = $(this).attr("data-form-prefix");
|
|
var _prefix = $(this).attr("data-form-prefix");
|
|
|
var _nextID = 0;
|
|
var _nextID = 0;
|
|
@@ -318,13 +318,13 @@ ${layout.menubar(section='query')}
|
|
|
checkAndSubmit();
|
|
checkAndSubmit();
|
|
|
});
|
|
});
|
|
|
});
|
|
});
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
$("a[data-form-prefix]").click(function(){
|
|
$("a[data-form-prefix]").click(function(){
|
|
|
var _prefix = $(this).attr("data-form-prefix");
|
|
var _prefix = $(this).attr("data-form-prefix");
|
|
|
$("<input>").attr("type","hidden").attr("name",_prefix+"-add").attr("value","True").appendTo($("#advancedSettingsForm"));
|
|
$("<input>").attr("type","hidden").attr("name",_prefix+"-add").attr("value","True").appendTo($("#advancedSettingsForm"));
|
|
|
checkAndSubmit();
|
|
checkAndSubmit();
|
|
|
});
|
|
});
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
$("a[data-filechooser-destination]").click(function(){
|
|
$("a[data-filechooser-destination]").click(function(){
|
|
|
var _destination = $(this).attr("data-filechooser-destination");
|
|
var _destination = $(this).attr("data-filechooser-destination");
|
|
|
$("#filechooser").jHueFileChooser({
|
|
$("#filechooser").jHueFileChooser({
|
|
@@ -335,47 +335,41 @@ ${layout.menubar(section='query')}
|
|
|
});
|
|
});
|
|
|
$("#chooseFile").modal("show");
|
|
$("#chooseFile").modal("show");
|
|
|
});
|
|
});
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
$("#executeQuery").click(function(){
|
|
$("#executeQuery").click(function(){
|
|
|
$("<input>").attr("type","hidden").attr("name","button-submit").attr("value","Execute").appendTo($("#advancedSettingsForm"));
|
|
$("<input>").attr("type","hidden").attr("name","button-submit").attr("value","Execute").appendTo($("#advancedSettingsForm"));
|
|
|
checkAndSubmit();
|
|
checkAndSubmit();
|
|
|
});
|
|
});
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
$("#saveQuery").click(function(){
|
|
$("#saveQuery").click(function(){
|
|
|
$("<input>").attr("type","hidden").attr("name","saveform-save").attr("value","Save").appendTo($("#advancedSettingsForm"));
|
|
$("<input>").attr("type","hidden").attr("name","saveform-save").attr("value","Save").appendTo($("#advancedSettingsForm"));
|
|
|
checkAndSubmit();
|
|
checkAndSubmit();
|
|
|
});
|
|
});
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
$("#saveQueryAs").click(function(){
|
|
$("#saveQueryAs").click(function(){
|
|
|
$("<input>").attr("type","hidden").attr("name","saveform-saveas").attr("value","Save As...").appendTo($("#advancedSettingsForm"));
|
|
$("<input>").attr("type","hidden").attr("name","saveform-saveas").attr("value","Save As...").appendTo($("#advancedSettingsForm"));
|
|
|
checkAndSubmit();
|
|
checkAndSubmit();
|
|
|
});
|
|
});
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
$("#explainQuery").click(function(){
|
|
$("#explainQuery").click(function(){
|
|
|
$("<input>").attr("type","hidden").attr("name","button-explain").attr("value","Explain").appendTo($("#advancedSettingsForm"));
|
|
$("<input>").attr("type","hidden").attr("name","button-explain").attr("value","Explain").appendTo($("#advancedSettingsForm"));
|
|
|
checkAndSubmit();
|
|
checkAndSubmit();
|
|
|
});
|
|
});
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
$("#queryField").change(function(){
|
|
$("#queryField").change(function(){
|
|
|
$(".query").val($(this).val());
|
|
$(".query").val($(this).val());
|
|
|
});
|
|
});
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
$("#queryField").focus(function(){
|
|
$("#queryField").focus(function(){
|
|
|
$(this).removeClass("fieldError");
|
|
$(this).removeClass("fieldError");
|
|
|
$("#validationResults").empty();
|
|
$("#validationResults").empty();
|
|
|
});
|
|
});
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
function checkAndSubmit(){
|
|
function checkAndSubmit(){
|
|
|
- $(".query").val($("#queryField").val());
|
|
|
|
|
- if ($.trim($("#queryField").val()) == ""){
|
|
|
|
|
- $("#queryField").addClass("fieldError");
|
|
|
|
|
- $("#validationResults").html('<ul class="errorlist"><li>This field is required.</li></ul>');
|
|
|
|
|
- }
|
|
|
|
|
- else {
|
|
|
|
|
- $("#advancedSettingsForm").submit();
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ // TODO: client side validation
|
|
|
|
|
+ $("#advancedSettingsForm").submit();
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
$("#chooseFile").modal({
|
|
$("#chooseFile").modal({
|
|
|
keyboard: true,
|
|
keyboard: true,
|
|
|
backdrop: true
|
|
backdrop: true
|