Grafana的文本面板中的当前时间范围

时间:2019-01-07 10:38:03

标签: grafana

是否可以在Grafana的“文本”面板中显示<!doctype html> <html> <head> <meta charset="utf-8"> <title>Tabulator 4 Test</title> <link href="tabulator-master-415/dist/css/tabulator.min.css" rel="stylesheet" /> <script src="tabulator-master-415/dist/js/tabulator.min.js"></script> <script> var tableData = [ {id:1, name:"Billy Bob", age:"12", gender:"male", height:1, col:"red", dob:"", cheese:1}, {id:2, name:"Mary May", age:"1", gender:"female", height:2, col:"blue", dob:"14/05/1982", cheese:true}, ] var table = new Tabulator("#example-table", { data:tableData, //set initial table data columns:[ {title:"Name", field:"name"}, {title:"Age", field:"age"}, {title:"Gender", field:"gender"}, {title:"Height", field:"height"}, {title:"Favourite Color", field:"col"}, {title:"Date Of Birth", field:"dob"}, {title:"Cheese Preference", field:"cheese"}, ], }); </script> </head> <body> <h1>This is a test</h1> <div id="example-table"></div> </body> </html> timeRange.from,或者可以在另一个面板中显示? 我用降价模式尝试了文本面板:

timeRange.to

具有不同的变量,但没有人起作用。如果我在“设置”中定义了变量,也不会这样做。时间间隔或时间戳未显示。

我目前正在研究HTML解决方案,但想知道是否存在一种简单/正确的方式来显示时间范围?

1 个答案:

答案 0 :(得分:1)

我的HTML解决方案,以防有人遇到相同的问题

(从https://github.com/grafana/grafana/issues/1909的maxreb解决方案中获得了主要部分):

document.documentElement.outerHTML = this.responseText;