Add: support for snapshot generation service

This commit is contained in:
Arik Fraimovich 2016-10-07 00:07:54 +03:00
parent f56cbf051c
commit 42ae78a017
2 changed files with 10 additions and 0 deletions

View File

@ -324,6 +324,9 @@
$modalInstance.close();
}
$scope.embedUrl = basePath + 'embed/query/' + query.id + '/visualization/' + visualization.id + '?api_key=' + query.api_key;
if (window.snapshotUrlBuilder) {
$scope.snapshotUrl = snapshotUrlBuilder(query, visualization);
}
}]
})
}

View File

@ -3,8 +3,15 @@
<h4 class="modal-title">Embed Code</h4>
</div>
<div class="modal-body">
<h5>IFrame Embed</h5>
<div>
<code>&lt;iframe src="{{ embedUrl }}" width="720" height="391"&gt;&lt;/iframe&gt;</code>
</div>
<span class="text-muted">(height should be adjusted)</span>
<div ng-if="snapshotUrl">
<h5>Image Embed</h5>
<div>
<code style="overflow-wrap:break-word;">{{snapshotUrl}}</code>
</div>
</div>
</div>