Changeset 8545


Ignore:
Timestamp:
08/30/12 16:09:34 (7 years ago)
Author:
fschoepp
Message:

#1888:

  • Controller is now capable of gathering Hive Jobs
  • Hive Jobs will be mapped to independent Job-Class (shared between Controller and Frontend)
  • HiveScenarioManager is capable of gathering Hive Jobs + their results
  • Job Results will be mapped to string properties
  • Frontend renders all Results after opening the job details
  • Misc: Frontend now passes User-object to Controller so that it is able to connect to the Hive Service (hardcoded values removed)
Location:
branches/OaaS
Files:
5 added
17 edited

Legend:

Unmodified
Added
Removed
  • branches/OaaS/HeuristicLab 3.3 Services.sln

    r8506 r8545  
    3939    Release.AspNetCompiler.FixedNames = "false"
    4040    Release.AspNetCompiler.Debug = "False"
    41     VWDPort = "1512"
     41    VWDPort = "48545"
    4242    VWDVirtualPath = "/Hive-3.3"
    4343    DefaultWebSiteLanguage = "Visual C#"
     
    6565EndProject
    6666Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Services.Optimization.ControllerService", "HeuristicLab.Services.Optimization.Controller\HeuristicLab.Services.Optimization.ControllerService.csproj", "{E0095F29-604B-4EE8-9EE8-8187DA3B24F1}"
     67EndProject
     68Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Services.Optimization.ControllerService.Tests", "HeuristicLab.Services.Optimization.ControllerService.Tests\HeuristicLab.Services.Optimization.ControllerService.Tests.csproj", "{D6DD768C-707C-415A-B9F8-C1F7668F8560}"
    6769EndProject
    6870Global
     
    7274  GlobalSection(SolutionConfigurationPlatforms) = preSolution
    7375    Debug|Any CPU = Debug|Any CPU
     76    Debug|Mixed Platforms = Debug|Mixed Platforms
    7477    Debug|x64 = Debug|x64
    7578    Debug|x86 = Debug|x86
    7679    Release|Any CPU = Release|Any CPU
     80    Release|Mixed Platforms = Release|Mixed Platforms
    7781    Release|x64 = Release|x64
    7882    Release|x86 = Release|x86
     
    8185    {30D8C5F1-CD3A-4EC1-907F-430177A03FBE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
    8286    {30D8C5F1-CD3A-4EC1-907F-430177A03FBE}.Debug|Any CPU.Build.0 = Debug|Any CPU
     87    {30D8C5F1-CD3A-4EC1-907F-430177A03FBE}.Debug|Mixed Platforms.ActiveCfg = Debug|x64
     88    {30D8C5F1-CD3A-4EC1-907F-430177A03FBE}.Debug|Mixed Platforms.Build.0 = Debug|x64
    8389    {30D8C5F1-CD3A-4EC1-907F-430177A03FBE}.Debug|x64.ActiveCfg = Debug|x64
    8490    {30D8C5F1-CD3A-4EC1-907F-430177A03FBE}.Debug|x64.Build.0 = Debug|x64
     
    8793    {30D8C5F1-CD3A-4EC1-907F-430177A03FBE}.Release|Any CPU.ActiveCfg = Release|Any CPU
    8894    {30D8C5F1-CD3A-4EC1-907F-430177A03FBE}.Release|Any CPU.Build.0 = Release|Any CPU
     95    {30D8C5F1-CD3A-4EC1-907F-430177A03FBE}.Release|Mixed Platforms.ActiveCfg = Release|x64
     96    {30D8C5F1-CD3A-4EC1-907F-430177A03FBE}.Release|Mixed Platforms.Build.0 = Release|x64
    8997    {30D8C5F1-CD3A-4EC1-907F-430177A03FBE}.Release|x64.ActiveCfg = Release|x64
    9098    {30D8C5F1-CD3A-4EC1-907F-430177A03FBE}.Release|x64.Build.0 = Release|x64
     
    93101    {EBEBA863-DD05-4331-BE25-5758B15F7407}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
    94102    {EBEBA863-DD05-4331-BE25-5758B15F7407}.Debug|Any CPU.Build.0 = Debug|Any CPU
     103    {EBEBA863-DD05-4331-BE25-5758B15F7407}.Debug|Mixed Platforms.ActiveCfg = Debug|x64
     104    {EBEBA863-DD05-4331-BE25-5758B15F7407}.Debug|Mixed Platforms.Build.0 = Debug|x64
    95105    {EBEBA863-DD05-4331-BE25-5758B15F7407}.Debug|x64.ActiveCfg = Debug|x64
    96106    {EBEBA863-DD05-4331-BE25-5758B15F7407}.Debug|x64.Build.0 = Debug|x64
     
    99109    {EBEBA863-DD05-4331-BE25-5758B15F7407}.Release|Any CPU.ActiveCfg = Release|Any CPU
    100110    {EBEBA863-DD05-4331-BE25-5758B15F7407}.Release|Any CPU.Build.0 = Release|Any CPU
     111    {EBEBA863-DD05-4331-BE25-5758B15F7407}.Release|Mixed Platforms.ActiveCfg = Release|x64
     112    {EBEBA863-DD05-4331-BE25-5758B15F7407}.Release|Mixed Platforms.Build.0 = Release|x64
    101113    {EBEBA863-DD05-4331-BE25-5758B15F7407}.Release|x64.ActiveCfg = Release|x64
    102114    {EBEBA863-DD05-4331-BE25-5758B15F7407}.Release|x64.Build.0 = Release|x64
     
    105117    {421D9CCA-5A48-4813-AB9C-ED7025F9CC35}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
    106118    {421D9CCA-5A48-4813-AB9C-ED7025F9CC35}.Debug|Any CPU.Build.0 = Debug|Any CPU
     119    {421D9CCA-5A48-4813-AB9C-ED7025F9CC35}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
     120    {421D9CCA-5A48-4813-AB9C-ED7025F9CC35}.Debug|Mixed Platforms.Build.0 = Debug|x86
    107121    {421D9CCA-5A48-4813-AB9C-ED7025F9CC35}.Debug|x64.ActiveCfg = Debug|x64
    108122    {421D9CCA-5A48-4813-AB9C-ED7025F9CC35}.Debug|x64.Build.0 = Debug|x64
     
    111125    {421D9CCA-5A48-4813-AB9C-ED7025F9CC35}.Release|Any CPU.ActiveCfg = Release|Any CPU
    112126    {421D9CCA-5A48-4813-AB9C-ED7025F9CC35}.Release|Any CPU.Build.0 = Release|Any CPU
     127    {421D9CCA-5A48-4813-AB9C-ED7025F9CC35}.Release|Mixed Platforms.ActiveCfg = Release|x86
     128    {421D9CCA-5A48-4813-AB9C-ED7025F9CC35}.Release|Mixed Platforms.Build.0 = Release|x86
    113129    {421D9CCA-5A48-4813-AB9C-ED7025F9CC35}.Release|x64.ActiveCfg = Release|x64
    114130    {421D9CCA-5A48-4813-AB9C-ED7025F9CC35}.Release|x64.Build.0 = Release|x64
     
    117133    {EC2C8109-6E1E-4C88-9A2B-908CFF2EF4AC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
    118134    {EC2C8109-6E1E-4C88-9A2B-908CFF2EF4AC}.Debug|Any CPU.Build.0 = Debug|Any CPU
     135    {EC2C8109-6E1E-4C88-9A2B-908CFF2EF4AC}.Debug|Mixed Platforms.ActiveCfg = Debug|x64
     136    {EC2C8109-6E1E-4C88-9A2B-908CFF2EF4AC}.Debug|Mixed Platforms.Build.0 = Debug|x64
    119137    {EC2C8109-6E1E-4C88-9A2B-908CFF2EF4AC}.Debug|x64.ActiveCfg = Debug|x64
    120138    {EC2C8109-6E1E-4C88-9A2B-908CFF2EF4AC}.Debug|x64.Build.0 = Debug|x64
     
    123141    {EC2C8109-6E1E-4C88-9A2B-908CFF2EF4AC}.Release|Any CPU.ActiveCfg = Release|Any CPU
    124142    {EC2C8109-6E1E-4C88-9A2B-908CFF2EF4AC}.Release|Any CPU.Build.0 = Release|Any CPU
     143    {EC2C8109-6E1E-4C88-9A2B-908CFF2EF4AC}.Release|Mixed Platforms.ActiveCfg = Release|x64
     144    {EC2C8109-6E1E-4C88-9A2B-908CFF2EF4AC}.Release|Mixed Platforms.Build.0 = Release|x64
    125145    {EC2C8109-6E1E-4C88-9A2B-908CFF2EF4AC}.Release|x64.ActiveCfg = Release|x64
    126146    {EC2C8109-6E1E-4C88-9A2B-908CFF2EF4AC}.Release|x64.Build.0 = Release|x64
     
    129149    {CF9DA321-AC1B-4FD3-9EC3-67BC6B861BDE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
    130150    {CF9DA321-AC1B-4FD3-9EC3-67BC6B861BDE}.Debug|Any CPU.Build.0 = Debug|Any CPU
     151    {CF9DA321-AC1B-4FD3-9EC3-67BC6B861BDE}.Debug|Mixed Platforms.ActiveCfg = Debug|x64
     152    {CF9DA321-AC1B-4FD3-9EC3-67BC6B861BDE}.Debug|Mixed Platforms.Build.0 = Debug|x64
    131153    {CF9DA321-AC1B-4FD3-9EC3-67BC6B861BDE}.Debug|x64.ActiveCfg = Debug|x64
    132154    {CF9DA321-AC1B-4FD3-9EC3-67BC6B861BDE}.Debug|x64.Build.0 = Debug|x64
     
    135157    {CF9DA321-AC1B-4FD3-9EC3-67BC6B861BDE}.Release|Any CPU.ActiveCfg = Release|Any CPU
    136158    {CF9DA321-AC1B-4FD3-9EC3-67BC6B861BDE}.Release|Any CPU.Build.0 = Release|Any CPU
     159    {CF9DA321-AC1B-4FD3-9EC3-67BC6B861BDE}.Release|Mixed Platforms.ActiveCfg = Release|x64
     160    {CF9DA321-AC1B-4FD3-9EC3-67BC6B861BDE}.Release|Mixed Platforms.Build.0 = Release|x64
    137161    {CF9DA321-AC1B-4FD3-9EC3-67BC6B861BDE}.Release|x64.ActiveCfg = Release|x64
    138162    {CF9DA321-AC1B-4FD3-9EC3-67BC6B861BDE}.Release|x64.Build.0 = Release|x64
     
    141165    {0CA6706D-A569-45DE-A85C-4158891CC1BC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
    142166    {0CA6706D-A569-45DE-A85C-4158891CC1BC}.Debug|Any CPU.Build.0 = Debug|Any CPU
     167    {0CA6706D-A569-45DE-A85C-4158891CC1BC}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
     168    {0CA6706D-A569-45DE-A85C-4158891CC1BC}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
    143169    {0CA6706D-A569-45DE-A85C-4158891CC1BC}.Debug|x64.ActiveCfg = Debug|Any CPU
    144170    {0CA6706D-A569-45DE-A85C-4158891CC1BC}.Debug|x86.ActiveCfg = Debug|Any CPU
    145171    {0CA6706D-A569-45DE-A85C-4158891CC1BC}.Release|Any CPU.ActiveCfg = Debug|Any CPU
     172    {0CA6706D-A569-45DE-A85C-4158891CC1BC}.Release|Mixed Platforms.ActiveCfg = Debug|Any CPU
     173    {0CA6706D-A569-45DE-A85C-4158891CC1BC}.Release|Mixed Platforms.Build.0 = Debug|Any CPU
    146174    {0CA6706D-A569-45DE-A85C-4158891CC1BC}.Release|x64.ActiveCfg = Debug|Any CPU
    147175    {0CA6706D-A569-45DE-A85C-4158891CC1BC}.Release|x86.ActiveCfg = Debug|Any CPU
    148176    {F685556B-F6EB-4143-8E7E-662D00FDD299}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
    149177    {F685556B-F6EB-4143-8E7E-662D00FDD299}.Debug|Any CPU.Build.0 = Debug|Any CPU
     178    {F685556B-F6EB-4143-8E7E-662D00FDD299}.Debug|Mixed Platforms.ActiveCfg = Debug|x64
     179    {F685556B-F6EB-4143-8E7E-662D00FDD299}.Debug|Mixed Platforms.Build.0 = Debug|x64
    150180    {F685556B-F6EB-4143-8E7E-662D00FDD299}.Debug|x64.ActiveCfg = Debug|x64
    151181    {F685556B-F6EB-4143-8E7E-662D00FDD299}.Debug|x64.Build.0 = Debug|x64
     
    154184    {F685556B-F6EB-4143-8E7E-662D00FDD299}.Release|Any CPU.ActiveCfg = Release|Any CPU
    155185    {F685556B-F6EB-4143-8E7E-662D00FDD299}.Release|Any CPU.Build.0 = Release|Any CPU
     186    {F685556B-F6EB-4143-8E7E-662D00FDD299}.Release|Mixed Platforms.ActiveCfg = Release|x64
     187    {F685556B-F6EB-4143-8E7E-662D00FDD299}.Release|Mixed Platforms.Build.0 = Release|x64
    156188    {F685556B-F6EB-4143-8E7E-662D00FDD299}.Release|x64.ActiveCfg = Release|x64
    157189    {F685556B-F6EB-4143-8E7E-662D00FDD299}.Release|x64.Build.0 = Release|x64
     
    160192    {034C2EE4-E303-4E45-98AB-F0074EC83B81}.Debug|Any CPU.ActiveCfg = Debug
    161193    {034C2EE4-E303-4E45-98AB-F0074EC83B81}.Debug|Any CPU.Build.0 = Debug
     194    {034C2EE4-E303-4E45-98AB-F0074EC83B81}.Debug|Mixed Platforms.ActiveCfg = Debug
     195    {034C2EE4-E303-4E45-98AB-F0074EC83B81}.Debug|Mixed Platforms.Build.0 = Debug
    162196    {034C2EE4-E303-4E45-98AB-F0074EC83B81}.Debug|x64.ActiveCfg = Debug
    163197    {034C2EE4-E303-4E45-98AB-F0074EC83B81}.Debug|x64.Build.0 = Debug
     
    166200    {034C2EE4-E303-4E45-98AB-F0074EC83B81}.Release|Any CPU.ActiveCfg = Release
    167201    {034C2EE4-E303-4E45-98AB-F0074EC83B81}.Release|Any CPU.Build.0 = Release
     202    {034C2EE4-E303-4E45-98AB-F0074EC83B81}.Release|Mixed Platforms.ActiveCfg = Release
     203    {034C2EE4-E303-4E45-98AB-F0074EC83B81}.Release|Mixed Platforms.Build.0 = Release
    168204    {034C2EE4-E303-4E45-98AB-F0074EC83B81}.Release|x64.ActiveCfg = Release
    169205    {034C2EE4-E303-4E45-98AB-F0074EC83B81}.Release|x64.Build.0 = Release
     
    172208    {BE9B0229-9150-49A4-AEA6-BB58E055992F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
    173209    {BE9B0229-9150-49A4-AEA6-BB58E055992F}.Debug|Any CPU.Build.0 = Debug|Any CPU
     210    {BE9B0229-9150-49A4-AEA6-BB58E055992F}.Debug|Mixed Platforms.ActiveCfg = Debug|x64
     211    {BE9B0229-9150-49A4-AEA6-BB58E055992F}.Debug|Mixed Platforms.Build.0 = Debug|x64
    174212    {BE9B0229-9150-49A4-AEA6-BB58E055992F}.Debug|x64.ActiveCfg = Debug|x64
    175213    {BE9B0229-9150-49A4-AEA6-BB58E055992F}.Debug|x64.Build.0 = Debug|x64
     
    178216    {BE9B0229-9150-49A4-AEA6-BB58E055992F}.Release|Any CPU.ActiveCfg = Release|Any CPU
    179217    {BE9B0229-9150-49A4-AEA6-BB58E055992F}.Release|Any CPU.Build.0 = Release|Any CPU
     218    {BE9B0229-9150-49A4-AEA6-BB58E055992F}.Release|Mixed Platforms.ActiveCfg = Release|x64
     219    {BE9B0229-9150-49A4-AEA6-BB58E055992F}.Release|Mixed Platforms.Build.0 = Release|x64
    180220    {BE9B0229-9150-49A4-AEA6-BB58E055992F}.Release|x64.ActiveCfg = Release|x64
    181221    {BE9B0229-9150-49A4-AEA6-BB58E055992F}.Release|x64.Build.0 = Release|x64
     
    184224    {0F652437-998A-4EAB-8BF1-444B5FE8CE97}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
    185225    {0F652437-998A-4EAB-8BF1-444B5FE8CE97}.Debug|Any CPU.Build.0 = Debug|Any CPU
     226    {0F652437-998A-4EAB-8BF1-444B5FE8CE97}.Debug|Mixed Platforms.ActiveCfg = Debug|x64
     227    {0F652437-998A-4EAB-8BF1-444B5FE8CE97}.Debug|Mixed Platforms.Build.0 = Debug|x64
    186228    {0F652437-998A-4EAB-8BF1-444B5FE8CE97}.Debug|x64.ActiveCfg = Debug|x64
    187229    {0F652437-998A-4EAB-8BF1-444B5FE8CE97}.Debug|x64.Build.0 = Debug|x64
     
    190232    {0F652437-998A-4EAB-8BF1-444B5FE8CE97}.Release|Any CPU.ActiveCfg = Release|Any CPU
    191233    {0F652437-998A-4EAB-8BF1-444B5FE8CE97}.Release|Any CPU.Build.0 = Release|Any CPU
     234    {0F652437-998A-4EAB-8BF1-444B5FE8CE97}.Release|Mixed Platforms.ActiveCfg = Release|x64
     235    {0F652437-998A-4EAB-8BF1-444B5FE8CE97}.Release|Mixed Platforms.Build.0 = Release|x64
    192236    {0F652437-998A-4EAB-8BF1-444B5FE8CE97}.Release|x64.ActiveCfg = Release|x64
    193237    {0F652437-998A-4EAB-8BF1-444B5FE8CE97}.Release|x64.Build.0 = Release|x64
     
    196240    {9FAC0B23-2730-452A-9BA0-D7CA1746C541}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
    197241    {9FAC0B23-2730-452A-9BA0-D7CA1746C541}.Debug|Any CPU.Build.0 = Debug|Any CPU
     242    {9FAC0B23-2730-452A-9BA0-D7CA1746C541}.Debug|Mixed Platforms.ActiveCfg = Debug|x64
     243    {9FAC0B23-2730-452A-9BA0-D7CA1746C541}.Debug|Mixed Platforms.Build.0 = Debug|x64
    198244    {9FAC0B23-2730-452A-9BA0-D7CA1746C541}.Debug|x64.ActiveCfg = Debug|x64
    199245    {9FAC0B23-2730-452A-9BA0-D7CA1746C541}.Debug|x64.Build.0 = Debug|x64
     
    202248    {9FAC0B23-2730-452A-9BA0-D7CA1746C541}.Release|Any CPU.ActiveCfg = Release|Any CPU
    203249    {9FAC0B23-2730-452A-9BA0-D7CA1746C541}.Release|Any CPU.Build.0 = Release|Any CPU
     250    {9FAC0B23-2730-452A-9BA0-D7CA1746C541}.Release|Mixed Platforms.ActiveCfg = Release|x64
     251    {9FAC0B23-2730-452A-9BA0-D7CA1746C541}.Release|Mixed Platforms.Build.0 = Release|x64
    204252    {9FAC0B23-2730-452A-9BA0-D7CA1746C541}.Release|x64.ActiveCfg = Release|x64
    205253    {9FAC0B23-2730-452A-9BA0-D7CA1746C541}.Release|x64.Build.0 = Release|x64
     
    208256    {E36BE58F-F3CE-40BB-9AB3-9F9E30AD5CCF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
    209257    {E36BE58F-F3CE-40BB-9AB3-9F9E30AD5CCF}.Debug|Any CPU.Build.0 = Debug|Any CPU
     258    {E36BE58F-F3CE-40BB-9AB3-9F9E30AD5CCF}.Debug|Mixed Platforms.ActiveCfg = Debug|x64
     259    {E36BE58F-F3CE-40BB-9AB3-9F9E30AD5CCF}.Debug|Mixed Platforms.Build.0 = Debug|x64
    210260    {E36BE58F-F3CE-40BB-9AB3-9F9E30AD5CCF}.Debug|x64.ActiveCfg = Debug|x64
    211261    {E36BE58F-F3CE-40BB-9AB3-9F9E30AD5CCF}.Debug|x64.Build.0 = Debug|x64
     
    214264    {E36BE58F-F3CE-40BB-9AB3-9F9E30AD5CCF}.Release|Any CPU.ActiveCfg = Release|Any CPU
    215265    {E36BE58F-F3CE-40BB-9AB3-9F9E30AD5CCF}.Release|Any CPU.Build.0 = Release|Any CPU
     266    {E36BE58F-F3CE-40BB-9AB3-9F9E30AD5CCF}.Release|Mixed Platforms.ActiveCfg = Release|x64
     267    {E36BE58F-F3CE-40BB-9AB3-9F9E30AD5CCF}.Release|Mixed Platforms.Build.0 = Release|x64
    216268    {E36BE58F-F3CE-40BB-9AB3-9F9E30AD5CCF}.Release|x64.ActiveCfg = Release|x64
    217269    {E36BE58F-F3CE-40BB-9AB3-9F9E30AD5CCF}.Release|x64.Build.0 = Release|x64
     
    220272    {766DA4B7-2A0E-4CDE-8F90-93D8B1AD62CF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
    221273    {766DA4B7-2A0E-4CDE-8F90-93D8B1AD62CF}.Debug|Any CPU.Build.0 = Debug|Any CPU
     274    {766DA4B7-2A0E-4CDE-8F90-93D8B1AD62CF}.Debug|Mixed Platforms.ActiveCfg = Debug|x64
     275    {766DA4B7-2A0E-4CDE-8F90-93D8B1AD62CF}.Debug|Mixed Platforms.Build.0 = Debug|x64
    222276    {766DA4B7-2A0E-4CDE-8F90-93D8B1AD62CF}.Debug|x64.ActiveCfg = Debug|x64
    223277    {766DA4B7-2A0E-4CDE-8F90-93D8B1AD62CF}.Debug|x64.Build.0 = Debug|x64
     
    226280    {766DA4B7-2A0E-4CDE-8F90-93D8B1AD62CF}.Release|Any CPU.ActiveCfg = Release|Any CPU
    227281    {766DA4B7-2A0E-4CDE-8F90-93D8B1AD62CF}.Release|Any CPU.Build.0 = Release|Any CPU
     282    {766DA4B7-2A0E-4CDE-8F90-93D8B1AD62CF}.Release|Mixed Platforms.ActiveCfg = Release|x64
     283    {766DA4B7-2A0E-4CDE-8F90-93D8B1AD62CF}.Release|Mixed Platforms.Build.0 = Release|x64
    228284    {766DA4B7-2A0E-4CDE-8F90-93D8B1AD62CF}.Release|x64.ActiveCfg = Release|x64
    229285    {766DA4B7-2A0E-4CDE-8F90-93D8B1AD62CF}.Release|x64.Build.0 = Release|x64
     
    232288    {E64DB8C8-3197-4A80-BD94-2EAC8FD81B29}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
    233289    {E64DB8C8-3197-4A80-BD94-2EAC8FD81B29}.Debug|Any CPU.Build.0 = Debug|Any CPU
     290    {E64DB8C8-3197-4A80-BD94-2EAC8FD81B29}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
     291    {E64DB8C8-3197-4A80-BD94-2EAC8FD81B29}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
    234292    {E64DB8C8-3197-4A80-BD94-2EAC8FD81B29}.Debug|x64.ActiveCfg = Debug|Any CPU
    235293    {E64DB8C8-3197-4A80-BD94-2EAC8FD81B29}.Debug|x86.ActiveCfg = Debug|Any CPU
    236294    {E64DB8C8-3197-4A80-BD94-2EAC8FD81B29}.Release|Any CPU.ActiveCfg = Release|Any CPU
    237295    {E64DB8C8-3197-4A80-BD94-2EAC8FD81B29}.Release|Any CPU.Build.0 = Release|Any CPU
     296    {E64DB8C8-3197-4A80-BD94-2EAC8FD81B29}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
     297    {E64DB8C8-3197-4A80-BD94-2EAC8FD81B29}.Release|Mixed Platforms.Build.0 = Release|Any CPU
    238298    {E64DB8C8-3197-4A80-BD94-2EAC8FD81B29}.Release|x64.ActiveCfg = Release|Any CPU
    239299    {E64DB8C8-3197-4A80-BD94-2EAC8FD81B29}.Release|x86.ActiveCfg = Release|Any CPU
    240300    {5BC9293E-A17C-462F-A946-4781CC763553}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
    241301    {5BC9293E-A17C-462F-A946-4781CC763553}.Debug|Any CPU.Build.0 = Debug|Any CPU
     302    {5BC9293E-A17C-462F-A946-4781CC763553}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
     303    {5BC9293E-A17C-462F-A946-4781CC763553}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
    242304    {5BC9293E-A17C-462F-A946-4781CC763553}.Debug|x64.ActiveCfg = Debug|Any CPU
    243305    {5BC9293E-A17C-462F-A946-4781CC763553}.Debug|x86.ActiveCfg = Debug|Any CPU
    244306    {5BC9293E-A17C-462F-A946-4781CC763553}.Release|Any CPU.ActiveCfg = Release|Any CPU
    245307    {5BC9293E-A17C-462F-A946-4781CC763553}.Release|Any CPU.Build.0 = Release|Any CPU
     308    {5BC9293E-A17C-462F-A946-4781CC763553}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
     309    {5BC9293E-A17C-462F-A946-4781CC763553}.Release|Mixed Platforms.Build.0 = Release|Any CPU
    246310    {5BC9293E-A17C-462F-A946-4781CC763553}.Release|x64.ActiveCfg = Release|Any CPU
    247311    {5BC9293E-A17C-462F-A946-4781CC763553}.Release|x86.ActiveCfg = Release|Any CPU
    248312    {6C07848B-B75F-4A0F-9292-066A636E9A5F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
    249313    {6C07848B-B75F-4A0F-9292-066A636E9A5F}.Debug|Any CPU.Build.0 = Debug|Any CPU
     314    {6C07848B-B75F-4A0F-9292-066A636E9A5F}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
     315    {6C07848B-B75F-4A0F-9292-066A636E9A5F}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
    250316    {6C07848B-B75F-4A0F-9292-066A636E9A5F}.Debug|x64.ActiveCfg = Debug|Any CPU
    251317    {6C07848B-B75F-4A0F-9292-066A636E9A5F}.Debug|x86.ActiveCfg = Debug|Any CPU
    252318    {6C07848B-B75F-4A0F-9292-066A636E9A5F}.Release|Any CPU.ActiveCfg = Release|Any CPU
    253319    {6C07848B-B75F-4A0F-9292-066A636E9A5F}.Release|Any CPU.Build.0 = Release|Any CPU
     320    {6C07848B-B75F-4A0F-9292-066A636E9A5F}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
     321    {6C07848B-B75F-4A0F-9292-066A636E9A5F}.Release|Mixed Platforms.Build.0 = Release|Any CPU
    254322    {6C07848B-B75F-4A0F-9292-066A636E9A5F}.Release|x64.ActiveCfg = Release|Any CPU
    255323    {6C07848B-B75F-4A0F-9292-066A636E9A5F}.Release|x86.ActiveCfg = Release|Any CPU
    256324    {E0095F29-604B-4EE8-9EE8-8187DA3B24F1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
    257325    {E0095F29-604B-4EE8-9EE8-8187DA3B24F1}.Debug|Any CPU.Build.0 = Debug|Any CPU
     326    {E0095F29-604B-4EE8-9EE8-8187DA3B24F1}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
     327    {E0095F29-604B-4EE8-9EE8-8187DA3B24F1}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
    258328    {E0095F29-604B-4EE8-9EE8-8187DA3B24F1}.Debug|x64.ActiveCfg = Debug|Any CPU
    259329    {E0095F29-604B-4EE8-9EE8-8187DA3B24F1}.Debug|x86.ActiveCfg = Debug|Any CPU
    260330    {E0095F29-604B-4EE8-9EE8-8187DA3B24F1}.Release|Any CPU.ActiveCfg = Release|Any CPU
    261331    {E0095F29-604B-4EE8-9EE8-8187DA3B24F1}.Release|Any CPU.Build.0 = Release|Any CPU
     332    {E0095F29-604B-4EE8-9EE8-8187DA3B24F1}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
     333    {E0095F29-604B-4EE8-9EE8-8187DA3B24F1}.Release|Mixed Platforms.Build.0 = Release|Any CPU
    262334    {E0095F29-604B-4EE8-9EE8-8187DA3B24F1}.Release|x64.ActiveCfg = Release|Any CPU
    263335    {E0095F29-604B-4EE8-9EE8-8187DA3B24F1}.Release|x86.ActiveCfg = Release|Any CPU
     336    {D6DD768C-707C-415A-B9F8-C1F7668F8560}.Debug|Any CPU.ActiveCfg = Debug|x86
     337    {D6DD768C-707C-415A-B9F8-C1F7668F8560}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
     338    {D6DD768C-707C-415A-B9F8-C1F7668F8560}.Debug|Mixed Platforms.Build.0 = Debug|x86
     339    {D6DD768C-707C-415A-B9F8-C1F7668F8560}.Debug|x64.ActiveCfg = Debug|x86
     340    {D6DD768C-707C-415A-B9F8-C1F7668F8560}.Debug|x86.ActiveCfg = Debug|x86
     341    {D6DD768C-707C-415A-B9F8-C1F7668F8560}.Debug|x86.Build.0 = Debug|x86
     342    {D6DD768C-707C-415A-B9F8-C1F7668F8560}.Release|Any CPU.ActiveCfg = Release|x86
     343    {D6DD768C-707C-415A-B9F8-C1F7668F8560}.Release|Mixed Platforms.ActiveCfg = Release|x86
     344    {D6DD768C-707C-415A-B9F8-C1F7668F8560}.Release|Mixed Platforms.Build.0 = Release|x86
     345    {D6DD768C-707C-415A-B9F8-C1F7668F8560}.Release|x64.ActiveCfg = Release|x86
     346    {D6DD768C-707C-415A-B9F8-C1F7668F8560}.Release|x86.ActiveCfg = Release|x86
     347    {D6DD768C-707C-415A-B9F8-C1F7668F8560}.Release|x86.Build.0 = Release|x86
    264348  EndGlobalSection
    265349  GlobalSection(SolutionProperties) = preSolution
  • branches/OaaS/HeuristicLab.Clients.Hive.Slave.Azure

    • Property svn:ignore set to
      bin
      csx
      obj
  • branches/OaaS/HeuristicLab.Clients.Hive.Slave.AzureClient/3.3

    • Property svn:ignore set to
      obj
  • branches/OaaS/HeuristicLab.Services.Hive.WebRole

    • Property svn:ignore set to
      bin
      obj
  • branches/OaaS/HeuristicLab.Services.Optimization

    • Property svn:ignore set to
      bin
      csx
      obj
  • branches/OaaS/HeuristicLab.Services.Optimization.Controller

    • Property svn:ignore set to
      bin
      obj
  • branches/OaaS/HeuristicLab.Services.Optimization.Controller/HeuristicLab.Services.Optimization.ControllerService.csproj

    r8506 r8545  
    9595      <HintPath>..\bin\HeuristicLab.Optimization.Operators-3.3.dll</HintPath>
    9696    </Reference>
     97    <Reference Include="HeuristicLab.ParallelEngine-3.3">
     98      <HintPath>..\bin\HeuristicLab.ParallelEngine-3.3.dll</HintPath>
     99    </Reference>
    97100    <Reference Include="HeuristicLab.Parameters-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    98101      <SpecificVersion>False</SpecificVersion>
     
    108111    <Reference Include="HeuristicLab.Problems.TravelingSalesman-3.3">
    109112      <HintPath>..\bin\HeuristicLab.Problems.TravelingSalesman-3.3.dll</HintPath>
     113    </Reference>
     114    <Reference Include="HeuristicLab.Problems.VehicleRouting-3.3">
     115      <HintPath>..\bin\HeuristicLab.Problems.VehicleRouting-3.3.dll</HintPath>
     116    </Reference>
     117    <Reference Include="HeuristicLab.Problems.VehicleRouting-3.4">
     118      <HintPath>..\bin\HeuristicLab.Problems.VehicleRouting-3.4.dll</HintPath>
    110119    </Reference>
    111120    <Reference Include="HeuristicLab.Random-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
  • branches/OaaS/HeuristicLab.Services.Optimization.Controller/HiveScenarioManager.cs

    r8506 r8545  
    1414using HeuristicLab.Clients.Hive;
    1515using System.Threading;
     16using HeuristicLab.Data;
    1617
    1718namespace HeuristicLab.Services.Optimization.ControllerService {
     
    110111    }
    111112
    112     public void DispatchScenario(Model.OptimizationScenario scenario) {
     113    public void DispatchScenario(Model.User user, Model.OptimizationScenario scenario) {
    113114      Experiment experiment = new Experiment();
    114115      var problem = new TravelingSalesmanProblem();
     
    124125
    125126      experiment.Optimizers.Add(algo);
    126       SendExperimentToHive(experiment);
    127     }
    128 
    129     private void SendExperimentToHive(Experiment exp) {
     127      SendExperimentToHive(user, experiment);
     128    }
     129
     130    private void SendExperimentToHive(Model.User user, Experiment exp) {
    130131      var job = new RefreshableJob();
    131132      job.IsAllowedPrivileged = true;     
     
    134135      job.RefreshAutomatically = false;
    135136      job.HiveTasks.Add(new OptimizerHiveTask(exp));
    136       HiveServiceLocator.Instance.Username = "fschoeppl";
    137       HiveServiceLocator.Instance.Password = "fschoeppl";
     137      HiveServiceLocator.Instance.Username = user.Username;
     138      HiveServiceLocator.Instance.Password = user.Password;
    138139      HiveServiceLocator.Instance.EndpointConfigurationName = "WSHttpBinding_IHiveService";
    139140     
     
    144145      job.StopResultPolling();
    145146    }
     147
     148
     149    public IList<Model.Job> GetJobs(User user) {
     150      HiveServiceLocator.Instance.Username = user.Username;
     151      HiveServiceLocator.Instance.Password = user.Password;
     152      HiveServiceLocator.Instance.EndpointConfigurationName = "WSHttpBinding_IHiveService";
     153      var jobsLoaded = HiveServiceLocator.Instance.CallHiveService<IEnumerable<HeuristicLab.Clients.Hive.Job>>(s => s.GetJobs());
     154      IList<Model.Job> jobs = new List<Model.Job>();
     155     
     156      foreach (var job in jobsLoaded) {
     157        jobs.Add(ConvertJob(user, job));
     158      }
     159      return jobs;
     160    }
     161
     162    private Model.Job ConvertJob(User user, HeuristicLab.Clients.Hive.Job job)
     163    {
     164      var waitingJobs = job.JobCount - job.CalculatingCount - job.FinishedCount;
     165      Model.JobState? state = null;
     166      var jobTasks = HiveServiceLocator.Instance.CallHiveService<IEnumerable<HeuristicLab.Clients.Hive.LightweightTask>>(s => s.GetLightweightJobTasks(job.Id));
     167     
     168      foreach (var task in jobTasks) {       
     169        switch (task.State) {
     170          case TaskState.Aborted:
     171            state = JobState.Aborted;
     172            break;
     173          case TaskState.Failed:
     174            state = JobState.Failed;
     175            break;
     176        }
     177      }
     178      if (!state.HasValue) {
     179        if (job.CalculatingCount > 0)
     180          state = JobState.Calculating;
     181        else if (waitingJobs > 0)
     182          state = JobState.Waiting;
     183        else
     184          state = JobState.Finished;
     185      }
     186      return new Model.Job() { Id = job.Id.ToString(), Name = job.Name, Resource = job.ResourceNames, State = state.Value };
     187    }
     188
     189
     190    public Model.Job GetJob(User user, string id) {
     191      HiveServiceLocator.Instance.Username = user.Username;
     192      HiveServiceLocator.Instance.Password = user.Password;
     193      HiveServiceLocator.Instance.EndpointConfigurationName = "WSHttpBinding_IHiveService";
     194      var guid = Guid.Parse(id);
     195      return ConvertJob(user, HiveServiceLocator.Instance.CallHiveService<HeuristicLab.Clients.Hive.Job>(s => s.GetJob(guid)));
     196    }
     197
     198
     199    public void DeleteJob(User user, string id) {
     200      HiveServiceLocator.Instance.Username = user.Username;
     201      HiveServiceLocator.Instance.Password = user.Password;
     202      HiveServiceLocator.Instance.EndpointConfigurationName = "WSHttpBinding_IHiveService";
     203      var guid = Guid.Parse(id);
     204      HiveServiceLocator.Instance.CallHiveService(s => s.DeleteJob(guid));     
     205    }
     206
     207    public IList<Model.Run> GetJobResults(User user, string id) {
     208      HiveServiceLocator.Instance.Username = user.Username;
     209      HiveServiceLocator.Instance.Password = user.Password;
     210      HiveServiceLocator.Instance.EndpointConfigurationName = "WSHttpBinding_IHiveService";
     211      var guid = Guid.Parse(id);
     212      var jobTasks = HiveServiceLocator.Instance.CallHiveService<IEnumerable<HeuristicLab.Clients.Hive.LightweightTask>>(s => s.GetLightweightJobTasks(guid));
     213
     214      IList<Guid> taskIds = new List<Guid>();
     215      foreach (var task in jobTasks) {
     216        taskIds.Add(task.Id);
     217      }
     218      TaskDownloader downloader = new TaskDownloader(taskIds);
     219      downloader.StartAsync();
     220      while (!downloader.IsFinished) {       
     221        Thread.Sleep(500);
     222
     223        if (downloader.IsFaulted) {
     224          throw downloader.Exception;
     225        }
     226      }
     227      IDictionary<Guid, HiveTask> hiveTasks = downloader.Results;
     228      IList<Model.Run> runs = new List<Model.Run>();
     229      foreach (var keyTask in hiveTasks.Keys) {
     230        var oht = hiveTasks[keyTask] as OptimizerHiveTask;
     231        if (oht != null) {
     232          foreach (var run in oht.ItemTask.Item.Runs) {
     233            Model.Run taskRun = new Model.Run();
     234            taskRun.Id = taskRun.Name = run.Name;
     235            IList<Parameter> resultValues = new List<Model.Parameter>();
     236            foreach (var key in run.Results.Keys) {
     237              var value = run.Results[key];             
     238              Parameter result = MapHiveDataType(key, value);
     239              resultValues.Add(result);
     240            }
     241            taskRun.Results = resultValues;
     242            runs.Add(taskRun);
     243          }
     244        }
     245      }
     246      return runs;
     247    }
     248    private Parameter MapHiveDataType(string name, IItem item) {
     249      Parameter result = new Parameter();
     250      result.Type = ParameterType.String;
     251      if (item is IStringConvertibleValue) {
     252        var value = (item as IStringConvertibleValue).GetValue();
     253        result.Value = new HeuristicLab.Services.Optimization.ControllerService.Model.StringValue() { Name = name, Value = value };
     254      }
     255      else if (item is IStringConvertibleValueTuple) {
     256        var value1 = (item as IStringConvertibleValueTuple).Item1.GetValue();
     257        var value2 = (item as IStringConvertibleValueTuple).Item2.GetValue();
     258        result.Value = new HeuristicLab.Services.Optimization.ControllerService.Model.StringValue() { Name = name, Value = "{" + value1 + ", " + value2 + "}" };
     259      }
     260      else if (item is IStringConvertibleArray) {
     261        StringBuilder sb = new StringBuilder();
     262        var array = item as IStringConvertibleArray;
     263        if (array.Length == 0) {
     264          sb.Append("[ ]");
     265        } else {
     266          sb.Append("[");
     267          for (int i=0; i < array.Length - 1; i++) {
     268            sb.Append(array.GetValue(i)).Append(", ");         
     269          }
     270          sb.Append(array.GetValue(array.Length - 1));
     271          sb.Append(" ]");
     272        }
     273        var value = sb.ToString();
     274        result.Value = new HeuristicLab.Services.Optimization.ControllerService.Model.StringValue() { Name = name, Value = value };
     275      }
     276      else if (item is IStringConvertibleMatrix) {
     277        StringBuilder sb = new StringBuilder();
     278        var matrix = item as IStringConvertibleMatrix;
     279        if (matrix.Rows == 0 || matrix.Columns == 0) {
     280          sb.Append("[ ]");
     281        }
     282        else {
     283          sb.Append("[ ");
     284          for (int r = 0; r < matrix.Rows; r++) {
     285            sb.Append("( ");
     286            for (int c = 0; c < matrix.Columns - 1; c++) {
     287              sb.Append(matrix.GetValue(r, c)).Append(", ");
     288            }
     289            sb.Append(matrix.GetValue(r, matrix.Columns - 1)).Append(r < matrix.Rows - 1 ? " ), " : " )");
     290          }
     291          sb.Append(" ]");
     292        }
     293        var value = sb.ToString();
     294        result.Value = new HeuristicLab.Services.Optimization.ControllerService.Model.StringValue() { Name = name, Value = value };
     295      }
     296      else {
     297        result.Value = new HeuristicLab.Services.Optimization.ControllerService.Model.StringValue() { Name = name, Value = "Cannot be displayed as string" };
     298      }
     299      return result;
     300    }
    146301  }
    147302}
  • branches/OaaS/HeuristicLab.Services.Optimization.Controller/Interfaces/IControllerService.cs

    r8506 r8545  
    1717
    1818    [OperationContract]
    19     void ScheduleOptimizationScenario(OptimizationScenario scenario);
     19    void ScheduleOptimizationScenario(User user, OptimizationScenario scenario);
     20
     21    [OperationContract]
     22    IEnumerable<Job> GetJobs(User user);
     23
     24    [OperationContract]
     25    Job GetJob(User user, string id);
     26
     27    [OperationContract]
     28    void DeleteJob(User user, string id);
     29
     30    [OperationContract]
     31    IList<Model.Run> GetJobResults(User user, string id);
    2032  }
    2133}
  • branches/OaaS/HeuristicLab.Services.Optimization.Controller/Interfaces/IScenarioManager.cs

    r8506 r8545  
    77namespace HeuristicLab.Services.Optimization.ControllerService.Interfaces {
    88  public interface IScenarioManager {
    9     void DispatchScenario(OptimizationScenario scenario);
     9    void DispatchScenario(User user, OptimizationScenario scenario);
     10    IList<Job> GetJobs(User user);
     11    Job GetJob(User user, string id);
     12    void DeleteJob(User user, string id);
     13    IList<Model.Run> GetJobResults(User user, string id);
    1014  }
    1115}
  • branches/OaaS/HeuristicLab.Services.Optimization.Controller/Model/ControllerModel.cs

    r8506 r8545  
    2323    DecimalVector,
    2424    [EnumMember]
    25     Percent
     25    Percent,
     26    [EnumMember]
     27    String
    2628  }
    2729
     
    151153
    152154  [DataContract]
     155  public class StringValue : Value {
     156    [DataMember]
     157    public string Value { get; set; }
     158
     159    public override bool TrySetFromString(string input) {
     160      Value = input;
     161      return true;
     162    }
     163  }
     164
     165  [DataContract]
    153166  [KnownType(typeof(BoolValue))]
    154167  [KnownType(typeof(DecimalValue))]
     
    156169  [KnownType(typeof(DecimalVector))]
    157170  [KnownType(typeof(DecimalMatrix))]
     171  [KnownType(typeof(StringValue))]
    158172  public class Parameter {       
    159173    // some kind of value type
     
    211225      set { algorithmParameters = value; }
    212226    }
    213 
     227  }
     228
     229  [DataContract]
     230  public enum JobState {
     231    [EnumMember]
     232    Waiting,
     233    [EnumMember]
     234    Calculating,
     235    [EnumMember]
     236    Aborted,
     237    [EnumMember]
     238    Failed,
     239    [EnumMember]
     240    Finished
     241  }
     242
     243  [DataContract]
     244  public class Job {
     245    [DataMember]
     246    public string Id { get; set; }
     247
     248    [DataMember]
     249    public JobState State { get; set; }
     250
     251    [DataMember]
     252    public string Name { get; set; }
     253
     254    [DataMember]
     255    public string Resource { get; set; }   
     256  }
     257
     258  [DataContract]
     259  public class Run {
     260    [DataMember]
     261    public string Id { get; set; }
     262
     263    [DataMember]
     264    public string Name { get; set; }
     265
     266    [DataMember]
     267    public IList<Parameter> Results { get; set; }
     268  }
     269
     270  [DataContract]
     271  public class User {
     272    [DataMember]
     273    public string Username { get; set; }
     274    [DataMember]
     275    public string Password { get; set; }
    214276  }
    215277}
  • branches/OaaS/HeuristicLab.Services.Optimization.Controller/PlaceholderControllerService.cs

    r8506 r8545  
    6161    }
    6262
    63     public void ScheduleOptimizationScenario(Model.OptimizationScenario scenario) {
    64       hiveManager.DispatchScenario(scenario);
     63    public void ScheduleOptimizationScenario(Model.User user, Model.OptimizationScenario scenario) {
     64      hiveManager.DispatchScenario(user, scenario);
    6565    }
    6666
    67    
     67    public IEnumerable<Model.Job> GetJobs(Model.User user) {
     68      return hiveManager.GetJobs(user);
     69    }
     70
     71
     72    public Model.Job GetJob(Model.User user, string id) {
     73      return hiveManager.GetJob(user, id);
     74    }
     75
     76
     77    public void DeleteJob(Model.User user, string id) {
     78      hiveManager.DeleteJob(user, id);
     79    }
     80
     81
     82    public IList<Model.Run> GetJobResults(Model.User user, string id) {
     83      return hiveManager.GetJobResults(user, id);
     84    }
    6885  }
    6986}
  • branches/OaaS/HeuristicLab.Services.Optimization.Web

    • Property svn:ignore set to
      bin
      obj
  • branches/OaaS/HeuristicLab.Services.Optimization.Web/Controllers/OptimizationController.cs

    r8506 r8545  
    99using System.ServiceModel.Description;
    1010using System.Web.Security;
     11using HeuristicLab.Services.Optimization.Web.Models;
    1112
    1213namespace HeuristicLab.Services.Optimization.Web.Controllers
     
    1617    {
    1718      public const string DEFAULT_CONTROLLER_ENDPOINT = "WSHttpBinding_IControllerService";
     19
     20      public delegate T ControllerServiceDelegate<T>(IControllerService service);
     21      public delegate void ControllerServiceDelegate(IControllerService service);
     22
     23      public T withControllerService<T>(ControllerServiceDelegate<T> del) {
     24        using (var cf = new ChannelFactory<IControllerService>(OptimizationController.DEFAULT_CONTROLLER_ENDPOINT)) {
     25          var credentialBehaviour = cf.Endpoint.Behaviors.Find<ClientCredentials>();
     26          credentialBehaviour.UserName.UserName = Membership.GetUser().UserName;
     27          credentialBehaviour.UserName.Password = Session["pw"] as string;
     28          var controllerProxy = cf.CreateChannel();
     29          return del(controllerProxy);
     30        }
     31      }
     32
     33      public void withControllerService(ControllerServiceDelegate del) {
     34        using (var cf = new ChannelFactory<IControllerService>(OptimizationController.DEFAULT_CONTROLLER_ENDPOINT)) {
     35          var credentialBehaviour = cf.Endpoint.Behaviors.Find<ClientCredentials>();
     36          credentialBehaviour.UserName.UserName = Membership.GetUser().UserName;
     37          credentialBehaviour.UserName.Password = Session["pw"] as string;
     38          var controllerProxy = cf.CreateChannel();
     39          del(controllerProxy);
     40        }
     41      }
    1842        //
    1943        // GET: /Optimization/       
     
    2145        public ActionResult Index()
    2246        {
    23           IEnumerable<OptimizationScenario> scenarios;
    24           using (var cf = new ChannelFactory<IControllerService>(OptimizationController.DEFAULT_CONTROLLER_ENDPOINT)) {
    25             var credentialBehaviour = cf.Endpoint.Behaviors.Find<ClientCredentials>();
    26             credentialBehaviour.UserName.UserName = Membership.GetUser().UserName;
    27             credentialBehaviour.UserName.Password = Session["pw"] as string;
    28             var controllerProxy = cf.CreateChannel();
    29             scenarios = controllerProxy.GetOptimizationScenarios();
    30           }
    31           return View(scenarios);
     47          var optModel = withControllerService<OptimizationModel>((service) => {
     48            OptimizationModel model = new OptimizationModel();
     49            model.Scenarios = service.GetOptimizationScenarios();
     50            User u = new User() { Username = Membership.GetUser().UserName, Password = Session["pw"] as string };
     51            model.Jobs = service.GetJobs(u);
     52            return model;
     53          });
     54          return View(optModel);
    3255        }
    3356
    3457        public ActionResult ProblemParameters(string scenario) {
    35           OptimizationScenario optScenario;         
    36           using (var cf = new ChannelFactory<IControllerService>(OptimizationController.DEFAULT_CONTROLLER_ENDPOINT)) {
    37             var credentialBehaviour = cf.Endpoint.Behaviors.Find<ClientCredentials>();
    38             credentialBehaviour.UserName.UserName = Membership.GetUser().UserName;
    39             credentialBehaviour.UserName.Password = Session["pw"] as string;
    40             var controllerProxy = cf.CreateChannel();
    41             optScenario = controllerProxy.GetOptimizationScenarioByName(scenario);
    42             Session["scenario"] = optScenario;
    43           }
     58          var optScenario = withControllerService<OptimizationScenario>((service) => {
     59            return service.GetOptimizationScenarioByName(scenario);
     60          });
     61          Session["scenario"] = optScenario;
    4462          return View(optScenario.InputParameters);
     63        }
     64
     65        public ActionResult JobDetails(string jobId) {
     66          Job job = withControllerService<Job>((service) => {
     67            User u = new User() { Username = Membership.GetUser().UserName, Password = Session["pw"] as string };
     68            return service.GetJob(u, jobId);
     69          });
     70          var runs = withControllerService<IList<Run>>((service) => {
     71            User u = new User() { Username = Membership.GetUser().UserName, Password = Session["pw"] as string };
     72            return service.GetJobResults(u, jobId);
     73          });
     74          JobDetailsModel jdm = new JobDetailsModel() { Job = job, Runs = runs };
     75          return View(jdm);
     76        }
     77
     78        [HttpPost]
     79        public ActionResult JobDetails(Job job) {
     80          withControllerService((service) => {
     81            User u = new User() { Username = Membership.GetUser().UserName, Password = Session["pw"] as string };
     82            service.DeleteJob(u, job.Id);
     83          });
     84          return RedirectToAction("Index");
    4585        }
    4686
     
    76116            credentialBehaviour.UserName.Password = Session["pw"] as string;
    77117            var controllerProxy = cf.CreateChannel();
    78             controllerProxy.ScheduleOptimizationScenario(Session["scenario"] as OptimizationScenario);
     118            User u = new User() { Username = Membership.GetUser().UserName, Password = Session["pw"] as string };
     119            controllerProxy.ScheduleOptimizationScenario(u, Session["scenario"] as OptimizationScenario);
    79120          }
    80121          return RedirectToAction("Index");
  • branches/OaaS/HeuristicLab.Services.Optimization.Web/HeuristicLab.Services.Optimization.Web.csproj

    r8506 r8545  
    245245    <Content Include="HeuristicLab 3.3.exe.config" />
    246246  </ItemGroup>
     247  <ItemGroup>
     248    <Content Include="Views\Optimization\JobDetails.cshtml" />
     249  </ItemGroup>
    247250  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
    248251  <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" />
  • branches/OaaS/HeuristicLab.Services.Optimization.Web/Models/OptimizationModels.cs

    r8506 r8545  
    77
    88namespace HeuristicLab.Services.Optimization.Web.Models {
     9
     10  public class OptimizationModel {
     11    public IEnumerable<OptimizationScenario> Scenarios { get; set; }
     12    public IEnumerable<Job> Jobs { get; set; }
     13    public Operation Operation { get; set; }
     14  }
     15
     16  public class JobDetailsModel {
     17    public IList<Run> Runs { get; set; }
     18    public Job Job { get; set; }
     19  }
     20
     21  public enum Operation {
     22    DeleteJob
     23  }
    924
    1025  public class ProblemParametersModelBinder : IModelBinder {
  • branches/OaaS/HeuristicLab.Services.Optimization.Web/Views/Optimization/Index.cshtml

    r8506 r8545  
    1 @model IEnumerable<HeuristicLab.Services.Optimization.ControllerService.Model.OptimizationScenario>
     1@model HeuristicLab.Services.Optimization.Web.Models.OptimizationModel
    22
    33@{
     
    55}
    66
     7<h2>Your jobs:</h2>
     8<table>
     9  <thead>
     10    <tr>
     11      <td>Name</td>
     12      <td>Resource</td>
     13      <td>State</td>   
     14    </tr>
     15  </thead>
     16  <tbody>
     17    @foreach(var itm in Model.Jobs) {
     18        <tr>
     19            <td>@Html.ActionLink(itm.Name, "JobDetails", new { jobId = itm.Id })</td>
     20            <td>@itm.Resource</td>
     21            <td>@itm.State</td>           
     22        </tr>
     23    }
     24  </tbody>
     25</table>
     26
    727<h2>Choose your scenario</h2>
    828
    929<ul>
    10 @foreach (var itm in Model) {
     30@foreach (var itm in Model.Scenarios) {
    1131    <li>@Html.ActionLink(itm.Name, "ProblemParameters", new { scenario=itm.Name })</li>
    1232}
Note: See TracChangeset for help on using the changeset viewer.