|
@@ -25,22 +25,23 @@
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<script type="text/ng-template" id="shareEmbed.html">
|
|
<script type="text/ng-template" id="shareEmbed.html">
|
|
|
- <div class="share-modal-big-icon">
|
|
|
|
|
- <i class="fa fa-code"></i>
|
|
|
|
|
- </div>
|
|
|
|
|
-
|
|
|
|
|
- <div class="share-snapshot-header">
|
|
|
|
|
- <p class="share-snapshot-info-text">
|
|
|
|
|
- The html code below can be pasted and included in another web page. Unless anonymous access
|
|
|
|
|
- is enabled the user viewing that page need to be signed into grafana for the graph to load.
|
|
|
|
|
- </p>
|
|
|
|
|
- </div>
|
|
|
|
|
|
|
+ <div class="share-modal-header">
|
|
|
|
|
+ <div class="share-modal-big-icon">
|
|
|
|
|
+ <i class="fa fa-code"></i>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div>
|
|
|
|
|
+ <p class="share-modal-info-text">
|
|
|
|
|
+ The html code below can be pasted and included in another web page. Unless anonymous access
|
|
|
|
|
+ is enabled the user viewing that page need to be signed into grafana for the graph to load.
|
|
|
|
|
+ </p>
|
|
|
|
|
|
|
|
- <div ng-include src="'shareLinkOptions.html'"></div>
|
|
|
|
|
|
|
+ <div ng-include src="'shareLinkOptions.html'"></div>
|
|
|
|
|
|
|
|
- <div class="gf-form-group section">
|
|
|
|
|
- <div class="gf-form width-30">
|
|
|
|
|
- <textarea rows="5" data-share-panel-url class="gf-form-input width-30" ng-model='iframeHtml'></textarea>
|
|
|
|
|
|
|
+ <div class="gf-form-group section">
|
|
|
|
|
+ <div class="gf-form width-30">
|
|
|
|
|
+ <textarea rows="5" data-share-panel-url class="gf-form-input width-30" ng-model='iframeHtml'></textarea>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</script>
|
|
</script>
|
|
@@ -69,91 +70,98 @@
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<script type="text/ng-template" id="shareLink.html">
|
|
<script type="text/ng-template" id="shareLink.html">
|
|
|
- <div class="share-modal-big-icon">
|
|
|
|
|
- <i class="fa fa-link"></i>
|
|
|
|
|
- </div>
|
|
|
|
|
-
|
|
|
|
|
- <div ng-include src="'shareLinkOptions.html'"></div>
|
|
|
|
|
- <div>
|
|
|
|
|
- <div class="gf-form-group section">
|
|
|
|
|
- <div class="gf-form-inline">
|
|
|
|
|
- <div class="gf-form width-30">
|
|
|
|
|
- <input type="text" data-share-panel-url class="gf-form-input" ng-model="shareUrl"></input>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="gf-form pull-right">
|
|
|
|
|
- <button class="btn btn-inverse pull-right" data-clipboard-text="{{shareUrl}}" clipboard-button><i class="fa fa-clipboard"></i> Copy</button>
|
|
|
|
|
|
|
+ <div class="share-modal-header">
|
|
|
|
|
+ <div class="share-modal-big-icon">
|
|
|
|
|
+ <i class="fa fa-link"></i>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div>
|
|
|
|
|
+ <p class="share-modal-info-text">
|
|
|
|
|
+ Create a direct link to this dashboard or panel, customized with the options below.
|
|
|
|
|
+ </p>
|
|
|
|
|
+ <div ng-include src="'shareLinkOptions.html'"></div>
|
|
|
|
|
+ <div>
|
|
|
|
|
+ <div class="gf-form-group section">
|
|
|
|
|
+ <div class="gf-form-inline">
|
|
|
|
|
+ <div class="gf-form width-30">
|
|
|
|
|
+ <input type="text" data-share-panel-url class="gf-form-input" ng-model="shareUrl"></input>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="gf-form pull-right">
|
|
|
|
|
+ <button class="btn btn-inverse pull-right" data-clipboard-text="{{shareUrl}}" clipboard-button><i class="fa fa-clipboard"></i> Copy</button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+ <div class="gf-form section" ng-show="modeSharePanel">
|
|
|
|
|
+ <a href="{{imageUrl}}" target="_blank"><i class="fa fa-camera"></i> Direct link rendered image</a>
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
- </div>
|
|
|
|
|
- <div class="gf-form section" ng-show="modeSharePanel">
|
|
|
|
|
- <a href="{{imageUrl}}" target="_blank"><i class="fa fa-camera"></i> Direct link rendered image</a>
|
|
|
|
|
- </div>
|
|
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<script type="text/ng-template" id="shareSnapshot.html">
|
|
<script type="text/ng-template" id="shareSnapshot.html">
|
|
|
<div class="ng-cloak" ng-cloak ng-controller="ShareSnapshotCtrl" ng-init="init()">
|
|
<div class="ng-cloak" ng-cloak ng-controller="ShareSnapshotCtrl" ng-init="init()">
|
|
|
- <div class="share-modal-big-icon">
|
|
|
|
|
- <i ng-if="loading" class="fa fa-spinner fa-spin"></i>
|
|
|
|
|
- <i ng-if="!loading" class="icon-gf icon-gf-snapshot"></i>
|
|
|
|
|
- </div>
|
|
|
|
|
-
|
|
|
|
|
- <div class="share-snapshot-header" ng-if="step === 1">
|
|
|
|
|
- <p class="share-snapshot-info-text">
|
|
|
|
|
- A snapshot is an instant way to share an interactive dashboard publicly.
|
|
|
|
|
- When created, we <strong>strip sensitive data</strong> like queries (metric, template and annotation) and panel links,
|
|
|
|
|
- leaving only the visible metric data and series names embedded into your dashboard.
|
|
|
|
|
- </p>
|
|
|
|
|
- <p class="share-snapshot-info-text">
|
|
|
|
|
- Keep in mind, your <strong>snapshot can be viewed by anyone</strong> that has the link and can reach the URL.
|
|
|
|
|
- Share wisely.
|
|
|
|
|
- </p>
|
|
|
|
|
- </div>
|
|
|
|
|
-
|
|
|
|
|
- <div class="share-snapshot-header" ng-if="step === 3">
|
|
|
|
|
- <p class="share-snapshot-info-text">
|
|
|
|
|
- The snapshot has now been deleted. If it you have already accessed it once, It might take up to an hour before it is removed from
|
|
|
|
|
- browser caches or CDN caches.
|
|
|
|
|
- </p>
|
|
|
|
|
- </div>
|
|
|
|
|
-
|
|
|
|
|
- <div class="gf-form-group share-modal-options">
|
|
|
|
|
- <div class="gf-form" ng-if="step === 1">
|
|
|
|
|
- <span class="gf-form-label width-12">Snapshot name</span>
|
|
|
|
|
- <input type="text" ng-model="snapshot.name" class="gf-form-input max-width-15" >
|
|
|
|
|
|
|
+ <div class="share-modal-header" ng-if="step === 1">
|
|
|
|
|
+ <div class="share-modal-big-icon">
|
|
|
|
|
+ <i ng-if="loading" class="fa fa-spinner fa-spin"></i>
|
|
|
|
|
+ <i ng-if="!loading" class="icon-gf icon-gf-snapshot"></i>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="gf-form" ng-if="step === 1">
|
|
|
|
|
- <span class="gf-form-label width-12">Expire</span>
|
|
|
|
|
- <div class="gf-form-select-wrapper max-width-15">
|
|
|
|
|
- <select class="gf-form-input" ng-model="snapshot.expires" ng-options="f.value as f.text for f in expireOptions"></select>
|
|
|
|
|
|
|
+ <div>
|
|
|
|
|
+ <p class="share-modal-info-text">
|
|
|
|
|
+ A snapshot is an instant way to share an interactive dashboard publicly.
|
|
|
|
|
+ When created, we <strong>strip sensitive data</strong> like queries (metric, template and annotation) and panel links,
|
|
|
|
|
+ leaving only the visible metric data and series names embedded into your dashboard.
|
|
|
|
|
+ </p>
|
|
|
|
|
+ <p class="share-modal-info-text">
|
|
|
|
|
+ Keep in mind, your <strong>snapshot can be viewed by anyone</strong> that has the link and can reach the URL.
|
|
|
|
|
+ Share wisely.
|
|
|
|
|
+ </p>
|
|
|
|
|
+
|
|
|
|
|
+ <div class="share-modal-header" ng-if="step === 3">
|
|
|
|
|
+ <p class="share-modal-info-text">
|
|
|
|
|
+ The snapshot has now been deleted. If it you have already accessed it once, It might take up to an hour before it is removed from
|
|
|
|
|
+ browser caches or CDN caches.
|
|
|
|
|
+ </p>
|
|
|
</div>
|
|
</div>
|
|
|
- </div>
|
|
|
|
|
|
|
|
|
|
- <div class="gf-form" ng-if="step === 2" style="margin-top: 40px">
|
|
|
|
|
- <div class="gf-form-row">
|
|
|
|
|
- <a href="{{snapshotUrl}}" class="large share-snapshot-link" target="_blank">
|
|
|
|
|
- <i class="fa fa-external-link-square"></i>
|
|
|
|
|
- {{snapshotUrl}}
|
|
|
|
|
- </a>
|
|
|
|
|
- <br>
|
|
|
|
|
- <button class="btn btn-inverse btn-large" data-clipboard-text="{{snapshotUrl}}" clipboard-button><i class="fa fa-clipboard"></i> Copy Link</button>
|
|
|
|
|
|
|
+ <div class="gf-form-group share-modal-options">
|
|
|
|
|
+ <div class="gf-form" ng-if="step === 1">
|
|
|
|
|
+ <span class="gf-form-label width-12">Snapshot name</span>
|
|
|
|
|
+ <input type="text" ng-model="snapshot.name" class="gf-form-input max-width-15" >
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="gf-form" ng-if="step === 1">
|
|
|
|
|
+ <span class="gf-form-label width-12">Expire</span>
|
|
|
|
|
+ <div class="gf-form-select-wrapper max-width-15">
|
|
|
|
|
+ <select class="gf-form-input" ng-model="snapshot.expires" ng-options="f.value as f.text for f in expireOptions"></select>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <div class="gf-form" ng-if="step === 2" style="margin-top: 40px">
|
|
|
|
|
+ <div class="gf-form-row">
|
|
|
|
|
+ <a href="{{snapshotUrl}}" class="large share-modal-link" target="_blank">
|
|
|
|
|
+ <i class="fa fa-external-link-square"></i>
|
|
|
|
|
+ {{snapshotUrl}}
|
|
|
|
|
+ </a>
|
|
|
|
|
+ <br>
|
|
|
|
|
+ <button class="btn btn-inverse btn-large" data-clipboard-text="{{snapshotUrl}}" clipboard-button><i class="fa fa-clipboard"></i> Copy Link</button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
|
|
|
|
|
- <div ng-if="step === 1" class="gf-form-buttons-row">
|
|
|
|
|
- <button class="btn btn-success btn-large" ng-click="createSnapshot()" ng-disabled="loading">
|
|
|
|
|
- <i class="fa fa-save"></i>
|
|
|
|
|
- Local Snapshot
|
|
|
|
|
- </button>
|
|
|
|
|
- <button class="btn btn-primary btn-large" ng-if="externalEnabled" ng-click="createSnapshot(true)" ng-disabled="loading">
|
|
|
|
|
- <i class="fa fa-cloud-upload"></i>
|
|
|
|
|
- {{sharingButtonText}}
|
|
|
|
|
- </button>
|
|
|
|
|
- </div>
|
|
|
|
|
|
|
+ <div ng-if="step === 1" class="gf-form-button-row">
|
|
|
|
|
+ <button class="btn gf-form-btn width-10 btn-success" ng-click="createSnapshot()" ng-disabled="loading">
|
|
|
|
|
+ <i class="fa fa-save"></i>
|
|
|
|
|
+ Local Snapshot
|
|
|
|
|
+ </button>
|
|
|
|
|
+ <button class="btn gf-form-btn width-16 btn-secondary" ng-if="externalEnabled" ng-click="createSnapshot(true)" ng-disabled="loading">
|
|
|
|
|
+ <i class="fa fa-cloud-upload"></i>
|
|
|
|
|
+ {{sharingButtonText}}
|
|
|
|
|
+ </button>
|
|
|
|
|
+ <a class="btn btn-link" ng-click="dismiss()">Cancel</a>
|
|
|
|
|
+ </div>
|
|
|
|
|
|
|
|
- <div class="pull-right" ng-if="step === 2" style="padding: 5px">
|
|
|
|
|
- Did you make a mistake? <a class="pointer" ng-click="deleteSnapshot()" target="_blank">delete snapshot.</a>
|
|
|
|
|
|
|
+ <div class="pull-right" ng-if="step === 2" style="padding: 5px">
|
|
|
|
|
+ Did you make a mistake? <a class="pointer" ng-click="deleteSnapshot()" target="_blank">delete snapshot.</a>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|