mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Added details view, nested fields, clickable query building to table panel
This commit is contained in:
@@ -13,8 +13,12 @@ curl -XPUT http://localhost:9200/_template/shakespeare -d '
|
||||
"play_name" : {"type": "string", "index" : "not_analyzed" },
|
||||
"line_id" : { "type" : "integer", "index": "not_analyzed" },
|
||||
"speech_number" : { "type" : "integer", "index": "not_analyzed" },
|
||||
"state" : {"type": "string", "index" : "not_analyzed" },
|
||||
"country" : {"type": "string", "index" : "not_analyzed" }
|
||||
"geo" : {
|
||||
"properties": {
|
||||
"state" : {"type": "string", "index" : "not_analyzed" },
|
||||
"country" : {"type": "string", "index" : "not_analyzed" }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,10 +24,12 @@ fs.readFile('shakespeare.json', 'utf8', function (err,data) {
|
||||
var randomnumber=Math.floor(Math.random()*57600000)
|
||||
var command = {index:{_index: "shakespeare", _type: "line", _id: i}};
|
||||
o['@timestamp'] = new Date((new Date()).getTime() -9000000 + randomnumber);
|
||||
o.geo = [getRandomInRange(-90, 90, 3),getRandomInRange(-180, 180, 3)]
|
||||
o.country = get_country();
|
||||
if(o.country == 'US')
|
||||
o.state = get_state()
|
||||
o.geo = {
|
||||
geojson : [getRandomInRange(-90, 90, 3),getRandomInRange(-180, 180, 3)],
|
||||
country : get_country()
|
||||
}
|
||||
if(o.geo.country == 'US')
|
||||
o.geo.state = get_state();
|
||||
console.log(JSON.stringify(command))
|
||||
console.log(JSON.stringify(o));
|
||||
var percent = Math.floor((i/lines)*100)
|
||||
|
||||
Reference in New Issue
Block a user