Changeset 9215
- Timestamp:
- 02/11/13 10:15:52 (12 years ago)
- Location:
- branches/OaaS
- Files:
-
- 37 added
- 4 deleted
- 20 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/OaaS/HeuristicLab.Services.Hive.WebRole/WebRole.cs
r8235 r9215 24 24 using Microsoft.WindowsAzure.Diagnostics; 25 25 using Microsoft.WindowsAzure.ServiceRuntime; 26 using System.Diagnostics; 26 27 27 28 namespace HeuristicLab.Services.Hive.WebRole { … … 31 32 32 33 public override bool OnStart() { 34 Trace.WriteLine("Starting Janitor Service..."); 35 try { 36 DiagnosticMonitorConfiguration diagnosticConfig = DiagnosticMonitor.GetDefaultInitialConfiguration(); 37 /*diagnosticConfig.Directories.ScheduledTransferPeriod = TimeSpan.FromMinutes(1); 38 diagnosticConfig.Directories.DataSources.Add(AzureLocalStorageTraceListener.GetLogDirectory());*/ 39 diagnosticConfig.Logs.ScheduledTransferPeriod = TimeSpan.FromMinutes(1); 40 diagnosticConfig.Logs.ScheduledTransferLogLevelFilter = LogLevel.Verbose; 41 diagnosticConfig.WindowsEventLog.ScheduledTransferPeriod = TimeSpan.FromMinutes(1); 42 diagnosticConfig.WindowsEventLog.ScheduledTransferLogLevelFilter = LogLevel.Verbose; 43 DiagnosticMonitor.Start("Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString", diagnosticConfig); 44 } 45 catch (Exception e) { 46 Trace.WriteLine("Error during diagnostic configuration: " + e.Message); 47 } 48 33 49 // To enable the AzureLocalStorageTraceListner, uncomment relevent section in the web.config 34 DiagnosticMonitorConfiguration diagnosticConfig = DiagnosticMonitor.GetDefaultInitialConfiguration(); 35 diagnosticConfig.Directories.ScheduledTransferPeriod = TimeSpan.FromMinutes(1); 36 diagnosticConfig.Directories.DataSources.Add(AzureLocalStorageTraceListener.GetLogDirectory()); 37 50 51 Trace.WriteLine("Loading diagnostic configuration..."); 52 38 53 // For information on handling configuration changes 39 54 // see the MSDN topic at http://go.microsoft.com/fwlink/?LinkId=166357. 40 55 41 56 // Start Janitorn Service: 42 janitor = new HiveJanitor(); 43 janitorThread = new Thread(janitor.Run); 44 janitorThread.IsBackground = true; //dont keep app alive 45 janitorThread.Start(); 46 57 Trace.WriteLine("Starting HiveJanitor..."); 58 try { 59 janitor = new HiveJanitor(); 60 janitorThread = new Thread(janitor.Run); 61 janitorThread.IsBackground = true; //dont keep app alive 62 janitorThread.Start(); 63 } 64 catch (Exception e) { 65 Trace.WriteLine("Error during janitor startup: " + e.Message); 66 } 67 Trace.WriteLine("Startup completed..."); 47 68 return base.OnStart(); 48 69 } … … 51 72 janitor.StopJanitor(); 52 73 janitorThread.Join(); 53 54 74 base.OnStop(); 55 75 } -
branches/OaaS/HeuristicLab.Services.Hive/3.3/HiveDao.cs
r8326 r9215 28 28 using HeuristicLab.Services.Hive.Interfaces; 29 29 using System.Data.Common; 30 using System.Configuration; 30 31 31 32 namespace HeuristicLab.Services.Hive.DataAccess { … … 34 35 public HiveDataContext CreateContext(bool longRunning = false) { 35 36 //var context = new HiveDataContext(Settings.Default.HeuristicLab_Hive_LinqConnectionString); 36 var context = new HiveDataContext(provider.GetOpenConnection(Settings.Default.HiveConnectionStringName)); 37 HiveDataContext context; 38 if (ConfigurationManager.ConnectionStrings[Settings.Default.HiveConnectionStringName] == null) { 39 context = new HiveDataContext(Settings.Default.HeuristicLab_Hive_LinqConnectionString); 40 } 41 else { 42 context = new HiveDataContext(provider.GetOpenConnection(Settings.Default.HiveConnectionStringName)); 43 } 37 44 if (longRunning) context.CommandTimeout = (int)Settings.Default.LongRunningDatabaseCommandTimeout.TotalSeconds; 38 45 return context; -
branches/OaaS/HeuristicLab.Services.Hive/3.3/HiveJanitor.cs
r8266 r9215 23 23 using System.Threading; 24 24 using HeuristicLab.Services.Hive.DataAccess; 25 using System.Diagnostics; 25 26 26 27 namespace HeuristicLab.Services.Hive { … … 55 56 try { 56 57 LogFactory.GetLogger(typeof(HiveJanitor).Namespace).Log("HiveJanitor: starting cleanup"); 58 Trace.WriteLine("HiveJanitor: starting cleanup"); 57 59 bool cleanup = false; 58 60 DateTime lastCleanup = DateTime.MinValue; … … 70 72 } 71 73 LogFactory.GetLogger(typeof(HiveJanitor).Namespace).Log("HiveJanitor: cleanup finished"); 74 Trace.WriteLine("HiveJanitor: cleanup finished"); 72 75 } 73 76 catch (Exception e) { 74 77 LogFactory.GetLogger(typeof(HiveJanitor).Namespace).Log(string.Format("HiveJanitor: The following exception occured: {0}", e.ToString())); 78 Trace.WriteLine(string.Format("HiveJanitor: The following exception occured: {0}", e.ToString())); 75 79 } 76 80 waitHandle.WaitOne(HeuristicLab.Services.Hive.Properties.Settings.Default.CleanupInterval); -
branches/OaaS/HeuristicLab.Services.Optimization.Controller/Azure/DAL.cs
r9166 r9215 8 8 using Microsoft.WindowsAzure.ServiceRuntime; 9 9 using System.Diagnostics; 10 using HeuristicLab.Services.Optimization.ControllerService.Model; 10 11 11 12 namespace HeuristicLab.Services.Optimization.ControllerService.Azure { … … 13 14 public static readonly string SCENARIO_TABLE = "Scenario"; 14 15 public static readonly string SCENARIO_BLOB_CONTAINER = "scenario"; 16 public static readonly string EXPERIMENT_TABLE = "Experiment"; 15 17 public static readonly string CLOUD_SETTINGS_KEY = "Cloudia.WindowsAzure.Storage"; 16 18 } … … 91 93 } 92 94 95 internal sealed class ExperimentEntity : TableServiceEntity { 96 public ExperimentEntity() { 97 } 98 99 public ExperimentEntity(string user, Experiment experiment) { 100 PartitionKey = "ScenarioPartition"; 101 RowKey = user + "_" + experiment.Name; 102 var scenarios = ""; 103 foreach (var scen in experiment.Scenarios) { 104 scenarios += scen.Id + ","; 105 } 106 Scenarios = scenarios.Remove(scenarios.Length - 1); 107 User = user; 108 } 109 110 public string User { get; set; } 111 112 public string Scenarios { get; set; } 113 114 } 115 116 public class ExperimentDao : IExperimentDao { 117 public CloudBlobClient BlobClient { get; set; } 118 public CloudTableClient TableClient { get; set; } 119 120 public bool Add(string username, Model.Experiment experiment) { 121 if (FindByName(username, experiment.Name) != null) 122 return false; 123 124 TableServiceContext serviceContext = TableClient.GetDataServiceContext(); 125 TableClient.CreateTableIfNotExist(AzureConstants.EXPERIMENT_TABLE); 126 var entity = new ExperimentEntity(username, experiment); 127 serviceContext.AddObject(AzureConstants.EXPERIMENT_TABLE, entity); 128 serviceContext.SaveChangesWithRetries(); 129 return true; 130 } 131 132 public bool DeleteByName(string username, string experiment) { 133 TableServiceContext serviceContext = TableClient.GetDataServiceContext(); 134 TableClient.CreateTableIfNotExist(AzureConstants.EXPERIMENT_TABLE); 135 var entity = (from e in serviceContext.CreateQuery<ExperimentEntity>(AzureConstants.EXPERIMENT_TABLE) 136 where e.RowKey == (username + "_" + experiment) 137 select e).FirstOrDefault(); 138 139 if (entity == null) 140 return false; 141 142 serviceContext.DeleteObject(entity); 143 serviceContext.SaveChangesWithRetries(); 144 return true; 145 } 146 147 public Model.Experiment FindByName(string username, string experiment) { 148 TableServiceContext serviceContext = TableClient.GetDataServiceContext(); 149 TableClient.CreateTableIfNotExist(AzureConstants.EXPERIMENT_TABLE); 150 var entity = (from e in serviceContext.CreateQuery<ExperimentEntity>(AzureConstants.EXPERIMENT_TABLE) 151 where e.RowKey == (username + "_" + experiment) 152 select e).FirstOrDefault(); 153 154 if (entity == null) { 155 return null; 156 } 157 158 var exp = Convert(entity); 159 return exp; 160 } 161 162 private Experiment Convert(ExperimentEntity entity) { 163 var exp = new Experiment() { Name = entity.RowKey.Split('_')[1] }; 164 foreach (var scenarioName in entity.Scenarios.Split(',')) 165 exp.Scenarios.Add(new OptimizationScenario() { Id = scenarioName }); 166 return exp; 167 } 168 169 public IEnumerable<Model.Experiment> GetExperiments(string user) { 170 TableServiceContext serviceContext = TableClient.GetDataServiceContext(); 171 TableClient.CreateTableIfNotExist(AzureConstants.EXPERIMENT_TABLE); 172 var entites = (from e in serviceContext.CreateQuery<ExperimentEntity>(AzureConstants.EXPERIMENT_TABLE) 173 where e.User == user 174 select e).ToList(); 175 var experiments = new List<Experiment>(); 176 foreach (var entity in entites) { 177 experiments.Add(Convert(entity)); 178 } 179 return experiments; 180 } 181 } 182 93 183 public class AzureDataAccessLayer : IDataAccessLayer { 94 184 private IScenarioDao scenarioDao; 95 185 private IBlobDao blobDao; 186 private IExperimentDao expDao; 96 187 97 188 private CloudStorageAccount storageAccount; … … 115 206 get { 116 207 if (scenarioDao == null) { 117 scenarioDao = new ScenarioDao() ;208 scenarioDao = new ScenarioDao() { TableClient = StorageAccount.CreateCloudTableClient() }; 118 209 } 119 210 return scenarioDao; … … 124 215 get { 125 216 if (blobDao == null) { 126 blobDao = new BlobDao() ;217 blobDao = new BlobDao() { BlobClient = StorageAccount.CreateCloudBlobClient() }; 127 218 } 128 219 return blobDao; … … 130 221 } 131 222 132 public IScenarioDao CreateScenarioDao() { 133 return new ScenarioDao() { TableClient = StorageAccount.CreateCloudTableClient() }; 134 } 135 136 public IBlobDao CreateBlobDao() { 137 return new BlobDao() { BlobClient = StorageAccount.CreateCloudBlobClient() }; 223 public IExperimentDao ExperimentDao { 224 get { 225 if (expDao == null) { 226 expDao = new ExperimentDao() { TableClient = StorageAccount.CreateCloudTableClient() }; 227 } 228 return expDao; 229 } 138 230 } 139 231 } -
branches/OaaS/HeuristicLab.Services.Optimization.Controller/HL/HiveScenarioManager.cs
r9166 r9215 52 52 } 53 53 54 public voidDispatchScenario(Model.User user, Model.OptimizationScenario scenario, JobExecutionDetails details) {54 public string DispatchScenario(Model.User user, Model.OptimizationScenario scenario, JobExecutionDetails details) { 55 55 // Experiment experiment = new Experiment(); 56 56 // var problem = new TravelingSalesmanProblem(); … … 66 66 br.Optimizer = algo; 67 67 br.Repetitions = details.Repititions; 68 SendExperimentToHive(user, br, details);68 return SendExperimentToHive(user, br, details); 69 69 } 70 70 else { 71 SendExperimentToHive(user, algo, details);71 return SendExperimentToHive(user, algo, details); 72 72 } 73 73 } … … 141 141 } 142 142 143 private voidSendExperimentToHive(Model.User user, IOptimizer exp, JobExecutionDetails details) {143 private string SendExperimentToHive(Model.User user, IOptimizer exp, JobExecutionDetails details) { 144 144 var job = new RefreshableJob(); 145 145 job.IsAllowedPrivileged = true; … … 156 156 Console.WriteLine(ex.StackTrace); 157 157 }, job, new CancellationToken()); 158 158 159 159 job.StopResultPolling(); 160 return job.Id != null ? job.Id.ToString() : null; 160 161 } 161 162 … … 168 169 foreach (var job in jobsLoaded) { 169 170 jobs.Add(ConvertJob(user, job)); 170 } 171 } 171 172 return jobs; 172 173 } … … 182 183 else 183 184 state = JobState.Waiting; 185 184 186 return new Model.Job() { Id = job.Id.ToString(), Name = job.Name, Resource = job.ResourceNames, State = state.Value, DateCreated = job.DateCreated }; 185 187 } … … 193 195 194 196 195 public voidDeleteJob(User user, string id) {197 public bool DeleteJob(User user, string id) { 196 198 ConfigureHive(user); 197 var guid = Guid.Parse(id); 198 HiveServiceLocator.Instance.CallHiveService(s => s.DeleteJob(guid)); 199 var guid = Guid.Parse(id); 200 HiveServiceLocator.Instance.CallHiveService(s => s.DeleteJob(guid)); 201 return true; 199 202 } 200 203 … … 344 347 345 348 // insert into table & blob store 346 var scenDao = dal. CreateScenarioDao();347 var blobDao = dal. CreateBlobDao();349 var scenDao = dal.ScenarioDao; 350 var blobDao = dal.BlobDao; 348 351 349 352 Guid scenarioXmlGuid = Guid.NewGuid(); … … 369 372 370 373 private string GetMapperFromBlobStore(string scenarioName) { 371 var scenarioDao = dal. CreateScenarioDao();372 var blobDao = dal. CreateBlobDao();374 var scenarioDao = dal.ScenarioDao; 375 var blobDao = dal.BlobDao; 373 376 var entity = scenarioDao.FindByName(scenarioName); 374 377 if (entity == null) … … 383 386 public bool DeleteScenario(User user, string scenarioName) { 384 387 // delete from table & blob store 385 var scenarioDao = dal. CreateScenarioDao();386 var blobDao = dal. CreateBlobDao();388 var scenarioDao = dal.ScenarioDao; 389 var blobDao = dal.BlobDao; 387 390 388 391 var entity = scenarioDao.FindByName(scenarioName); … … 395 398 return true; 396 399 } 400 401 public bool SaveExperiment(User user, Model.Experiment experiment) { 402 return dal.ExperimentDao.Add(user.Username, experiment); 403 } 404 405 public IEnumerable<string> GetExperiments(User user) { 406 return (from exp in dal.ExperimentDao.GetExperiments(user.Username) 407 select exp.Name); 408 } 409 410 411 public bool DeleteExperiment(User user, string experiment) { 412 return dal.ExperimentDao.DeleteByName(user.Username, experiment); 413 } 414 415 416 public Model.Task GetTaskData(User u, string jobId, string taskId) { 417 ConfigureHive(u); 418 TaskDownloader downloader = new TaskDownloader(new List<Guid>(){Guid.Parse(taskId)}); 419 downloader.StartAsync(); 420 while (!downloader.IsFinished) { 421 Thread.Sleep(250); 422 if (downloader.IsFaulted) { 423 throw downloader.Exception; 424 } 425 } 426 427 IDictionary<Guid, HiveTask> hiveTasks = downloader.Results; 428 var task = hiveTasks[Guid.Parse(taskId)]; 429 if (task == null) 430 return null; 431 432 return new Model.Task() { 433 State = new Model.TaskState() { 434 DateCreated = task.Task.DateCreated.ToString(), 435 DateFinished = task.Task.DateFinished.ToString(), 436 ExecutionTime = task.Task.ExecutionTime.ToString(), 437 State = task.Task.State.ToString() 438 }, 439 General = new Model.General() { 440 Id = task.Task.Id.ToString(), 441 LastChanged = task.Task.Modified.ToString(), 442 Name = task.ItemTask.Name 443 } 444 }; 445 } 446 447 public Model.Job GetTasks(User u, string jobId) { 448 ConfigureHive(u); 449 var jobTasks = HiveServiceLocator.Instance.CallHiveService<IEnumerable<HeuristicLab.Clients.Hive.LightweightTask>>(s => s.GetLightweightJobTasks(Guid.Parse(jobId))); 450 451 var job = new Model.Job(); 452 job.Id = jobId; 453 var tasks = new Dictionary<Guid, Model.Task>(); 454 // push all elements to dictionary 455 foreach (var task in jobTasks) { 456 // TODO: Crawl children + parent and create hierarchy! 457 var children = HiveServiceLocator.Instance.CallHiveService<IEnumerable<HeuristicLab.Clients.Hive.LightweightTask>>(s => s.GetLightweightChildTasks(Guid.Parse(jobId), true, true)); 458 foreach (var child in children) { 459 tasks[child.Id] = new Model.Task() { 460 State = new Model.TaskState() { 461 DateCreated = child.DateCreated.ToString(), 462 DateFinished = child.DateFinished.ToString(), 463 ExecutionTime = child.ExecutionTime.ToString(), 464 State = child.State.ToString() 465 }, 466 General = new Model.General() { 467 Id = child.Id.ToString(), 468 LastChanged = child.Modified.ToString(), 469 Name = child.ItemName 470 } 471 }; 472 } 473 } 474 475 // traverse all tasks again and create tree of tasks 476 foreach (var task in jobTasks) { 477 if (task.ParentTaskId.HasValue) 478 tasks[task.Id].Children.Add(tasks[task.ParentTaskId.Value]); 479 else // its a root task 480 job.Tasks.Add(tasks[task.Id]); 481 } 482 483 return job; 484 } 397 485 } 398 486 } -
branches/OaaS/HeuristicLab.Services.Optimization.Controller/HeuristicLab.Services.Optimization.ControllerService.csproj
r9166 r9215 151 151 <Reference Include="Microsoft.WindowsAzure.ServiceRuntime, Version=1.7.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" /> 152 152 <Reference Include="Microsoft.WindowsAzure.StorageClient, Version=1.7.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" /> 153 <Reference Include="Newtonsoft.Json"> 154 <HintPath>..\packages\Newtonsoft.Json.4.5.11\lib\net40\Newtonsoft.Json.dll</HintPath> 155 </Reference> 153 156 <Reference Include="System" /> 154 157 <Reference Include="System.configuration" /> … … 175 178 <Compile Include="Mockup\MockupDAL.cs" /> 176 179 <Compile Include="Mockup\MockupScenarioManager.cs" /> 180 <Compile Include="Parsers\AlgorithmConverter.cs" /> 177 181 <Compile Include="PlaceholderControllerService.cs" /> 178 182 <Compile Include="Properties\AssemblyInfo.cs" /> 179 <Compile Include=" HL\ScenarioParser.cs" />183 <Compile Include="Parsers\ScenarioParser.cs" /> 180 184 <Compile Include="Utility.cs" /> 181 185 </ItemGroup> … … 186 190 <None Include="packages.config" /> 187 191 </ItemGroup> 188 <ItemGroup />189 192 <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> 190 193 <PropertyGroup> -
branches/OaaS/HeuristicLab.Services.Optimization.Controller/Interfaces/DAL.cs
r9166 r9215 3 3 using System.Linq; 4 4 using System.Text; 5 using HeuristicLab.Services.Optimization.ControllerService.Model; 5 6 6 7 namespace HeuristicLab.Services.Optimization.ControllerService.Interfaces { … … 17 18 } 18 19 20 public interface IExperimentDao { 21 bool Add(string username, Experiment experiment); 22 bool DeleteByName(string username, string experiment); 23 Experiment FindByName(string username, string experiment); 24 IEnumerable<Experiment> GetExperiments(string user); 25 } 26 19 27 public interface IBlobDao { 20 28 bool Add(StringEntry entry); … … 24 32 25 33 public interface IDataAccessLayer { 26 IScenarioDao CreateScenarioDao(); 27 IBlobDao CreateBlobDao(); 34 IScenarioDao ScenarioDao { get; } 35 IBlobDao BlobDao { get; } 36 IExperimentDao ExperimentDao { get; } 28 37 } 29 38 -
branches/OaaS/HeuristicLab.Services.Optimization.Controller/Interfaces/IControllerService.cs
r9166 r9215 20 20 21 21 [OperationContract] 22 voidScheduleOptimizationScenario(User user, OptimizationScenario scenario, JobExecutionDetails details);22 bool ScheduleOptimizationScenario(User user, OptimizationScenario scenario, JobExecutionDetails details); 23 23 24 24 [OperationContract] … … 29 29 30 30 [OperationContract] 31 voidDeleteJob(User user, string id);31 bool DeleteJob(User user, string id); 32 32 33 33 [OperationContract] … … 39 39 [OperationContract] 40 40 bool DeleteHiveScenario(User user, string scenarioName); 41 42 [OperationContract] 43 bool SaveExperiment(User user, Experiment experiment); 44 45 [OperationContract] 46 IEnumerable<string> GetExperiments(User user); 47 48 [OperationContract] 49 bool DeleteExperiment(User user, string experiment); 50 51 [OperationContract] 52 Job GetTasks(User u, string jobId); 53 54 [OperationContract] 55 Task GetTaskData(User u, string jobId, string taskId); 41 56 } 42 57 } -
branches/OaaS/HeuristicLab.Services.Optimization.Controller/Interfaces/IScenarioManager.cs
r9166 r9215 7 7 namespace HeuristicLab.Services.Optimization.ControllerService.Interfaces { 8 8 public interface IScenarioManager { 9 voidDispatchScenario(User user, OptimizationScenario scenario, JobExecutionDetails details);9 string DispatchScenario(User user, OptimizationScenario scenario, JobExecutionDetails details); 10 10 IList<Job> GetJobs(User user); 11 11 Job GetJob(User user, string id); 12 voidDeleteJob(User user, string id);12 bool DeleteJob(User user, string id); 13 13 IList<Model.Run> GetJobResults(User user, string id); 14 14 bool AddScenario(User user, string scenarioName, string scenarioXml, string scenarioMapper); 15 15 bool DeleteScenario(User user, string scenarioName); 16 17 bool SaveExperiment(User user, Experiment experiment); 18 IEnumerable<string> GetExperiments(User user); 19 bool DeleteExperiment(User user, string experiment); 20 21 Task GetTaskData(User u, string jobId, string taskId); 22 Job GetTasks(User u, string jobId); 16 23 } 17 24 } -
branches/OaaS/HeuristicLab.Services.Optimization.Controller/Interfaces/Model/ControllerModel.cs
r9166 r9215 306 306 public class Experiment { 307 307 [DataMember] 308 public string Name { get; set; } 309 310 [DataMember] 308 311 public IList<OptimizationScenario> Scenarios { get; set; } 309 312 … … 340 343 341 344 [DataContract] 345 public class Property { 346 [DataMember] 347 public string Key { get; set; } 348 [DataMember] 349 public string Value { get; set; } 350 } 351 352 [DataContract] 353 public class General { 354 [DataMember] 355 public string Name { get { return GetValue("Name"); } set { SetValue("Name", value); } } 356 [DataMember] 357 public string Id { get { return GetValue("Id"); } set { SetValue("Id", value); } } 358 [DataMember] 359 public string Priority { get { return GetValue("Priority"); } set { SetValue("Priority", value); } } 360 [DataMember] 361 public string LastChanged { get { return GetValue("LastChanged"); } set { SetValue("LastChanged", value); } } 362 363 364 private IList<Property> properties = new List<Property>(); 365 [DataMember] 366 public IList<Property> Properties 367 { 368 get { 369 if (properties == null) 370 properties = new List<Property>(); 371 return properties; 372 } 373 set { properties = value;} 374 } 375 376 private string GetValue(string key) { 377 return (from p in Properties where p.Key == key select p.Value).FirstOrDefault(); 378 } 379 380 private void SetValue(string key, string value) { 381 var prop = (from p in Properties where p.Key == key select p).FirstOrDefault(); 382 if (prop == null) { 383 prop = new Property(); 384 Properties.Add(prop); 385 } 386 prop.Key = key; 387 prop.Value = value; 388 } 389 } 390 391 [DataContract] 392 public class TaskState { 393 [DataMember] 394 public string State { get; set; } 395 [DataMember] 396 public string ExecutionTime { get; set; } 397 [DataMember] 398 public string DateCreated { get; set; } 399 [DataMember] 400 public string DateFinished { get; set; } 401 } 402 403 [DataContract] 404 public class Task { 405 private General general = new General(); 406 [DataMember] 407 public General General { 408 get { return general; } 409 set { general = value; } 410 } 411 412 private IList<Task> tasks = new List<Task>(); 413 [DataMember] 414 public IList<Task> Children { 415 get { return tasks; } 416 set { tasks = value; } 417 } 418 419 private TaskState state = new TaskState(); 420 421 [DataMember] 422 public TaskState State { 423 get { return state; } 424 set { state = value; } 425 } 426 } 427 428 [DataContract] 342 429 public class Job { 343 430 [DataMember] … … 355 442 [DataMember] 356 443 public DateTime DateCreated { get; set; } 444 445 private IList<Task> tasks = new List<Task>(); 446 447 [DataMember] 448 public IList<Task> Tasks { 449 get { return tasks; } 450 set { tasks = value; } 451 } 452 357 453 } 358 454 -
branches/OaaS/HeuristicLab.Services.Optimization.Controller/Mockup/MockupDAL.cs
r9166 r9215 246 246 } 247 247 248 public IScenarioDao CreateScenarioDao() { 249 return new ScenarioDao(); 250 } 251 252 public IBlobDao CreateBlobDao() { 253 return new BlobDao(); 254 } 248 private IExperimentDao experimentDao; 249 250 public IExperimentDao ExperimentDao { 251 get { 252 return null; 253 } 254 } 255 255 256 } 256 257 } -
branches/OaaS/HeuristicLab.Services.Optimization.Controller/Mockup/MockupScenarioManager.cs
r9166 r9215 131 131 } 132 132 133 public void DispatchScenario(Model.User user, Model.OptimizationScenario scenario, JobExecutionDetails details) { 134 // does nothign 133 public string DispatchScenario(Model.User user, Model.OptimizationScenario scenario, JobExecutionDetails details) { 134 // does nothing 135 return "guid"; 135 136 } 136 137 … … 144 145 145 146 146 public voidDeleteJob(User user, string id) {147 public bool DeleteJob(User user, string id) { 147 148 jobs.RemoveAll(j => j.Id == id); 149 return true; 148 150 } 149 151 … … 199 201 200 202 // insert into table & blob store 201 var scenDao = dal. CreateScenarioDao();202 var blobDao = dal. CreateBlobDao();203 var scenDao = dal.ScenarioDao; 204 var blobDao = dal.BlobDao; 203 205 204 206 Guid scenarioXmlGuid = Guid.NewGuid(); … … 225 227 public bool DeleteScenario(User user, string scenarioName) { 226 228 // delete from table & blob store 227 var scenarioDao = dal. CreateScenarioDao();228 var blobDao = dal. CreateBlobDao();229 var scenarioDao = dal.ScenarioDao; 230 var blobDao = dal.BlobDao; 229 231 230 232 var entity = scenarioDao.FindByName(scenarioName); … … 237 239 return true; 238 240 } 241 242 243 public bool SaveExperiment(User user, Model.Experiment experiment) { 244 throw new NotImplementedException(); 245 } 246 247 248 public IEnumerable<string> GetExperiments(User user) { 249 throw new NotImplementedException(); 250 } 251 252 253 public bool DeleteExperiment(User user, string experiment) { 254 throw new NotImplementedException(); 255 } 256 257 258 public Model.Task GetTaskData(User u, string jobId, string taskId) { 259 throw new NotImplementedException(); 260 } 261 262 public Model.Job GetTasks(User u, string jobId) { 263 throw new NotImplementedException(); 264 } 239 265 } 240 266 } -
branches/OaaS/HeuristicLab.Services.Optimization.Controller/PlaceholderControllerService.cs
r9166 r9215 69 69 } 70 70 71 public voidScheduleOptimizationScenario(Model.User user, Model.OptimizationScenario scenario, JobExecutionDetails details) {71 public bool ScheduleOptimizationScenario(Model.User user, Model.OptimizationScenario scenario, JobExecutionDetails details) { 72 72 hiveManager.DispatchScenario(user, scenario, details); 73 return true; 73 74 } 74 75 … … 83 84 84 85 85 public voidDeleteJob(Model.User user, string id) {86 hiveManager.DeleteJob(user, id);86 public bool DeleteJob(Model.User user, string id) { 87 return hiveManager.DeleteJob(user, id); 87 88 } 88 89 … … 117 118 select e.Id).AsEnumerable(); 118 119 } 120 121 122 public bool SaveExperiment(User user, Experiment experiment) { 123 return hiveManager.SaveExperiment(user, experiment); 124 } 125 126 127 public IEnumerable<string> GetExperiments(User user) { 128 return hiveManager.GetExperiments(user); 129 } 130 131 132 public bool DeleteExperiment(User user, string experiment) { 133 return hiveManager.DeleteExperiment(user, experiment); 134 } 135 136 137 public Job GetTasks(User u, string jobId) { 138 return hiveManager.GetTasks(u, jobId); 139 } 140 141 public Task GetTaskData(User u, string jobId, string taskId) { 142 return hiveManager.GetTaskData(u, jobId, taskId); 143 } 119 144 } 120 145 } -
branches/OaaS/HeuristicLab.Services.Optimization.Web/Content/Site.css
r9062 r9215 335 335 overflow: auto; 336 336 } 337 338 .dragables 339 { 340 height :100px; 341 width:100px; 342 border:1px solid #000000; 343 background: #EEEEEE; 344 padding: 5px 5px 5px 5px; 345 margin: 5px 5px 5px 5px; 346 float: left; 347 } 348 349 .clearer 350 { 351 clear:both; 352 } 353 354 .treeStyle 355 { 356 border: 1px solid black; 357 } -
branches/OaaS/HeuristicLab.Services.Optimization.Web/Content/hl/Site.css
r9062 r9215 148 148 } 149 149 150 #master-MainContent { 150 #master-MainContent 151 { 152 background-repeat: repeat-y; 153 background-image: url("images/bg_main.png"); 151 154 padding-left: 12px; 152 155 padding-right: 12px; … … 403 406 display: inline 404 407 } 408 409 410 .dragables 411 { 412 height :100px; 413 width:100px; 414 border:1px solid #000000; 415 background: #EEEEEE; 416 padding: 5px 5px 5px 5px; 417 margin: 5px 5px 5px 5px; 418 float: left; 419 } 420 421 .clearer 422 { 423 clear:both; 424 } 425 426 .treeStyle 427 { 428 border: 1px solid black; 429 } 430 431 .unseen 432 { 433 display: none; 434 } -
branches/OaaS/HeuristicLab.Services.Optimization.Web/Controllers/AdminController.cs
r8958 r9215 13 13 using System.Web.Security; 14 14 using HeuristicLab.Services.Optimization.ControllerService.Model; 15 using HeuristicLab.Services.Optimization.Web.Helpers; 15 16 16 17 namespace HeuristicLab.Services.Optimization.Web.Controllers … … 19 20 public class AdminController : Controller 20 21 { 21 public delegate T ControllerServiceDelegate<T>(IControllerService service); 22 public delegate void ControllerServiceDelegate(IControllerService service); 23 24 public T withControllerService<T>(ControllerServiceDelegate<T> del) { 25 using (var cf = new ChannelFactory<IControllerService>(OptimizationController.DEFAULT_CONTROLLER_ENDPOINT)) { 26 var credentialBehaviour = cf.Endpoint.Behaviors.Find<ClientCredentials>(); 27 credentialBehaviour.UserName.UserName = Membership.GetUser().UserName; 28 credentialBehaviour.UserName.Password = Session["pw"] as string; 29 var controllerProxy = cf.CreateChannel(); 30 return del(controllerProxy); 22 private ControllerServiceHelper ControllerService { 23 get { 24 var helper = new ControllerServiceHelper(Session["pw"] as string); 25 if (!helper.Valid) { 26 Response.Redirect("/Account/Logon"); 27 } 28 return helper; 29 } 31 30 } 32 }33 34 public void withControllerService(ControllerServiceDelegate del) {35 using (var cf = new ChannelFactory<IControllerService>(OptimizationController.DEFAULT_CONTROLLER_ENDPOINT)) {36 var credentialBehaviour = cf.Endpoint.Behaviors.Find<ClientCredentials>();37 credentialBehaviour.UserName.UserName = Membership.GetUser().UserName;38 credentialBehaviour.UserName.Password = Session["pw"] as string;39 var controllerProxy = cf.CreateChannel();40 del(controllerProxy);41 }42 }43 31 // 44 32 // GET: /Admin/ … … 46 34 public ActionResult Index() 47 35 { 48 var names = withControllerService<IEnumerable<string>>((service) => {36 var names = ControllerService.withControllerService<IEnumerable<string>>((service) => { 49 37 User u = new User() { Username = Membership.GetUser().UserName, Password = Session["pw"] as string }; 50 38 return service.GetOptimizationScenarioNames(); … … 68 56 } 69 57 70 var ok = withControllerService<bool>((service) => {58 var ok = ControllerService.withControllerService<bool>((service) => { 71 59 OptimizationModel model = new OptimizationModel(); 72 60 User u = new User() { Username = Membership.GetUser().UserName, Password = Session["pw"] as string }; … … 78 66 79 67 public ActionResult DeleteScenario(string id) { 80 withControllerService<bool>((service) => {68 ControllerService.withControllerService<bool>((service) => { 81 69 User u = new User() { Username = Membership.GetUser().UserName, Password = Session["pw"] as string }; 82 70 return service.DeleteHiveScenario(u, id); -
branches/OaaS/HeuristicLab.Services.Optimization.Web/Controllers/OptimizationController.cs
r9166 r9215 11 11 using HeuristicLab.Services.Optimization.Web.Models; 12 12 using HeuristicLab.Services.Optimization.ControllerService.General; 13 using HeuristicLab.Services.Optimization.Web.Helpers; 13 14 14 15 namespace HeuristicLab.Services.Optimization.Web.Controllers … … 16 17 [Authorize(Roles="Web User")] 17 18 public class OptimizationController : Controller 18 { 19 public static readonly string DEFAULT_CONTROLLER_ENDPOINT = Configuration.ControllerEndpointName; 19 { 20 private ControllerServiceHelper ControllerService { 21 get { 22 var helper = new ControllerServiceHelper(Session["pw"] as string); 23 if (!helper.Valid) { 24 Response.Redirect("/Account/Logon?ReturnUrl=%2fOptimization"); 25 } 26 return helper; 27 } 28 } 20 29 21 public delegate T ControllerServiceDelegate<T>(IControllerService service);22 public delegate void ControllerServiceDelegate(IControllerService service);23 24 public T withControllerService<T>(ControllerServiceDelegate<T> del) {25 if (Session["pw"] == null)26 Response.Redirect("/Account/Logon");27 28 using (var cf = new ChannelFactory<IControllerService>(DEFAULT_CONTROLLER_ENDPOINT)) {29 var credentialBehaviour = cf.Endpoint.Behaviors.Find<ClientCredentials>();30 credentialBehaviour.UserName.UserName = Membership.GetUser().UserName;31 credentialBehaviour.UserName.Password = Session["pw"] as string;32 var controllerProxy = cf.CreateChannel();33 return del(controllerProxy);34 }35 }36 37 public void withControllerService(ControllerServiceDelegate del) {38 if (Session["pw"] == null)39 Response.Redirect("/Account/Logon");40 41 using (var cf = new ChannelFactory<IControllerService>(DEFAULT_CONTROLLER_ENDPOINT)) {42 var credentialBehaviour = cf.Endpoint.Behaviors.Find<ClientCredentials>();43 credentialBehaviour.UserName.UserName = Membership.GetUser().UserName;44 credentialBehaviour.UserName.Password = Session["pw"] as string;45 var controllerProxy = cf.CreateChannel();46 del(controllerProxy);47 }48 }49 30 // 50 // GET: /Optimization/ 51 31 // GET: /Optimization/ 52 32 public ActionResult Index() 53 33 { 54 var optModel = withControllerService<OptimizationModel>((service) => {34 var optModel = ControllerService.withControllerService<OptimizationModel>((service) => { 55 35 OptimizationModel model = new OptimizationModel(); 56 36 model.Scenarios = service.GetOptimizationScenarios(); … … 58 38 model.Jobs = service.GetJobs(u); 59 39 return model; 60 }); 40 }); 61 41 return View(optModel); 62 42 } 63 43 64 44 public ActionResult ProblemParameters(string scenario) { 65 var optScenario = withControllerService<OptimizationScenario>((service) => {45 var optScenario = ControllerService.withControllerService<OptimizationScenario>((service) => { 66 46 return service.GetOptimizationScenarioByName(scenario); 67 47 }); … … 77 57 78 58 public ActionResult JobDetails(string jobId) { 79 Job job = withControllerService<Job>((service) => {59 Job job = ControllerService.withControllerService<Job>((service) => { 80 60 User u = new User() { Username = Membership.GetUser().UserName, Password = Session["pw"] as string }; 81 61 return service.GetJob(u, jobId); 82 62 }); 83 var runs = withControllerService<IList<Run>>((service) => {63 var runs = ControllerService.withControllerService<IList<Run>>((service) => { 84 64 User u = new User() { Username = Membership.GetUser().UserName, Password = Session["pw"] as string }; 85 65 return service.GetJobResults(u, jobId); … … 92 72 [HttpPost] 93 73 public ActionResult JobDetails(Job job) { 94 withControllerService((service) => {74 ControllerService.withControllerService<bool>((service) => { 95 75 User u = new User() { Username = Membership.GetUser().UserName, Password = Session["pw"] as string }; 96 service.DeleteJob(u, job.Id);76 return service.DeleteJob(u, job.Id); 97 77 }); 98 78 return RedirectToAction("Index"); … … 125 105 [HttpPost] 126 106 public ActionResult ScheduleJob(ScheduleJobModel jobModel) { 127 using (var cf = new ChannelFactory<IControllerService>(OptimizationController.DEFAULT_CONTROLLER_ENDPOINT)) { 128 var credentialBehaviour = cf.Endpoint.Behaviors.Find<ClientCredentials>(); 129 credentialBehaviour.UserName.UserName = Membership.GetUser().UserName; 130 credentialBehaviour.UserName.Password = Session["pw"] as string; 131 var controllerProxy = cf.CreateChannel(); 107 var success = ControllerService.withControllerService<bool>((service) => { 132 108 User u = new User() { Username = Membership.GetUser().UserName, Password = Session["pw"] as string }; 133 109 var scenario = Session["scenario"] as OptimizationScenario; 134 110 var details = new JobExecutionDetails() { Group = jobModel.Group, JobTitle = jobModel.Name, Repititions = jobModel.Repetitions }; 135 controllerProxy.ScheduleOptimizationScenario(u, scenario, details);136 } 111 return service.ScheduleOptimizationScenario(u, scenario, details); 112 }); 137 113 return RedirectToAction("Index"); 138 114 } -
branches/OaaS/HeuristicLab.Services.Optimization.Web/HeuristicLab.Services.Optimization.Web.csproj
r9166 r9215 97 97 </ItemGroup> 98 98 <ItemGroup> 99 <Content Include="Content\dynatree\dist\jquery.dynatree.min.js" /> 100 <Content Include="Content\dynatree\src\skin\icons-rtl.gif" /> 101 <Content Include="Content\dynatree\src\skin\icons.gif" /> 102 <Content Include="Content\dynatree\src\skin\loading.gif" /> 103 <Content Include="Content\dynatree\src\skin\ui.dynatree.css" /> 104 <Content Include="Content\dynatree\src\skin\vline-rtl.gif" /> 105 <Content Include="Content\dynatree\src\skin\vline.gif" /> 106 <Content Include="Content\ExperimentSupport.js" /> 99 107 <Compile Include="Controllers\AccountController.cs" /> 100 108 <Compile Include="Controllers\AdminController.cs" /> 101 109 <Compile Include="Controllers\ChartController.cs" /> 110 <Compile Include="Controllers\ExperimentController.cs" /> 102 111 <Compile Include="Controllers\HomeController.cs" /> 103 112 <Compile Include="Controllers\OptimizationController.cs" /> 113 <Compile Include="Controllers\StatusController.cs" /> 104 114 <Compile Include="Global.asax.cs"> 105 115 <DependentUpon>Global.asax</DependentUpon> 106 116 </Compile> 117 <Compile Include="Helpers\ControllerService.cs" /> 107 118 <Compile Include="Mockup\MockupMembershipProvider.cs" /> 108 119 <Compile Include="Models\AccountModels.cs" /> 109 120 <Compile Include="Models\AdminModels.cs" /> 110 121 <Compile Include="Models\ChartModels.cs" /> 122 <Compile Include="Models\ExperimentModel.cs" /> 111 123 <Compile Include="Models\OptimizationModels.cs" /> 124 <Compile Include="Models\StatusModel.cs" /> 112 125 <Compile Include="Properties\AssemblyInfo.cs" /> 113 126 <Compile Include="WebRole.cs" /> … … 131 144 <Content Include="Content\datatable\images\sort_desc.png" /> 132 145 <Content Include="Content\datatable\images\sort_desc_disabled.png" /> 146 <Content Include="Content\hl\images\ajax-loader.gif" /> 133 147 <Content Include="Content\jqplot\src\changes.txt" /> 134 148 <Content Include="Content\jqplot\src\excanvas.js" /> … … 273 287 <Content Include="Scripts\modernizr-1.7.js" /> 274 288 <Content Include="Scripts\modernizr-1.7.min.js" /> 289 <Content Include="Views\Account\ChangePassword.cshtml" /> 290 <Content Include="Views\Account\ChangePasswordSuccess.cshtml" /> 291 <Content Include="Views\Account\LogOn.cshtml" /> 292 <Content Include="Views\Account\Register.cshtml" /> 293 <Content Include="Views\Admin\Index.cshtml" /> 294 <Content Include="Views\Chart\GenerateChart.cshtml" /> 295 <Content Include="Views\Experiment\Edit.cshtml" /> 296 <Content Include="Views\Experiment\Index.cshtml" /> 297 <Content Include="Views\Home\About.cshtml" /> 298 <Content Include="Views\Home\Index.cshtml" /> 299 <Content Include="Views\Optimization\AlgorithmParameters.cshtml" /> 300 <Content Include="Views\Optimization\Copy of JobDetails.cshtml" /> 301 <Content Include="Views\Optimization\Index.cshtml"> 302 <SubType>Code</SubType> 303 </Content> 304 <Content Include="Views\Optimization\JobDetails.cshtml" /> 305 <Content Include="Views\Optimization\ProblemParameters.cshtml" /> 306 <Content Include="Views\Optimization\ScheduleJob.cshtml" /> 307 <Content Include="Views\Shared\DisplayTemplates\AlgorithmParameters.cshtml" /> 308 <Content Include="Views\Shared\DisplayTemplates\BoolValue.cshtml" /> 309 <Content Include="Views\Shared\DisplayTemplates\DecimalMatrix.cshtml" /> 310 <Content Include="Views\Shared\DisplayTemplates\DecimalValue.cshtml" /> 311 <Content Include="Views\Shared\DisplayTemplates\DecimalVector.cshtml" /> 312 <Content Include="Views\Shared\DisplayTemplates\ProblemParameters.cshtml" /> 313 <Content Include="Views\Shared\DisplayTemplates\StringValue.cshtml" /> 314 <Content Include="Views\Shared\DisplayTemplates\TypeValue.cshtml" /> 315 <Content Include="Views\Shared\EditorTemplates\AlgorithmParameters.cshtml" /> 316 <Content Include="Views\Shared\EditorTemplates\BoolValue.cshtml" /> 317 <Content Include="Views\Shared\EditorTemplates\DecimalMatrix.cshtml" /> 318 <Content Include="Views\Shared\EditorTemplates\DecimalValue.cshtml" /> 319 <Content Include="Views\Shared\EditorTemplates\DecimalVector.cshtml" /> 320 <Content Include="Views\Shared\EditorTemplates\ProblemParameters.cshtml" /> 321 <Content Include="Views\Shared\EditorTemplates\TypeValue.cshtml" /> 322 <Content Include="Views\Shared\Error.cshtml" /> 323 <Content Include="Views\Shared\_Layout.cshtml" /> 324 <Content Include="Views\Shared\_LogOnPartial.cshtml" /> 325 <Content Include="Views\Web.config" /> 326 <Content Include="Views\_ViewStart.cshtml" /> 275 327 <Content Include="Web.config"> 276 328 <SubType>Designer</SubType> … … 293 345 <Content Include="Scripts\MicrosoftMvcValidation.js" /> 294 346 <Content Include="Scripts\MicrosoftMvcValidation.debug.js" /> 295 <Content Include="Views\_ViewStart.cshtml" />296 <Content Include="Views\Account\ChangePassword.cshtml" />297 <Content Include="Views\Account\ChangePasswordSuccess.cshtml" />298 <Content Include="Views\Account\LogOn.cshtml" />299 <Content Include="Views\Account\Register.cshtml" />300 <Content Include="Views\Home\About.cshtml" />301 <Content Include="Views\Home\Index.cshtml" />302 <Content Include="Views\Shared\Error.cshtml" />303 <Content Include="Views\Shared\_LogOnPartial.cshtml" />304 <Content Include="Views\Shared\_Layout.cshtml" />305 <Content Include="Views\Web.config" />306 347 </ItemGroup> 307 348 <ItemGroup> … … 310 351 <ItemGroup> 311 352 <Content Include="packages.config" /> 312 </ItemGroup>313 <ItemGroup>314 <Content Include="Views\Optimization\Index.cshtml" />315 353 </ItemGroup> 316 354 <ItemGroup> … … 321 359 </ItemGroup> 322 360 <ItemGroup> 323 <Content Include="Views\Optimization\ProblemParameters.cshtml" />324 </ItemGroup>325 <ItemGroup>326 <Content Include="Views\Optimization\AlgorithmParameters.cshtml" />327 </ItemGroup>328 <ItemGroup>329 <Content Include="Views\Optimization\ScheduleJob.cshtml" />330 </ItemGroup>331 <ItemGroup>332 <Content Include="Views\Shared\EditorTemplates\ProblemParameters.cshtml" />333 </ItemGroup>334 <ItemGroup>335 <Content Include="Views\Shared\EditorTemplates\DecimalValue.cshtml" />336 </ItemGroup>337 <ItemGroup>338 <Content Include="Views\Shared\EditorTemplates\BoolValue.cshtml" />339 </ItemGroup>340 <ItemGroup>341 <Content Include="Views\Shared\EditorTemplates\TypeValue.cshtml" />342 </ItemGroup>343 <ItemGroup>344 <Content Include="Views\Shared\EditorTemplates\DecimalMatrix.cshtml" />345 </ItemGroup>346 <ItemGroup>347 <Content Include="Views\Shared\EditorTemplates\DecimalVector.cshtml" />348 </ItemGroup>349 <ItemGroup>350 <Content Include="Views\Shared\EditorTemplates\AlgorithmParameters.cshtml" />351 </ItemGroup>352 <ItemGroup>353 <Content Include="Views\Shared\DisplayTemplates\AlgorithmParameters.cshtml" />354 </ItemGroup>355 <ItemGroup>356 <Content Include="Views\Shared\DisplayTemplates\TypeValue.cshtml" />357 </ItemGroup>358 <ItemGroup>359 <Content Include="Views\Shared\DisplayTemplates\BoolValue.cshtml" />360 </ItemGroup>361 <ItemGroup>362 <Content Include="Views\Shared\DisplayTemplates\DecimalMatrix.cshtml" />363 </ItemGroup>364 <ItemGroup>365 <Content Include="Views\Shared\DisplayTemplates\DecimalValue.cshtml" />366 </ItemGroup>367 <ItemGroup>368 <Content Include="Views\Shared\DisplayTemplates\DecimalVector.cshtml" />369 </ItemGroup>370 <ItemGroup>371 <Content Include="Views\Shared\DisplayTemplates\ProblemParameters.cshtml" />372 </ItemGroup>373 <ItemGroup>374 361 <Content Include="HeuristicLab 3.3.exe.config" /> 375 </ItemGroup>376 <ItemGroup>377 <Content Include="Views\Optimization\JobDetails.cshtml" />378 362 </ItemGroup> 379 363 <ItemGroup> … … 384 368 <SubType>Designer</SubType> 385 369 </None> 386 <Content Include="Views\Admin\Index.cshtml" /> 387 <Content Include="Views\Chart\GenerateChart.cshtml" /> 388 <Content Include="Views\Optimization\Copy of JobDetails.cshtml" /> 389 <Content Include="Views\Shared\DisplayTemplates\StringValue.cshtml" /> 370 <Content Include="Views\Status\Index.cshtml" /> 390 371 </ItemGroup> 391 372 <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> -
branches/OaaS/HeuristicLab.Services.Optimization.Web/Views/Account/LogOn.cshtml
r9062 r9215 14 14 15 15 @Html.ValidationSummary(true, "Login was unsuccessful. Please correct the errors and try again.") 16 17 @using (Html.BeginForm("LogOn", "Account", FormMethod.Post, new { @class = "hl-signon-form" })) { 16 @using (Html.BeginForm("LogOn", "Account", new { ReturnUrl = Request.QueryString["ReturnUrl"] }, FormMethod.Post, new { @class ="hl-signon-form" })) { 18 17 <fieldset> 19 18 <legend>Account Information</legend> -
branches/OaaS/HeuristicLab.Services.Optimization.Web/Views/Shared/_Layout.cshtml
r9166 r9215 26 26 <script type="text/javascript" src="@Url.Content("~/Content/jqplot/src/plugins/jqplot.donutRenderer.js")"></script> 27 27 <script type="text/javascript" src="@Url.Content("~/Content/jqplot/src/plugins/jqplot.cursor.js")"></script> 28 29 <link href="@Url.Content("~/Content/dynatree/src/skin/ui.dynatree.css")" rel="stylesheet" type="text/css" /> 30 <script type="text/javascript" src="@Url.Content("~/Content/dynatree/dist/jquery.dynatree.min.js")"></script> 31 <script type="text/javascript" src="@Url.Content("~/Content/ExperimentSupport.js")"></script> 28 32 </head> 29 33 <body> … … 40 44 <div id="master-mainmenu"> 41 45 <ul id="menu"> 42 <li>@Html.ActionLink("Admin", "Index", "Admin")</li>43 46 <li>@Html.ActionLink("Home", "Index", "Home")</li> 47 <li>@Html.ActionLink("Experiment", "Index", "Experiment")</li> 48 <li>@Html.ActionLink("Admin", "Index", "Admin")</li> 44 49 <li>@Html.ActionLink("About", "About", "Home")</li> 45 50 </ul> … … 47 52 48 53 <div id="master-main"> 49 <div id="master-submenu"/> 54 <div id="master-submenu"> 55 @RenderSection("submenu", required: false) 56 </div> 50 57 <div id="master-MainContent"> 51 58 @RenderBody()
Note: See TracChangeset
for help on using the changeset viewer.