deployAddedNodesProgress.js 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /*
  2. *
  3. * Licensed to the Apache Software Foundation (ASF) under one
  4. * or more contributor license agreements. See the NOTICE file
  5. * distributed with this work for additional information
  6. * regarding copyright ownership. The ASF licenses this file
  7. * to you under the Apache License, Version 2.0 (the
  8. * "License"); you may not use this file except in compliance
  9. * with the License. You may obtain a copy of the License at
  10. *
  11. * http://www.apache.org/licenses/LICENSE-2.0
  12. *
  13. * Unless required by applicable law or agreed to in writing,
  14. * software distributed under the License is distributed on an
  15. * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  16. * KIND, either express or implied. See the License for the
  17. * specific language governing permissions and limitations
  18. * under the License.
  19. *
  20. */
  21. renderDeployAddedNodesProgress = function (context) {
  22. /* At this point, our users are done with the installation wizard
  23. * and have asked for a deploy, so there's no going back - remove
  24. * all traces of #installationWizardProgressBarDivId.
  25. */
  26. var progressBarDiv = Y.one('#installationWizardProgressBarDivId');
  27. if (progressBarDiv) {
  28. progressBarDiv.hide();
  29. }
  30. var successMessage =
  31. '<p>' +
  32. 'Successfully added new nodes to your cluster.<br><a href="index.php" id="addMoreNodesSuccessLink" style="margin-top:10px" class="btn btn-large">Continue</a>' +
  33. '</p>';
  34. var failureMessage =
  35. '<p>' +
  36. 'Failed to add new nodes to the cluster.<br>Take a look at the ' +
  37. '<a href="javascript:void(null)" id="txnProgressWidgetShowLogsLink">deploy logs</a>' +
  38. ' to find out what might have gone wrong.' +
  39. '<a href="index.php" class="btn btn-large" style="margin-top:10px" id="addMoreNodesFailedLink">' +
  40. 'Continue' +
  41. '</a>' +
  42. '</p>';
  43. var config = {
  44. context: context,
  45. title: 'Add Nodes Progress',
  46. successMessage: successMessage,
  47. failureMessage: failureMessage
  48. };
  49. var progressWidget = new App.ui.TxnProgressWidget(config);
  50. progressWidget.show();
  51. };