diff --git a/src/DataCollector/ViewCollector.php b/src/DataCollector/ViewCollector.php
index 8bb47e058..a1a6ce3ab 100644
--- a/src/DataCollector/ViewCollector.php
+++ b/src/DataCollector/ViewCollector.php
@@ -117,8 +117,8 @@ public function addView(View $view)
}
$template = [
- 'name' => $shortPath ? sprintf('%s (%s)', $name, $shortPath) : $name,
- 'param_count' => count($params),
+ 'name' => $name,
+ 'param_count' => $this->collect_data ? count($params) : null,
'params' => $params,
'start' => microtime(true),
'type' => $type,
diff --git a/src/Resources/laravel-debugbar-dark-mode.css b/src/Resources/laravel-debugbar-dark-mode.css
index 7dc5053b1..84e683c1d 100644
--- a/src/Resources/laravel-debugbar-dark-mode.css
+++ b/src/Resources/laravel-debugbar-dark-mode.css
@@ -139,6 +139,11 @@ div.phpdebugbar-openhandler .phpdebugbar-text-muted
color: var(--color-gray-600);
}
+li.phpdebugbar-widgets-list-item span.phpdebugbar-widgets-filename,
+li.phpdebugbar-widgets-list-item span.phpdebugbar-widgets-filename a.phpdebugbar-widgets-editor-link
+{
+ color: #ddd;
+}
div.phpdebugbar div.phpdebugbar-widgets-sqlqueries li.phpdebugbar-widgets-list-item.phpdebugbar-widgets-sql-duplicate {
background-color: #6f6200;
}
diff --git a/src/Resources/sqlqueries/widget.js b/src/Resources/sqlqueries/widget.js
index af2b13e48..e894fa9a6 100644
--- a/src/Resources/sqlqueries/widget.js
+++ b/src/Resources/sqlqueries/widget.js
@@ -82,20 +82,21 @@
if (typeof(stmt.row_count) != 'undefined') {
$('').addClass(csscls('row-count')).text(stmt.row_count).appendTo(li);
}
- if (typeof(stmt.filename) != 'undefined' && stmt.filename) {
- $('').addClass(csscls('source-file'))
- .append(! stmt.xdebug_link ? $('').text(stmt.filename).html() : $('')
- .attr('href', stmt.xdebug_link.url).text(stmt.filename)
- .attr('title', stmt.source)
- .on('click', function (event) {
- event.stopPropagation();
- if (stmt.xdebug_link.ajax) {
- event.preventDefault();
- $.ajax(stmt.xdebug_link.url);
- }
- })
- ).appendTo(li);
+
+ if (typeof stmt.xdebug_link !== 'undefined' && stmt.xdebug_link !== null) {
+ var header = $('').addClass(csscls('filename')).text(stmt.xdebug_link.filename + ( stmt.xdebug_link.line ? "#" + stmt.xdebug_link.line : ''));
+ if (stmt.xdebug_link) {
+ if (stmt.xdebug_link.ajax) {
+ $('').on('click', function () {
+ $.ajax(stmt.xdebug_link.url);
+ }).addClass(csscls('editor-link')).appendTo(header);
+ } else {
+ $('').addClass(csscls('editor-link')).appendTo(header);
+ }
+ }
+ header.appendTo(li);
}
+
if (stmt.connection) {
$('').addClass(csscls('database')).text(stmt.connection).appendTo(li);
li.attr("connection",stmt.connection);