2015-03-29 15:01:27 +02:00
< div class = "modal-body gf-box gf-box-no-margin" ng-controller = "ShareModalCtrl" ng-init = "init()" >
2015-03-20 22:01:39 -04:00
< div class = "gf-box-header" >
< div class = "gf-box-title" >
2015-03-29 14:30:03 +02:00
< i class = "fa fa-share" ></ i >
{{modalTitle}}
2015-03-20 22:01:39 -04:00
</ div >
2015-03-29 14:30:03 +02:00
< div ng-model = "editor.index" bs-tabs >
< div ng-repeat = "tab in tabs" data-title = "{{tab.title}}" >
2015-03-20 22:01:39 -04:00
</ div >
</ div >
< button class = "gf-box-header-close-btn" ng-click = "dismiss();" >
< i class = "fa fa-remove" ></ i >
</ button >
</ div >
2015-03-29 14:30:03 +02:00
< div class = "gf-box-body" ng-repeat = "tab in tabs" ng-if = "editor.index == $index" >
2015-04-02 09:21:38 +02:00
< div ng-include src = "tab.src" class = "share-modal-body" ></ div >
2015-03-29 14:30:03 +02:00
</ div >
2015-03-20 22:01:39 -04:00
2015-03-29 14:30:03 +02:00
</ div >
2015-03-20 22:01:39 -04:00
2015-03-29 14:30:03 +02:00
< script type = "text/ng-template" id = "shareEmbed.html" >
2015-04-02 09:21:38 +02:00
< div class = "share-modal-big-icon" >
< i class = "fa fa-code" >< /i>
< /div>
< div class = "share-snapshot-header" >
< p class = "share-snapshot-info-text" >
2015-03-29 14:30:03 +02:00
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 .
2015-04-02 09:21:38 +02:00
< /p>
< /div>
< div ng - include src = "'shareLinkOptions.html'" >< /div>
2015-03-29 14:30:03 +02:00
< div class = "gf-form" >
< div class = "gf-form-row" >
< span class = "gf-fluid-input" >
< textarea rows = "5" data - share - panel - url class = "input" ng - model = 'iframeHtml' >< /textarea>
< /span>
2015-03-20 22:01:39 -04:00
< /div>
2015-03-29 14:30:03 +02:00
< button class = "btn btn-inverse" data - clipboard - text = "{{iframeHtml}}" clipboard - button >< i class = "fa fa-clipboard" >< /i> Copy</button>
2015-03-20 22:01:39 -04:00
< /div>
2015-03-29 14:30:03 +02:00
</ script >
2015-03-20 22:01:39 -04:00
2015-04-02 09:21:38 +02:00
< script type = "text/ng-template" id = "shareLinkOptions.html" >
< div class = "editor-row" style = "margin: 11px 20px 33px 20px" >
< div class = "section" >
< div class = "tight-form" >
< ul class = "tight-form-list" >
< li class = "tight-form-item" style = "width: 170px;" >
< label class = "checkbox-label" for = "options.forCurrent" > Current time range < /label>
< /li>
< li class = "tight-form-item last" >
< input class = "cr1" id = "options.forCurrent" type = "checkbox" ng - model = "options.forCurrent" ng - checked = "options.forCurrent" ng - change = "buildUrl()" >
< label for = "options.forCurrent" class = "cr1" >< /label>
< /li>
< /ul>
< div class = "clearfix" >< /div>
< /div>
< div class = "tight-form" >
< ul class = "tight-form-list" >
< li class = "tight-form-item" style = "width: 170px" >
< label class = "checkbox-label" for = "options.includeTemplateVars" > Include template variables < /label>
< /li>
< li class = "tight-form-item last" >
< input class = "cr1" id = "options.includeTemplateVars" type = "checkbox" ng - model = "options.includeTemplateVars" ng - checked = "options.includeTemplateVars" ng - change = "buildUrl()" >
< label for = "options.includeTemplateVars" class = "cr1" >< /label>
< /li>
< /ul>
< div class = "clearfix" >< /div>
< /div>
< div class = "tight-form" >
< ul class = "tight-form-list" >
< li class = "tight-form-item" style = "width: 170px" >
Theme
< /li>
< li >
< select class = "input-small tight-form-input last" style = "width: 211px" ng - model = "options.theme" ng - options = "f as f for f in ['current', 'dark', 'light']" ng - change = "buildUrl()" >< /select>
< /li>
< /ul>
< div class = "clearfix" >< /div>
< /div>
2015-03-29 14:30:03 +02:00
< /div>
< /div>
2015-04-02 09:21:38 +02:00
</ script >
< script type = "text/ng-template" id = "shareLink.html" >
< div class = "share-modal-big-icon" >
< i class = "fa fa-external-link" >< /i>
2015-03-29 14:30:03 +02:00
< /div>
2015-04-02 09:21:38 +02:00
< div ng - include src = "'shareLinkOptions.html'" >< /div>
2015-03-29 14:30:03 +02:00
< div class = "gf-form" >
< div class = "gf-form-row" >
< button class = "btn btn-inverse pull-right" data - clipboard - text = "{{shareUrl}}" clipboard - button >< i class = "fa fa-clipboard" >< /i> Copy</button>
< span class = "gf-fluid-input" >
< input type = "text" data - share - panel - url class = "input" ng - model = 'shareUrl' >< /input>
< /span>
< /div>
2015-03-29 15:01:27 +02:00
< div class = "editor-row" style = "margin-top: 5px;" ng - show = "modeSharePanel" >
2015-03-29 14:30:03 +02:00
< a href = "{{imageUrl}}" target = "_blank" >< i class = "fa fa-camera" >< /i> Direct link rendered image</a>
< /div>
< /div>
</ script >
2015-03-21 08:53:16 -04:00
2015-03-29 14:30:03 +02:00
< script type = "text/ng-template" id = "shareSnapshot.html" >
2015-10-14 17:39:57 +03:00
< div class = "ng-cloak" ng - cloak ng - controller = "ShareSnapshotCtrl" ng - init = "init()" >
2015-04-02 09:21:38 +02:00
< div class = "share-modal-big-icon" >
2015-03-23 13:58:30 -04:00
< i ng - if = "loading" class = "fa fa-spinner fa-spin" >< /i>
2015-03-28 21:04:38 +01:00
< i ng - if = "!loading" class = "gf-icon gf-icon-snap-multi" >< /i>
2015-03-28 17:53:52 +01:00
< /div>
< div class = "share-snapshot-header" ng - if = "step === 1" >
2015-03-25 20:36:48 +01:00
< p class = "share-snapshot-info-text" >
2015-03-25 20:55:41 +01:00
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" >
2015-03-26 12:00:52 +01:00
Keep in mind , your < strong > snapshot can be viewed by anyone < /strong> that has the link and can reach the URL.
2015-03-25 20:55:41 +01:00
Share wisely .
2015-03-25 20:36:48 +01:00
< /p>
< /div>
2015-03-21 10:56:26 -04:00
2015-04-01 08:24:03 +02:00
< 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>
2015-04-02 09:21:38 +02:00
< div class = "editor-row share-modal-options" style = "" >
2015-03-25 20:36:48 +01:00
< div class = "section" ng - if = "step === 1" >
< div class = "tight-form" >
2015-03-24 15:45:31 +01:00
< ul class = "tight-form-list" >
2015-03-25 20:36:48 +01:00
< li class = "tight-form-item" style = "width: 110px;" >
2015-03-25 20:55:41 +01:00
Snapshot name
2015-03-24 15:45:31 +01:00
< /li>
< li >
< input type = "text" ng - model = "snapshot.name" class = "input-large tight-form-input last" >
< /li>
< /ul>
< div class = "clearfix" >< /div>
2015-03-23 13:58:30 -04:00
< /div>
2015-03-25 20:36:48 +01:00
< div class = "tight-form" >
< ul class = "tight-form-list" >
< li class = "tight-form-item" style = "width: 110px" >
2015-03-25 20:55:41 +01:00
Expire
2015-03-25 20:36:48 +01:00
< /li>
< li >
2015-03-26 12:00:52 +01:00
< select class = "input-small tight-form-input last" style = "width: 211px" ng - model = "snapshot.expires" ng - options = "f.value as f.text for f in expireOptions" >< /select>
2015-03-25 20:36:48 +01:00
< /li>
< /ul>
< div class = "clearfix" >< /div>
< /div>
2015-03-24 15:45:31 +01:00
< /div>
2015-03-23 13:58:30 -04:00
2015-03-28 17:53:52 +01:00
< div class = "gf-form" ng - if = "step === 2" style = "margin-top: 40px" >
2015-03-24 15:45:31 +01:00
< 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>
2015-03-23 13:58:30 -04:00
< /div>
2015-03-21 10:56:26 -04:00
< /div>
< /div>
2015-03-25 20:36:48 +01:00
< div ng - if = "step === 1" >
< button class = "btn btn-success btn-large" ng - click = "createSnapshot()" ng - disabled = "loading" >
< i class = "fa fa-save" >< /i>
Local Snapshot
< /button>
2015-10-14 17:39:57 +03:00
< button class = "btn btn-primary btn-large" ng - if = "externalEnabled" ng - click = "createSnapshot(true)" ng - disabled = "loading" >
2015-03-25 20:36:48 +01:00
< i class = "fa fa-cloud-upload" >< /i>
2015-10-14 17:39:57 +03:00
{{ sharingButtonText }}
2015-03-25 20:36:48 +01:00
< /button>
< /div>
2015-03-23 13:58:30 -04:00
2015-03-26 20:34:58 +01:00
< div class = "pull-right" ng - if = "step === 2" style = "padding: 5px" >
2015-04-01 08:24:03 +02:00
Did you make a mistake ? < a class = "pointer" ng - click = "deleteSnapshot()" target = "_blank" > delete snapshot . < /a>
2015-03-26 20:34:58 +01:00
< /div>
2015-04-01 08:24:03 +02:00
2015-03-21 08:53:16 -04:00
< /div>
2015-03-29 14:30:03 +02:00
</ script >