Fix "refresh results" for batches, in Buefy theme

This commit is contained in:
Lance Edgar 2020-09-28 13:23:01 -05:00
parent e0d1e39824
commit dc1f613bc2

View file

@ -81,10 +81,15 @@
% if master.results_refreshable and master.has_perm('refresh'):
% if use_buefy:
<b-button type="is-primary"
disabled
title="TODO: need to implement this for new theme">
Refresh Results
:disabled="refreshResultsButtonDisabled"
icon-pack="fas"
icon-left="fas fa-redo"
@click="refreshResults()">
{{ refreshResultsButtonText }}
</b-button>
${h.form(url('{}.refresh_results'.format(route_prefix)), ref='refreshResultsForm')}
${h.csrf_token(request)}
${h.end_form()}
% else:
<button type="button" id="refresh-results-button">
Refresh Results
@ -148,6 +153,15 @@
% if master.results_executable and master.has_perm('execute_multiple'):
<script type="text/javascript">
TailboneGridData.refreshResultsButtonText = "Refresh Results"
TailboneGridData.refreshResultsButtonDisabled = false
TailboneGrid.methods.refreshResults = function() {
this.refreshResultsButtonDisabled = true
this.refreshResultsButtonText = "Working, please wait..."
this.$refs.refreshResultsForm.submit()
}
${execute_form.component_studly}.methods.submit = function() {
this.$refs.actualExecuteForm.submit()
}