Last Build Time

Comments

2 comments

  • Avatar
    Moti Granovsky

    Hi Mike,

    The most accurate way to retrieve an ElastiCube's last build time is via the REST API call:

    http://localhost:8081/api/elasticubes/servers/LocalHost/YourCubeNameHere/lastBuildTime

    Which you can execute using jQuery's $.get() shorthand function. (or any other method of executing AJAX calls you prefer)

    It will return a serialized date/tick string, like this one: "\/Date(1485199620844)\/"

    You can parse it using this code:

    // assuming responseData = "\/Date(1485199620844)\/"
    var date = new Date(parseInt(responseData.replace('/Date(','').replace(')/',''), 10));

    Hope this helps!

    1
    Comment actions Permalink
  • Avatar
    Mike Watkinson (Edited )

    Didnt think to use the rest api. Seems a bit silly when sisense is pulling the date somewhere. But I'll Take it.

    Just a note, Sisense exposes moment to widget scripts, so you can throw the return data in a moment object:

     

    $.get(url, function(data){
        moment(data).format('LLL')
    })
    1
    Comment actions Permalink

Please sign in to leave a comment.