Skip to content

Commit

Permalink
added encoding for url params
Browse files Browse the repository at this point in the history
  • Loading branch information
shagtv committed Mar 8, 2019
1 parent e9ce726 commit 9470ab7
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 21 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@

There are next changes:

## 1.1.10

There are next changes:

- added encoding for url params

## 1.1.8

There are next changes:
Expand Down
6 changes: 3 additions & 3 deletions src/templates/flame_graph.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
<div class="alert alert-danger" role="alert"><?= $data['error'] ?></div>
<?php else: ?>
<div class="btn-group" role="group">
<a class="btn btn-default" href="/profiler/tree-view.phtml?app=<?= $data['snapshot']->getApp() ?>&label=<?= $data['snapshot']->getLabel() ?>&method_id=0">Methods tree</a>
<a class="btn btn-default" href="/profiler/result-diff.phtml?app=<?= $data['snapshot']->getApp() ?>&label=<?= $data['snapshot']->getLabel() ?>">Diff interface</a>
<a class="btn btn-default" href="/profiler/tree-view.phtml?app=<?= urlencode($data['snapshot']->getApp()) ?>&label=<?= urlencode($data['snapshot']->getLabel()) ?>&method_id=0">Methods tree</a>
<a class="btn btn-default" href="/profiler/result-diff.phtml?app=<?= urlencode($data['snapshot']->getApp()) ?>&label=<?= urlencode($data['snapshot']->getLabel()) ?>">Diff interface</a>
<a class="btn btn-default" href="/profiler/list-view.phtml?snapshot_id=<?= $data['snapshot']->getId() ?>">Methods list</a>
<a class="btn btn-default btn-primary" href="/profiler/result-flamegraph.phtml?app=<?= $data['snapshot']->getApp() ?>&label=<?= $data['snapshot']->getLabel() ?>&snapshot_id=<?= $data['snapshot']->getId() ?>">Flame graph</a>
<a class="btn btn-default btn-primary" href="/profiler/result-flamegraph.phtml?app=<?= urlencode($data['snapshot']->getApp()) ?>&label=<?= urlencode($data['snapshot']->getLabel()) ?>&snapshot_id=<?= $data['snapshot']->getId() ?>">Flame graph</a>
</div>

<div>
Expand Down
2 changes: 1 addition & 1 deletion src/templates/method_usage.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
<?php foreach ($data['results'] as $result): ?>
<tr>
<td>
<a href="/profiler/tree-view.phtml?app=<?= $result['app'] ?>&label=<?= $result['label'] ?>&method_id=<?= $result['method_id'] ?>">
<a href="/profiler/tree-view.phtml?app=<?= urlencode($result['app']) ?>&label=<?= urlencode($result['label']) ?>&method_id=<?= $result['method_id'] ?>">
<span class="glyphicon glyphicon-stats" data-toggle="tooltip" title="Goto methods tree"></span>
</a>
</td>
Expand Down
6 changes: 3 additions & 3 deletions src/templates/profile_list.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@
<?php foreach ($data['results'] as $Snapshot): ?>
<tr>
<td>
<a href="/profiler/tree-view.phtml?app=<?= $Snapshot->getApp() ?>&label=<?= $Snapshot->getLabel() ?>&method_id=0"><span class="glyphicon glyphicon-stats" data-toggle="tooltip" title="Goto methods tree"></span></a>
<a href="/profiler/result-diff.phtml?app=<?= $Snapshot->getApp() ?>&label=<?= $Snapshot->getLabel() ?>"><span class="glyphicon glyphicon-sort-by-attributes-alt" data-toggle="tooltip" title="Goto diff interface"></span></a>
<a href="/profiler/tree-view.phtml?app=<?= urlencode($Snapshot->getApp()) ?>&label=<?= urlencode($Snapshot->getLabel()) ?>&method_id=0"><span class="glyphicon glyphicon-stats" data-toggle="tooltip" title="Goto methods tree"></span></a>
<a href="/profiler/result-diff.phtml?app=<?= urlencode($Snapshot->getApp()) ?>&label=<?= urlencode($Snapshot->getLabel()) ?>"><span class="glyphicon glyphicon-sort-by-attributes-alt" data-toggle="tooltip" title="Goto diff interface"></span></a>
<a href="/profiler/list-view.phtml?snapshot_id=<?= $Snapshot->getId() ?>"><span class="glyphicon glyphicon-unchecked" data-toggle="tooltip" title="Goto methods list"></span></a>
<a href="/profiler/result-flamegraph.phtml?app=<?= $Snapshot->getApp() ?>&label=<?= $Snapshot->getLabel() ?>&snapshot_id=<?= $Snapshot->getId() ?>"><span class="glyphicon glyphicon-fire" data-toggle="tooltip" title="Goto flame graph"></span></a>
<a href="/profiler/result-flamegraph.phtml?app=<?= urlencode($Snapshot->getApp()) ?>&label=<?= urlencode($Snapshot->getLabel()) ?>&snapshot_id=<?= $Snapshot->getId() ?>"><span class="glyphicon glyphicon-fire" data-toggle="tooltip" title="Goto flame graph"></span></a>
<a class="aggregate-snapshot-button" href="#" data-app="<?= $Snapshot->getApp() ?>" data-label="<?= $Snapshot->getLabel() ?>"><span class="glyphicon glyphicon-refresh" data-toggle="tooltip" title="Aggregate last snapshot"></span></a>
</td>
<td><?= $Snapshot->getDate() ?></td>
Expand Down
6 changes: 3 additions & 3 deletions src/templates/profile_method_list.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,10 @@
</h3>

<div class="btn-group" role="group">
<a class="btn btn-default<?php if (empty($data['wall'])): ?> btn-primary<?php endif; ?>" href="/profiler/tree-view.phtml?app=<?= $data['snapshot']->getApp() ?>&label=<?= $data['snapshot']->getLabel() ?>&method_id=0">Methods tree</a>
<a class="btn btn-default" href="/profiler/result-diff.phtml?app=<?= $data['snapshot']->getApp() ?>&label=<?= $data['snapshot']->getLabel() ?>">Diff interface</a>
<a class="btn btn-default<?php if (empty($data['wall'])): ?> btn-primary<?php endif; ?>" href="/profiler/tree-view.phtml?app=<?= urlencode($data['snapshot']->getApp()) ?>&label=<?= urlencode($data['snapshot']->getLabel()) ?>&method_id=0">Methods tree</a>
<a class="btn btn-default" href="/profiler/result-diff.phtml?app=<?= urlencode($data['snapshot']->getApp()) ?>&label=<?= urlencode($data['snapshot']->getLabel()) ?>">Diff interface</a>
<a class="btn btn-default<?php if (!empty($data['wall'])): ?> btn-primary<?php endif; ?>" href="/profiler/list-view.phtml?snapshot_id=<?= $data['snapshot']->getId() ?>">Methods list</a>
<a class="btn btn-default" href="/profiler/result-flamegraph.phtml?app=<?= $data['snapshot']->getApp() ?>&label=<?= $data['snapshot']->getLabel() ?>&snapshot_id=<?= $data['snapshot']->getId() ?>">Flame graph</a>
<a class="btn btn-default" href="/profiler/result-flamegraph.phtml?app=<?= urlencode($data['snapshot']->getApp()) ?>&label=<?= urlencode($data['snapshot']->getLabel()) ?>&snapshot_id=<?= $data['snapshot']->getId() ?>">Flame graph</a>
</div>

<?php if (!empty($data['wall'])): ?>
Expand Down
6 changes: 3 additions & 3 deletions src/templates/profile_method_tree.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@
</h3>

<div class="btn-group" role="group">
<a class="btn btn-default<?php if (empty($data['wall'])): ?> btn-primary<?php endif; ?>" href="/profiler/tree-view.phtml?app=<?= $data['snapshot']->getApp() ?>&label=<?= $data['snapshot']->getLabel() ?>&method_id=0">Methods tree</a>
<a class="btn btn-default" href="/profiler/result-diff.phtml?app=<?= $data['snapshot']->getApp() ?>&label=<?= $data['snapshot']->getLabel() ?>&date1=<?= $data['date1'] ?>&date2=<?= $data['date2'] ?>">Diff interface</a>
<a class="btn btn-default<?php if (empty($data['wall'])): ?> btn-primary<?php endif; ?>" href="/profiler/tree-view.phtml?app=<?= urlencode($data['snapshot']->getApp()) ?>&label=<?= urlencode($data['snapshot']->getLabel()) ?>&method_id=0">Methods tree</a>
<a class="btn btn-default" href="/profiler/result-diff.phtml?app=<?= urlencode($data['snapshot']->getApp()) ?>&label=<?= urlencode($data['snapshot']->getLabel()) ?>&date1=<?= $data['date1'] ?>&date2=<?= $data['date2'] ?>">Diff interface</a>
<a class="btn btn-default<?php if (!empty($data['wall'])): ?> btn-primary<?php endif; ?>" href="/profiler/list-view.phtml?snapshot_id=<?= $data['snapshot']->getId() ?>">Methods list</a>
<a class="btn btn-default" href="/profiler/result-flamegraph.phtml?app=<?= $data['snapshot']->getApp() ?>&label=<?= $data['snapshot']->getApp() ?>&snapshot_id=<?= $data['snapshot']->getId() ?>">Flame graph</a>
<a class="btn btn-default" href="/profiler/result-flamegraph.phtml?app=<?= urlencode($data['snapshot']->getApp()) ?>&label=<?= urlencode($data['snapshot']->getLabel()) ?>&snapshot_id=<?= $data['snapshot']->getId() ?>">Flame graph</a>
</div>

<form id="dates-form" class="form-inline" style="margin-top: 5px">
Expand Down
8 changes: 4 additions & 4 deletions src/templates/snapshots_diff.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
</h2>

<div class="btn-group" role="group">
<a class="btn btn-default" href="/profiler/tree-view.phtml?app=<?= $data['app'] ?>&label=<?= $data['label'] ?>&method_id=0">Methods tree</a>
<a class="btn btn-default btn-primary" href="/profiler/result-diff.phtml?app=<?= $data['app'] ?>&label=<?= $data['label'] ?>">Diff interface</a>
<a class="btn btn-default" href="/profiler/list-view.phtml?app=<?= $data['app'] ?>&label=<?= $data['label'] ?>">Methods list</a>
<a class="btn btn-default" href="/profiler/result-flamegraph.phtml?app=<?= $data['app'] ?>&label=<?= $data['label'] ?>">Flame graph</a>
<a class="btn btn-default" href="/profiler/tree-view.phtml?app=<?= urlencode($data['app']) ?>&label=<?= urlencode($data['label']) ?>&method_id=0">Methods tree</a>
<a class="btn btn-default btn-primary" href="/profiler/result-diff.phtml?app=<?= $data['app'] ?>&label=<?= urlencode($data['label']) ?>">Diff interface</a>
<a class="btn btn-default" href="/profiler/list-view.phtml?app=<?= urlencode($data['app']) ?>&label=<?= urlencode($data['label']) ?>">Methods list</a>
<a class="btn btn-default" href="/profiler/result-flamegraph.phtml?app=<?= urlencode($data['app']) ?>&label=<?= urlencode($data['label']) ?>">Flame graph</a>
</div>

<p>This interface allows to compare two snapshots with different dates. Please, select the dates.</p>
Expand Down
8 changes: 4 additions & 4 deletions src/templates/top_diff.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,10 @@
<?php foreach ($data['data'] as $Result): ?>
<tr>
<td>
<a href="/profiler/tree-view.phtml?app=<?= $Result->getApp() ?>&label=<?= $Result->getLabel() ?>&method_id=<?= $Result->getMethodId() ?>&date1=<?= $data['date1'] ?>&date2=<?= $data['date2'] ?>"><span class="glyphicon glyphicon-stats" data-toggle="tooltip" title="Goto methods tree"></span></a>
<a href="/profiler/result-diff.phtml?app=<?= $Result->getApp() ?>&label=<?= $Result->getLabel() ?>&date1=<?= $data['date1'] ?>&date2=<?= $data['date2'] ?>"><span class="glyphicon glyphicon-sort-by-attributes-alt" data-toggle="tooltip" title="Goto diff interface"></span></a>
<a href="/profiler/list-view.phtml?app=<?= $Result->getApp() ?>&label=<?= $Result->getLabel() ?>"><span class="glyphicon glyphicon-unchecked" data-toggle="tooltip" title="Goto methods list"></span></a>
<a href="/profiler/result-flamegraph.phtml?app=<?= $Result->getApp() ?>&label=<?= $Result->getLabel() ?>"><span class="glyphicon glyphicon-fire" data-toggle="tooltip" title="Goto flame graph"></span></a>
<a href="/profiler/tree-view.phtml?app=<?= urlencode($Result->getApp()) ?>&label=<?= urlencode($Result->getLabel()) ?>&method_id=<?= $Result->getMethodId() ?>&date1=<?= $data['date1'] ?>&date2=<?= $data['date2'] ?>"><span class="glyphicon glyphicon-stats" data-toggle="tooltip" title="Goto methods tree"></span></a>
<a href="/profiler/result-diff.phtml?app=<?= urlencode($Result->getApp()) ?>&label=<?= urlencode($Result->getLabel()) ?>&date1=<?= $data['date1'] ?>&date2=<?= $data['date2'] ?>"><span class="glyphicon glyphicon-sort-by-attributes-alt" data-toggle="tooltip" title="Goto diff interface"></span></a>
<a href="/profiler/list-view.phtml?app=<?= urlencode($Result->getApp()) ?>&label=<?= urlencode($Result->getLabel()) ?>"><span class="glyphicon glyphicon-unchecked" data-toggle="tooltip" title="Goto methods list"></span></a>
<a href="/profiler/result-flamegraph.phtml?app=<?= urlencode($Result->getApp()) ?>&label=<?= urlencode($Result->getLabel()) ?>"><span class="glyphicon glyphicon-fire" data-toggle="tooltip" title="Goto flame graph"></span></a>
</td>
<?php if ($data['mode'] !== 'snapshots'): ?>
<td>
Expand Down

0 comments on commit 9470ab7

Please sign in to comment.