discourse-data-explorer/assets/javascripts/discourse/templates/admin/plugins-explorer.hbs

37 lines
1.3 KiB
Handlebars
Raw Normal View History

2015-06-29 15:10:24 -04:00
<h3>Queries</h3>
2015-06-30 13:37:48 -04:00
<div class="query-list">
2015-06-30 15:52:17 -04:00
{{combo-box valueAttribute="id" value=selectedQueryId nameProperty="listName" content=content castInteger="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>
{{#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}}
<hr>
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 18:12:12 -04:00
<div class="query-run">
{{#if selectedItem.param_names}}
<div class="query-params">
{{#each selectedItem.param_names as |pname|}}
{{param-field params=selectedItem.params pname=pname}} {{pname}}
{{/each}}
</div>
{{/if}}
<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-29 15:10:24 -04:00
<hr>
2015-06-30 12:07:33 -04:00
{{conditional-loading-spinner condition=loading}}
2015-06-30 18:12:12 -04:00
{{#if results}}
<div class="query-results">
{{query-result query=selectedItem content=results}}
</div>
{{/if}}