Changeset 9062
- Timestamp:
- 12/17/12 09:37:16 (12 years ago)
- Location:
- branches/OaaS
- Files:
-
- 141 added
- 1 deleted
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/OaaS/HeuristicLab.Services.Optimization.Controller/HL/HiveScenarioManager.cs
r8958 r9062 19 19 using Microsoft.WindowsAzure.StorageClient; 20 20 using HeuristicLab.Services.Optimization.ControllerService.Azure; 21 using System.Data; 21 22 22 23 namespace HeuristicLab.Services.Optimization.ControllerService { … … 112 113 var mapper = CompileMapper(mapperString); 113 114 114 /*@"using System; 115 using System.Collections.Generic; 116 using System.Linq; 117 using System.Text; 118 using HeuristicLab.Data; 119 using HeuristicLab.Services.Optimization.ControllerService.Model; 120 using HeuristicLab.Optimization; 121 using HeuristicLab.Services.Optimization.ControllerService; 122 using HeuristicLab.Algorithms.GeneticAlgorithm; 123 using HeuristicLab.Problems.TravelingSalesman; 124 public class TSPScenarioMapper : IScenarioMapper { 125 public void MapScenario(OptimizationScenario scenario, IAlgorithm algorithm) { 126 Console.WriteLine(""Mapping scenario!""); 127 var ga = algorithm as GeneticAlgorithm; 128 var problem = algorithm.Problem as TravelingSalesmanProblem; 129 130 problem.BestKnownQuality = HLMapper.ConvertToDoubleValue(scenario.InputParameters.FindByName(""BestKnownQuality"")); 131 problem.BestKnownSolution = HLMapper.ConvertToPermutation(scenario.InputParameters.FindByName(""BestKnownSolution"")); 132 problem.Coordinates = HLMapper.ConvertToDoubleMatrix(scenario.InputParameters.FindByName(""Coordinates"")); 133 var evalParam = HLMapper.GetStringValue(scenario.InputParameters.FindByName(""EvaluatorParameter"")); 134 if (evalParam == ""HeuristicLab.Problems.TravelingSalesman.TSPRoundedEuclideanPathEvaluator"") { 135 problem.EvaluatorParameter.Value = new TSPRoundedEuclideanPathEvaluator(); 136 } 137 else if (evalParam == ""HeuristicLab.Problems.TravelingSalesman.TSPGeoPathEvaluator"") { 138 problem.EvaluatorParameter.Value = new TSPGeoPathEvaluator(); 139 } 140 else { 141 problem.EvaluatorParameter.Value = new TSPEuclideanPathEvaluator(); 142 } 143 problem.UseDistanceMatrix = HLMapper.ConvertToBoolValue(scenario.InputParameters.FindByName(""UseDistanceMatrix"")); 144 Console.WriteLine(""Mapping algorithm...""); 145 ga.Mutator = HLMapper.FindInItemSet<HeuristicLab.Optimization.IManipulator>(ga.MutatorParameter.ValidValues, scenario.AlgorithmParameters.FindByName(""Mutator"")); 146 ga.CrossoverParameter.Value = HLMapper.FindOperator<HeuristicLab.Optimization.ICrossover>(problem, scenario.AlgorithmParameters.FindByName(""CrossoverParameter"")); 147 ga.Elites = HLMapper.ConvertToIntValue(scenario.AlgorithmParameters.FindByName(""Elites"")); 148 ga.MaximumGenerations = HLMapper.ConvertToIntValue(scenario.AlgorithmParameters.FindByName(""MaximumGenerations"")); 149 ga.MutationProbability = HLMapper.ConvertToPercentValue(scenario.AlgorithmParameters.FindByName(""MutationProbability"")); 150 ga.PopulationSize = HLMapper.ConvertToIntValue(scenario.AlgorithmParameters.FindByName(""PopulationSize"")); 151 ga.Seed = HLMapper.ConvertToIntValue(scenario.AlgorithmParameters.FindByName(""Seed"")); 152 ga.Selector = HLMapper.FindInItemSet<HeuristicLab.Optimization.ISelector>(ga.SelectorParameter.ValidValues, scenario.AlgorithmParameters.FindByName(""Selector"")); 153 ga.SetSeedRandomly = HLMapper.ConvertToBoolValue(scenario.AlgorithmParameters.FindByName(""SetSeedRandomly"")); 154 } 155 }"*/ 156 mappers[scenario.Name] = mapper; 157 return mapper; 115 mappers[scenario.Name] = mapper; 116 return mapper; 158 117 } // lock 159 118 } // if … … 202 161 var waitingJobs = job.JobCount - job.CalculatingCount - job.FinishedCount; 203 162 Model.JobState? state = null; 204 var jobTasks = HiveServiceLocator.Instance.CallHiveService<IEnumerable<HeuristicLab.Clients.Hive.LightweightTask>>(s => s.GetLightweightJobTasks(job.Id)); 163 if (job.CalculatingCount > 0) 164 state = JobState.Calculating; 165 else if (job.JobCount == job.FinishedCount) 166 state = JobState.Finished; 167 else 168 state = JobState.Waiting; 169 /*var jobTasks = HiveServiceLocator.Instance.CallHiveService<IEnumerable<HeuristicLab.Clients.Hive.LightweightTask>>(s => s.GetLightweightJobTasks(job.Id)); 205 170 206 171 foreach (var task in jobTasks) { … … 220 185 state = JobState.Waiting; 221 186 else 222 state = JobState.Finished; 223 } 224 return new Model.Job() { Id = job.Id.ToString(), Name = job.Name, Resource = job.ResourceNames, State = state.Value };187 state = JobState.Finished; 188 }*/ 189 return new Model.Job() { Id = job.Id.ToString(), Name = job.Name, Resource = job.ResourceNames, State = state.Value, DateCreated = job.DateCreated }; 225 190 } 226 191 … … 286 251 287 252 //TODO: We might need images / +++ 253 288 254 private Parameter MapHiveDataType(string name, IItem item) { 289 255 Parameter result = new Parameter(); 290 256 result.Type = ParameterType.String; 257 //TODO: How shall we handle dll specific datatypes? 258 //if (item is PathTSPTour) { 259 // var tour = item as PathTSPTour; 260 //} 261 //else 291 262 if (item is IStringConvertibleValue) { 292 263 var value = (item as IStringConvertibleValue).GetValue(); … … 297 268 var value2 = (item as IStringConvertibleValueTuple).Item2.GetValue(); 298 269 result.Value = new HeuristicLab.Services.Optimization.ControllerService.Model.StringValue() { Name = name, Value = "{" + value1 + ", " + value2 + "}" }; 270 } 271 else if (item is DoubleArray) { 272 var array = item as DoubleArray; 273 double[] arrayValue = new double[array.Length]; 274 for (int i = 0; i < arrayValue.Length; ++i) { 275 arrayValue[i] = array[i]; 276 } 277 result.Value = new HeuristicLab.Services.Optimization.ControllerService.Model.DecimalVector() { Name = name, Value = arrayValue }; 278 } 279 else if (item is DoubleMatrix) { 280 var matrix = item as DoubleMatrix; 281 double[][] matrixValue = new double[matrix.Rows][]; 282 for (int i = 0; i < matrixValue.Length; ++i) { 283 matrixValue[i] = new double[matrix.Columns]; 284 for (int j = 0; j < matrixValue[i].Length; ++j) { 285 matrixValue[i][j] = matrix[i, j]; 286 } 287 } 288 result.Value = new HeuristicLab.Services.Optimization.ControllerService.Model.DecimalMatrix() { Name = name, Value = matrixValue }; 299 289 } 300 290 else if (item is IStringConvertibleArray) { … … 303 293 if (array.Length == 0) { 304 294 sb.Append("[ ]"); 305 } else { 295 } 296 else { 306 297 sb.Append("["); 307 for (int i =0; i < array.Length - 1; i++) {308 sb.Append(array.GetValue(i)).Append(", "); 298 for (int i = 0; i < array.Length - 1; i++) { 299 sb.Append(array.GetValue(i)).Append(", "); 309 300 } 310 301 sb.Append(array.GetValue(array.Length - 1)); … … 314 305 result.Value = new HeuristicLab.Services.Optimization.ControllerService.Model.StringValue() { Name = name, Value = value }; 315 306 } 307 else if (item is HeuristicLab.Analysis.DataTable) { 308 var table = item as HeuristicLab.Analysis.DataTable; 309 string[] names = new string[table.Rows.Count]; 310 double[][] results = new double[table.Rows.Count][]; 311 for (int i = 0; i < table.Rows.Count; i++ ) { 312 var columns = table.Rows.ToList()[i]; 313 names[i] = columns.Name; 314 results[i] = new double[columns.Values.Count]; 315 for (int j=0; j < columns.Values.Count; j++) { 316 results[i][j] = columns.Values[j]; 317 } 318 } 319 result.Value = new HeuristicLab.Services.Optimization.ControllerService.Model.DecimalMatrix() { Name = name, Value = results, RowNames = names }; 320 } 316 321 else if (item is IStringConvertibleMatrix) { 317 322 StringBuilder sb = new StringBuilder(); 318 323 var matrix = item as IStringConvertibleMatrix; 324 319 325 if (matrix.Rows == 0 || matrix.Columns == 0) { 320 326 sb.Append("[ ]"); 321 327 } 322 328 else { 329 323 330 sb.Append("[ "); 324 331 for (int r = 0; r < matrix.Rows; r++) { 325 332 sb.Append("( "); 326 333 for (int c = 0; c < matrix.Columns - 1; c++) { 334 matrix.GetValue(r, c); 327 335 sb.Append(matrix.GetValue(r, c)).Append(", "); 328 336 } -
branches/OaaS/HeuristicLab.Services.Optimization.Controller/HeuristicLab.Services.Optimization.ControllerService.csproj
r8958 r9062 38 38 <Reference Include="HeuristicLab.Algorithms.GeneticAlgorithm-3.3"> 39 39 <HintPath>..\bin\HeuristicLab.Algorithms.GeneticAlgorithm-3.3.dll</HintPath> 40 </Reference> 41 <Reference Include="HeuristicLab.Analysis-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 42 <SpecificVersion>False</SpecificVersion> 43 <HintPath>..\bin\HeuristicLab.Analysis-3.3.dll</HintPath> 40 44 </Reference> 41 45 <Reference Include="HeuristicLab.Clients.Hive-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> … … 156 160 <Compile Include="Interfaces\DAL.cs" /> 157 161 <Compile Include="Interfaces\IScenarioManager.cs" /> 158 <Compile Include=" Model\ControllerModel.cs" />162 <Compile Include="Interfaces\Model\ControllerModel.cs" /> 159 163 <Compile Include="PlaceholderControllerService.cs" /> 160 164 <Compile Include="Properties\AssemblyInfo.cs" /> … … 165 169 <WCFMetadata Include="Service References\" /> 166 170 </ItemGroup> 167 <ItemGroup /> 171 <ItemGroup> 172 <None Include="packages.config" /> 173 </ItemGroup> 168 174 <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> 169 175 <PropertyGroup> -
branches/OaaS/HeuristicLab.Services.Optimization.Web/Content/Site.css
r8384 r9062 200 200 } 201 201 202 input[type="text"] 203 { 204 width: 200px; 205 } 206 202 207 select { 203 208 border: 1px solid #ccc; … … 323 328 width: 6em; 324 329 } 330 331 div.scroll 332 { 333 height: 400px; 334 width: 400px; 335 overflow: auto; 336 } -
branches/OaaS/HeuristicLab.Services.Optimization.Web/Controllers/OptimizationController.cs
r8545 r9062 22 22 23 23 public T withControllerService<T>(ControllerServiceDelegate<T> del) { 24 if (Session["pw"] == null) 25 Response.Redirect("/Account/Logon"); 26 24 27 using (var cf = new ChannelFactory<IControllerService>(OptimizationController.DEFAULT_CONTROLLER_ENDPOINT)) { 25 28 var credentialBehaviour = cf.Endpoint.Behaviors.Find<ClientCredentials>(); … … 32 35 33 36 public void withControllerService(ControllerServiceDelegate del) { 34 using (var cf = new ChannelFactory<IControllerService>(OptimizationController.DEFAULT_CONTROLLER_ENDPOINT)) { 37 if (Session["pw"] == null) 38 Response.Redirect("/Account/Logon"); 39 40 using (var cf = new ChannelFactory<IControllerService>(OptimizationController.DEFAULT_CONTROLLER_ENDPOINT)) { 35 41 var credentialBehaviour = cf.Endpoint.Behaviors.Find<ClientCredentials>(); 36 42 credentialBehaviour.UserName.UserName = Membership.GetUser().UserName; 37 credentialBehaviour.UserName.Password = Session["pw"] as string; 43 credentialBehaviour.UserName.Password = Session["pw"] as string; 38 44 var controllerProxy = cf.CreateChannel(); 39 45 del(controllerProxy); … … 73 79 }); 74 80 JobDetailsModel jdm = new JobDetailsModel() { Job = job, Runs = runs }; 81 Session["jobDetails"] = jdm; 75 82 return View(jdm); 76 83 } -
branches/OaaS/HeuristicLab.Services.Optimization.Web/HeuristicLab.Services.Optimization.Web.csproj
r8958 r9062 55 55 <Reference Include="System.Runtime.Serialization" /> 56 56 <Reference Include="System.ServiceModel" /> 57 <Reference Include="System.Web.DataVisualization" /> 57 58 <Reference Include="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> 58 59 <Private>True</Private> … … 98 99 <Compile Include="Controllers\AccountController.cs" /> 99 100 <Compile Include="Controllers\AdminController.cs" /> 101 <Compile Include="Controllers\ChartController.cs" /> 100 102 <Compile Include="Controllers\HomeController.cs" /> 101 103 <Compile Include="Controllers\OptimizationController.cs" /> … … 105 107 <Compile Include="Models\AccountModels.cs" /> 106 108 <Compile Include="Models\AdminModels.cs" /> 109 <Compile Include="Models\ChartModels.cs" /> 107 110 <Compile Include="Models\OptimizationModels.cs" /> 108 111 <Compile Include="Properties\AssemblyInfo.cs" /> … … 110 113 </ItemGroup> 111 114 <ItemGroup> 115 <Content Include="Content\datatable\css\demo_page.css" /> 116 <Content Include="Content\datatable\css\demo_table.css" /> 117 <Content Include="Content\datatable\css\demo_table_jui.css" /> 118 <Content Include="Content\datatable\css\jquery.dataTables.css" /> 119 <Content Include="Content\datatable\css\jquery.dataTables_themeroller.css" /> 120 <Content Include="Content\datatable\images\back_disabled.png" /> 121 <Content Include="Content\datatable\images\back_enabled.png" /> 122 <Content Include="Content\datatable\images\back_enabled_hover.png" /> 123 <Content Include="Content\datatable\images\favicon.ico" /> 124 <Content Include="Content\datatable\images\forward_disabled.png" /> 125 <Content Include="Content\datatable\images\forward_enabled.png" /> 126 <Content Include="Content\datatable\images\forward_enabled_hover.png" /> 127 <Content Include="Content\datatable\images\sort_asc.png" /> 128 <Content Include="Content\datatable\images\sort_asc_disabled.png" /> 129 <Content Include="Content\datatable\images\sort_both.png" /> 130 <Content Include="Content\datatable\images\sort_desc.png" /> 131 <Content Include="Content\datatable\images\sort_desc_disabled.png" /> 132 <Content Include="Content\jqplot\src\changes.txt" /> 133 <Content Include="Content\jqplot\src\excanvas.js" /> 134 <Content Include="Content\jqplot\src\gpl-2.0.txt" /> 135 <Content Include="Content\jqplot\src\images\background.jpg" /> 136 <Content Include="Content\jqplot\src\images\basicline.png" /> 137 <Content Include="Content\jqplot\src\images\basiclogaxis.png" /> 138 <Content Include="Content\jqplot\src\images\basiclogoptions.png" /> 139 <Content Include="Content\jqplot\src\images\basicoptions.png" /> 140 <Content Include="Content\jqplot\src\images\dualaxis.png" /> 141 <Content Include="Content\jqplot\src\images\logo.jpg" /> 142 <Content Include="Content\jqplot\src\images\navdocs.png" /> 143 <Content Include="Content\jqplot\src\images\navdocsover.png" /> 144 <Content Include="Content\jqplot\src\images\navdownload.png" /> 145 <Content Include="Content\jqplot\src\images\navdownloadover.png" /> 146 <Content Include="Content\jqplot\src\images\navexamples.png" /> 147 <Content Include="Content\jqplot\src\images\navexamplesover.png" /> 148 <Content Include="Content\jqplot\src\images\navhome.gif" /> 149 <Content Include="Content\jqplot\src\images\navhome.png" /> 150 <Content Include="Content\jqplot\src\images\navhomeover.png" /> 151 <Content Include="Content\jqplot\src\images\new.png" /> 152 <Content Include="Content\jqplot\src\images\sample3.png" /> 153 <Content Include="Content\jqplot\src\images\samplesm.png" /> 154 <Content Include="Content\jqplot\src\jqplot.axisLabelRenderer.js" /> 155 <Content Include="Content\jqplot\src\jqplot.axisTickRenderer.js" /> 156 <Content Include="Content\jqplot\src\jqplot.canvasGridRenderer.js" /> 157 <Content Include="Content\jqplot\src\jqplot.core.js" /> 158 <Content Include="Content\jqplot\src\jqplot.divTitleRenderer.js" /> 159 <Content Include="Content\jqplot\src\jqplot.linearAxisRenderer.js" /> 160 <Content Include="Content\jqplot\src\jqplot.linearTickGenerator.js" /> 161 <Content Include="Content\jqplot\src\jqplot.lineRenderer.js" /> 162 <Content Include="Content\jqplot\src\jqplot.markerRenderer.js" /> 163 <Content Include="Content\jqplot\src\jqplot.shadowRenderer.js" /> 164 <Content Include="Content\jqplot\src\jqplot.shapeRenderer.js" /> 165 <Content Include="Content\jqplot\src\jqplot.sprintf.js" /> 166 <Content Include="Content\jqplot\src\jqplot.tableLegendRenderer.js" /> 167 <Content Include="Content\jqplot\src\jqplot.themeEngine.js" /> 168 <Content Include="Content\jqplot\src\jqPlotCssStyling.txt" /> 169 <Content Include="Content\jqplot\src\jqPlotOptions.txt" /> 170 <Content Include="Content\jqplot\src\jquery.jqplot.css" /> 171 <Content Include="Content\jqplot\src\jquery.jqplot.js" /> 172 <Content Include="Content\jqplot\src\jquery.js" /> 173 <Content Include="Content\jqplot\src\jquery.min.js" /> 174 <Content Include="Content\jqplot\src\jsdate.js" /> 175 <Content Include="Content\jqplot\src\MIT-LICENSE.txt" /> 176 <Content Include="Content\jqplot\src\optionsTutorial.txt" /> 177 <Content Include="Content\jqplot\src\plugins\jqplot.barRenderer.js" /> 178 <Content Include="Content\jqplot\src\plugins\jqplot.BezierCurveRenderer.js" /> 179 <Content Include="Content\jqplot\src\plugins\jqplot.blockRenderer.js" /> 180 <Content Include="Content\jqplot\src\plugins\jqplot.bubbleRenderer.js" /> 181 <Content Include="Content\jqplot\src\plugins\jqplot.canvasAxisLabelRenderer.js" /> 182 <Content Include="Content\jqplot\src\plugins\jqplot.canvasAxisTickRenderer.js" /> 183 <Content Include="Content\jqplot\src\plugins\jqplot.canvasOverlay.js" /> 184 <Content Include="Content\jqplot\src\plugins\jqplot.canvasTextRenderer.js" /> 185 <Content Include="Content\jqplot\src\plugins\jqplot.categoryAxisRenderer.js" /> 186 <Content Include="Content\jqplot\src\plugins\jqplot.ciParser.js" /> 187 <Content Include="Content\jqplot\src\plugins\jqplot.cursor.js" /> 188 <Content Include="Content\jqplot\src\plugins\jqplot.dateAxisRenderer.js" /> 189 <Content Include="Content\jqplot\src\plugins\jqplot.donutRenderer.js" /> 190 <Content Include="Content\jqplot\src\plugins\jqplot.dragable.js" /> 191 <Content Include="Content\jqplot\src\plugins\jqplot.enhancedLegendRenderer.js" /> 192 <Content Include="Content\jqplot\src\plugins\jqplot.funnelRenderer.js" /> 193 <Content Include="Content\jqplot\src\plugins\jqplot.highlighter.js" /> 194 <Content Include="Content\jqplot\src\plugins\jqplot.json2.js" /> 195 <Content Include="Content\jqplot\src\plugins\jqplot.logAxisRenderer.js" /> 196 <Content Include="Content\jqplot\src\plugins\jqplot.mekkoAxisRenderer.js" /> 197 <Content Include="Content\jqplot\src\plugins\jqplot.mekkoRenderer.js" /> 198 <Content Include="Content\jqplot\src\plugins\jqplot.meterGaugeRenderer.js" /> 199 <Content Include="Content\jqplot\src\plugins\jqplot.ohlcRenderer.js" /> 200 <Content Include="Content\jqplot\src\plugins\jqplot.pieRenderer.js" /> 201 <Content Include="Content\jqplot\src\plugins\jqplot.pointLabels.js" /> 202 <Content Include="Content\jqplot\src\plugins\jqplot.trendline.js" /> 203 <Content Include="Content\jqplot\src\usage.txt" /> 204 <Content Include="Content\Styling.js" /> 205 <Content Include="Content\hl\images\._bg_footer.png" /> 206 <Content Include="Content\hl\images\._bg_header.png" /> 207 <Content Include="Content\hl\images\._bg_main.png" /> 208 <Content Include="Content\hl\images\._bg_mainmenu.png" /> 209 <Content Include="Content\hl\images\._hl-logo.png" /> 210 <Content Include="Content\hl\images\bg_footer.png" /> 211 <Content Include="Content\hl\images\bg_header.png" /> 212 <Content Include="Content\hl\images\bg_main.png" /> 213 <Content Include="Content\hl\images\bg_mainmenu.png" /> 214 <Content Include="Content\hl\images\hl-logo.png" /> 215 <Content Include="Content\hl\Site.css" /> 112 216 <Content Include="Content\themes\base\images\ui-bg_flat_0_aaaaaa_40x100.png" /> 113 217 <Content Include="Content\themes\base\images\ui-bg_flat_75_ffffff_40x100.png" /> … … 137 241 <Content Include="Content\themes\base\jquery.ui.tabs.css" /> 138 242 <Content Include="Content\themes\base\jquery.ui.theme.css" /> 243 <Content Include="Content\ui-lightness\images\ui-bg_diagonals-thick_18_b81900_40x40.png" /> 244 <Content Include="Content\ui-lightness\images\ui-bg_diagonals-thick_20_666666_40x40.png" /> 245 <Content Include="Content\ui-lightness\images\ui-bg_flat_10_000000_40x100.png" /> 246 <Content Include="Content\ui-lightness\images\ui-bg_glass_100_f6f6f6_1x400.png" /> 247 <Content Include="Content\ui-lightness\images\ui-bg_glass_100_fdf5ce_1x400.png" /> 248 <Content Include="Content\ui-lightness\images\ui-bg_glass_65_ffffff_1x400.png" /> 249 <Content Include="Content\ui-lightness\images\ui-bg_gloss-wave_35_f6a828_500x100.png" /> 250 <Content Include="Content\ui-lightness\images\ui-bg_highlight-soft_100_eeeeee_1x100.png" /> 251 <Content Include="Content\ui-lightness\images\ui-bg_highlight-soft_75_ffe45c_1x100.png" /> 252 <Content Include="Content\ui-lightness\images\ui-icons_222222_256x240.png" /> 253 <Content Include="Content\ui-lightness\images\ui-icons_228ef1_256x240.png" /> 254 <Content Include="Content\ui-lightness\images\ui-icons_ef8c08_256x240.png" /> 255 <Content Include="Content\ui-lightness\images\ui-icons_ffd27a_256x240.png" /> 256 <Content Include="Content\ui-lightness\images\ui-icons_ffffff_256x240.png" /> 257 <Content Include="Content\ui-lightness\jquery-ui-1.9.2.css" /> 258 <Content Include="Content\ui-lightness\jquery-ui-1.9.2.min.css" /> 139 259 <Content Include="Global.asax" /> 140 260 <Content Include="ControllerService.svc" /> … … 145 265 <Content Include="Scripts\jquery-ui-1.8.11.js" /> 146 266 <Content Include="Scripts\jquery-ui-1.8.11.min.js" /> 267 <Content Include="Scripts\jquery-ui-1.9.2.min.js" /> 268 <Content Include="Scripts\jquery.dataTables.min.js" /> 147 269 <Content Include="Scripts\jquery.validate-vsdoc.js" /> 148 270 <Content Include="Scripts\jquery.validate.js" /> … … 255 377 </ItemGroup> 256 378 <ItemGroup> 379 <None Include="Content\datatable\images\Sorting icons.psd" /> 380 <None Include="Content\jqplot\src\jsl.conf" /> 257 381 <None Include="Mappings\mapping.py" /> 258 382 <None Include="Mappings\scenario.xsd"> … … 260 384 </None> 261 385 <Content Include="Views\Admin\Index.cshtml" /> 386 <Content Include="Views\Chart\GenerateChart.cshtml" /> 387 <Content Include="Views\Optimization\Copy of JobDetails.cshtml" /> 262 388 </ItemGroup> 263 389 <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> -
branches/OaaS/HeuristicLab.Services.Optimization.Web/Models/OptimizationModels.cs
r8545 r9062 42 42 } 43 43 var param = (from par in scenario.InputParameters.Items where par.Value.Name == realKey select par).FirstOrDefault(); 44 if ( !param.Value.TrySetFromString(realValue)) {44 if (param != null && !param.Value.TrySetFromString(realValue)) { 45 45 bindingContext.ModelState.AddModelError(bindingContext.ModelName, new Exception(string.Format("Unable to parse {0} into destination type {1}", value, param.Type))); 46 46 } … … 56 56 var value = bindingContext.ValueProvider.GetValue(key); 57 57 var param = (from par in scenario.AlgorithmParameters.Items where par.Value.Name == key select par).FirstOrDefault(); 58 if ( !param.Value.TrySetFromString(value.AttemptedValue)) {58 if (param != null && !param.Value.TrySetFromString(value.AttemptedValue)) { 59 59 bindingContext.ModelState.AddModelError(bindingContext.ModelName, new Exception(string.Format("Unable to parse {0} into destination type {1}", value, param.Type))); 60 60 } -
branches/OaaS/HeuristicLab.Services.Optimization.Web/Views/Account/LogOn.cshtml
r8384 r9062 15 15 @Html.ValidationSummary(true, "Login was unsuccessful. Please correct the errors and try again.") 16 16 17 @using (Html.BeginForm()) { 18 <div> 17 @using (Html.BeginForm("LogOn", "Account", FormMethod.Post, new { @class = "hl-signon-form" })) { 19 18 <fieldset> 20 19 <legend>Account Information</legend> … … 45 44 </p> 46 45 </fieldset> 47 </div>48 46 } -
branches/OaaS/HeuristicLab.Services.Optimization.Web/Views/Optimization/Index.cshtml
r8545 r9062 6 6 7 7 <h2>Your jobs:</h2> 8 <table >8 <table class="viewableTable"> 9 9 <thead> 10 10 <tr> 11 <td>Name</td> 12 <td>Resource</td> 13 <td>State</td> 11 <th>Name</th> 12 <th>Created at</th> 13 <th>Resource</th> 14 <th>State</th> 14 15 </tr> 15 16 </thead> … … 18 19 <tr> 19 20 <td>@Html.ActionLink(itm.Name, "JobDetails", new { jobId = itm.Id })</td> 21 <td>@itm.DateCreated</td> 20 22 <td>@itm.Resource</td> 21 23 <td>@itm.State</td> … … 24 26 </tbody> 25 27 </table> 28 <div class="spacer"></div> 26 29 27 <h2>Choose your scenario </h2>30 <h2>Choose your scenario:</h2> 28 31 29 32 <ul> -
branches/OaaS/HeuristicLab.Services.Optimization.Web/Views/Optimization/JobDetails.cshtml
r8545 r9062 28 28 29 29 <h3>Run details:</h3> 30 @foreach (var run in Model.Runs) { 30 @for (int j=0; j < Model.Runs.Count; j++) { 31 var run = Model.Runs[j]; 31 32 <p>@run.Name:</p> 32 33 <table> … … 38 39 </thead> 39 40 <tbody> 40 @foreach (var result in run.Results) { 41 @for (var i = 0; i < run.Results.Count; i++) { 42 var result = run.Results[i]; 41 43 <tr> 42 <td>@result.Value.Name</td> 43 <td>@((result.Value as HeuristicLab.Services.Optimization.ControllerService.Model.StringValue).Value)</td> 44 <td>@result.Value.Name</td> 45 @if (result.Value is HeuristicLab.Services.Optimization.ControllerService.Model.DecimalMatrix) { 46 var matrix = (result.Value as HeuristicLab.Services.Optimization.ControllerService.Model.DecimalMatrix); 47 <td> 48 <div class="tabable"> 49 <ul> 50 <li> 51 <a href="#matrix-tab-@j-@i">Table @result.Value.Name</a> 52 </li> 53 <li> 54 <a href="#matrix-graph-@j-@i-render">Chart @result.Value.Name</a> 55 <!--a href="@Url.Content("~/Chart/GenerateChart?index=" + j + "¶meterName=" + result.Value.Name + "&chartType=Line")">Chart @result.Value.Name</a--> 56 <!--img alt="Chart" src="@Url.Content("~/Chart/GenerateChart?index=" + j + "¶meterName=" + result.Value.Name)" /--> 57 </li> 58 </ul> 59 <div id="matrix-tab-@j-@i" class="scroll"> 60 @Html.DisplayFor(model => matrix) 61 </div> 62 <div class="resizable ui-widget-content" id="matrix-graph-@j-@i-render" style="width: 800px; height: 600px;"> 63 <div class="matrix-graph" id="matrix-graph-@j-@i" style="width:96%; height:96%;" ></div> 64 </div> 65 </div> 66 </td> 67 } 68 else { 69 <td>@((result.Value as HeuristicLab.Services.Optimization.ControllerService.Model.StringValue).Value)</td> 70 } 44 71 </tr> 45 72 } -
branches/OaaS/HeuristicLab.Services.Optimization.Web/Views/Shared/DisplayTemplates/DecimalMatrix.cshtml
r8817 r9062 1 1 @model HeuristicLab.Services.Optimization.ControllerService.Model.DecimalMatrix 2 2 3 <table> 4 <tr> 5 <th>@Model.Name</th> 6 </tr> 7 @for (int i = 0; i < Model.Value.Length; i++) { 8 <tr> 9 @for (int j = 0; j < Model.Value[i].Length; j++) { 10 <td> 11 @Model.Value[i][j] 12 </td> 13 } 14 </tr> 15 } 3 <table class="viewableTable"> 4 <thead> 5 <tr> 6 <th>@Model.Name</th> 7 </tr> 8 </thead> 9 <tbody> 10 @for (int i = 0; i < Model.Value.Length; i++) { 11 <tr> 12 @if (Model.RowNames.Length > i) { 13 <th scope="row">@Model.RowNames[i]</th> 14 } 15 @for (int j = 0; j < Model.Value[i].Length; j++) { 16 <td> 17 @Model.Value[i][j] 18 </td> 19 } 20 </tr> 21 } 22 </tbody> 16 23 </table> -
branches/OaaS/HeuristicLab.Services.Optimization.Web/Views/Shared/DisplayTemplates/InputParameters.cshtml
r8506 r9062 2 2 3 3 @foreach (var itm in Model.Items) { 4 <div class="editor-label ">4 <div class="editor-label param-input"> 5 5 @Html.Label(itm.Value.Name, itm.Value.Name) 6 6 </div> -
branches/OaaS/HeuristicLab.Services.Optimization.Web/Views/Shared/EditorTemplates/DecimalMatrix.cshtml
r8817 r9062 1 1 @model HeuristicLab.Services.Optimization.ControllerService.Model.DecimalMatrix 2 2 3 <table> 4 <tr> 5 <th>@Model.Name</th> 6 </tr> 3 <table class="editableTable"> 4 <thead> 5 <tr> 6 @for (int i = 0; i < Model.Value[0].Length; i++) { 7 <th>@Model.Name Column @i</th> 8 } 9 <th>Delete</th> 10 <th>Add</th> 11 </tr> 12 </thead> 13 <tbody> 7 14 @for (int i = 0; i < Model.Value.Length; i++) { 8 <tr >15 <tr id="@i"> 9 16 @for (int j = 0; j < Model.Value[i].Length; j++) { 10 17 <td> … … 12 19 </td> 13 20 } 14 </tr> 21 <td><a class="delete-row" href="#">Delete</a></td> 22 <td><input type="submit" name="AddRow" value="Add Row"/></td> 23 </tr> 15 24 } 25 </tbody> 16 26 </table> -
branches/OaaS/HeuristicLab.Services.Optimization.Web/Views/Shared/EditorTemplates/DecimalVector.cshtml
r8506 r9062 2 2 3 3 <table> 4 <thead> 4 5 <tr> 5 6 <th>@Model.Name</th> 6 7 </tr> 8 </thead> 9 <tbody> 7 10 @for (int i = 0; i < Model.Value.Length; i++) { 8 11 <tr> … … 12 15 </tr> 13 16 } 17 </tbody> 14 18 </table> -
branches/OaaS/HeuristicLab.Services.Optimization.Web/Views/Shared/_Layout.cshtml
r8958 r9062 4 4 <meta charset="utf-8" /> 5 5 <title>@ViewBag.Title</title> 6 <link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" /> 7 <script src="@Url.Content("~/Scripts/jquery-1.5.1.min.js")" type="text/javascript"></script> 6 <link href="@Url.Content("~/Content/hl/Site.css")" rel="stylesheet" type="text/css" /> 7 <link href="@Url.Content("~/Content/datatable/css/jquery.dataTables.css")" rel="stylesheet" type="text/css" /> 8 <link href="@Url.Content("~/Content/ui-lightness/jquery-ui-1.9.2.min.css")" rel="stylesheet" type="text/css" /> 9 <link href="@Url.Content("~/Content/jqplot/src/jquery.jqplot.css")" rel="stylesheet" type="text/css" /> 10 11 <script src="@Url.Content("~/Scripts/jquery-1.8.3.min.js")" type="text/javascript"></script> 12 <script src="@Url.Content("~/Scripts/jquery.dataTables.min.js")" type="text/javascript"></script> 13 <script src="@Url.Content("~/Scripts/jquery-ui-1.9.2.min.js")" type="text/javascript"></script> 8 14 <script src="@Url.Content("~/Scripts/modernizr-1.7.min.js")" type="text/javascript"></script> 15 <script src="@Url.Content("~/Content/Styling.js")" type="text/javascript"></script> 16 17 <!--[if lt IE 9]><script language="javascript" type="text/javascript" src="/Content/jqplot/src/excanvas.js"></script><![endif]--> 18 <script src="@Url.Content("~/Content/jqplot/src/jquery.jqplot.js")" type="text/javascript"></script> 19 <script src="@Url.Content("~/Content/jqplot/src/plugins/jqplot.canvasTextRenderer.js")" type="text/javascript"></script> 20 <script src="@Url.Content("~/Content/jqplot/src/plugins/jqplot.canvasAxisLabelRenderer.js")" type="text/javascript"></script> 21 <script type="text/javascript" src="@Url.Content("~/Content/jqplot/src/plugins/jqplot.barRenderer.js")"></script> 22 <script type="text/javascript" src="@Url.Content("~/Content/jqplot/src/plugins/jqplot.categoryAxisRenderer.js")"></script> 23 <script type="text/javascript" src="@Url.Content("~/Content/jqplot/src/plugins/jqplot.pointLabels.js")"></script> 24 <script type="text/javascript" src="@Url.Content("~/Content/jqplot/src/plugins/jqplot.pieRenderer.js")"></script> 25 <script type="text/javascript" src="@Url.Content("~/Content/jqplot/src/plugins/jqplot.donutRenderer.js")"></script> 26 <script type="text/javascript" src="@Url.Content("~/Content/jqplot/src/plugins/jqplot.cursor.js")"></script> 9 27 </head> 10 28 <body> 11 <div class="page"> 12 <header> 13 <div id="title"> 14 <h1>Optimization-as-a-Service</h1> 15 </div> 16 <div id="logindisplay"> 29 <div id="master-page"> 30 31 <div id="master-header"> 32 <div class="logo"> 33 <a href="/">Optimization-as-a-Service</a> 34 </div> 35 <div class="login"> 17 36 @Html.Partial("_LogOnPartial") 18 37 </div> 19 <nav> 20 <ul id="menu"> 21 <li>@Html.ActionLink("Admin", "Index", "Admin")</li> 22 <li>@Html.ActionLink("Home", "Index", "Home")</li> 23 <li>@Html.ActionLink("About", "About", "Home")</li> 24 </ul> 25 </nav> 26 </header> 27 <section id="main"> 28 @RenderBody() 29 </section> 30 <footer> 31 </footer> 38 </div> 39 <div id="master-mainmenu"> 40 <ul id="menu"> 41 <li>@Html.ActionLink("Admin", "Index", "Admin")</li> 42 <li>@Html.ActionLink("Home", "Index", "Home")</li> 43 <li>@Html.ActionLink("About", "About", "Home")</li> 44 </ul> 45 </div> 46 47 <div id="master-main"> 48 <div id="master-submenu"/> 49 <div id="master-MainContent"> 50 @RenderBody() 51 </div> 52 </div> 53 <div id="master-footer"> 54 <div class="logo"> 55 <a title="Visit the HeuristicLab website" href="http://www.heuristiclab.com/" target="_blank"> 56 <img alt="HeuristicLab" src="/Content/hl/images/hl-logo.png" /> 57 </a> 58 </div> 59 </div> 60 <!--footer> 61 </footer--> 32 62 </div> 33 63 </body> -
branches/OaaS/HeuristicLab.Services.Optimization.Web/Views/Shared/_LogOnPartial.cshtml
r8384 r9062 1 1 @if(Request.IsAuthenticated) { 2 2 <text>Welcome <strong>@User.Identity.Name</strong>! 3 [ @Html.ActionLink("Log Off", "LogOff", "Account") ]</text>3 @Html.ActionLink("Log Off", "LogOff", "Account")</text> 4 4 } 5 5 else { 6 @ :[ @Html.ActionLink("Log On", "LogOn", "Account") ]6 @Html.ActionLink("Log On", "LogOn", "Account") 7 7 }
Note: See TracChangeset
for help on using the changeset viewer.