feat(recorder): Allow clearing request list
This commit is contained in:
parent
e9e931df17
commit
ce185a86a9
2 changed files with 12 additions and 1 deletions
|
|
@ -3,7 +3,8 @@
|
|||
<h1>
|
||||
<span>Recorder</span>
|
||||
<span class="indicator" :class="status.color">{{ status.status }}</span>
|
||||
<span class="chart-actions btn-group dropdown pull-right" style="float:right; margin-left:15px">
|
||||
<span style="float:right; margin-left:15px">
|
||||
<button v-if="requests" class="btn btn-default" @click="clear(true)">Clear</button>
|
||||
<button v-if="status.status == 'Inactive'" class="btn btn-default btn-primary" @click="record(true)">Start</button>
|
||||
<button v-if="status.status == 'Active'" class="btn btn-default btn-primary" @click="record(false)">Stop</button>
|
||||
</span>
|
||||
|
|
@ -140,6 +141,10 @@ export default {
|
|||
this.last_fetched = new Date();
|
||||
});
|
||||
},
|
||||
clear: function() {
|
||||
frappe.call("frappe.www.recorder.erase_requests");
|
||||
this.refresh();
|
||||
},
|
||||
record: function(should_record) {
|
||||
frappe.call({
|
||||
method: "frappe.www.recorder.set_recorder_state",
|
||||
|
|
|
|||
|
|
@ -50,6 +50,12 @@ def get_requests():
|
|||
return requests
|
||||
|
||||
|
||||
@frappe.whitelist()
|
||||
def erase_requests():
|
||||
do_not_record()
|
||||
frappe.cache().delete_value("recorder-requests")
|
||||
|
||||
|
||||
@frappe.whitelist()
|
||||
def get_request_data(uuid):
|
||||
do_not_record()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue