style: Linting fixes

This commit is contained in:
Aditya Hase 2019-01-19 23:14:52 +05:30
parent 10f8fad12d
commit b0faf64386
5 changed files with 17 additions and 17 deletions

View file

@ -3,7 +3,6 @@
# MIT License. See license.txt
from __future__ import unicode_literals
import json
import os
from six import iteritems
import logging

View file

@ -9,7 +9,7 @@
<button v-if="status.status == 'Active'" class="btn btn-default btn-primary" @click="record(false)">Stop</button>
</span>
</h1>
<table class="table table-hover">
<table class="table table-hover table-condensed">
<thead>
<tr>
<th style="width:10%"><span style="margin-right:5px">Index</span><i @click="sort('index')" class="glyphicon" :class="glyphicon('index')"></i></th>

View file

@ -1,11 +1,11 @@
import Vue from 'vue/dist/vue.js'
import VueRouter from 'vue-router/dist/vue-router.js'
import Vue from 'vue/dist/vue.js';
import VueRouter from 'vue-router/dist/vue-router.js';
import RecorderRoot from "./RecorderRoot.vue"
import RecorderRoot from "./RecorderRoot.vue";
import RecorderDetail from "./RecorderDetail.vue"
import RequestDetail from "./RequestDetail.vue"
import SQLDetail from "./SQLDetail.vue"
import RecorderDetail from "./RecorderDetail.vue";
import RequestDetail from "./RequestDetail.vue";
import SQLDetail from "./SQLDetail.vue";
frappe.ready(function() {
Vue.use(VueRouter)
@ -25,7 +25,7 @@ frappe.ready(function() {
path: '/request/:request_uuid/sql/:call_index',
component: SQLDetail,
},
]
];
const router = new VueRouter({
mode: 'hash',

View file

@ -89,7 +89,7 @@ class Recorder():
"headers": dict(frappe.local.request.headers),
"data": frappe.local.form_dict,
}
self._patch()
_patch()
def register(self, data):
self.calls.append(data)
@ -104,17 +104,19 @@ class Recorder():
"time": self.time,
"duration": float("{:0.3f}".format((datetime.datetime.now() - self.time).total_seconds() * 1000)),
"method": self.method,
}, default=lambda x: str(x))
}, default=str)
)
frappe.cache().set(
"recorder-request-{}".format(self.uuid),
json.dumps(self.calls, default=lambda x: str(x))
json.dumps(self.calls, default=str)
)
def _patch(self):
frappe.db._sql = frappe.db.sql
frappe.db.sql = sql
frappe.db._sql("SET PROFILING = 1")
def _patch():
frappe.db._sql = frappe.db.sql
frappe.db.sql = sql
frappe.db._sql("SET PROFILING = 1")
def compress(data):
if data:

View file

@ -5,7 +5,6 @@
from __future__ import unicode_literals
import frappe
import json
import redis
from pygments.formatters import HtmlFormatter
def do_not_record():