No commit activity in last 3 years
No release in over 3 years
The Tableau trusted interface allows you to embed Tableau workbooks from a Tableau server in your web views, even when the user isn’t presently authenticated.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 3.4
~> 0.11
>= 3.0
>= 1.22

Runtime

 Project Readme

Tableau Trusted Interface for Ruby

Build Status

Wrapper for embedding Tableau workbooks using the Tableau trusted interface.

Installation

Add to your Gemfile:

gem 'tableau_trusted_interface'

You have the option of specifying a default Trusted Authentication server address, view retrieval server address and user:

TableauTrustedInterface.configure do |config|
  config.default_tableau_auth_server = 'http://auth.example.com'
  config.default_tableau_view_server = 'https://view.example.com'
  config.default_tableau_user = 'foobar'
end

As a fallback for both the default_tableau_auth_server and default_tableau_view_server options, a default_tableau_server option can be specified.

Usage

Instantiate the interface by specifying which workbook you want and the embed params you wish to use:

@report = TableauTrustedInterface::Report.new(
 path: 'project/workbook',
 embed_params: { embed: 'yes', toolbar: 'no' }
)

You can optionally pass user:, auth_server: and view_server: options here too if you don’t want to use the configured defaults. Similar to the configuration, you can also specify a server: option as a fallback for the latter two.

This would typically be put in a Rails controller, providing you access to the following methods in your view:

  • @report.report_url
  • @report.report_embed_url

For convenience, this is how you embed the report in a responsive Bootstrap 3 iframe:

<div class="embed-responsive embed-responsive-16by9">
  <iframe class="embed-responsive-item" src="<%= @report.report_embed_url %>"></iframe>
</div>

Contributors

License

See the LICENSE file for license rights and limitations (MIT).