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

37 lines
1.3 KiB
Handlebars

<h3>Queries</h3>
<div class="query-list">
{{combo-box valueAttribute="id" value=selectedQueryId nameProperty="listName" content=content castInteger="true" nameChanges="true"}}
{{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"}}
{{d-button action="create" label="explorer.create" icon="plus" class="btn-primary"}}
</div>
{{/if}}
<hr>
<div class="query-edit">
{{partial "admin/plugins-explorer-show" model=selectedItem}}
</div>
<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>
{{d-button action="run" label="explorer.run" disabled=runDisabled}}
</div>
<hr>
{{conditional-loading-spinner condition=loading}}
{{#if results}}
<div class="query-results">
{{query-result query=selectedItem content=results}}
</div>
{{/if}}