Advertisement
Guest User

Untitled

a guest
Mar 27th, 2013
197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.89 KB | None | 0 0
  1. For (http://localhost) (Running from VS 2012) Chrome: Works; FireFox: Works; IE 9: Works
  2.  
  3. For (http://webtrgws01:1200/) Chrome: Works; FireFox: Works; IE 9: Not Working
  4.  
  5. For (http://localhost:1200/) (This is on the server) IE 9: Works
  6.  
  7. For (http://webtrgws01:1200/) (This is also on the server) IE 9: Not working
  8.  
  9. @model LatencyApp.Domain.Models.ChartsViewModel
  10.  
  11. @{
  12. Layout = null;
  13. }
  14.  
  15. <!DOCTYPE html>
  16.  
  17. <html>
  18. <head>
  19. <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  20. <title>Bentley Systems - Application Latency</title>
  21.  
  22. <!-- Kendo References -->
  23. <link rel="stylesheet" href="~/Content/kendo.common.min.css">
  24. <link rel="stylesheet" href="~/Content/kendo.blueopal.min.css">
  25. <link rel="stylesheet" href="~/Content/kendo.dataviz.min.css" type="text/css" />
  26. <script src="~/Scripts/jquery.min.js"></script>
  27. <script src="~/Scripts/kendo.all.min.js"></script>
  28. <script src="~/Scripts/kendo.aspnetmvc.min.js"></script>
  29.  
  30. <!-- Bootstrap References -->
  31. <link href="~/Content/bootstrap.min.css" rel="stylesheet" />
  32. <link href="~/Content/bootstrap-responsive.css" rel="stylesheet" />
  33.  
  34. </head>
  35. <body>
  36. <div class="container">
  37. <h2>Bentley Systems - Application Latency</h2>
  38.  
  39. @* Filters Begin Here *@
  40. @using (Html.BeginForm("Index", "Home", FormMethod.Get))
  41. {
  42. <div style="white-space: nowrap; display: inline-block;">
  43. Environment:
  44. @(Html.Kendo().DropDownList()
  45. .Name("envDD")
  46. .DataTextField("LoginEnvName")
  47. .DataValueField("LoginEnvironmentID")
  48. .BindTo(Model.EnvForDD)
  49. .HtmlAttributes(new { style = "width: 100px;" })
  50. )
  51. &nbsp;
  52. </div>
  53. <div style="white-space: nowrap; display: inline-block;">
  54. Region:
  55. @(Html.Kendo().DropDownList()
  56. .Name("locDD")
  57. .DataTextField("LoginLocName")
  58. .DataValueField("LoginLocationID")
  59. .BindTo(Model.LocForDD)
  60. .HtmlAttributes(new { style = "width: 100px;" })
  61. )
  62. &nbsp;
  63. </div>
  64. <div style="white-space: nowrap; display: inline-block;">
  65. Frequency:
  66. @(Html.Kendo().DropDownList()
  67. .Name("freDD")
  68. .DataTextField("FrequencyName")
  69. .DataValueField("FrequencyID")
  70. .BindTo(Model.FreForDD)
  71. .HtmlAttributes(new { style = "width: 100px;" })
  72. )
  73. &nbsp;
  74. </div>
  75. <div style="white-space: nowrap; display: inline-block;">
  76. Date Range:
  77. @(Html.Kendo().DateTimePicker()
  78. .Name("startDate")
  79. .HtmlAttributes(new { style = "width: 210px;" })
  80. .Value(DateTime.Today.AddDays(-7))
  81. .Max(DateTime.Today.AddDays(1))
  82. .ParseFormats(new string[] { "MM/dd/yyyy" })
  83. .Events(e => e.Change("startChange"))
  84. )
  85. -
  86. @(Html.Kendo().DateTimePicker()
  87. .Name("endDate")
  88. .HtmlAttributes(new { style = "width: 210px;" })
  89. .Value(DateTime.Today.AddDays(1))
  90. .Min(DateTime.Today.AddDays(-7))
  91. .ParseFormats(new string[] { "MM/dd/yyyy" })
  92. .Events(e => e.Change("endChange"))
  93. )
  94. &nbsp;
  95. </div>
  96.  
  97. <input type="submit" value="Run Report" class="k-button" />
  98. }
  99. @* Filters End Here *@
  100.  
  101.  
  102.  
  103. @* Charts Begin Here *@
  104. @foreach (var item in Model.AppsForChart)
  105. {
  106. @Html.Partial("ChartPartial", item.LoginHistories,
  107. new ViewDataDictionary{{"AppName", item.LoginAppName},
  108. {"StartDate", item.StartDate.ToShortDateString()},
  109. {"EndDate", item.EndDate.ToShortDateString()},
  110. {"Step", item.Step },
  111. {"AvgDuration", item.AvgDuration },
  112. })
  113. }
  114. @* Charts End Here *@
  115.  
  116. </div>
  117.  
  118. <!-- Bootstrap -->
  119. <script src="~/Scripts/bootstrap.min.js"></script>
  120.  
  121. </body>
  122. </html>
  123. <style>
  124. .k-widget.k-chart{
  125. display: inline-block;
  126. }
  127. </style>
  128.  
  129. <script>
  130. function startChange() {
  131. var endPicker = $("#endDate").data("kendoDateTimePicker"),
  132. startDate = this.value();
  133.  
  134. if (startDate) {
  135. startDate = new Date(startDate);
  136. startDate.setDate(startDate.getDate() + 1);
  137. endPicker.min(startDate);
  138. }
  139. }
  140.  
  141. function endChange() {
  142. var startPicker = $("#startDate").data("kendoDateTimePicker"),
  143. endDate = this.value();
  144.  
  145. if (endDate) {
  146. endDate = new Date(endDate);
  147. endDate.setDate(endDate.getDate() - 1);
  148. startPicker.max(endDate);
  149. }
  150. }
  151. </script>
  152.  
  153. <meta http-equiv="X-UA-Compatible" content="IE=9">
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement