index.html 1.7 KB
Newer Older
J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
1
2
3
<html>
  <head>

J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
4
    <script src="bower_components/webcomponentsjs/webcomponents-lite.js"></script>
J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
5
    <link rel="import" href="imports.html"></link>
Alberto Pascual's avatar
Alberto Pascual committed
6
7
8
9
10
    <style>
    .info-box-icon.number-chart iron-icon.number-chart {
        top: 26%;
    }
    </style>
J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
11
12
13
14
15
16
  </head>
  
  <body>
    <template is="dom-bind">

    <elastic-client 
J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
17
      config='{"host": "localhost:9200"}' 
J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
18
19
20
21
      client="{{client}}"
      cluster-status="{{myStatus}}">
    </elastic-client>

militarpancho's avatar
militarpancho committed
22
23
    <dashboard-reddit
      client="{{client}}"></dashboard-reddit>
J. Fernando Sánchez's avatar
J. Fernando Sánchez committed
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
    <!-- <button id="databutton" onclick="changedata()">Click to change data</button> -->
    <script>
      var datas =[
        {"hits": {
                "total": 20000
            },
            "aggregations": {
                "category": {
                    "buckets": [
                        {"key": "myObject", "doc_count": 3000},
                        {"key": "otherObject", "doc_count": 1000}
                    ]
                }
            }
        },
        {"hits": {
                "total": 30000
            },
            "aggregations": {
                "category": {
                    "buckets": [
                        {"key": "myObject", "doc_count": 1000},
                        {"key": "otherObject", "doc_count": 4000}
                    ]
                }
            }
        }];
      var numdata = 0;
      <!-- var nc1 = document.getElementById('demo-chart1'); -->
      <!-- var nc2 = document.getElementById('demo-chart2'); -->
      <!-- nc1.data = nc2.data = datas[0]; -->
      <!-- function changedata(){ -->
      <!--   numdata += 1; -->
      <!-- nc1.data = nc2.data = datas[numdata%2]; -->
      <!-- } -->
    </script>
    </template>
  </body>
</html>