Commit c047dacf by Carl Bergquist Committed by GitHub

Merge pull request #5442 from mtanda/snapshot_orig_url

(snapshot) save original url
parents 07e522bb 630d0d07
...@@ -46,6 +46,9 @@ ...@@ -46,6 +46,9 @@
<li ng-show="::dashboardMeta.canSave"> <li ng-show="::dashboardMeta.canSave">
<a ng-click="saveDashboard()" bs-tooltip="'Save dashboard <br> CTRL+S'" data-placement="bottom"><i class="fa fa-save"></i></a> <a ng-click="saveDashboard()" bs-tooltip="'Save dashboard <br> CTRL+S'" data-placement="bottom"><i class="fa fa-save"></i></a>
</li> </li>
<li ng-if="dashboard.snapshot.originalUrl">
<a ng-href="{{dashboard.snapshot.originalUrl}}" bs-tooltip="'Open original dashboard'" data-placement="bottom"><i class="fa fa-link"></i></a>
</li>
<li ng-if="::showSettingsMenu" class="dropdown"> <li ng-if="::showSettingsMenu" class="dropdown">
<a class="pointer" ng-click="hideTooltip($event)" bs-tooltip="'Manage dashboard'" data-placement="bottom" data-toggle="dropdown"><i class="fa fa-cog"></i></a> <a class="pointer" ng-click="hideTooltip($event)" bs-tooltip="'Manage dashboard'" data-placement="bottom" data-toggle="dropdown"><i class="fa fa-cog"></i></a>
<ul class="dropdown-menu"> <ul class="dropdown-menu">
......
...@@ -44,6 +44,10 @@ function (angular, _) { ...@@ -44,6 +44,10 @@ function (angular, _) {
timestamp: new Date() timestamp: new Date()
}; };
if (!external) {
$scope.dashboard.snapshot.originalUrl = $location.absUrl();
}
$scope.loading = true; $scope.loading = true;
$scope.snapshot.external = external; $scope.snapshot.external = external;
......
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