Guest User

https://d22e57szuniygl.cloudfront.net/admin-3a69415e54eec951

a guest
Oct 25th, 2016
274
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function getRandomInt(e, n) {
  2.     return e = Math.ceil(e), n = Math.floor(n), Math.floor(Math.random() * (n - e)) + e
  3. }
  4.  
  5. function getRandomIntInclusive(e, n) {
  6.     return e = Math.ceil(e), n = Math.floor(n), Math.floor(Math.random() * (n - e + 1)) + e
  7. }
  8.  
  9. function drawChart() {
  10.     var e = 0,
  11.         n = [getRandomIntInclusive(35, 65), getRandomIntInclusive(35, 65), getRandomIntInclusive(35, 65), getRandomIntInclusive(35, 65), getRandomIntInclusive(35, 65), getRandomIntInclusive(35, 65), getRandomIntInclusive(35, 65), getRandomIntInclusive(35, 65)],
  12.         o = google.visualization.arrayToDataTable([
  13.             ["t", "1", "2", "3", "4", "5", "6", "7", "8"],
  14.             [e].concat(n)
  15.         ]),
  16.         t = google.visualization.arrayToDataTable([
  17.             ["Label", "Value"],
  18.             ["1", n[0]],
  19.             ["2", n[1]],
  20.             ["3", n[2]],
  21.             ["4", n[3]],
  22.             ["5", n[4]],
  23.             ["6", n[5]],
  24.             ["7", n[6]],
  25.             ["8", n[7]]
  26.         ]),
  27.         a = {
  28.             curveType: "function",
  29.             width: 948,
  30.             legend: {
  31.                 position: "bottom"
  32.             },
  33.             vAxis: {
  34.                 minValue: 0,
  35.                 maxValue: 100
  36.             }
  37.         },
  38.         i = {
  39.             legend: {
  40.                 position: "bottom"
  41.             },
  42.             pieHole: .4,
  43.             pieSliceText: "none"
  44.         },
  45.         r = {
  46.             width: 948,
  47.             height: 120,
  48.             redFrom: 90,
  49.             redTo: 100,
  50.             yellowFrom: 75,
  51.             yellowTo: 90,
  52.             minorTicks: 5
  53.         },
  54.         l = new google.visualization.LineChart(document.getElementById("lines")),
  55.         d = new google.visualization.PieChart(document.getElementById("donut")),
  56.         u = new google.visualization.Gauge(document.getElementById("gauges")),
  57.         g = function() {
  58.             e += .25;
  59.             for (var n = [e], a = 0; a < t.getNumberOfRows(); a++) {
  60.                 var i = t.getValue(a, 1),
  61.                     r = getRandomIntInclusive(-2, 2),
  62.                     l = i + r;
  63.                 l < 0 && (l = 0), l > 100 && (l = 100), n.push(l), t.setValue(a, 1, l)
  64.             }
  65.             o.addRow(n), o.getNumberOfRows() > 40 && o.removeRow(0)
  66.         };
  67.     for (x = 0; x < 40; x++) g();
  68.     l.draw(o, a), d.draw(t, i), u.draw(t, r), setInterval(function() {
  69.         g(), l.draw(o, a), d.draw(t, i), u.draw(t, r)
  70.     }, 250)
  71. }
  72. google.charts.load("current", {
  73.         packages: ["corechart", "gauge"]
  74.     }), google.charts.setOnLoadCallback(drawChart),
  75.     function(e, n) {
  76.         n(".terminal").terminal(function(e, n) {
  77.             n.echo("[[b;red;]Terminal Está Desconectado]")
  78.         }, {
  79.             greetings: "Bienvenido a la terminal de administrador de LumériCo!",
  80.             name: "lumerico",
  81.             height: 250,
  82.             prompt: "lmrco > "
  83.         })
  84.     }(window, window.jQuery);
Add Comment
Please, Sign In to add comment