Changeset 12514 for trunk/sources
- Timestamp:
- 06/25/15 18:02:47 (9 years ago)
- Location:
- trunk/sources
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Services.WebApp.Status/3.3/WebApi/DataController.cs
r12445 r12514 81 81 FreeCores = onlineSlaves.Sum(s => s.FreeCores ?? 0), // temporary for old chart data 82 82 ActiveCores = activeSlaves.Sum(s => s.Cores ?? 0), 83 CalculatingCores = calculatingSlaves.Sum(s => s.Cores ?? 0) 83 CalculatingCores = calculatingSlaves.Sum(s => s.Cores ?? 0) - calculatingSlaves.Sum(s => s.FreeCores ?? 0) 84 84 }, 85 85 CpuUtilizationStatus = new DTO.CpuUtilizationStatus { -
trunk/sources/HeuristicLab.Services.WebApp/3.3/Configs/BundleConfig.cs
r12435 r12514 99 99 }; 100 100 PluginManager pluginManager = PluginManager.Instance; 101 foreach (var plugin in pluginManager. GetPlugins()) {101 foreach (var plugin in pluginManager.Plugins) { 102 102 if (File.Exists(string.Format(@"{0}\{1}\{1}.js", PluginManager.PluginsDirectory, plugin.Name))) { 103 103 jsFiles.Add(string.Format("WebApp/plugins/{0}/{0}.js", plugin.Name)); -
trunk/sources/HeuristicLab.Services.WebApp/3.3/Controllers/PluginController.cs
r12435 r12514 34 34 35 35 public IEnumerable<DTO.Plugin> GetPlugins() { 36 var plugins = pluginManager. GetPlugins();36 var plugins = pluginManager.Plugins; 37 37 return plugins.Select(plugin => new DTO.Plugin { 38 38 Name = plugin.Name, -
trunk/sources/HeuristicLab.Services.WebApp/3.3/Global.asax
r12428 r12514 1 <%@ Application Codebehind="Global.asax.cs" Inherits="HeuristicLab.Services.WebApp. MvcApplication" Language="C#" %>1 <%@ Application Codebehind="Global.asax.cs" Inherits="HeuristicLab.Services.WebApp.HeuristicLabWebApp" Language="C#" %> -
trunk/sources/HeuristicLab.Services.WebApp/3.3/Global.asax.cs
r12435 r12514 1 using System.Web.Http; 1 #region License Information 2 /* HeuristicLab 3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 * 5 * This file is part of HeuristicLab. 6 * 7 * HeuristicLab is free software: you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation, either version 3 of the License, or 10 * (at your option) any later version. 11 * 12 * HeuristicLab is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>. 19 */ 20 #endregion 21 22 using System.Web.Http; 2 23 using System.Web.Mvc; 3 24 using System.Web.Optimization; … … 6 27 7 28 namespace HeuristicLab.Services.WebApp { 8 public class MvcApplication: System.Web.HttpApplication {29 public class HeuristicLabWebApp : System.Web.HttpApplication { 9 30 protected void Application_Start() { 10 31 var pluginManager = PluginManager.Instance; -
trunk/sources/HeuristicLab.Services.WebApp/3.3/Plugin.cs
r12435 r12514 31 31 namespace HeuristicLab.Services.WebApp { 32 32 public class Plugin { 33 private HttpConfiguration configuration;34 33 public string Name { get; set; } 35 34 public string Directory { get; set; } 36 35 public string AssemblyName { get; set; } 37 36 public DateTime? LastReload { get; set; } 37 38 private HttpConfiguration configuration; 39 public HttpConfiguration Configuration { 40 get { return configuration; } 41 set { 42 if (configuration != value) { 43 configuration = value; 44 ReloadControllers(); 45 } 46 } 47 } 38 48 39 49 private IDictionary<string, HttpControllerDescriptor> controllers; … … 42 52 } 43 53 44 public void Configure(HttpConfiguration configuration) { 45 if (this.configuration != configuration) { 46 this.configuration = configuration; 47 ReloadControllers(); 48 } 54 public Plugin(string name, string directory, HttpConfiguration configuration) { 55 Name = name; 56 Directory = directory; 57 Configuration = configuration; 49 58 } 50 59 -
trunk/sources/HeuristicLab.Services.WebApp/3.3/PluginManager.cs
r12435 r12514 38 38 public HttpConfiguration Configuration { get; set; } 39 39 40 public IEnumerable<Plugin> Plugins { 41 get { return plugins.Values; } 42 } 43 40 44 public static string PluginsDirectory { 41 45 get { return string.Format(@"{0}WebApp\plugins", HttpRuntime.AppDomainAppPath); } … … 56 60 private void OnFilesChanged(object sender, FileSystemEventArgs args) { 57 61 string path = args.FullPath.Remove(0, PluginsDirectory.Length + 1); 58 var pathParts = path.Split( '\\');62 var pathParts = path.Split(Path.PathSeparator); 59 63 string pluginName = pathParts[0]; 60 64 if (pathParts.Length == 1) { … … 71 75 RenamedEventArgs renamedArgs = (RenamedEventArgs)args; 72 76 string oldPath = renamedArgs.OldFullPath.Remove(0, PluginsDirectory.Length + 1); 73 var oldPathParts = oldPath.Split( '\\');77 var oldPathParts = oldPath.Split(Path.PathSeparator); 74 78 string oldPluginName = oldPathParts[0]; 75 79 plugins.Remove(oldPluginName); … … 92 96 string directory = string.Format(@"{0}\{1}", PluginsDirectory, name); 93 97 if (Directory.Exists(directory)) { 94 plugin = new Plugin { 95 Name = name, 96 Directory = directory 97 }; 98 plugin.Configure(Configuration); 98 plugin = new Plugin(name, directory, Configuration); 99 99 plugins.Add(name, plugin); 100 100 } … … 113 113 Plugin plugin = LookupPlugin(pluginName); 114 114 if (plugin == null) { 115 plugin = new Plugin { 116 Name = pluginName, 117 Directory = directory 118 }; 119 plugin.Configure(Configuration); 115 plugin = new Plugin(pluginName, directory, Configuration); 120 116 plugins.Add(pluginName, plugin); 121 117 } -
trunk/sources/HeuristicLab.Services.WebApp/3.3/WebApp/app.css
r12435 r12514 3 3 -moz-border-radius: 0 !important; 4 4 border-radius: 0 !important; 5 /* -webkit-box-shadow: none !important;6 -moz-box-shadow: none !important;7 -o-box-shadow: none !important;8 box-shadow: none !important;*/9 5 font-family: "Open Sans", Helvetica, Arial, sans-serif; 10 6 } -
trunk/sources/HeuristicLab.Services.WebApp/3.3/WebApp/shared/layout/layout.cshtml
r12435 r12514 96 96 </section> 97 97 </div> 98 <script type="text/javascript"> 99 $('.navbar-collapse').on('click', 'li a', function () { 100 $('.navbar-collapse').collapse('hide'); 101 }); 102 </script> 98 103 </body> 99 104 </html> -
trunk/sources/HeuristicLab.Services.WebApp/3.3/WebApp/shared/menu/menu.cshtml
r12435 r12514 1 1 <li ng-repeat="section in entries" ng-class="{'category':section.isCategory === true, 'active': isActive(section.route)}"> 2 <a ng-href="{{section.route}}" ng-if="!section.isCategory" 3 data-toggle="collapse" data-target="#menu .navbar-collapse"> 2 <a ng-href="{{section.route}}" ng-if="!section.isCategory"> 4 3 <span ng-if="section.icon != ''" ng-class="section.icon" style="padding-right: 10px;"></span> 5 4 <span>{{section.name}}</span>
Note: See TracChangeset
for help on using the changeset viewer.