728bc253801b74a5c7e21071b828985477e542a3
java/com.sap.sailing.landscape.ui/src/com/sap/sailing/landscape/ui/client/AbstractNewProcessDialog.java
| ... | ... | @@ -4,7 +4,6 @@ import com.google.gwt.user.client.ui.Grid; |
| 4 | 4 | import com.google.gwt.user.client.ui.Label; |
| 5 | 5 | import com.google.gwt.user.client.ui.ListBox; |
| 6 | 6 | import com.google.gwt.user.client.ui.TextBox; |
| 7 | -import com.sap.sailing.landscape.common.SharedLandscapeConstants; |
|
| 8 | 7 | import com.sap.sailing.landscape.ui.client.i18n.StringMessages; |
| 9 | 8 | import com.sap.sse.gwt.client.ErrorReporter; |
| 10 | 9 | import com.sap.sse.gwt.client.controls.IntegerBox; |
| ... | ... | @@ -63,12 +62,13 @@ public abstract class AbstractNewProcessDialog<T> extends DataEntryDialog<T> { |
| 63 | 62 | private final IntegerBox memoryInMegabytesBox; |
| 64 | 63 | private final IntegerBox memoryTotalSizeFactorBox; |
| 65 | 64 | |
| 66 | - public AbstractNewProcessDialog(String title, LandscapeManagementWriteServiceAsync landscapeManagementService, |
|
| 67 | - StringMessages stringMessages, ErrorReporter errorReporter, DialogCallback<T> callback) { |
|
| 65 | + public AbstractNewProcessDialog(String title, String defaultInstanceTypeName, |
|
| 66 | + LandscapeManagementWriteServiceAsync landscapeManagementService, StringMessages stringMessages, |
|
| 67 | + ErrorReporter errorReporter, DialogCallback<T> callback) { |
|
| 68 | 68 | super(title, /* message */ null, stringMessages.ok(), stringMessages.cancel(), /* validator */ null, callback); |
| 69 | 69 | this.stringMessages = stringMessages; |
| 70 | 70 | instanceTypeListBox = LandscapeDialogUtil.createInstanceTypeListBox(this, landscapeManagementService, |
| 71 | - stringMessages, SharedLandscapeConstants.DEFAULT_DEDICATED_INSTANCE_TYPE_NAME, errorReporter, /* canBeDeployedInNlbInstanceBasedTargetGroup */ false); |
|
| 71 | + stringMessages, defaultInstanceTypeName, errorReporter, /* canBeDeployedInNlbInstanceBasedTargetGroup */ false); |
|
| 72 | 72 | instanceTypeLabel = new Label(); |
| 73 | 73 | masterReplicationBearerTokenBox = createTextBox("", 40); |
| 74 | 74 | replicaReplicationBearerTokenBox = createTextBox("", 40); |
java/com.sap.sailing.landscape.ui/src/com/sap/sailing/landscape/ui/client/LandscapeManagementPanel.java
| ... | ... | @@ -1462,9 +1462,11 @@ public class LandscapeManagementPanel extends SimplePanel { |
| 1462 | 1462 | |
| 1463 | 1463 | private void upgradeArchiveServer(StringMessages stringMessages, String regionId, |
| 1464 | 1464 | SailingApplicationReplicaSetDTO<String> archiveReplicaSet) { |
| 1465 | + applicationReplicaSetsBusy.setBusy(true); |
|
| 1465 | 1466 | landscapeManagementService.getReleases(new AsyncCallback<ArrayList<ReleaseDTO>>() { |
| 1466 | 1467 | @Override |
| 1467 | 1468 | public void onFailure(Throwable caught) { |
| 1469 | + applicationReplicaSetsBusy.setBusy(false); |
|
| 1468 | 1470 | errorReporter.reportError(caught.getMessage()); |
| 1469 | 1471 | } |
| 1470 | 1472 | |
| ... | ... | @@ -1484,11 +1486,13 @@ public class LandscapeManagementPanel extends SimplePanel { |
| 1484 | 1486 | new AsyncCallback<Void>() { |
| 1485 | 1487 | @Override |
| 1486 | 1488 | public void onFailure(Throwable caught) { |
| 1489 | + applicationReplicaSetsBusy.setBusy(false); |
|
| 1487 | 1490 | errorReporter.reportError(caught.getMessage()); |
| 1488 | 1491 | } |
| 1489 | 1492 | |
| 1490 | 1493 | @Override |
| 1491 | 1494 | public void onSuccess(Void result) { |
| 1495 | + applicationReplicaSetsBusy.setBusy(false); |
|
| 1492 | 1496 | Notification.notify(stringMessages.successfullyLaunchedNewArchiveCandidate( |
| 1493 | 1497 | archiveReplicaSet.getName(), upgradeInstructions.getReleaseNameOrNullForLatestMaster()), |
| 1494 | 1498 | NotificationType.SUCCESS); |
| ... | ... | @@ -1498,6 +1502,7 @@ public class LandscapeManagementPanel extends SimplePanel { |
| 1498 | 1502 | |
| 1499 | 1503 | @Override |
| 1500 | 1504 | public void cancel() { |
| 1505 | + applicationReplicaSetsBusy.setBusy(false); |
|
| 1501 | 1506 | } |
| 1502 | 1507 | }).show(); |
| 1503 | 1508 | } |
| ... | ... | @@ -1505,23 +1510,28 @@ public class LandscapeManagementPanel extends SimplePanel { |
| 1505 | 1510 | } |
| 1506 | 1511 | |
| 1507 | 1512 | private void makeCandidateArchiveServerGoLive(StringMessages stringMessages, String regionId, SailingApplicationReplicaSetDTO<String> archiveReplicaSetToUpgrade) { |
| 1508 | - landscapeManagementService.makeCandidateArchiveServerGoLive(regionId, archiveReplicaSetToUpgrade, |
|
| 1509 | - sshKeyManagementPanel.getSelectedKeyPair() == null ? null |
|
| 1510 | - : sshKeyManagementPanel.getSelectedKeyPair().getName(), |
|
| 1511 | - sshKeyManagementPanel.getPassphraseForPrivateKeyDecryption() != null |
|
| 1512 | - ? sshKeyManagementPanel.getPassphraseForPrivateKeyDecryption().getBytes() |
|
| 1513 | - : null, |
|
| 1514 | - new AsyncCallback<Void>() { |
|
| 1515 | - @Override |
|
| 1516 | - public void onFailure(Throwable caught) { |
|
| 1517 | - errorReporter.reportError(caught.getMessage()); |
|
| 1518 | - } |
|
| 1519 | - |
|
| 1520 | - @Override |
|
| 1521 | - public void onSuccess(Void result) { |
|
| 1522 | - Notification.notify(stringMessages.successfullySwitchedToNewArchiveCandidate(archiveReplicaSetToUpgrade.getName()), NotificationType.SUCCESS); |
|
| 1523 | - } |
|
| 1524 | - }); |
|
| 1513 | + if (Window.confirm(stringMessages.reallySwitchToNewArchiveCandidate())) { |
|
| 1514 | + applicationReplicaSetsBusy.setBusy(true); |
|
| 1515 | + landscapeManagementService.makeCandidateArchiveServerGoLive(regionId, archiveReplicaSetToUpgrade, |
|
| 1516 | + sshKeyManagementPanel.getSelectedKeyPair() == null ? null |
|
| 1517 | + : sshKeyManagementPanel.getSelectedKeyPair().getName(), |
|
| 1518 | + sshKeyManagementPanel.getPassphraseForPrivateKeyDecryption() != null |
|
| 1519 | + ? sshKeyManagementPanel.getPassphraseForPrivateKeyDecryption().getBytes() |
|
| 1520 | + : null, |
|
| 1521 | + new AsyncCallback<Void>() { |
|
| 1522 | + @Override |
|
| 1523 | + public void onFailure(Throwable caught) { |
|
| 1524 | + applicationReplicaSetsBusy.setBusy(true); |
|
| 1525 | + errorReporter.reportError(caught.getMessage()); |
|
| 1526 | + } |
|
| 1527 | + |
|
| 1528 | + @Override |
|
| 1529 | + public void onSuccess(Void result) { |
|
| 1530 | + applicationReplicaSetsBusy.setBusy(true); |
|
| 1531 | + Notification.notify(stringMessages.successfullySwitchedToNewArchiveCandidate(archiveReplicaSetToUpgrade.getName()), NotificationType.SUCCESS); |
|
| 1532 | + } |
|
| 1533 | + }); |
|
| 1534 | + } |
|
| 1525 | 1535 | } |
| 1526 | 1536 | |
| 1527 | 1537 | private void refreshRegionsTable(UserService userService) { |
java/com.sap.sailing.landscape.ui/src/com/sap/sailing/landscape/ui/client/MoveMasterProcessDialog.java
| ... | ... | @@ -36,8 +36,10 @@ public class MoveMasterProcessDialog extends AbstractNewProcessDialog<MoveMaster |
| 36 | 36 | private boolean memoryAsFactorToTotalMemoryAdjusted; |
| 37 | 37 | |
| 38 | 38 | public MoveMasterProcessDialog(LandscapeManagementWriteServiceAsync landscapeManagementService, |
| 39 | - StringMessages stringMessages, ErrorReporter errorReporter, DialogCallback<MoveMasterToOtherInstanceInstructions> callback) { |
|
| 40 | - super(stringMessages.moveMasterToOtherInstance(), landscapeManagementService, stringMessages, errorReporter, callback); |
|
| 39 | + StringMessages stringMessages, ErrorReporter errorReporter, |
|
| 40 | + DialogCallback<MoveMasterToOtherInstanceInstructions> callback) { |
|
| 41 | + super(stringMessages.moveMasterToOtherInstance(), SharedLandscapeConstants.DEFAULT_DEDICATED_INSTANCE_TYPE_NAME, |
|
| 42 | + landscapeManagementService, stringMessages, errorReporter, callback); |
|
| 41 | 43 | getMemoryTotalSizeFactorBox().addValueChangeHandler(e->memoryAsFactorToTotalMemoryAdjusted=true); |
| 42 | 44 | sharedMasterInstanceBox = createCheckbox(stringMessages.sharedMasterInstance()); |
| 43 | 45 | sharedMasterInstanceBox.addValueChangeHandler(e->updateInstanceTypeBasedOnSharedMasterInstanceBox()); |
java/com.sap.sailing.landscape.ui/src/com/sap/sailing/landscape/ui/client/UpgradeArchiveServerDialog.java
| ... | ... | @@ -26,19 +26,11 @@ public class UpgradeArchiveServerDialog extends AbstractNewProcessDialog<Upgrade |
| 26 | 26 | |
| 27 | 27 | private final SuggestBox releaseNameBox; |
| 28 | 28 | |
| 29 | - public UpgradeArchiveServerDialog(LandscapeManagementWriteServiceAsync landscapeManagementService, String defaultInstanceType, |
|
| 29 | + public UpgradeArchiveServerDialog(LandscapeManagementWriteServiceAsync landscapeManagementService, String defaultInstanceTypeName, |
|
| 30 | 30 | Iterable<String> releaseNames, |
| 31 | 31 | StringMessages stringMessages, ErrorReporter errorReporter, DialogCallback<UpgradeArchiveServerInstructions> callback) { |
| 32 | - super(stringMessages.upgradeArchiveServer(), landscapeManagementService, stringMessages, errorReporter, callback); |
|
| 32 | + super(stringMessages.upgradeArchiveServer(), defaultInstanceTypeName, landscapeManagementService, stringMessages, errorReporter, callback); |
|
| 33 | 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 | - } |
|
| 42 | 34 | } |
| 43 | 35 | |
| 44 | 36 | @Override |
java/com.sap.sailing.landscape.ui/src/com/sap/sailing/landscape/ui/client/i18n/StringMessages.java
| ... | ... | @@ -183,4 +183,5 @@ com.sap.sse.gwt.adminconsole.StringMessages { |
| 183 | 183 | String successfullyLaunchedNewArchiveCandidate(String replicaSetName, String releaseName); |
| 184 | 184 | String successfullySwitchedToNewArchiveCandidate(String replicaSetName); |
| 185 | 185 | String activateArchiveCandidate(); |
| 186 | + String reallySwitchToNewArchiveCandidate(); |
|
| 186 | 187 | } |
java/com.sap.sailing.landscape.ui/src/com/sap/sailing/landscape/ui/client/i18n/StringMessages.properties
| ... | ... | @@ -171,4 +171,5 @@ igtimiRiotPort=Igtimi Riot Port |
| 171 | 171 | examplePort=e.g., {0} |
| 172 | 172 | successfullyLaunchedNewArchiveCandidate=Successfully launched new {0} candidate with release {1}. You will receive an e-mail when the candidate is ready for spot checks and rotation to production. This can take several hours, depending on the number of events to load. |
| 173 | 173 | successfullySwitchedToNewArchiveCandidate=Successfully switched to new {0} server |
| 174 | -activateArchiveCandidate=Activate ARCHIVE candidate (must have run an upgrade before and received the success e-mail!) |
|
| ... | ... | \ No newline at end of file |
| 0 | +activateArchiveCandidate=Activate ARCHIVE candidate (must have run an upgrade before and received the success e-mail!) |
|
| 1 | +reallySwitchToNewArchiveCandidate=Really switch to new ARCHIVE candidate? You confirm that you have previously received a success notification from a prior ARCHIVE upgrade request and that you have done a few spot checks to ensure the ARCHIVE candidate looks good. |
|
| ... | ... | \ No newline at end of file |
java/com.sap.sailing.landscape.ui/src/com/sap/sailing/landscape/ui/client/i18n/StringMessages_de.properties
| ... | ... | @@ -170,4 +170,5 @@ igtimiRiotPort=Igtimi Riot Port |
| 170 | 170 | examplePort=z.B. {0} |
| 171 | 171 | successfullyLaunchedNewArchiveCandidate=Neuen Kandidaten für {0} mit Version {1} gestartet. Es erfolgt eine Benachrichtigung per e-Mail. Das kann, je nach Umfang der zu ladenden Daten, etliche Stunden dauern. |
| 172 | 172 | successfullySwitchedToNewArchiveCandidate=Erfolgreich auf neuen Server {0} umgeschaltet |
| 173 | -activateArchiveCandidate=ARCHIVE-Kandidaten aktivieren (zuvor muss ein Upgrade-Versuch per e-Mail als erfolgreich markiert worden sein!) |
|
| ... | ... | \ No newline at end of file |
| 0 | +activateArchiveCandidate=ARCHIVE-Kandidaten aktivieren (zuvor muss ein Upgrade-Versuch per e-Mail als erfolgreich markiert worden sein!) |
|
| 1 | +reallySwitchToNewArchiveCandidate=Wirklich auf dne neuen ARCHIVE-Kandidaten umschalten? Du bestätigst damit, dass Du eine Erfolgs-Benachrichtigung zu einer vorangegangenen Update-Prozedur für den ARCHIVE-Server erhalten hast und Du Dich wenigstens stichprobenartig von der Korrektheit des neuen Kandidaten überzeugt hast. |
|
| ... | ... | \ No newline at end of file |