mirror of
https://github.com/maximebf/php-debugbar.git
synced 2025-07-28 04:00:43 +02:00
Update openhandler view
Don't show the id. Make the method/request/ip clickable, to filter by that.
This commit is contained in:
@@ -25,7 +25,7 @@ if (typeof(PhpDebugBar) == 'undefined') {
|
|||||||
this.$closebtn = $('<a href="javascript:"><i class="fa fa-times"></i></a>');
|
this.$closebtn = $('<a href="javascript:"><i class="fa fa-times"></i></a>');
|
||||||
this.$table = $('<tbody />');
|
this.$table = $('<tbody />');
|
||||||
$('<div>PHP DebugBar | Open</div>').addClass(csscls('header')).append(this.$closebtn).appendTo(this.$el);
|
$('<div>PHP DebugBar | Open</div>').addClass(csscls('header')).append(this.$closebtn).appendTo(this.$el);
|
||||||
$('<table><thead><tr><th>ID</th><th>Method</th><th>URL</th><th>Date</th><th>IP</th></tr></thead></table>').append(this.$table).appendTo(this.$el);
|
$('<table><thead><tr><th>Load</th><th>Method</th><th>URL</th><th>Date</th><th>IP</th></tr></thead></table>').append(this.$table).appendTo(this.$el);
|
||||||
this.$actions = $('<div />').addClass(csscls('actions')).appendTo(this.$el);
|
this.$actions = $('<div />').addClass(csscls('actions')).appendTo(this.$el);
|
||||||
|
|
||||||
this.$closebtn.on('click', function() {
|
this.$closebtn.on('click', function() {
|
||||||
@@ -75,7 +75,7 @@ if (typeof(PhpDebugBar) == 'undefined') {
|
|||||||
var self = this;
|
var self = this;
|
||||||
$.each(data, function(i, meta) {
|
$.each(data, function(i, meta) {
|
||||||
var a = $('<a href="javascript:" />')
|
var a = $('<a href="javascript:" />')
|
||||||
.text(meta['id'])
|
.text('Load dataset')
|
||||||
.on('click', function(e) {
|
.on('click', function(e) {
|
||||||
self.hide();
|
self.hide();
|
||||||
self.load(meta['id'], function(data) {
|
self.load(meta['id'], function(data) {
|
||||||
@@ -84,10 +84,34 @@ if (typeof(PhpDebugBar) == 'undefined') {
|
|||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
var method = $('<a href="javascript:" />')
|
||||||
|
.text(meta['method'])
|
||||||
|
.on('click', function(e) {
|
||||||
|
self.$table.empty();
|
||||||
|
self.find({method: meta['method']}, 0, self.handleFind.bind(self));
|
||||||
|
e.preventDefault();
|
||||||
|
});
|
||||||
|
|
||||||
|
var uri = $('<a href="javascript:" />')
|
||||||
|
.text(meta['uri'])
|
||||||
|
.on('click', function(e) {
|
||||||
|
self.$table.empty();
|
||||||
|
self.find({uri: meta['uri']}, 0, self.handleFind.bind(self));
|
||||||
|
e.preventDefault();
|
||||||
|
});
|
||||||
|
|
||||||
|
var ip = $('<a href="javascript:" />')
|
||||||
|
.text(meta['ip'])
|
||||||
|
.on('click', function(e) {
|
||||||
|
self.$table.empty();
|
||||||
|
self.find({ip: meta['ip']}, 0, self.handleFind.bind(self));
|
||||||
|
e.preventDefault();
|
||||||
|
});
|
||||||
|
|
||||||
$('<tr />')
|
$('<tr />')
|
||||||
.append($('<td />').append(a))
|
.append($('<td />').append(a))
|
||||||
.append('<td>' + meta['method'] + '</td>')
|
.append($('<td />').append(method))
|
||||||
.append('<td>' + meta['uri'] + '</td>')
|
.append($('<td />').append(uri))
|
||||||
.append('<td>' + meta['datetime'] + '</td>')
|
.append('<td>' + meta['datetime'] + '</td>')
|
||||||
.append('<td>' + meta['ip'] + '</td>')
|
.append('<td>' + meta['ip'] + '</td>')
|
||||||
.appendTo(self.$table);
|
.appendTo(self.$table);
|
||||||
|
Reference in New Issue
Block a user