- Timestamp:
- 03/07/12 11:16:50 (13 years ago)
- Location:
- branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/CloudManagerClient.cs
r7441 r7577 102 102 Add(s); 103 103 } 104 105 List<HostedService> listToDelete = new List<HostedService>(); 106 foreach (HostedService s in HostedServices) { 107 if (!servs.Contains(s)) { 108 //Remove(s); 109 listToDelete.Add(s); 110 } 111 } 112 foreach (HostedService s in listToDelete) { 113 Remove(s); 114 } 104 115 } 105 116 } … … 131 142 if (Subscriptions.Contains(subscription)) { 132 143 Subscriptions.Remove(subscription); 144 } 145 } 146 147 public void Remove(HostedService hostedService) { 148 if (hostedService == null) { 149 throw new ArgumentNullException("hostedService", "HostedService must not be null."); 150 } 151 if (HostedServices.Contains(hostedService)) { 152 HostedServices.Remove(hostedService); 133 153 } 134 154 } -
branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/HeuristicLab.Clients.Hive.CloudManager-3.3.csproj
r7550 r7577 132 132 <ItemGroup> 133 133 <None Include="HeuristicLab.snk" /> 134 <None Include="PackageFiles\HeuristicLab.Clients.Hive.Slave.Azure.ExtraLarge.cspkg"> 135 <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> 136 </None> 137 <None Include="PackageFiles\HeuristicLab.Clients.Hive.Slave.Azure.Large.cspkg"> 138 <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> 139 </None> 140 <None Include="PackageFiles\HeuristicLab.Clients.Hive.Slave.Azure.Medium.cspkg"> 141 <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> 142 </None> 143 <None Include="PackageFiles\HeuristicLab.Clients.Hive.Slave.Azure.Small.cspkg"> 144 <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> 145 </None> 146 <None Include="PackageFiles\ServiceConfiguration.Cloud.cscfg"> 147 <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> 148 </None> 134 149 <None Include="Plugin.cs.frame" /> 135 150 <None Include="Properties\AssemblyInfo.cs.frame" /> -
branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/Model/HostedService.cs
r7433 r7577 81 81 } 82 82 83 List<Deployment> listToDelete = new List<Deployment>(); 83 84 foreach (Deployment dep in this.Deployments) { 84 85 int idx = hostedService.Deployments.IndexOf(dep); 85 86 if (idx == -1) { 86 this.Deployments.Remove(dep); 87 //this.Deployments.Remove(dep); 88 listToDelete.Add(dep); 87 89 } 90 } 91 foreach (Deployment d in listToDelete) { 92 this.Deployments.Remove(d); 88 93 } 89 94 } -
branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/Views/DeploymentView.cs
r7441 r7577 36 36 txtDeploymentSlot.Text = Content.DeploymentSlot; 37 37 txtDeploymentStatus.Text = Content.Status; 38 txtInstanceCount.Text = Content.RoleInstanceList.Count.ToString(); 39 if (Content.RoleInstanceList.Count > 0) { 40 txtInstanceSize.Text = Content.RoleInstanceList[0].InstanceSize; 38 if (Content.RoleInstanceList != null) { 39 txtInstanceCount.Text = Content.RoleInstanceList.Count.ToString(); 40 if (Content.RoleInstanceList.Count > 0) { 41 txtInstanceSize.Text = Content.RoleInstanceList[0].InstanceSize; 42 } 43 } else { 44 txtInstanceCount.Text = ""; 45 txtInstanceSize.Text = ""; 41 46 } 47 42 48 43 49 tbChangeCores.Minimum = 1; … … 47 53 lblChanges.Text = SaveChangesString; 48 54 } else { 49 tbChangeCores.Value = Content.RoleInstanceList.Count; 55 if (Content.RoleInstanceList == null) { 56 tbChangeCores.Value = tbChangeCores.Minimum; 57 } else { 58 tbChangeCores.Value = Content.RoleInstanceList.Count; 59 } 50 60 lblChanges.Text = ""; 51 61 } … … 75 85 76 86 private int GetCoresFromInstanceSize(string instanceSize) { 77 HeuristicLab.Clients.Hive.CloudManager.Azure.Constants.InstanceSize size = 78 (HeuristicLab.Clients.Hive.CloudManager.Azure.Constants.InstanceSize)Enum.Parse( 79 typeof(HeuristicLab.Clients.Hive.CloudManager.Azure.Constants.InstanceSize), 80 instanceSize, 81 true); 82 return (int)size; 87 if (instanceSize != string.Empty) { 88 HeuristicLab.Clients.Hive.CloudManager.Azure.Constants.InstanceSize size = 89 (HeuristicLab.Clients.Hive.CloudManager.Azure.Constants.InstanceSize)Enum.Parse( 90 typeof(HeuristicLab.Clients.Hive.CloudManager.Azure.Constants.InstanceSize), 91 instanceSize, 92 true); 93 return (int)size; 94 } else { 95 return 0; 96 } 97 83 98 } 84 99 }
Note: See TracChangeset
for help on using the changeset viewer.