Hide Dashboard Refresh Time

Answered

Comments

13 comments

  • Avatar
    Oxana Noa Umansky

    Hi Brian,

    The code below will hide the 'build date and time' element
     
    dashboard.on("stylechanged", function(d, args) {
    $(".toolbar-dashboard-datasource__date").hide();
    }
     
    Depending on many factors, the element may or may not appear for a fraction of a second.
     
    Please let us know if that worked.  
    0
    Comment actions Permalink
  • Avatar
    Brian Bontrager

    Thank you!  That worked, with the addition of the missing ); at the end.

    0
    Comment actions Permalink
  • Avatar
    Oxana Noa Umansky

    Glad it worked Brian! :) 

    And thanks for letting me know that ); was missing!

    0
    Comment actions Permalink
  • Avatar
    Brian Bontrager (Edited )

    For benefit of others who find this post,

    The above works in version 7

    In version 6.7 use

    dashboard.on("stylechanged", function(d, args) {
    $(".ds-lbt").hide();
    });
    1
    Comment actions Permalink
  • Avatar
    Ian Emmons

    Is this still functional in 7.1? I've been unable to get it working.

    1
    Comment actions Permalink
  • Avatar
    David Burke

    @Ian I'm unable to get it working in 7.1 either.

    I did close the parenthesis that Brian mentioned. I'll play around with it and post if successful.

     

    0
    Comment actions Permalink
  • Avatar
    Richard Stubbs (Edited )

    Hi

    Is it possible to show only the date part of this, hiding the time.

    For example, to have it show just

    6 Dec 2018

    instead of

    6 Dec 2018 13:04:25

    ?

     

    0
    Comment actions Permalink
  • Avatar
    Ravid Paldi
    Yes. Simply modify the code to something like: 
    dashboard.on("stylechanged", function(d, args) {
    var d = $(".toolbar-dashboard-datasource__date").text();
    var dateString = new Date(d).toUTCString();
    dateString = dateString.split(' ').slice(0, 4).join(' ');
    $(".toolbar-dashboard-datasource__date").text(dateString);
    }
     
    0
    Comment actions Permalink
  • Avatar
    Alina Lotman (Edited )

    Hi,

    I'm using a similar script to hide the name of the Elasticube:

    dashboard.on("stylechanged", function(d, args) {
    $(".dashboard-datasource").hide();
    });

    However, when the dashboard is first loaded the name of the Elasticube the name of the Elasticube is still displayed. It disappears only after I refresh the dashboard again - Does anyone know of a way around this?

    I need the name of the Elasticube to be hidden every time the dashboard is loaded.

    Thanks,

    Alina

    1
    Comment actions Permalink
  • Avatar
    Antti Wolk

    Hi,

    I have the same issue like Alina.

    I would like to hide the name of a dashboard. This part here:

    <div class="dashboard-title" data-display-action-if-has-permission="hide" data-path="dashboards.rename" data-source="dashboard" data-has-permission=""> Homepage (single country) </div>

    But I cant get it working. Isnt there another way to hide the name?

     

    Thanks

    Antti

     

    0
    Comment actions Permalink
  • Avatar
    David Rogers

    I need the "hide dashboard title" solution too.  This is particularly important when using the Jump-to-Dashboard plugin, as no one wants to see "_drill_[DashboardName]".

    0
    Comment actions Permalink
  • Avatar
    Thiyagarajan Parameswaran

    I am using 7.4.4 and I need to hide the Cube build date and time from the dashboard. I tried the below script and it is not working for me. Can anyone please help me with this?

     

    dashboard.on("stylechanged", function(d, args) {
    $(".toolbar-dashboard-datasource__date").hide();
    });
    0
    Comment actions Permalink
  • Avatar
    Einav Shuker

    Versions tested- V7.4.3 and V8.0.0

    This script is working:

    dashboard.on('refreshend', function(d, args) {

    $('.toolbar-dashboard-datasource__date').css('display','none','important');
    debugger;
    })

    1
    Comment actions Permalink

Please sign in to leave a comment.