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

34 lines
1.1 KiB
Handlebars

<h3>Queries</h3>
<div class="query-list">
{{combo-box valueAttribute="id" value=selectedQueryId nameProperty="listName" content=content castInteger="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}}
{{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}}