Changeset 9617 for branches/HiveStatistics
- Timestamp:
- 06/12/13 15:10:06 (11 years ago)
- Location:
- branches/HiveStatistics/sources
- Files:
-
- 161 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/App_Start/BundleConfig.cs
r9604 r9617 54 54 "~/Content/themes/base/jquery.ui.progressbar.css", 55 55 "~/Content/themes/base/jquery.ui.theme.css")); 56 57 bundles.Add(new ScriptBundle("~/Scripts/jqPlot/jquery.jqplot").Include( 58 "~/Scripts/jqPlot/jquery.jqplot.js")); 59 60 bundles.Add(new StyleBundle("~/Styles/jqPlot/jquery.jqplot").Include( 61 "~/Scripts/jqPlot/jquery.jqplot.css")); 56 62 } 57 63 } -
branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/Controllers/HomeController.cs
r9604 r9617 20 20 #endregion 21 21 22 using System; 23 using System.Collections.Generic; 24 using System.Linq; 25 using System.Web.Helpers; 22 26 using System.Web.Mvc; 27 using HeuristicLab.Services.Hive.DataAccess; 28 using HeuristicLab.Services.Hive.Statistics.Models; 23 29 24 30 namespace HeuristicLab.Services.Hive.Statistics.Controllers { 25 31 public class HomeController : Controller { 26 32 public ActionResult Index() { 27 ViewBag.Message = "Modify this template to jump-start your ASP.NET MVC application.";33 OverallStatus result = null; 28 34 29 return View(); 35 using (var db = new HiveDataContext(Settings.Default.HeuristicLab_Hive_LinqConnectionString)) { 36 var onlineSlaves = (from slave in db.Resources.OfType<Slave>() 37 where slave.SlaveState == SlaveState.Calculating || slave.SlaveState == SlaveState.Idle 38 select slave) 39 .ToList(); 40 41 result = new OverallStatus { 42 OverallCurrentlyAvailableCores = onlineSlaves.Sum(s => s.Cores ?? 0), 43 CurrentlyAvailableCores = onlineSlaves.Where(s => s.IsAllowedToCalculate).Sum(s => s.Cores ?? 0), 44 CurrentlyUsedCores = onlineSlaves.Sum(s => s.Cores ?? 0) - onlineSlaves.Sum(s => s.FreeCores ?? 0), 45 CurrentlyJobsWaiting = db.Tasks.Count(x => x.State == TaskState.Waiting), 46 OverallCpuUtilization = onlineSlaves.Any() 47 ? Math.Round(onlineSlaves.Average(s => s.CpuUtilization), 2) 48 : 0.0, 49 AvailableCpuUtilization = onlineSlaves.Any(x => x.IsAllowedToCalculate) 50 ? Math.Round(onlineSlaves.Where(x => x.IsAllowedToCalculate).Average(s => s.CpuUtilization), 2) 51 : 0.0 52 }; 53 } 54 55 return View(result); 30 56 } 31 57 … … 41 67 return View(); 42 68 } 69 70 public ActionResult Error() { 71 throw new Exception(); 72 } 73 74 public ActionResult Test() { 75 var data = new Dictionary<string, float> 76 { 77 {"test", 10.023f}, 78 {"test2", 20.020f}, 79 {"test3", 19.203f}, 80 {"test4", 4.039f}, 81 {"test5", 5.343f} 82 }; 83 84 var chart = new Chart(600, 400) 85 .AddTitle("Testchart") 86 .AddSeries( 87 name: "13456", 88 chartType: "Area", 89 xValue: new[] { 1, 2, 3, 4, 5 }, 90 yValues: new[] { 10, 20, 35, 70, 50 } 91 ); 92 93 chart.Write("png"); 94 95 return null; 96 } 43 97 } 44 98 } -
branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/HeuristicLab.Services.Hive.Statistics-3.3.csproj
r9604 r9617 42 42 <Reference Include="Microsoft.CSharp" /> 43 43 <Reference Include="System" /> 44 <Reference Include="System.Data" /> 45 <Reference Include="System.Data.Linq" /> 44 46 <Reference Include="System.Web.ApplicationServices" /> 45 47 <Reference Include="System.ComponentModel.DataAnnotations" /> … … 107 109 <Compile Include="Controllers\AccountController.cs" /> 108 110 <Compile Include="Controllers\HomeController.cs" /> 111 <Compile Include="Models\OverallStatistics.cs" /> 109 112 <Compile Include="Global.asax.cs"> 110 113 <DependentUpon>Global.asax</DependentUpon> … … 174 177 <None Include="Scripts\jquery-1.8.2.intellisense.js" /> 175 178 <Content Include="HeuristicLab.ico" /> 179 <Content Include="Scripts\jqPlot\changes.txt" /> 180 <Content Include="Scripts\jqPlot\copyright.txt" /> 181 <Content Include="Scripts\jqPlot\excanvas.js" /> 182 <Content Include="Scripts\jqPlot\excanvas.min.js" /> 183 <Content Include="Scripts\jqPlot\gpl-2.0.txt" /> 184 <Content Include="Scripts\jqPlot\jqPlotCssStyling.txt" /> 185 <Content Include="Scripts\jqPlot\jqPlotOptions.txt" /> 186 <Content Include="Scripts\jqPlot\jquery.jqplot.css" /> 187 <Content Include="Scripts\jqPlot\jquery.jqplot.js" /> 188 <Content Include="Scripts\jqPlot\jquery.jqplot.min.css" /> 189 <Content Include="Scripts\jqPlot\jquery.jqplot.min.js" /> 190 <Content Include="Scripts\jqPlot\jquery.js" /> 191 <Content Include="Scripts\jqPlot\jquery.min.js" /> 192 <Content Include="Scripts\jqPlot\MIT-LICENSE.txt" /> 193 <Content Include="Scripts\jqPlot\optionsTutorial.txt" /> 194 <Content Include="Scripts\jqPlot\plugins\jqplot.barRenderer.js" /> 195 <Content Include="Scripts\jqPlot\plugins\jqplot.barRenderer.min.js" /> 196 <Content Include="Scripts\jqPlot\plugins\jqplot.BezierCurveRenderer.js" /> 197 <Content Include="Scripts\jqPlot\plugins\jqplot.BezierCurveRenderer.min.js" /> 198 <Content Include="Scripts\jqPlot\plugins\jqplot.blockRenderer.js" /> 199 <Content Include="Scripts\jqPlot\plugins\jqplot.blockRenderer.min.js" /> 200 <Content Include="Scripts\jqPlot\plugins\jqplot.bubbleRenderer.js" /> 201 <Content Include="Scripts\jqPlot\plugins\jqplot.bubbleRenderer.min.js" /> 202 <Content Include="Scripts\jqPlot\plugins\jqplot.canvasAxisLabelRenderer.js" /> 203 <Content Include="Scripts\jqPlot\plugins\jqplot.canvasAxisLabelRenderer.min.js" /> 204 <Content Include="Scripts\jqPlot\plugins\jqplot.canvasAxisTickRenderer.js" /> 205 <Content Include="Scripts\jqPlot\plugins\jqplot.canvasAxisTickRenderer.min.js" /> 206 <Content Include="Scripts\jqPlot\plugins\jqplot.canvasOverlay.js" /> 207 <Content Include="Scripts\jqPlot\plugins\jqplot.canvasOverlay.min.js" /> 208 <Content Include="Scripts\jqPlot\plugins\jqplot.canvasTextRenderer.js" /> 209 <Content Include="Scripts\jqPlot\plugins\jqplot.canvasTextRenderer.min.js" /> 210 <Content Include="Scripts\jqPlot\plugins\jqplot.categoryAxisRenderer.js" /> 211 <Content Include="Scripts\jqPlot\plugins\jqplot.categoryAxisRenderer.min.js" /> 212 <Content Include="Scripts\jqPlot\plugins\jqplot.ciParser.js" /> 213 <Content Include="Scripts\jqPlot\plugins\jqplot.ciParser.min.js" /> 214 <Content Include="Scripts\jqPlot\plugins\jqplot.cursor.js" /> 215 <Content Include="Scripts\jqPlot\plugins\jqplot.cursor.min.js" /> 216 <Content Include="Scripts\jqPlot\plugins\jqplot.dateAxisRenderer.js" /> 217 <Content Include="Scripts\jqPlot\plugins\jqplot.dateAxisRenderer.min.js" /> 218 <Content Include="Scripts\jqPlot\plugins\jqplot.donutRenderer.js" /> 219 <Content Include="Scripts\jqPlot\plugins\jqplot.donutRenderer.min.js" /> 220 <Content Include="Scripts\jqPlot\plugins\jqplot.dragable.js" /> 221 <Content Include="Scripts\jqPlot\plugins\jqplot.dragable.min.js" /> 222 <Content Include="Scripts\jqPlot\plugins\jqplot.enhancedLegendRenderer.js" /> 223 <Content Include="Scripts\jqPlot\plugins\jqplot.enhancedLegendRenderer.min.js" /> 224 <Content Include="Scripts\jqPlot\plugins\jqplot.funnelRenderer.js" /> 225 <Content Include="Scripts\jqPlot\plugins\jqplot.funnelRenderer.min.js" /> 226 <Content Include="Scripts\jqPlot\plugins\jqplot.highlighter.js" /> 227 <Content Include="Scripts\jqPlot\plugins\jqplot.highlighter.min.js" /> 228 <Content Include="Scripts\jqPlot\plugins\jqplot.json2.js" /> 229 <Content Include="Scripts\jqPlot\plugins\jqplot.json2.min.js" /> 230 <Content Include="Scripts\jqPlot\plugins\jqplot.logAxisRenderer.js" /> 231 <Content Include="Scripts\jqPlot\plugins\jqplot.logAxisRenderer.min.js" /> 232 <Content Include="Scripts\jqPlot\plugins\jqplot.mekkoAxisRenderer.js" /> 233 <Content Include="Scripts\jqPlot\plugins\jqplot.mekkoAxisRenderer.min.js" /> 234 <Content Include="Scripts\jqPlot\plugins\jqplot.mekkoRenderer.js" /> 235 <Content Include="Scripts\jqPlot\plugins\jqplot.mekkoRenderer.min.js" /> 236 <Content Include="Scripts\jqPlot\plugins\jqplot.meterGaugeRenderer.js" /> 237 <Content Include="Scripts\jqPlot\plugins\jqplot.meterGaugeRenderer.min.js" /> 238 <Content Include="Scripts\jqPlot\plugins\jqplot.ohlcRenderer.js" /> 239 <Content Include="Scripts\jqPlot\plugins\jqplot.ohlcRenderer.min.js" /> 240 <Content Include="Scripts\jqPlot\plugins\jqplot.pieRenderer.js" /> 241 <Content Include="Scripts\jqPlot\plugins\jqplot.pieRenderer.min.js" /> 242 <Content Include="Scripts\jqPlot\plugins\jqplot.pointLabels.js" /> 243 <Content Include="Scripts\jqPlot\plugins\jqplot.pointLabels.min.js" /> 244 <Content Include="Scripts\jqPlot\plugins\jqplot.pyramidAxisRenderer.js" /> 245 <Content Include="Scripts\jqPlot\plugins\jqplot.pyramidAxisRenderer.min.js" /> 246 <Content Include="Scripts\jqPlot\plugins\jqplot.pyramidGridRenderer.js" /> 247 <Content Include="Scripts\jqPlot\plugins\jqplot.pyramidGridRenderer.min.js" /> 248 <Content Include="Scripts\jqPlot\plugins\jqplot.pyramidRenderer.js" /> 249 <Content Include="Scripts\jqPlot\plugins\jqplot.pyramidRenderer.min.js" /> 250 <Content Include="Scripts\jqPlot\plugins\jqplot.trendline.js" /> 251 <Content Include="Scripts\jqPlot\plugins\jqplot.trendline.min.js" /> 252 <Content Include="Scripts\jqPlot\README.txt" /> 253 <Content Include="Scripts\jqPlot\usage.txt" /> 176 254 <Content Include="Scripts\jquery-1.8.2.js" /> 177 255 <Content Include="Scripts\jquery-1.8.2.min.js" /> … … 211 289 <ItemGroup> 212 290 <Content Include="packages.config" /> 291 </ItemGroup> 292 <ItemGroup> 293 <ProjectReference Include="..\..\HeuristicLab.Services.Hive.DataAccess\3.3\HeuristicLab.Services.Hive.DataAccess-3.3.csproj"> 294 <Project>{ec2c8109-6e1e-4c88-9a2b-908cff2ef4ac}</Project> 295 <Name>HeuristicLab.Services.Hive.DataAccess-3.3</Name> 296 </ProjectReference> 297 <ProjectReference Include="..\..\HeuristicLab.Services.Hive\3.3\HeuristicLab.Services.Hive-3.3.csproj"> 298 <Project>{cf9da321-ac1b-4fd3-9ec3-67bc6b861bde}</Project> 299 <Name>HeuristicLab.Services.Hive-3.3</Name> 300 </ProjectReference> 213 301 </ItemGroup> 214 302 <PropertyGroup> -
branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/Properties/PublishProfiles/Hive.Statistics-3.3.pubxml
r9604 r9617 34 34 </PublishDatabaseSettings> 35 35 </PropertyGroup> 36 <ItemGroup> 37 <MSDeployParameterValue Include="$(DeployParameterPrefix)HeuristicLab.Authentication-Web.config Connection String" /> 38 </ItemGroup> 36 39 </Project> -
branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/Views/Account/Login.cshtml
r9604 r9617 35 35 </section> 36 36 37 @section Styles { 38 @Styles.Render("~/Content/themes/base/css") 39 } 40 37 41 @section Scripts { 38 @Styles.Render("~/Content/themes/base/css")39 42 @Scripts.Render("~/bundles/jqueryui") 40 43 @Scripts.Render("~/bundles/jqueryval") -
branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/Views/Home/Index.cshtml
r9604 r9617 1 @{ 2 ViewBag.Title = "Home Page"; 1 @model HeuristicLab.Services.Hive.Statistics.Models.OverallStatus 2 3 @{ 4 ViewBag.Title = "Status Monitor"; 3 5 } 4 @*@section featured {5 <section class="featured">6 <div class="content-wrapper">7 <hgroup class="title">8 <h1>@ViewBag.Title.</h1>9 <h2>@ViewBag.Message</h2>10 </hgroup>11 <p>12 To learn more about ASP.NET MVC visit13 <a href="http://asp.net/mvc" title="ASP.NET MVC Website">http://asp.net/mvc</a>.14 The page features <mark>videos, tutorials, and samples</mark> to help you get the most from ASP.NET MVC.15 If you have any questions about ASP.NET MVC visit16 <a href="http://forums.asp.net/1146.aspx/1?MVC" title="ASP.NET MVC Forum">our forums</a>.17 </p>18 </div>19 </section>20 }*@21 <h3>We suggest the following:</h3>22 <ol class="round">23 <li class="one">24 <h5>Getting Started</h5>25 ASP.NET MVC gives you a powerful, patterns-based way to build dynamic websites that26 enables a clean separation of concerns and that gives you full control over markup27 for enjoyable, agile development. ASP.NET MVC includes many features that enable28 fast, TDD-friendly development for creating sophisticated applications that use29 the latest web standards.30 <a href="http://go.microsoft.com/fwlink/?LinkId=245151">Learn more…</a>31 </li>32 6 33 <li class="two"> 34 <h5>Add NuGet packages and jump-start your coding</h5> 35 NuGet makes it easy to install and update free libraries and tools. 36 <a href="http://go.microsoft.com/fwlink/?LinkId=245153">Learn more…</a> 37 </li> 7 <h1>Current Status</h1> 38 8 39 <li class="three"> 40 <h5>Find Web Hosting</h5> 41 You can easily find a web hosting company that offers the right mix of features 42 and price for your applications. 43 <a href="http://go.microsoft.com/fwlink/?LinkId=245157">Learn more…</a> 44 </li> 45 </ol> 9 <section> 10 <table> 11 <tr> 12 <td>Overall Available Cores</td> 13 <td>@Model.OverallCurrentlyAvailableCores</td> 14 </tr> 15 <tr> 16 <td>Availabe Cores (real)</td> 17 <td>@Model.CurrentlyAvailableCores</td> 18 </tr> 19 <tr> 20 <td>System-Wide Waiting Tasks</td> 21 <td>@Model.CurrentlyJobsWaiting</td> 22 </tr> 23 <tr> 24 <td>Used Cores</td> 25 <td>@Model.CurrentlyUsedCores</td> 26 </tr> 27 <tr> 28 <td>Overall Avg. CPU Utilization</td> 29 <td>@Model.OverallCpuUtilization</td> 30 </tr> 31 <tr> 32 <td>Available Avg. CPU Utilization</td> 33 <td>@Model.AvailableCpuUtilization</td> 34 </tr> 35 </table> 36 </section> 37 38 <section> 39 <div id="chartdiv" style="height:400px;width:300px;"></div> 40 </section> 41 42 @section Styles { 43 @Styles.Render("~/Scripts/jqPlot/jquery.jqplot") 44 } 45 46 @section Scripts { 47 @Scripts.Render("~/Scripts/jqPlot/jquery.jqplot") 48 <script> 49 $.jqplot('chartdiv', [[[1, 2], [3, 5.12], [5, 13.1], [7, 33.6], [9, 85.9], [11, 219.9]]]); 50 </script> 51 } -
branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/Views/Shared/_Layout.cshtml
r9604 r9617 9 9 @Styles.Render("~/Content/css") 10 10 @Scripts.Render("~/bundles/modernizr") 11 @RenderSection("styles", required: false) 11 12 </head> 12 13 <body> … … 25 26 </ul> 26 27 </nav> 27 < sectionid="body">28 <div id="body"> 28 29 @RenderBody() 29 </ section>30 </div> 30 31 <footer> 31 32 <a href="http://heal.heuristiclab.com/" target="_blank" title="Visit the HeuristicLab website"> -
branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/packages.config
r9604 r9617 1 1 <?xml version="1.0" encoding="utf-8"?> 2 2 <packages> 3 <package id="jqPlot" version="1.0.0" targetFramework="net40" /> 3 4 <package id="jQuery" version="1.8.2" targetFramework="net40" /> 4 5 <package id="jQuery.UI.Combined" version="1.8.24" targetFramework="net40" />
Note: See TracChangeset
for help on using the changeset viewer.