-
Notifications
You must be signed in to change notification settings - Fork 31
Time function (in kibana 6.x only)
ytzlax edited this page Oct 24, 2018
·
3 revisions
This functionality allow you to set dashboard global time
this.iframeElement = document.getElementById('iframe');
this.iframeWindow = (<HTMLIFrameElement>this.iframeElement).contentWindow;
let time={from: '2015-12-14T14:56:26.288Z', to: '2015-12-14T15:11:26.289Z', mode: "absolute"};
let message={actionType: "setDashboardTime", time}
this.iframeWindow.postMessage(message, '*');
Lets explain the message object:
actionType: In this case "setDashboardTime"
time: The the time object, time object example:
let time:{from: '2015-12-14T14:56:26.288Z', to: '2015-12-14T15:11:26.289Z', mode: "absolute"}
let time: {from: 'now-24h', to: 'now', mode: "quick"};
let time: {from: 'now-12h', to: 'now', mode: "relative"};
This functionality allow you to set dashboard refresh interval
this.iframeElement = document.getElementById('iframe');
this.iframeWindow = (<HTMLIFrameElement>this.iframeElement).contentWindow;
let refresh={pause: false, value: 1000};
let message={actionType: "setRefreshInterval", refresh}
this.iframeWindow.postMessage(message, '*');
Lets explain the message object:
actionType: In this case "setRefreshInterval"
refresh: refresh object, the value is in millisecond