Changeset 8958
- Timestamp:
- 11/28/12 10:02:01 (12 years ago)
- Location:
- branches/OaaS
- Files:
-
- 14 added
- 5 deleted
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/OaaS/HeuristicLab.Clients.Hive.JobManager/3.3/HeuristicLab.Clients.Hive.JobManager-3.3.csproj
r7910 r8958 82 82 </PropertyGroup> 83 83 <ItemGroup> 84 <Reference Include="HeuristicLab.Analysis-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL" /> 85 <Reference Include="HeuristicLab.Visualization.ChartControlsExtensions-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL" /> 84 86 <Reference Include="System" /> 85 87 <Reference Include="System.Configuration" /> … … 149 151 </ItemGroup> 150 152 <ItemGroup> 153 <ProjectReference Include="..\..\HeuristicLab.Analysis.Views\3.3\HeuristicLab.Analysis.Views-3.3.csproj"> 154 <Project>{76945D76-CA61-4147-9DC2-0ACDCDDF87F9}</Project> 155 <Name>HeuristicLab.Analysis.Views-3.3</Name> 156 </ProjectReference> 151 157 <ProjectReference Include="..\..\HeuristicLab.Clients.Hive.Views\3.3\HeuristicLab.Clients.Hive.Views-3.3.csproj"> 152 158 <Project>{E1D6C801-892A-406A-B606-F158E36DD3C3}</Project> … … 224 230 <Private>False</Private> 225 231 </ProjectReference> 232 </ItemGroup> 233 <ItemGroup> 234 <EmbeddedResource Include="Views\RefreshableHiveJobView.resx"> 235 <DependentUpon>RefreshableHiveJobView.cs</DependentUpon> 236 </EmbeddedResource> 226 237 </ItemGroup> 227 238 <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> -
branches/OaaS/HeuristicLab.Clients.Hive.Slave/3.3/HeuristicLab.Clients.Hive.Slave-3.3.csproj
r8242 r8958 167 167 <Compile Include="TraceCom.cs" /> 168 168 <Compile Include="WcfService.cs" /> 169 <None Include="app.config" /> 169 <None Include="app.config"> 170 <SubType>Designer</SubType> 171 </None> 170 172 <None Include="Plugin.cs.frame" /> 171 173 <Compile Include="Plugin.cs" /> -
branches/OaaS/HeuristicLab.PluginInfrastructure/3.3/Manager/PluginValidator.cs
r8200 r8958 488 488 } 489 489 490 private string AssemblyDirectory(Assembly assem) { 491 string codeBase = assem.CodeBase; 492 UriBuilder uri = new UriBuilder(codeBase); 493 string path = Uri.UnescapeDataString(uri.Path); 494 return Path.GetFullPath(path); 495 } 496 490 497 491 498 private bool IsAnyDependencyDisabled(PluginDescription descr, List<PluginDescription> disabledPlugins) { … … 512 519 try { 513 520 string assemblyName = (from assembly in AppDomain.CurrentDomain.ReflectionOnlyGetAssemblies() 514 where string.Equals(Path.GetFullPath(assembly.Location), Path.GetFullPath(assemblyLocation), StringComparison.CurrentCultureIgnoreCase) 521 where string.Equals(Path.GetFullPath(assembly.Location), Path.GetFullPath(assemblyLocation), StringComparison.CurrentCultureIgnoreCase) || 522 string.Equals(AssemblyDirectory(assembly), Path.GetFullPath(assemblyLocation), StringComparison.CurrentCultureIgnoreCase) 515 523 select assembly.FullName).Single(); 516 524 // now load the assemblies into the execution context -
branches/OaaS/HeuristicLab.PluginInfrastructure/3.3/WebApplicationManager.cs
r8506 r8958 88 88 } 89 89 90 static private string AssemblyDirectory { 91 get { 92 string codeBase = Assembly.GetExecutingAssembly().CodeBase; 93 UriBuilder uri = new UriBuilder(codeBase); 94 string path = Uri.UnescapeDataString(uri.Path); 95 return Path.GetDirectoryName(path); 96 } 97 } 90 98 // find all types implementing IPlugin in the reflectionOnlyAssemblies and create a list of plugin descriptions 91 99 // the dependencies in the plugin descriptions are not yet set correctly because we need to create … … 93 101 private List<PluginDescription> GatherPluginDescriptions() 94 102 { 95 List<PluginDescription> pluginDescriptions = new List<PluginDescription>(); 96 foreach (Assembly assembly in AppDomain.CurrentDomain.GetAssemblies()) 103 /*List<PluginDescription> pluginDescriptions = new List<PluginDescription>(); 104 105 // load all assemblies that are available in the project folders 106 var loadedAssemblies = AppDomain.CurrentDomain.GetAssemblies().ToList(); 107 IList<string> loadedPaths = new List<string>(); 108 foreach (var asm in loadedAssemblies) { 109 try { 110 loadedPaths.Add(asm.Location); 111 } 112 catch (Exception ex) { 113 } 114 }*/ 115 /*var assembliePaths = from location in loadedAssemblies 116 select location.Location; 117 118 var loadedPaths = loadedAssemblies.Select(a => a.Location).ToArray();*/ 119 var pv = new PluginValidator() { PluginDir = AssemblyDirectory }; 120 pv.DiscoverAndCheckPlugins(); 121 return pv.Plugins.ToList(); 122 /*var pluginManager = new PluginManager(AssemblyDirectory); 123 pluginManager.DiscoverAndCheckPlugins(); 124 return pluginManager.Plugins.ToList();*/ 125 126 /*var referencedPaths = Directory.GetFiles(AssemblyDirectory, "*.dll"); 127 var toLoad = referencedPaths.Where(r => !loadedPaths.Contains(r, StringComparer.InvariantCultureIgnoreCase)).ToList(); 128 toLoad.ForEach(path => loadedAssemblies.Add(AppDomain.CurrentDomain.Load(AssemblyName.GetAssemblyName(path)))); 129 130 foreach (Assembly assembly in loadedAssemblies) 97 131 { 98 132 // GetExportedTypes throws FileNotFoundException when a referenced assembly … … 106 140 where !t.IsAbstract && t.GetInterfaces().Any(x => x.AssemblyQualifiedName == typeof(IPlugin).AssemblyQualifiedName) 107 141 select GetPluginDescription(t); 142 143 // TODO: Also load all plugin descriptors from assemblies liying in the app domain folder!!!!! 108 144 pluginDescriptions.AddRange(assemblyPluginDescriptions); 109 145 } … … 122 158 } 123 159 } 124 return pluginDescriptions; 160 return pluginDescriptions;*/ 125 161 } 126 162 -
branches/OaaS/HeuristicLab.Services.Optimization.Controller/HeuristicLab.Services.Optimization.ControllerService.csproj
r8817 r8958 130 130 <HintPath>..\bin\HeuristicLab.Tracing-3.3.dll</HintPath> 131 131 </Reference> 132 <Reference Include="Microsoft.WindowsAzure.CloudDrive, Version=1.7.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" /> 133 <Reference Include="Microsoft.WindowsAzure.Configuration, Version=1.7.0.0, Culture=neutral, processorArchitecture=MSIL" /> 134 <Reference Include="Microsoft.WindowsAzure.Diagnostics, Version=1.7.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" /> 135 <Reference Include="Microsoft.WindowsAzure.ServiceRuntime, Version=1.7.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" /> 136 <Reference Include="Microsoft.WindowsAzure.StorageClient, Version=1.7.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" /> 132 137 <Reference Include="System" /> 133 138 <Reference Include="System.configuration" /> 134 139 <Reference Include="System.Core" /> 140 <Reference Include="System.Data.Services.Client" /> 135 141 <Reference Include="System.Runtime.Serialization" /> 136 142 <Reference Include="System.ServiceModel" /> … … 142 148 </ItemGroup> 143 149 <ItemGroup> 144 <Compile Include="HiveScenarioManagerOld.cs" /> 145 <Compile Include="HiveMapper.cs" /> 146 <Compile Include="HiveScenarioManager.cs" /> 147 <Compile Include="HLMapper.cs" /> 150 <Compile Include="Azure\DAL.cs" /> 151 <Compile Include="HL\HiveScenarioManagerOld.cs" /> 152 <Compile Include="HL\HiveMapper.cs" /> 153 <Compile Include="HL\HiveScenarioManager.cs" /> 154 <Compile Include="HL\HLMapper.cs" /> 148 155 <Compile Include="Interfaces\IControllerService.cs" /> 156 <Compile Include="Interfaces\DAL.cs" /> 149 157 <Compile Include="Interfaces\IScenarioManager.cs" /> 150 158 <Compile Include="Model\ControllerModel.cs" /> 151 159 <Compile Include="PlaceholderControllerService.cs" /> 152 160 <Compile Include="Properties\AssemblyInfo.cs" /> 153 <Compile Include=" ScenarioParser.cs" />161 <Compile Include="HL\ScenarioParser.cs" /> 154 162 <Compile Include="Utility.cs" /> 155 163 </ItemGroup> … … 157 165 <WCFMetadata Include="Service References\" /> 158 166 </ItemGroup> 167 <ItemGroup /> 159 168 <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> 160 169 <PropertyGroup> -
branches/OaaS/HeuristicLab.Services.Optimization.Controller/Interfaces/IControllerService.cs
r8545 r8958 12 12 [OperationContract] 13 13 IEnumerable<OptimizationScenario> GetOptimizationScenarios(); 14 15 [OperationContract] 16 IEnumerable<string> GetOptimizationScenarioNames(); 14 17 15 18 [OperationContract] … … 30 33 [OperationContract] 31 34 IList<Model.Run> GetJobResults(User user, string id); 35 36 [OperationContract] 37 bool AddHiveScenario(User user, string scenarioXml, string scenarioMapper); 38 39 [OperationContract] 40 bool DeleteHiveScenario(User user, string scenarioName); 32 41 } 33 42 } -
branches/OaaS/HeuristicLab.Services.Optimization.Controller/Interfaces/IScenarioManager.cs
r8545 r8958 12 12 void DeleteJob(User user, string id); 13 13 IList<Model.Run> GetJobResults(User user, string id); 14 bool AddScenario(User user, string scenarioName, string scenarioXml, string scenarioMapper); 15 bool DeleteScenario(User user, string scenarioName); 14 16 } 15 17 } -
branches/OaaS/HeuristicLab.Services.Optimization.Controller/PlaceholderControllerService.cs
r8817 r8958 62 62 63 63 public Model.OptimizationScenario GetOptimizationScenarioByName(string name) { 64 if (scenarios[0].Name == name) 65 return scenarios[0]; 66 return null; 64 var scen = (from e in scenarios 65 where e.Name == name 66 select e).FirstOrDefault(); 67 return scen; 67 68 } 68 69 … … 89 90 return hiveManager.GetJobResults(user, id); 90 91 } 92 93 94 public bool AddHiveScenario(User user, string scenarioXml, string scenarioMapper) { 95 var scenario = parser.ParseScenarioFromXml(scenarioXml); 96 if (scenario == null) { 97 return false; 98 } 99 var added = hiveManager.AddScenario(user, scenario.Name, scenarioXml, scenarioMapper); 100 if (added) 101 scenarios.Add(scenario); 102 return added; 103 } 104 105 public bool DeleteHiveScenario(User user, string scenarioName) { 106 var scen = GetOptimizationScenarioByName(scenarioName); 107 if (scen != null) { 108 scenarios.Remove(scen); 109 return hiveManager.DeleteScenario(user, scenarioName); 110 } 111 return false; 112 } 113 114 public IEnumerable<string> GetOptimizationScenarioNames() { 115 return (from e in scenarios 116 select e.Name).AsEnumerable(); 117 } 91 118 } 92 119 } -
branches/OaaS/HeuristicLab.Services.Optimization.Web/Controllers/HomeController.cs
r8384 r8958 7 7 namespace HeuristicLab.Services.Optimization.Web.Controllers { 8 8 public class HomeController : Controller { 9 public ActionResult Index() { 10 ViewBag.Message = "Welcome to ASP.NET MVC!"; 11 12 return View(); 9 public ActionResult Index() { 10 return RedirectToAction("Index", "Optimization"); 13 11 } 14 12 -
branches/OaaS/HeuristicLab.Services.Optimization.Web/HeuristicLab.Services.Optimization.Web.csproj
r8817 r8958 97 97 <ItemGroup> 98 98 <Compile Include="Controllers\AccountController.cs" /> 99 <Compile Include="Controllers\AdminController.cs" /> 99 100 <Compile Include="Controllers\HomeController.cs" /> 100 101 <Compile Include="Controllers\OptimizationController.cs" /> … … 103 104 </Compile> 104 105 <Compile Include="Models\AccountModels.cs" /> 106 <Compile Include="Models\AdminModels.cs" /> 105 107 <Compile Include="Models\OptimizationModels.cs" /> 106 108 <Compile Include="Properties\AssemblyInfo.cs" /> … … 257 259 <SubType>Designer</SubType> 258 260 </None> 261 <Content Include="Views\Admin\Index.cshtml" /> 259 262 </ItemGroup> 260 263 <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> -
branches/OaaS/HeuristicLab.Services.Optimization.Web/Mappings/tsp.xml
r8817 r8958 11 11 <value v1="40"/> 12 12 <value v1="38"/> 13 <value v1="60"/> 13 14 </param> 14 15 <param type="DecimalMatrix" name="Coordinates"> 15 16 <value v1="334.5909" v2="161.7809"/> 16 17 <value v1="503.5909" v2="172.7809"/> 18 <value v1="400.5909" v2="300.7809"/> 19 <value v1="700.5909" v2="700.7809"/> 17 20 </param> 18 21 <param type="Type" name="EvaluatorParameter"> -
branches/OaaS/HeuristicLab.Services.Optimization.Web/Views/Shared/_Layout.cshtml
r8384 r8958 19 19 <nav> 20 20 <ul id="menu"> 21 <li>@Html.ActionLink("Admin", "Index", "Admin")</li> 21 22 <li>@Html.ActionLink("Home", "Index", "Home")</li> 22 23 <li>@Html.ActionLink("About", "About", "Home")</li> -
branches/OaaS/HeuristicLab.Services.Optimization.Web/WebRole.cs
r8384 r8958 7 7 8 8 namespace HeuristicLab.Services.Optimization.Web { 9 public static class Constants { 10 public const string DiagnosticsConnectionString = "Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString"; 11 } 12 9 13 public class WebRole : RoleEntryPoint { 10 14 public override bool OnStart() { 11 15 // For information on handling configuration changes 12 // see the MSDN topic at http://go.microsoft.com/fwlink/?LinkId=166357. 16 // see the MSDN topic at http://go.microsoft.com/fwlink/?LinkId=166357. 17 try { 18 if (!String.IsNullOrEmpty(RoleEnvironment.GetConfigurationSettingValue(Constants.DiagnosticsConnectionString))) { 19 DiagnosticMonitorConfiguration dmc = DiagnosticMonitor.GetDefaultInitialConfiguration(); 20 dmc.Logs.ScheduledTransferPeriod = TimeSpan.FromMinutes(1); 21 dmc.Logs.ScheduledTransferLogLevelFilter = LogLevel.Verbose; 22 DiagnosticMonitor.Start(Constants.DiagnosticsConnectionString, dmc); 23 } 24 } 25 catch (RoleEnvironmentException ex) { 26 // diagnostics connection string not in configuration 27 // -> diagnostics disabled 28 // nothing more to do 29 } 13 30 14 31 return base.OnStart();
Note: See TracChangeset
for help on using the changeset viewer.