The next generation of the Teknik Services. Written in ASP.NET. https://www.teknik.io/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Index.cshtml 3.5KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. @model Teknik.Areas.Status.ViewModels.StatusViewModel
  2. @using Teknik.Utilities
  3. @using Newtonsoft.Json
  4. @Scripts.Render("~/bundles/signalr")
  5. @Scripts.Render("~/signalr/hubs")
  6. @Scripts.Render("~/bundles/status")
  7. <script type="text/javascript">
  8. var getVisitorDataURL = '@Url.SubRouteUrl("status", "Status.Action", new { action = "GetVisitorData" })';
  9. var showWebCPU = @Model.Config.StatusConfig.ShowWebStatus.ToString().ToLower();
  10. var showDatabaseCPU = @Model.Config.StatusConfig.ShowDatabaseStatus.ToString().ToLower();
  11. var showNetworkUsage = @Model.Config.StatusConfig.ShowNetworkStatus.ToString().ToLower();
  12. var showVisitorStats = @Model.Config.PiwikConfig.Enabled.ToString().ToLower();
  13. var totalMemory = @Model.Config.StatusConfig.TotalMemory;
  14. var tickInterval = totalMemory / 5;
  15. </script>
  16. <div class="container">
  17. @if (Model.Config.StatusConfig.Enabled)
  18. {
  19. <div class="row">
  20. <div class="col-sm-10 col-sm-offset-1">
  21. <h2 class="text-center"><b>Realtime Usage</b></h2>
  22. <hr>
  23. <div class="row">
  24. <div class="col-sm-12">
  25. <div id="cpu-usage-chart"></div>
  26. </div>
  27. </div>
  28. <div class="row">
  29. <div class="col-sm-12">
  30. <div id="mem-usage-chart"></div>
  31. </div>
  32. </div>
  33. <div class="row">
  34. <div class="col-sm-12">
  35. <div id="network-usage-chart"></div>
  36. </div>
  37. </div>
  38. </div>
  39. </div>
  40. <div class="row">
  41. <div class="col-sm-10 col-sm-offset-1">
  42. <br />
  43. <h2 class="text-center"><b>Statistics</b></h2>
  44. <hr>
  45. @if (Model.Config.PiwikConfig.Enabled)
  46. {
  47. <div class="row">
  48. <div class="col-sm-12">
  49. <div id="visitor-chart"></div>
  50. </div>
  51. </div>
  52. <br />
  53. }
  54. <div class="row">
  55. <div class="col-sm-3 text-center">
  56. <h3>Uploads</h3>
  57. <p>Total Count: @Model.UploadCount</p>
  58. <p>Total Size: @StringHelper.GetBytesReadable(Model.UploadSize)</p>
  59. </div>
  60. <div class="col-sm-3 text-center">
  61. <h3>Pastes</h3>
  62. <p>Total Count: @Model.PasteCount</p>
  63. </div>
  64. <div class="col-sm-3 text-center">
  65. <h3>Shortened Urls</h3>
  66. <p>Total Count: @Model.ShortenedUrlCount</p>
  67. </div>
  68. <div class="col-sm-3 text-center">
  69. <h3>Vaults</h3>
  70. <p>Total Count: @Model.ShortenedUrlCount</p>
  71. </div>
  72. </div>
  73. <div class="row">
  74. <div class="col-sm-12 text-center">
  75. <h3>Users</h3>
  76. <p>Number of Users: @Model.UserCount</p>
  77. </div>
  78. </div>
  79. </div>
  80. </div>
  81. }
  82. else
  83. {
  84. <div class="row">
  85. <div class="col-sm-8 col-sm-offset-2 text-center">
  86. <h3>Status Information has been disabled</h3>
  87. </div>
  88. </div>
  89. }
  90. </div>