Skip to content

Commit a1a97d3

Browse files
Bryce Andersonjenkins
authored andcommitted
twitter-server: Add the current metric name as a url fragment in the metrics view
Problem The metrics Watch endpoint will use the url fragment to go right to the metrics you're interested in which is super convenient. However, you essentially have to type this in by hand since it's never populated in the browsers url bar. Solution Set the url fragment when we start to watch a metric. This makes copying and sharing admin metrics pages super quick. Differential Revision: https://phabricator.twitter.biz/D635343
1 parent 2c54904 commit a1a97d3

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

server/src/main/resources/twitter-server/js/metric-query.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ function graphLibLoaded() {
2727
if (selected != undefined) selected.removeClass("selected")
2828
li.addClass("selected")
2929
selected = li
30+
window.location.hash = "#" + stat
3031
refreshStats(stat, new ChartRenderer($("#chart-div")[0], stat))
3132
}
3233

0 commit comments

Comments
 (0)