a93921e5a9557b8edb663d54e9f57c75fd6ef888
java/com.sap.sailing.landscape.ui/src/com/sap/sailing/landscape/ui/client/ApplicationReplicaSetsImagesBarCell.java
| ... | ... | @@ -61,7 +61,7 @@ public class ApplicationReplicaSetsImagesBarCell extends ImagesBarCell { |
| 61 | 61 | result.add(new ImageSpec(ACTION_LAUNCH_ANOTHER_REPLICA_SET_ON_THIS_MASTER, |
| 62 | 62 | stringMessages.launchAnotherReplicaSetOnThisMaster(), |
| 63 | 63 | IconResources.INSTANCE.launchAnotherReplicaSetOnThisMasterIcon())); |
| 64 | - if (!applicationReplicaSet.isLocalReplicaSet(userService) && !applicationReplicaSet.isArchive()) { |
|
| 64 | + if (!applicationReplicaSet.isLocalReplicaSet(userService)) { |
|
| 65 | 65 | result.add(new ImageSpec(ACTION_UPGRADE, stringMessages.upgrade(), IconResources.INSTANCE.refreshIcon())); |
| 66 | 66 | } |
| 67 | 67 | if (applicationReplicaSet.isArchive()) { |
| ... | ... | @@ -98,9 +98,6 @@ public class ApplicationReplicaSetsImagesBarCell extends ImagesBarCell { |
| 98 | 98 | result.add(new ImageSpec(ACTION_MOVE_ALL_APPLICATION_PROCESSES_AWAY_FROM, |
| 99 | 99 | stringMessages.moveAllApplicationProcessesAwayFromMaster(), IconResources.INSTANCE.moveAway())); |
| 100 | 100 | } |
| 101 | - if (applicationReplicaSet.isArchive()) { |
|
| 102 | - result.add(new ImageSpec(ACTION_UPGRADE, stringMessages.upgrade(), IconResources.INSTANCE.refreshIcon())); |
|
| 103 | - } |
|
| 104 | 101 | return result; |
| 105 | 102 | } |
| 106 | 103 | } |
java/com.sap.sailing.landscape.ui/src/com/sap/sailing/landscape/ui/client/LandscapeManagementPanel.java
| ... | ... | @@ -1470,7 +1470,8 @@ public class LandscapeManagementPanel extends SimplePanel { |
| 1470 | 1470 | |
| 1471 | 1471 | @Override |
| 1472 | 1472 | public void onSuccess(ArrayList<ReleaseDTO> releases) { |
| 1473 | - new UpgradeArchiveServerDialog(landscapeManagementService, releases.stream().map(r->r.getName())::iterator, |
|
| 1473 | + new UpgradeArchiveServerDialog(landscapeManagementService, archiveReplicaSet.getMaster().getHost().getInstanceType(), |
|
| 1474 | + releases.stream().map(r->r.getName())::iterator, |
|
| 1474 | 1475 | stringMessages, errorReporter, new DialogCallback<UpgradeArchiveServerDialog.UpgradeArchiveServerInstructions>() { |
| 1475 | 1476 | @Override |
| 1476 | 1477 | public void ok(UpgradeArchiveServerInstructions upgradeInstructions) { |
java/com.sap.sailing.landscape.ui/src/com/sap/sailing/landscape/ui/client/UpgradeArchiveServerDialog.java
| ... | ... | @@ -26,10 +26,19 @@ public class UpgradeArchiveServerDialog extends AbstractNewProcessDialog<Upgrade |
| 26 | 26 | |
| 27 | 27 | private final SuggestBox releaseNameBox; |
| 28 | 28 | |
| 29 | - public UpgradeArchiveServerDialog(LandscapeManagementWriteServiceAsync landscapeManagementService, Iterable<String> releaseNames, |
|
| 29 | + public UpgradeArchiveServerDialog(LandscapeManagementWriteServiceAsync landscapeManagementService, String defaultInstanceType, |
|
| 30 | + Iterable<String> releaseNames, |
|
| 30 | 31 | StringMessages stringMessages, ErrorReporter errorReporter, DialogCallback<UpgradeArchiveServerInstructions> callback) { |
| 31 | 32 | super(stringMessages.upgradeArchiveServer(), landscapeManagementService, stringMessages, errorReporter, callback); |
| 32 | 33 | releaseNameBox = LandscapeDialogUtil.createReleaseNameBox(stringMessages, releaseNames, this); |
| 34 | + if (defaultInstanceType != null) { |
|
| 35 | + for (int i=0; i<getInstanceTypeListBox().getItemCount(); i++) { |
|
| 36 | + if (getInstanceTypeListBox().getItemText(i).equals(defaultInstanceType)) { |
|
| 37 | + getInstanceTypeListBox().setSelectedIndex(i); |
|
| 38 | + break; |
|
| 39 | + } |
|
| 40 | + } |
|
| 41 | + } |
|
| 33 | 42 | } |
| 34 | 43 | |
| 35 | 44 | @Override |
java/com.sap.sailing.landscape.ui/src/com/sap/sailing/landscape/ui/server/LandscapeManagementWriteServiceImpl.java
| ... | ... | @@ -297,10 +297,10 @@ public class LandscapeManagementWriteServiceImpl extends ResultCachingProxiedRem |
| 297 | 297 | private ReverseProxyDTO convertToReverseProxyDTO(String region, Map<AwsInstance<String>, TargetHealth> healths, |
| 298 | 298 | AwsInstance<String> instance, boolean isDisposable) { |
| 299 | 299 | return new ReverseProxyDTO(instance.getInstanceId(), |
| 300 | - instance.getPrivateAddress().getHostAddress(), instance.getPublicAddress().getHostAddress(), |
|
| 301 | - region, instance.getLaunchTimePoint(), instance.isSharedHost(), |
|
| 302 | - instance.getNameTag(), instance.getImageId(), extractHealth(healths, instance), |
|
| 303 | - isDisposable, new AvailabilityZoneDTO(instance.getAvailabilityZone().getName(), instance.getRegion().getId(), instance.getAvailabilityZone().getId())); |
|
| 300 | + instance.getInstanceType().name(), instance.getPrivateAddress().getHostAddress(), |
|
| 301 | + instance.getPublicAddress().getHostAddress(), region, instance.getLaunchTimePoint(), |
|
| 302 | + instance.isSharedHost(), instance.getNameTag(), instance.getImageId(), |
|
| 303 | + extractHealth(healths, instance), isDisposable, new AvailabilityZoneDTO(instance.getAvailabilityZone().getName(), instance.getRegion().getId(), instance.getAvailabilityZone().getId())); |
|
| 304 | 304 | } |
| 305 | 305 | |
| 306 | 306 | @Override |
| ... | ... | @@ -379,9 +379,13 @@ public class LandscapeManagementWriteServiceImpl extends ResultCachingProxiedRem |
| 379 | 379 | } |
| 380 | 380 | |
| 381 | 381 | private AwsInstanceDTO convertToAwsInstanceDTO(Host host) { |
| 382 | - return new AwsInstanceDTO(host.getId().toString(), host.getPrivateAddress().getHostAddress(), host.getPublicAddress() == null ? null : host.getPublicAddress().getHostAddress(), |
|
| 383 | - host.getRegion().getId(), |
|
| 384 | - host.getLaunchTimePoint(), host.isSharedHost(), new AvailabilityZoneDTO(host.getAvailabilityZone().getName(), host.getRegion().getId(), host.getAvailabilityZone().getId())); |
|
| 382 | + return new AwsInstanceDTO(host.getId().toString(), |
|
| 383 | + (host instanceof AwsInstance<?>) ? ((AwsInstance<?>) host).getInstanceType().name() : null, |
|
| 384 | + host.getPrivateAddress().getHostAddress(), |
|
| 385 | + host.getPublicAddress() == null ? null : host.getPublicAddress().getHostAddress(), |
|
| 386 | + host.getRegion().getId(), host.getLaunchTimePoint(), host.isSharedHost(), |
|
| 387 | + new AvailabilityZoneDTO(host.getAvailabilityZone().getName(), host.getRegion().getId(), |
|
| 388 | + host.getAvailabilityZone().getId())); |
|
| 385 | 389 | } |
| 386 | 390 | |
| 387 | 391 | @Override |
java/com.sap.sailing.landscape.ui/src/com/sap/sailing/landscape/ui/shared/AwsInstanceDTO.java
| ... | ... | @@ -5,6 +5,7 @@ import com.sap.sse.common.TimePoint; |
| 5 | 5 | |
| 6 | 6 | public class AwsInstanceDTO implements IsSerializable { |
| 7 | 7 | private String instanceId; |
| 8 | + private String instanceType; |
|
| 8 | 9 | private AvailabilityZoneDTO availabilityZoneDTO; |
| 9 | 10 | private String privateIpAddress; |
| 10 | 11 | private String publicIpAddress; |
| ... | ... | @@ -14,9 +15,10 @@ public class AwsInstanceDTO implements IsSerializable { |
| 14 | 15 | @Deprecated |
| 15 | 16 | AwsInstanceDTO() {} // for GWT RPC serialization only |
| 16 | 17 | |
| 17 | - public AwsInstanceDTO(String instanceId, String privateIpAddress, String publicIpAddress, String region, TimePoint launchTimePoint, boolean shared, AvailabilityZoneDTO azDTO) { |
|
| 18 | + public AwsInstanceDTO(String instanceId, String instanceType, String privateIpAddress, String publicIpAddress, String region, TimePoint launchTimePoint, boolean shared, AvailabilityZoneDTO azDTO) { |
|
| 18 | 19 | super(); |
| 19 | 20 | this.instanceId = instanceId; |
| 21 | + this.instanceType = instanceType; |
|
| 20 | 22 | this.availabilityZoneDTO = azDTO; |
| 21 | 23 | this.privateIpAddress = privateIpAddress; |
| 22 | 24 | this.publicIpAddress = publicIpAddress; |
| ... | ... | @@ -27,10 +29,12 @@ public class AwsInstanceDTO implements IsSerializable { |
| 27 | 29 | public String getAvailabilityZoneId() { |
| 28 | 30 | return availabilityZoneDTO.getAzId(); |
| 29 | 31 | } |
| 32 | + public String getInstanceType() { |
|
| 33 | + return instanceType; |
|
| 34 | + } |
|
| 30 | 35 | public String getInstanceId() { |
| 31 | 36 | return instanceId; |
| 32 | 37 | } |
| 33 | - |
|
| 34 | 38 | public AvailabilityZoneDTO getAvailabilityZoneDTO() { |
| 35 | 39 | return availabilityZoneDTO; |
| 36 | 40 | } |
java/com.sap.sailing.landscape.ui/src/com/sap/sailing/landscape/ui/shared/ReverseProxyDTO.java
| ... | ... | @@ -14,10 +14,10 @@ public class ReverseProxyDTO extends AwsInstanceDTO implements Named { |
| 14 | 14 | private String health; |
| 15 | 15 | private boolean isDisposable = false; |
| 16 | 16 | |
| 17 | - public ReverseProxyDTO(String instanceId, String privateIpAddress, String publicIpAddress, |
|
| 18 | - String region, TimePoint launchTimePoint, boolean shared, String name, String imageId, String healthInTargetGroup, |
|
| 19 | - boolean isDisposable, AvailabilityZoneDTO availabilityZoneDTO) { |
|
| 20 | - super(instanceId, privateIpAddress, publicIpAddress, region, launchTimePoint, shared, availabilityZoneDTO); |
|
| 17 | + public ReverseProxyDTO(String instanceId, String instanceType, String privateIpAddress, |
|
| 18 | + String publicIpAddress, String region, TimePoint launchTimePoint, boolean shared, String name, String imageId, |
|
| 19 | + String healthInTargetGroup, boolean isDisposable, AvailabilityZoneDTO availabilityZoneDTO) { |
|
| 20 | + super(instanceId, instanceType, privateIpAddress, publicIpAddress, region, launchTimePoint, shared, availabilityZoneDTO); |
|
| 21 | 21 | this.name = name; |
| 22 | 22 | this.amiId = imageId; |
| 23 | 23 | this.health = healthInTargetGroup; |
java/com.sap.sailing.landscape/src/com/sap/sailing/landscape/impl/ArchiveCandidateMonitoringBackgroundTask.java
| ... | ... | @@ -125,8 +125,6 @@ public class ArchiveCandidateMonitoringBackgroundTask implements Runnable { |
| 125 | 125 | private Iterable<Check> checks; |
| 126 | 126 | private Iterator<Check> checksIterator; |
| 127 | 127 | private Check currentCheck; |
| 128 | - |
|
| 129 | - |
|
| 130 | 128 | |
| 131 | 129 | public ArchiveCandidateMonitoringBackgroundTask(User currentUser, LandscapeService landscapeService, |
| 132 | 130 | AwsApplicationReplicaSet<String, SailingAnalyticsMetrics, SailingAnalyticsProcess<String>> replicaSet, |