mirror of
https://github.com/maximebf/php-debugbar.git
synced 2025-07-27 19:50:21 +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.$table = $('<tbody />');
|
||||
$('<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.$closebtn.on('click', function() {
|
||||
@@ -75,7 +75,7 @@ if (typeof(PhpDebugBar) == 'undefined') {
|
||||
var self = this;
|
||||
$.each(data, function(i, meta) {
|
||||
var a = $('<a href="javascript:" />')
|
||||
.text(meta['id'])
|
||||
.text('Load dataset')
|
||||
.on('click', function(e) {
|
||||
self.hide();
|
||||
self.load(meta['id'], function(data) {
|
||||
@@ -83,11 +83,35 @@ if (typeof(PhpDebugBar) == 'undefined') {
|
||||
});
|
||||
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 />')
|
||||
.append($('<td />').append(a))
|
||||
.append('<td>' + meta['method'] + '</td>')
|
||||
.append('<td>' + meta['uri'] + '</td>')
|
||||
.append($('<td />').append(method))
|
||||
.append($('<td />').append(uri))
|
||||
.append('<td>' + meta['datetime'] + '</td>')
|
||||
.append('<td>' + meta['ip'] + '</td>')
|
||||
.appendTo(self.$table);
|
||||
|
Reference in New Issue
Block a user