Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ The change log describes what is "Added", "Removed", "Changed" or "Fixed" betwee
### Fixed

- Fix deprecated notice when using symfony/config > 4.2
- Profiler does not display stack when client name contains dots

## 1.13.1 - 2018-11-28

Expand Down
8 changes: 8 additions & 0 deletions Collector/Stack.php
Original file line number Diff line number Diff line change
Expand Up @@ -340,4 +340,12 @@ public function setCurlCommand($curlCommand)
{
$this->curlCommand = $curlCommand;
}

/**
* @return string
*/
public function getClientSlug()
{
return preg_replace('/[^a-zA-Z0-9_-]/u', '_', $this->client);
}
}
10 changes: 5 additions & 5 deletions Resources/views/stack.html.twig
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="httplug-stack-header httplug-toggle" data-toggle="#httplug-{{ client }}-{{ id }}-details">
<div class="httplug-stack-header httplug-toggle" data-toggle="#httplug-{{ stack.clientSlug }}-{{ id }}-details">
<div>
{% if stack.failed %}
<span class="httplug-stack-failed">✘</span>
Expand All @@ -23,14 +23,14 @@
{% endif %}
</div>
</div>
<div id="httplug-{{ client }}-{{ id }}-details" class="httplug-hidden">
<div id="httplug-{{ stack.clientSlug }}-{{ id }}-details" class="httplug-hidden">
<div class="httplug-toolbar">
<div class="httplug-copy-as-curl">
<input readonly="readonly" type="text" value="{{ stack.curlCommand }}" />
<button class="btn tooltip-toggle" aria-label="Copy to clipboard">Copy to clipboard</button>
</div>
<button data-toggle="#httplug-{{ client }}-{{ id }}-stack" class="httplug-toggle btn" >Toggle plugin stack</button>
<button data-toggle="#httplug-{{ client }}-{{ id }}-details .httplug-http-body" class="httplug-toggle btn">Toggle body</button>
<button data-toggle="#httplug-{{ stack.clientSlug }}-{{ id }}-stack" class="httplug-toggle btn" >Toggle plugin stack</button>
<button data-toggle="#httplug-{{ stack.clientSlug }}-{{ id }}-details .httplug-http-body" class="httplug-toggle btn">Toggle body</button>
</div>
<div class="httplug-messages">
<div class="httplug-message card">
Expand All @@ -43,7 +43,7 @@
</div>
</div>
{% if stack.profiles %}
<div id="httplug-{{ client }}-{{ id }}-stack" class="httplug-hidden card">
<div id="httplug-{{ stack.clientSlug }}-{{ id }}-stack" class="httplug-hidden card">
{% for profile in stack.profiles %}
<h3 class="httplug-plugin-name">{{ profile.plugin }}</h3>
<div class="httplug-messages">
Expand Down