2015-06-30 22:51:38 -04:00
|
|
|
<h2>Queries</h2>
|
|
|
|
|
2015-06-30 13:37:48 -04:00
|
|
|
<div class="query-list">
|
2015-06-30 19:43:43 -04:00
|
|
|
{{combo-box valueAttribute="id" value=selectedQueryId nameProperty="listName" content=content castInteger="true" nameChanges="true"}}
|
2015-06-30 13:37:48 -04:00
|
|
|
{{d-button action="showCreate" icon="plus" class="no-text"}}
|
|
|
|
{{d-button action="importQuery" label="explorer.import.label" icon="upload"}}
|
|
|
|
</div>
|
2015-06-30 22:51:38 -04:00
|
|
|
|
2015-06-30 13:37:48 -04:00
|
|
|
{{#if showCreate}}
|
|
|
|
<div class="query-create">
|
|
|
|
{{text-field value=newQueryName placeholderKey="explorer.create_placeholder"}}
|
2015-06-30 15:52:17 -04:00
|
|
|
{{d-button action="create" label="explorer.create" icon="plus" class="btn-primary"}}
|
2015-06-30 13:37:48 -04:00
|
|
|
</div>
|
|
|
|
{{/if}}
|
2015-06-30 22:51:38 -04:00
|
|
|
|
2015-06-30 13:37:48 -04:00
|
|
|
<hr>
|
2015-06-30 22:51:38 -04:00
|
|
|
|
2015-06-29 15:10:24 -04:00
|
|
|
<div class="query-edit">
|
2015-06-30 12:07:33 -04:00
|
|
|
{{partial "admin/plugins-explorer-show" model=selectedItem}}
|
2015-06-29 15:10:24 -04:00
|
|
|
</div>
|
2015-06-30 22:51:38 -04:00
|
|
|
|
|
|
|
{{conditional-loading-spinner condition=loading}}
|
|
|
|
|
2015-06-30 18:12:12 -04:00
|
|
|
<div class="query-run">
|
|
|
|
{{#if selectedItem.param_names}}
|
|
|
|
<div class="query-params">
|
2015-06-30 22:51:38 -04:00
|
|
|
<div class="param-save">
|
|
|
|
{{d-button action="saveDefaults" label="explorer.save_params"}}
|
|
|
|
{{d-button action="resetParams" label="explorer.reset_params"}}
|
|
|
|
</div>
|
2015-06-30 18:12:12 -04:00
|
|
|
{{#each selectedItem.param_names as |pname|}}
|
2015-06-30 22:51:38 -04:00
|
|
|
<div class="param">
|
|
|
|
{{param-field params=selectedItem.params pname=pname}}
|
|
|
|
<span class="param-name">{{pname}}</span>
|
|
|
|
</div>
|
2015-06-30 18:12:12 -04:00
|
|
|
{{/each}}
|
|
|
|
</div>
|
|
|
|
{{/if}}
|
2015-06-30 18:56:09 -04:00
|
|
|
<div class="bool-options">
|
|
|
|
<label>{{input type="checkbox" checked=explain name="explain"}} {{i18n "explorer.explain_label"}}</label>
|
|
|
|
</div>
|
2015-06-30 18:12:12 -04:00
|
|
|
{{d-button action="run" label="explorer.run" disabled=runDisabled}}
|
|
|
|
</div>
|
2015-06-30 22:51:38 -04:00
|
|
|
|
2015-06-29 15:10:24 -04:00
|
|
|
<hr>
|
2015-06-30 22:51:38 -04:00
|
|
|
|
2015-06-30 18:12:12 -04:00
|
|
|
{{#if results}}
|
|
|
|
<div class="query-results">
|
2015-06-30 22:51:38 -04:00
|
|
|
{{#if showResults}}
|
|
|
|
{{query-result query=selectedItem content=results}}
|
|
|
|
{{else}}
|
|
|
|
{{#each results.errors as |err|}}
|
|
|
|
<pre class="query-error"><code>{{~err}}</code></pre>
|
|
|
|
{{/each}}
|
|
|
|
{{/if}}
|
2015-06-30 18:12:12 -04:00
|
|
|
</div>
|
|
|
|
{{/if}}
|