tv-react.html 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287
  1. <!DOCTYPE html>
  2. <!-- SPDX-License-Identifier: GPL-3.0-or-later -->
  3. <html lang="en">
  4. <head>
  5. <title>Netdata TV Dashboard</title>
  6. <meta name="application-name" content="netdata">
  7. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  8. <meta charset="utf-8">
  9. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  10. <meta name="viewport" content="width=device-width, initial-scale=1">
  11. <meta name="apple-mobile-web-app-capable" content="yes">
  12. <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
  13. <meta property="og:locale" content="en_US" />
  14. <meta property="og:image" content="https://cloud.githubusercontent.com/assets/2662304/22945737/e98cd0c6-f2fd-11e6-96f1-5501934b0955.png"/>
  15. <meta property="og:url" content="http://my-netdata.io/"/>
  16. <meta property="og:type" content="website"/>
  17. <meta property="og:site_name" content="netdata"/>
  18. <meta property="og:title" content="netdata - real-time performance monitoring, done right!"/>
  19. <meta property="og:description" content="Stunning real-time dashboards, blazingly fast and extremely interactive. Zero configuration, zero dependencies, zero maintenance." />
  20. <!-- todo generate urls like this from prod build -->
  21. <!-- <link href="/dashboard/build/static/css/main.19393e92.chunk.css" rel="stylesheet">-->
  22. </head>
  23. <script>
  24. // this section has to appear before loading dashboard.js
  25. // Select a theme.
  26. // uncomment on of the two themes:
  27. // var netdataTheme = 'default'; // this is white
  28. var netdataTheme = 'slate'; // this is dark
  29. // Set the default netdata server.
  30. // on charts without a 'data-host', this one will be used.
  31. // the default is the server that dashboard.js is downloaded from.
  32. // var netdataServer = 'http://my.server:19999/';
  33. </script>
  34. <!--
  35. Load dashboard.js
  36. to host this HTML file on your web server,
  37. you have to load dashboard.js from the netdata server.
  38. So, pick one the two below
  39. If you pick the first, set the server name/IP.
  40. The second assumes you host this file on /usr/share/netdata/web
  41. and that you have chown it to be owned by netdata:netdata
  42. -->
  43. <!-- <script type="text/javascript" src="http://my.server:19999/dashboard.js"></script> -->
  44. <script type="text/javascript" src="dashboard-react.js"></script>
  45. <script>
  46. // Set options for TV operation
  47. // This has to be done, after dashboard.js is loaded
  48. // destroy charts not shown (lowers memory on the browser)
  49. NETDATA.options.current.destroy_on_hide = true;
  50. // set this to false, to always show all dimensions
  51. NETDATA.options.current.eliminate_zero_dimensions = true;
  52. // lower the pressure on this browser
  53. NETDATA.options.current.concurrent_refreshes = false;
  54. // if the tv browser is too slow (a pi?)
  55. // set this to false
  56. NETDATA.options.current.parallel_refresher = true;
  57. // always update the charts, even if focus is lost
  58. // NETDATA.options.current.stop_updates_when_focus_is_lost = false;
  59. // Since you may render charts from many servers and any of them may
  60. // become offline for some time, the charts will break.
  61. // This will reload the page every RELOAD_EVERY minutes
  62. var RELOAD_EVERY = 5;
  63. setTimeout(function(){
  64. location.reload();
  65. }, RELOAD_EVERY * 60 * 1000);
  66. </script>
  67. <body>
  68. <div style="width: 100%; text-align: center; display: inline-block;">
  69. <div style="width: 100%; height: 24vh; text-align: center; display: inline-block;">
  70. <div style="width: 100%; height: 15px; text-align: center; display: inline-block;">
  71. <b>CPU On both servers</b>
  72. </div>
  73. <div style="width: 100%; height: calc(100% - 15px); text-align: center; display: inline-block;">
  74. <br/>
  75. <div data-netdata="system.cpu"
  76. data-host="https://registry.my-netdata.io"
  77. data-title="CPU usage of registry.my-netdata.io"
  78. data-chart-library="dygraph"
  79. data-width="49%"
  80. data-height="100%"
  81. data-after="-300"
  82. data-dygraph-valuerange="[0, 100]"
  83. ></div>
  84. <div data-netdata="system.cpu"
  85. data-title="CPU usage of your netdata server"
  86. data-chart-library="dygraph"
  87. data-width="49%"
  88. data-height="100%"
  89. data-after="-300"
  90. data-dygraph-valuerange="[0, 100]"
  91. ></div>
  92. </div>
  93. </div>
  94. <div style="width: 100%; height: 24vh; text-align: center; display: inline-block;">
  95. <div style="width: 100%; height: 15px; text-align: center; display: inline-block;">
  96. <b>Disk I/O on both servers</b>
  97. </div>
  98. <div style="width: 100%; height: calc(100% - 15px); text-align: center; display: inline-block;">
  99. <div data-netdata="system.io"
  100. data-host="https://registry.my-netdata.io"
  101. data-common-max="io"
  102. data-common-min="io"
  103. data-title="I/O on registry.my-netdata.io"
  104. data-chart-library="dygraph"
  105. data-width="49%"
  106. data-height="100%"
  107. data-after="-300"
  108. ></div>
  109. <div data-netdata="system.io"
  110. data-title="I/O on your netdata server"
  111. data-common-max="io"
  112. data-common-min="io"
  113. data-chart-library="dygraph"
  114. data-width="49%"
  115. data-height="100%"
  116. data-after="-300"
  117. ></div>
  118. </div>
  119. </div>
  120. <div style="width: 100%; height: 24vh; text-align: center; display: inline-block;">
  121. <div style="width: 100%; height: 15px; text-align: center; display: inline-block;">
  122. <b>IPv4 traffic on both servers</b>
  123. </div>
  124. <div style="width: 100%; height: calc(100% - 15px); text-align: center; display: inline-block;">
  125. <div data-netdata="system.net"
  126. data-host="https://registry.my-netdata.io"
  127. data-common-max="traffic"
  128. data-common-min="traffic"
  129. data-title="Network traffic on registry.my-netdata.io"
  130. data-chart-library="dygraph"
  131. data-width="49%"
  132. data-height="100%"
  133. data-after="-300"
  134. ></div>
  135. <div data-netdata="system.net"
  136. data-title="Network traffic on your netdata server"
  137. data-common-max="traffic"
  138. data-common-min="traffic"
  139. data-chart-library="dygraph"
  140. data-width="49%"
  141. data-height="100%"
  142. data-after="-300"
  143. ></div>
  144. </div>
  145. </div>
  146. <div style="width: 100%; height: 23vh; text-align: center; display: inline-block;">
  147. <div style="width: 100%; height: 15px; text-align: center; display: inline-block;">
  148. <b>Netdata statistics on both servers</b>
  149. </div>
  150. <div style="width: 100%; max-height: calc(100% - 15px); text-align: center; display: inline-block;">
  151. <div style="width: 49%; height:100%; align: center; display: inline-block;">
  152. registry.my-netdata.io
  153. <br/>
  154. <div data-netdata="netdata.requests"
  155. data-host="https://registry.my-netdata.io"
  156. data-common-max="netdata-requests"
  157. data-decimal-digits="0"
  158. data-title="Chart Refreshes/s"
  159. data-chart-library="gauge"
  160. data-width="20%"
  161. data-height="100%"
  162. data-after="-300"
  163. data-points="300"
  164. ></div>
  165. <div data-netdata="netdata.clients"
  166. data-host="https://registry.my-netdata.io"
  167. data-common-max="netdata-clients"
  168. data-decimal-digits="0"
  169. data-title="Sockets"
  170. data-chart-library="gauge"
  171. data-width="20%"
  172. data-height="100%"
  173. data-after="-300"
  174. data-points="300"
  175. data-colors="#AA5500"
  176. ></div>
  177. <div data-netdata="netdata.net"
  178. data-dimensions="in"
  179. data-common-max="netdata-net-in"
  180. data-decimal-digits="0"
  181. data-host="https://registry.my-netdata.io"
  182. data-title="Requests Traffic"
  183. data-chart-library="easypiechart"
  184. data-width="15%"
  185. data-height="100%"
  186. data-after="-300"
  187. data-points="300"
  188. ></div>
  189. <div data-netdata="netdata.net"
  190. data-dimensions="out"
  191. data-common-max="netdata-net-out"
  192. data-decimal-digits="0"
  193. data-host="https://registry.my-netdata.io"
  194. data-title="Chart Data Traffic"
  195. data-chart-library="easypiechart"
  196. data-width="15%"
  197. data-height="100%"
  198. data-after="-300"
  199. data-points="300"
  200. ></div>
  201. </div>
  202. <div style="width: 49%; height:100%; align: center; display: inline-block;">
  203. your netdata server
  204. <br/>
  205. <div data-netdata="netdata.requests"
  206. data-title="Chart Refreshes/s"
  207. data-common-max="netdata-requests"
  208. data-decimal-digits="0"
  209. data-chart-library="gauge"
  210. data-width="20%"
  211. data-height="100%"
  212. data-after="-300"
  213. data-points="300"
  214. ></div>
  215. <div data-netdata="netdata.clients"
  216. data-common-max="netdata-clients"
  217. data-decimal-digits="0"
  218. data-title="Sockets"
  219. data-chart-library="gauge"
  220. data-width="20%"
  221. data-height="100%"
  222. data-after="-300"
  223. data-points="300"
  224. data-colors="#AA5500"
  225. ></div>
  226. <div data-netdata="netdata.net"
  227. data-dimensions="in"
  228. data-common-max="netdata-net-in"
  229. data-decimal-digits="0"
  230. data-title="Requests Traffic"
  231. data-chart-library="easypiechart"
  232. data-width="15%"
  233. data-height="100%"
  234. data-after="-300"
  235. data-points="300"
  236. ></div>
  237. <div data-netdata="netdata.net"
  238. data-dimensions="out"
  239. data-common-max="netdata-net-out"
  240. data-decimal-digits="0"
  241. data-title="Chart Data Traffic"
  242. data-chart-library="easypiechart"
  243. data-width="15%"
  244. data-height="100%"
  245. data-after="-300"
  246. data-points="300"
  247. ></div>
  248. </div>
  249. </div>
  250. </div>
  251. <!-- react root -->
  252. <div id="root"></div>
  253. </div>
  254. <!-- todo generate links like this for production build -->
  255. <!--<script src="/dashboard/craBuildScript.js"></script>-->
  256. <!--<script src="/dashboard/build/static/js/2.b41502e9.chunk.js"></script>-->
  257. <!--<script src="/dashboard/build/static/js/main.bc5ba69e.chunk.js"></script>-->
  258. </body>
  259. </html>