1 2 Previous Next 15 Replies Latest reply on Feb 24, 2016 12:13 PM by Irwin Dolobowsky

    HOWTO: add your own page to Tableau Server's Portal

    Tamas Foldi

      It is a usual questions / request to deploy something under the Tableau Server's web portal. It has many advantages, like using Tableau's authentication system, metadata and other functions/services. Some examples:


      - Add a welcome page with an own/custom layout and with some quick links to visualizations, etc.

      - Put branded content or embed something from other web sites

      - Show latest activities inside the portal (visualization publishing, extract refreshes, etc.)

      - Implement reporting workflows (report request, data quality issue tracking) within the tableau portal


      The process, how you can add your own things are quite easy:


      1. You have to create your own controller
      2. Add your server pages (like in HTML format)
      3. Specify the URL within tableau server which should be routed to your own page


      Of course you can practically implement everything, let me just show how it works with a simple hello world page. I am using Tableau 8 right now but the things are similar with Tableau Server 7 as well.


      All pathnames are relative to the Tableau servers portal root path: c:\Program Files\Tableau\Tableau Server\8.0\wgserver\z5\WEB-INF\


      1. Create your own controller


      As the application itself is based on jruby on rails which follows the MVC principle, you should create at least a controller, helper and a view to display your content.


      Create the following controller as app\controllers\hello_controller.rb, which has only a single "index" method:


      class HelloController < ApplicationController

        after_filter  :set_page_as_breadcrumb


        include SessionExpirable

        include ViewCollection

        include QuerySupport


        def initialize


          @controller_name = "views"

          @aggregation = "Tag"

          @aggregates = "views"



        # GET /hello

        def index


          respond_to do |format|

            format.html {


              }# html

            format.xml  {

              render({:template => "shared/empty.xml", :layout => false})     






      It uses the layout and security from the Tableau Server framework, so you don't have to care about the authentication and security.


      2. Create an empty helper for the controller


      You will need an empty helper for your controller, save it as app\helpers\hello_helper.rb


      module HelloHelper



      3. Create your HTML code template


      You can put your stuff here, plain HTML or erb/haml/whatever stuff. Let's use my dumb example:


      <table class="formTable statusTable">


        <tr><th class="columnhead" style="border-right:none;">Hello World!</th></tr>


          <td class="textRow" name="hello_world">

            Hello Tableau Community






      Save it as app\views\hello\index.html.erb


      4. Configure the routes for your controller


      In config\routes.rb add the following lines after the "landing#index" line:


      match    '(:site)/hello'                            => 'hello#index',                                                                        :constraints => { :site => SITE_REGEXP }


      This instructs the framework, that the url /hello under the sites must be processed by your hello controller's index method. Restart the server


      5. Enjoy


      Navigate to http://yourserver/hello , enter your username and password and enjoy your beautiful webpage.

      tableau hello page.png

      In case of questions or some particular use cases just ping me

        1 2 Previous Next