From e4d52b2851cb37d77d02d60e0c4c56452192275b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Sun, 21 Feb 2016 09:02:32 +0100 Subject: [PATCH] fix(snapshot): fixed snapshot header, fixes #4094 --- public/app/app.ts | 11 +++++++++++ .../app/features/dashboard/dashnav/dashnav.html | 16 +++++++--------- 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/public/app/app.ts b/public/app/app.ts index a4e1bebca6e..00ae0974ec0 100644 --- a/public/app/app.ts +++ b/public/app/app.ts @@ -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 = [ diff --git a/public/app/features/dashboard/dashnav/dashnav.html b/public/app/features/dashboard/dashnav/dashnav.html index 9f8fcb99333..155037ca124 100644 --- a/public/app/features/dashboard/dashnav/dashnav.html +++ b/public/app/features/dashboard/dashnav/dashnav.html @@ -6,15 +6,13 @@ -
- - - - {{dashboard.title}} -   (snapshot) - - -
+ + + + {{dashboard.title}} +   (snapshot) + +