Commit e4d52b28 by Torkel Ödegaard

fix(snapshot): fixed snapshot header, fixes #4094

parent ac45ccba
......@@ -47,6 +47,17 @@ export class GrafanaApp {
this.registerFunctions.factory = $provide.factory;
this.registerFunctions.service = $provide.service;
this.registerFunctions.filter = $filterProvider.register;
$provide.decorator("$http", ["$delegate", function($delegate) {
var get = $delegate.get;
$delegate.get = function(url, config) {
if (url.match(/\.html$/)) {
url += "?v=" + new Date().getTime();
}
return get(url, config);
};
return $delegate;
}]);
});
this.ngModuleDependencies = [
......
......@@ -6,15 +6,13 @@
<i class="fa fa-caret-down"></i>
</a>
<div class="top-nav-btn dashnav-dashboards-btn" ng-if="dashboardMeta.isSnapshot">
<a class="pointer" bs-tooltip="titleTooltip" data-placement="bottom" ng-click="openSearch()">
<i class="icon-gf icon-gf-snapshot"></i>
<span class="dashboard-title">
{{dashboard.title}}
<em class="small">&nbsp;&nbsp;(snapshot)</em>
</span>
</a>
</div>
<a class="pointer navbar-page-btn" ng-if="dashboardMeta.isSnapshot" bs-tooltip="titleTooltip" data-placement="bottom" ng-click="openSearch()">
<i class="icon-gf icon-gf-snapshot"></i>
<span>
{{dashboard.title}}
<em class="small">&nbsp;&nbsp;(snapshot)</em>
</span>
</a>
<ul class="nav pull-left dashnav-action-icons">
<li ng-show="dashboardMeta.canStar">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment