{% extends 'clean_base.axml' %} {% from 'actions.axml' import pagination %} {% set modal_name = 'Gist Details' %} {% macro commander() %} { isFilterable: false, originSearch: '', completedFilter: '', destinationSearch: '', gistSearch: '', eventSearch: '', whenFilter: '', filterResults(){ let base = `/v1/gists?pagination=${this.pagination}&page=1` if(this.originSearch) base += `&origin=${this.originSearch}` if(this.completedFilter) base += `&completed=${this.completedFilter}` if(this.destinationSearch) base += `&destination=${this.destinationSearch}` if(this.gistSearch) base += `&gist=${this.gistSearch}` if(this.eventSearch) base += `&event=${this.eventSearch}` if(this.whenFilter) base += `&timeline=${this.whenFilter}` fetch(base) .then(r => r.json()) .then(data => { isFiltering = true; gists = data; }).catch(err => ShowFeedback('error', 'Filter operation failed')) }, clearFilter(){ this.originSearch = ''; this.completedFilter = ''; this.destinationSearch = ''; this.gistSearch = ''; this.eventSearch = ''; this.whenFilter = ''; isFiltering = false; fetchAll(); }, checkDirty(){ this.isFilterable = ( this.originSearch !== '' || this.completedFilter !== '' || this.destinationSearch !== '' || this.gistSearch !== '' || this.eventSearch !== '' || this.whenFilter !== '' ); return this.isFilterable; } } {% endmacro %} {% macro resendable() %} { resending: null, resendGist(gist){ this.resending = gist; fetch(`/v1/regists/${gist}`, { method: 'POST', headers: {'Content-Type': 'application/json'} }) .then(r => r.json()) .then(data => { this.resending = null; if(data.error) return ShowFeedback('error', data.error); ShowFeedback('success', `Gist ${gist} resent`); }) .catch(err => { this.resending = null; ShowFeedback('error', 'Could not resend gist'); }) } } {% endmacro %} {% block easel %}
tag
upload
download
bolt
ID Status Action Publisher Subscriber Endpoint Timestamp Resend
{{ pagination() }}
{% endblock %}