Free cookie consent management tool by TermsFeed Policy Generator

Changeset 9062


Ignore:
Timestamp:
12/17/12 09:37:16 (12 years ago)
Author:
fschoepp
Message:

#1888:
Backend changes:

  • Simplified job state detection (only one hive call will be made to detect all states now, instead of one additional call per job)
  • Reorganized classes (moved model classes into Model folder)

Website changes:

  • Website now heavily uses JavaScript to achieve better user experience
  • JavaScript degrades gracefully, except for plots
  • Tables: Added jquery-datatable-plugin to extend tables (pagination + search functionality)
  • OaaS-Website now uses the design of the HL websites (found in WebApplication branch)
  • Added jqplot to render zoomable line plots for HL-Datatables
  • Styling.js: Plots will be generated by using an ajax call; additional jquery-styling occurs within this file.
  • Added jquery-ui-1.9.2 which is capable of handling/rendering tabs, accordions and resizers.
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  
    1919using Microsoft.WindowsAzure.StorageClient;
    2020using HeuristicLab.Services.Optimization.ControllerService.Azure;
     21using System.Data;
    2122
    2223namespace HeuristicLab.Services.Optimization.ControllerService {
     
    112113          var mapper = CompileMapper(mapperString);
    113114
    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;
    158117        } // lock       
    159118       } // if
     
    202161      var waitingJobs = job.JobCount - job.CalculatingCount - job.FinishedCount;
    203162      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));
    205170     
    206171      foreach (var task in jobTasks) {       
     
    220185          state = JobState.Waiting;
    221186        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 };
    225190    }
    226191
     
    286251
    287252    //TODO: We might need images / +++
     253   
    288254    private Parameter MapHiveDataType(string name, IItem item) {
    289255      Parameter result = new Parameter();
    290256      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
    291262      if (item is IStringConvertibleValue) {
    292263        var value = (item as IStringConvertibleValue).GetValue();
     
    297268        var value2 = (item as IStringConvertibleValueTuple).Item2.GetValue();
    298269        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 };
    299289      }
    300290      else if (item is IStringConvertibleArray) {
     
    303293        if (array.Length == 0) {
    304294          sb.Append("[ ]");
    305         } else {
     295        }
     296        else {
    306297          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(", ");
    309300          }
    310301          sb.Append(array.GetValue(array.Length - 1));
     
    314305        result.Value = new HeuristicLab.Services.Optimization.ControllerService.Model.StringValue() { Name = name, Value = value };
    315306      }
     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      }
    316321      else if (item is IStringConvertibleMatrix) {
    317322        StringBuilder sb = new StringBuilder();
    318323        var matrix = item as IStringConvertibleMatrix;
     324
    319325        if (matrix.Rows == 0 || matrix.Columns == 0) {
    320326          sb.Append("[ ]");
    321327        }
    322328        else {
     329
    323330          sb.Append("[ ");
    324331          for (int r = 0; r < matrix.Rows; r++) {
    325332            sb.Append("( ");
    326333            for (int c = 0; c < matrix.Columns - 1; c++) {
     334              matrix.GetValue(r, c);
    327335              sb.Append(matrix.GetValue(r, c)).Append(", ");
    328336            }
  • branches/OaaS/HeuristicLab.Services.Optimization.Controller/HeuristicLab.Services.Optimization.ControllerService.csproj

    r8958 r9062  
    3838    <Reference Include="HeuristicLab.Algorithms.GeneticAlgorithm-3.3">
    3939      <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>
    4044    </Reference>
    4145    <Reference Include="HeuristicLab.Clients.Hive-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
     
    156160    <Compile Include="Interfaces\DAL.cs" />
    157161    <Compile Include="Interfaces\IScenarioManager.cs" />
    158     <Compile Include="Model\ControllerModel.cs" />
     162    <Compile Include="Interfaces\Model\ControllerModel.cs" />
    159163    <Compile Include="PlaceholderControllerService.cs" />
    160164    <Compile Include="Properties\AssemblyInfo.cs" />
     
    165169    <WCFMetadata Include="Service References\" />
    166170  </ItemGroup>
    167   <ItemGroup />
     171  <ItemGroup>
     172    <None Include="packages.config" />
     173  </ItemGroup>
    168174  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
    169175  <PropertyGroup>
  • branches/OaaS/HeuristicLab.Services.Optimization.Web/Content/Site.css

    r8384 r9062  
    200200}
    201201
     202input[type="text"]
     203{
     204    width: 200px;
     205}
     206
    202207select {
    203208    border: 1px solid #ccc;
     
    323328    width: 6em;
    324329}
     330
     331div.scroll
     332{
     333    height: 400px;
     334    width: 400px;
     335    overflow: auto;
     336}
  • branches/OaaS/HeuristicLab.Services.Optimization.Web/Controllers/OptimizationController.cs

    r8545 r9062  
    2222
    2323      public T withControllerService<T>(ControllerServiceDelegate<T> del) {
     24        if (Session["pw"] == null)
     25          Response.Redirect("/Account/Logon");
     26
    2427        using (var cf = new ChannelFactory<IControllerService>(OptimizationController.DEFAULT_CONTROLLER_ENDPOINT)) {
    2528          var credentialBehaviour = cf.Endpoint.Behaviors.Find<ClientCredentials>();
     
    3235
    3336      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)) {         
    3541          var credentialBehaviour = cf.Endpoint.Behaviors.Find<ClientCredentials>();
    3642          credentialBehaviour.UserName.UserName = Membership.GetUser().UserName;
    37           credentialBehaviour.UserName.Password = Session["pw"] as string;
     43          credentialBehaviour.UserName.Password = Session["pw"] as string;         
    3844          var controllerProxy = cf.CreateChannel();
    3945          del(controllerProxy);
     
    7379          });
    7480          JobDetailsModel jdm = new JobDetailsModel() { Job = job, Runs = runs };
     81          Session["jobDetails"] = jdm;
    7582          return View(jdm);
    7683        }
  • branches/OaaS/HeuristicLab.Services.Optimization.Web/HeuristicLab.Services.Optimization.Web.csproj

    r8958 r9062  
    5555    <Reference Include="System.Runtime.Serialization" />
    5656    <Reference Include="System.ServiceModel" />
     57    <Reference Include="System.Web.DataVisualization" />
    5758    <Reference Include="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
    5859      <Private>True</Private>
     
    9899    <Compile Include="Controllers\AccountController.cs" />
    99100    <Compile Include="Controllers\AdminController.cs" />
     101    <Compile Include="Controllers\ChartController.cs" />
    100102    <Compile Include="Controllers\HomeController.cs" />
    101103    <Compile Include="Controllers\OptimizationController.cs" />
     
    105107    <Compile Include="Models\AccountModels.cs" />
    106108    <Compile Include="Models\AdminModels.cs" />
     109    <Compile Include="Models\ChartModels.cs" />
    107110    <Compile Include="Models\OptimizationModels.cs" />
    108111    <Compile Include="Properties\AssemblyInfo.cs" />
     
    110113  </ItemGroup>
    111114  <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" />
    112216    <Content Include="Content\themes\base\images\ui-bg_flat_0_aaaaaa_40x100.png" />
    113217    <Content Include="Content\themes\base\images\ui-bg_flat_75_ffffff_40x100.png" />
     
    137241    <Content Include="Content\themes\base\jquery.ui.tabs.css" />
    138242    <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" />
    139259    <Content Include="Global.asax" />
    140260    <Content Include="ControllerService.svc" />
     
    145265    <Content Include="Scripts\jquery-ui-1.8.11.js" />
    146266    <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" />
    147269    <Content Include="Scripts\jquery.validate-vsdoc.js" />
    148270    <Content Include="Scripts\jquery.validate.js" />
     
    255377  </ItemGroup>
    256378  <ItemGroup>
     379    <None Include="Content\datatable\images\Sorting icons.psd" />
     380    <None Include="Content\jqplot\src\jsl.conf" />
    257381    <None Include="Mappings\mapping.py" />
    258382    <None Include="Mappings\scenario.xsd">
     
    260384    </None>
    261385    <Content Include="Views\Admin\Index.cshtml" />
     386    <Content Include="Views\Chart\GenerateChart.cshtml" />
     387    <Content Include="Views\Optimization\Copy of JobDetails.cshtml" />
    262388  </ItemGroup>
    263389  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
  • branches/OaaS/HeuristicLab.Services.Optimization.Web/Models/OptimizationModels.cs

    r8545 r9062  
    4242        }
    4343        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)) {
    4545          bindingContext.ModelState.AddModelError(bindingContext.ModelName, new Exception(string.Format("Unable to parse {0} into destination type {1}", value, param.Type)));
    4646        }
     
    5656        var value = bindingContext.ValueProvider.GetValue(key);
    5757        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)) {
    5959          bindingContext.ModelState.AddModelError(bindingContext.ModelName, new Exception(string.Format("Unable to parse {0} into destination type {1}", value, param.Type)));
    6060        }
  • branches/OaaS/HeuristicLab.Services.Optimization.Web/Views/Account/LogOn.cshtml

    r8384 r9062  
    1515@Html.ValidationSummary(true, "Login was unsuccessful. Please correct the errors and try again.")
    1616
    17 @using (Html.BeginForm()) {
    18     <div>
     17@using (Html.BeginForm("LogOn", "Account", FormMethod.Post, new { @class = "hl-signon-form" })) {
    1918        <fieldset>
    2019            <legend>Account Information</legend>
     
    4544            </p>
    4645        </fieldset>
    47     </div>
    4846}
  • branches/OaaS/HeuristicLab.Services.Optimization.Web/Views/Optimization/Index.cshtml

    r8545 r9062  
    66
    77<h2>Your jobs:</h2>
    8 <table>
     8<table class="viewableTable">
    99  <thead>
    1010    <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>   
    1415    </tr>
    1516  </thead>
     
    1819        <tr>
    1920            <td>@Html.ActionLink(itm.Name, "JobDetails", new { jobId = itm.Id })</td>
     21            <td>@itm.DateCreated</td>
    2022            <td>@itm.Resource</td>
    2123            <td>@itm.State</td>           
     
    2426  </tbody>
    2527</table>
     28<div class="spacer"></div>
    2629
    27 <h2>Choose your scenario</h2>
     30<h2>Choose your scenario:</h2>
    2831
    2932<ul>
  • branches/OaaS/HeuristicLab.Services.Optimization.Web/Views/Optimization/JobDetails.cshtml

    r8545 r9062  
    2828
    2929<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];
    3132    <p>@run.Name:</p>
    3233    <table>
     
    3839      </thead>
    3940      <tbody>
    40       @foreach (var result in run.Results) {
     41      @for (var i = 0; i < run.Results.Count; i++) {
     42        var result = run.Results[i];     
    4143        <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 + "&parameterName=" + result.Value.Name + "&chartType=Line")">Chart @result.Value.Name</a-->                           
     56                            <!--img alt="Chart" src="@Url.Content("~/Chart/GenerateChart?index=" + j + "&parameterName=" + 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          }
    4471       </tr>
    4572      }
  • branches/OaaS/HeuristicLab.Services.Optimization.Web/Views/Shared/DisplayTemplates/DecimalMatrix.cshtml

    r8817 r9062  
    11@model HeuristicLab.Services.Optimization.ControllerService.Model.DecimalMatrix
    22
    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>
    1623</table>
  • branches/OaaS/HeuristicLab.Services.Optimization.Web/Views/Shared/DisplayTemplates/InputParameters.cshtml

    r8506 r9062  
    22
    33@foreach (var itm in Model.Items) {
    4     <div class="editor-label">
     4    <div class="editor-label param-input">
    55        @Html.Label(itm.Value.Name, itm.Value.Name)
    66    </div>
  • branches/OaaS/HeuristicLab.Services.Optimization.Web/Views/Shared/EditorTemplates/DecimalMatrix.cshtml

    r8817 r9062  
    11@model HeuristicLab.Services.Optimization.ControllerService.Model.DecimalMatrix
    22
    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>
    714  @for (int i = 0; i < Model.Value.Length; i++) {
    8   <tr>
     15  <tr id="@i">
    916    @for (int j = 0; j < Model.Value[i].Length; j++) {                     
    1017    <td>
     
    1219    </td>
    1320    }
    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> 
    1524  }
     25  </tbody>
    1626</table>
  • branches/OaaS/HeuristicLab.Services.Optimization.Web/Views/Shared/EditorTemplates/DecimalVector.cshtml

    r8506 r9062  
    22 
    33<table>
     4<thead>
    45  <tr>
    56    <th>@Model.Name</th>
    67  </tr>
     8  </thead>
     9  <tbody>
    710  @for (int i = 0; i < Model.Value.Length; i++) {
    811  <tr>
     
    1215  </tr>
    1316  }
     17  </tbody>
    1418</table>
  • branches/OaaS/HeuristicLab.Services.Optimization.Web/Views/Shared/_Layout.cshtml

    r8958 r9062  
    44    <meta charset="utf-8" />
    55    <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>
    814    <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>
    927</head>
    1028<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">
    1736                @Html.Partial("_LogOnPartial")
    1837            </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-->
    3262    </div>
    3363</body>
  • branches/OaaS/HeuristicLab.Services.Optimization.Web/Views/Shared/_LogOnPartial.cshtml

    r8384 r9062  
    11@if(Request.IsAuthenticated) {
    22    <text>Welcome <strong>@User.Identity.Name</strong>!
    3     [ @Html.ActionLink("Log Off", "LogOff", "Account") ]</text>
     3    @Html.ActionLink("Log Off", "LogOff", "Account")</text>
    44}
    55else {
    6     @:[ @Html.ActionLink("Log On", "LogOn", "Account") ]
     6    @Html.ActionLink("Log On", "LogOn", "Account")
    77}
Note: See TracChangeset for help on using the changeset viewer.