main.js 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. 'use strict';
  2. /**
  3. * @ngdoc function
  4. * @name deivDashApp.controller:MainCtrl
  5. * @description
  6. * # MainCtrl
  7. * Controller of the deivDashApp
  8. */
  9. angular.module('deivDashApp')
  10. .controller('MainCtrl', function ($scope) {
  11. $scope.labels = ["Download Sales", "In-Store Sales", "Mail-Order Sales", "Tele Sales", "Corporate Sales"];
  12. $scope.data = [300, 500, 100, 40, 120];
  13. $scope.dataHosts = {
  14. "hosts": [
  15. {
  16. "host": "casa.especificosba.com.ar",
  17. "status": {
  18. "loadavg": [
  19. 0.03,
  20. 0.09,
  21. 0.13
  22. ],
  23. "disk": [
  24. {
  25. "mount": "/",
  26. "free": "6.0G",
  27. "used": "7.0G",
  28. "perc_used": "47"
  29. },
  30. {
  31. "mount": "/dev",
  32. "free": "0",
  33. "used": "10M",
  34. "perc_used": "0"
  35. },
  36. {
  37. "mount": "/home",
  38. "free": "187G",
  39. "used": "449G",
  40. "perc_used": "30"
  41. }
  42. ],
  43. "proc": {
  44. "motion": 1,
  45. "php-fpm": 1,
  46. "nginx": 1,
  47. "mysql": 1,
  48. "clearly_test_process": 0
  49. }
  50. }
  51. },
  52. {
  53. "host": "192.168.1.125",
  54. "status": {
  55. "loadavg": [
  56. 0,
  57. 0.01,
  58. 0.05
  59. ],
  60. "disk": [
  61. {
  62. "mount": "/",
  63. "free": "1.2G",
  64. "used": "5.7G",
  65. "perc used": "18"
  66. },
  67. {
  68. "mount": "/boot",
  69. "free": "19M",
  70. "used": "29M",
  71. "perc used": "40"
  72. },
  73. {
  74. "mount": "/dev",
  75. "free": "0",
  76. "used": "428M",
  77. "perc used": "0"
  78. }
  79. ],
  80. "proc": {
  81. "uv4l": 1,
  82. "ntpd": 1
  83. }
  84. }
  85. },
  86. {
  87. "host": "23.227.188.233",
  88. "status": {
  89. "loadavg": [
  90. 0,
  91. 0.01,
  92. 0.05
  93. ],
  94. "disk": [
  95. {
  96. "mount": "/",
  97. "free": "39G",
  98. "used": "195G",
  99. "perc used": "17"
  100. },
  101. {
  102. "mount": "/dev",
  103. "free": "0",
  104. "used": "10M",
  105. "perc used": "0"
  106. }
  107. ],
  108. "proc": {
  109. "fail2ban": 1,
  110. "nginx": 1
  111. }
  112. }
  113. },
  114. {
  115. "host": "especificosba.com.ar",
  116. "status": {
  117. "loadavg": [
  118. 0.02,
  119. 0.02,
  120. 0.05
  121. ],
  122. "disk": [
  123. {
  124. "mount": "/",
  125. "free": "19G",
  126. "used": "9.9G",
  127. "perc used": "65"
  128. },
  129. {
  130. "mount": "/dev",
  131. "free": "0",
  132. "used": "10M",
  133. "perc used": "0"
  134. }
  135. ],
  136. "proc": {
  137. "nginx": 1,
  138. "php-fpm": 1,
  139. "dovecot": 1,
  140. "serverCanvas": 1,
  141. "apache": 0
  142. }
  143. }
  144. }
  145. ]
  146. };
  147. });