Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/28/12 10:02:01 (12 years ago)
Author:
fschoepp
Message:

#1888:

  • Added a administrator web interface for job management
  • Fixed Hive Client (PluginValidator) to find the assemblies within the right directories
  • Reorganized controller classes (Folders HL, Interfaces, Azure)
  • You may now successfully schedule and run jobs with the web ui.
Location:
branches/OaaS/HeuristicLab.Services.Optimization.Controller
Files:
9 added
5 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • branches/OaaS/HeuristicLab.Services.Optimization.Controller/HeuristicLab.Services.Optimization.ControllerService.csproj

    r8817 r8958  
    130130      <HintPath>..\bin\HeuristicLab.Tracing-3.3.dll</HintPath>
    131131    </Reference>
     132    <Reference Include="Microsoft.WindowsAzure.CloudDrive, Version=1.7.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
     133    <Reference Include="Microsoft.WindowsAzure.Configuration, Version=1.7.0.0, Culture=neutral, processorArchitecture=MSIL" />
     134    <Reference Include="Microsoft.WindowsAzure.Diagnostics, Version=1.7.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
     135    <Reference Include="Microsoft.WindowsAzure.ServiceRuntime, Version=1.7.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
     136    <Reference Include="Microsoft.WindowsAzure.StorageClient, Version=1.7.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
    132137    <Reference Include="System" />
    133138    <Reference Include="System.configuration" />
    134139    <Reference Include="System.Core" />
     140    <Reference Include="System.Data.Services.Client" />
    135141    <Reference Include="System.Runtime.Serialization" />
    136142    <Reference Include="System.ServiceModel" />
     
    142148  </ItemGroup>
    143149  <ItemGroup>
    144     <Compile Include="HiveScenarioManagerOld.cs" />
    145     <Compile Include="HiveMapper.cs" />
    146     <Compile Include="HiveScenarioManager.cs" />
    147     <Compile Include="HLMapper.cs" />
     150    <Compile Include="Azure\DAL.cs" />
     151    <Compile Include="HL\HiveScenarioManagerOld.cs" />
     152    <Compile Include="HL\HiveMapper.cs" />
     153    <Compile Include="HL\HiveScenarioManager.cs" />
     154    <Compile Include="HL\HLMapper.cs" />
    148155    <Compile Include="Interfaces\IControllerService.cs" />
     156    <Compile Include="Interfaces\DAL.cs" />
    149157    <Compile Include="Interfaces\IScenarioManager.cs" />
    150158    <Compile Include="Model\ControllerModel.cs" />
    151159    <Compile Include="PlaceholderControllerService.cs" />
    152160    <Compile Include="Properties\AssemblyInfo.cs" />
    153     <Compile Include="ScenarioParser.cs" />
     161    <Compile Include="HL\ScenarioParser.cs" />
    154162    <Compile Include="Utility.cs" />
    155163  </ItemGroup>
     
    157165    <WCFMetadata Include="Service References\" />
    158166  </ItemGroup>
     167  <ItemGroup />
    159168  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
    160169  <PropertyGroup>
  • branches/OaaS/HeuristicLab.Services.Optimization.Controller/Interfaces/IControllerService.cs

    r8545 r8958  
    1212    [OperationContract]
    1313    IEnumerable<OptimizationScenario> GetOptimizationScenarios();
     14
     15    [OperationContract]
     16    IEnumerable<string> GetOptimizationScenarioNames();
    1417
    1518    [OperationContract]
     
    3033    [OperationContract]
    3134    IList<Model.Run> GetJobResults(User user, string id);
     35
     36    [OperationContract]
     37    bool AddHiveScenario(User user, string scenarioXml, string scenarioMapper);
     38
     39    [OperationContract]
     40    bool DeleteHiveScenario(User user, string scenarioName);
    3241  }
    3342}
  • branches/OaaS/HeuristicLab.Services.Optimization.Controller/Interfaces/IScenarioManager.cs

    r8545 r8958  
    1212    void DeleteJob(User user, string id);
    1313    IList<Model.Run> GetJobResults(User user, string id);
     14    bool AddScenario(User user, string scenarioName, string scenarioXml, string scenarioMapper);
     15    bool DeleteScenario(User user, string scenarioName);
    1416  }
    1517}
  • branches/OaaS/HeuristicLab.Services.Optimization.Controller/PlaceholderControllerService.cs

    r8817 r8958  
    6262
    6363    public Model.OptimizationScenario GetOptimizationScenarioByName(string name) {
    64       if (scenarios[0].Name == name)
    65         return scenarios[0];
    66       return null;
     64      var scen = (from e in scenarios
     65                  where e.Name == name
     66                  select e).FirstOrDefault();     
     67      return scen;
    6768    }
    6869
     
    8990      return hiveManager.GetJobResults(user, id);
    9091    }
     92
     93
     94    public bool AddHiveScenario(User user, string scenarioXml, string scenarioMapper) {
     95      var scenario = parser.ParseScenarioFromXml(scenarioXml);
     96      if (scenario == null) {
     97        return false;
     98      }     
     99      var added = hiveManager.AddScenario(user, scenario.Name, scenarioXml, scenarioMapper);
     100      if (added)
     101        scenarios.Add(scenario);
     102      return added;
     103    }
     104
     105    public bool DeleteHiveScenario(User user, string scenarioName) {
     106      var scen = GetOptimizationScenarioByName(scenarioName);
     107      if (scen != null) {
     108        scenarios.Remove(scen);
     109        return hiveManager.DeleteScenario(user, scenarioName);
     110      }
     111      return false;
     112    }
     113
     114    public IEnumerable<string> GetOptimizationScenarioNames() {
     115      return (from e in scenarios
     116              select e.Name).AsEnumerable();     
     117    }
    91118  }
    92119}
Note: See TracChangeset for help on using the changeset viewer.