1497
private class LandscapeDialog extends DialogBox {
1499
private boolean cancelled = false;
1500
private String landscapeUrl = null;
1502
public LandscapeDialog () {
1505
setHTML("<img src=\"themes/share/pending-FFCC33.gif\" align=\"middle\"> Checking the external IP address...");
1507
final Button okButton = new Button("OK",
1508
new ClickListener() {
1509
public void onClick(Widget sender) {
1510
LandscapeDialog.this.hide();
1511
if (landscapeUrl!=null) {
1512
Window.open(landscapeUrl, "_blank", "");
1516
okButton.setEnabled (false);
1517
Button cancelButton = new Button("Cancel",
1518
new ClickListener() {
1519
public void onClick(Widget sender) {
1520
LandscapeDialog.this.hide();
1525
HorizontalPanel buttonPanel = new HorizontalPanel();
1526
buttonPanel.add (okButton);
1527
buttonPanel.add (cancelButton);
1528
setWidget (buttonPanel);
1530
EucalyptusWebBackend.App.getInstance().getCloudInfo(
1532
true, // DO check external IP
1533
new AsyncCallback () {
1534
public void onSuccess( Object result )
1539
cloudInfo = (CloudInfoWeb) result;
1540
String ex = cloudInfo.getExternalHostPort();
1541
String in = cloudInfo.getInternalHostPort();
1547
text = "<b>Warning:</b> The external IP address of your cloud could not be discovered. Hence, the pre-filled cloud URL <i>may</i> be incorrect. Check your firewall settings.</p>";
1548
} else if (!ex.equals(in)) {
1550
text = "<b>Warning:</b> The external cloud IP discovered (" + ex + ") is different from the IP found by Eucalyptus (" + in + "). Hence, the pre-filled cloud URL <i>may</i> be incorrect. Check your firewall settings.</p>";
1554
String callbackUrl = "https://"
1556
+ cloudInfo.getServicePath();
1557
// XXX Should really use the info-url instead
1558
String ec2Url = "http://"
1560
+ "/services/Eucalyptus";
1562
"https://landscape.canonical.com/register-cloud"
1564
+ GWTUtils.escape(ec2Url)
1566
+ GWTUtils.escape(callbackUrl)
1568
+ GWTUtils.escape(cloudInfo.getCloudId());
1569
String pre = "<h3>Cloud registration</h3> You are about to open a new window to Landscape's web site, on which you will be able to complete the registraton.</p>";
1570
setHTML(pre + text);
1571
okButton.setEnabled(true);
1574
public void onFailure(Throwable caught)
1576
displayErrorPage(caught.getMessage());
1583
1491
public void actuallyDisplayCredentialsTab (VerticalPanel parent)
1585
1493
History.newItem("credentials");
2426
2331
parent.clear();
2427
2332
parent.add(imageStore);
2430
private class SectionWidget extends Composite {
2431
private VerticalPanel verticalPanel = new VerticalPanel();
2432
public SectionWidget(String title, String contentHtml) {
2433
initialize(title, new HTML(contentHtml));
2435
public SectionWidget(String title, Widget contentWidget) {
2436
initialize(title, contentWidget);
2438
private void initialize(String title, Widget contentWidget) {
2439
Label titleLabel = new Label(title);
2440
titleLabel.setStyleName("istore-section-title");
2441
verticalPanel.add(titleLabel);
2442
verticalPanel.add(new FrameWidget(contentWidget));
2443
contentWidget.addStyleName("istore-images-panel");
2444
initWidget(verticalPanel);
2445
setStyleName("istore-image-section-widget");
2449
public void displayServicesTab (final VerticalPanel parent)
2451
History.newItem ("services");
2452
VerticalPanel servicesPanel = new VerticalPanel();
2453
servicesPanel.add(new SectionWidget(
2454
"Ubuntu Enterprise Cloud Documentation",
2455
"<p>For UEC documentation, community pages and the " +
2456
"UEC user mailing list please see the Ubuntu site:</p>" +
2457
"<div style=\"padding-left: 2em; padding-bottom: 1em;\">" +
2458
"<a href=\"http://www.ubuntu.com/cloud\">" +
2459
"Ubuntu Enterprise Cloud" +
2461
servicesPanel.add(new SectionWidget(
2463
"<p>The Ubuntu Enterprise Cloud training course covers every " +
2464
"aspect of running your own cloud. Including installing, " +
2465
"configuring and optimising the infrastructure, along with " +
2466
"setting up and managing virtual machines for your " +
2467
"applications. To learn about the UEC course, and our other " +
2468
"Ubuntu courses please see:</p>" +
2469
"<div style=\"padding-left: 2em; padding-bottom: 1em;\">" +
2470
"<a href=\"http://www.ubuntu.com/cloud/training\">" +
2473
servicesPanel.add(new SectionWidget(
2475
"<p>The UEC is powered by Eucalyptus, an open-source cloud " +
2476
"computing platform with support for popular hypervisor and " +
2477
"cloud computing interfaces. Eucalyptus enables users to " +
2478
"easily implement on-premise and hybrid clouds that leverage " +
2479
"both internal and external resources.</p>" +
2480
"<p>For open-source downloads, documentation and user forums " +
2481
"please visit:</p>" +
2482
"<div style=\"padding-left: 2em; padding-bottom: 1em;\">" +
2483
"<a href=\"http://open.eucalyptus.com\">" +
2484
"Eucalyptus Community Website" +
2486
"<p>For enterprise support, professional services and " +
2487
"additional Eucalyptus products please visit:" +
2488
"<div style=\"padding-left: 2em; padding-bottom: 1em;\">" +
2489
"<a href=\"http://www.eucalyptus.com\">" +
2490
"Eucalyptus Enterprise Website" +
2493
HTMLPanel landscapePanel = new HTMLPanel(
2494
"<p><a href=\"http://www.ubuntu.com/landscape\">Landscape</a> is " +
2495
"a systems management service that provides package management, " +
2496
"security alerts, custom script automation and monitoring. " +
2497
"With Landscape you can see and manage all of your Cloud " +
2498
"environment.</p>" +
2499
"<p>If you already have an account with Landscape, you can " +
2500
"register this cloud now:</p>" +
2501
"<div style=\"padding-left: 2em; padding-bottom: 1em;\">" +
2502
"<a href=\"\" id=\"ls-anchor\">" +
2503
"Register this cloud with Landscape" +
2506
Anchor landscapeAnchor = Anchor.wrap(
2507
landscapePanel.getElementById("ls-anchor"));
2509
landscapeAnchor.addClickHandler(new ClickHandler() {
2510
public void onClick(ClickEvent event) {
2511
event.preventDefault();
2512
new LandscapeDialog().center();
2516
servicesPanel.add(new SectionWidget(
2521
if (loggedInUser.isAdministrator() && show_cloud_registration) {
2522
HTMLPanel rightScalePanel = new HTMLPanel(
2523
"<p>Your Eucalyptus cloud can also be registered with " +
2524
"<a href=\"http://rightscale.com/\">RightScale</a>, " +
2525
"providing you and your users with an easy-to-use interface " +
2526
"to both EC2 and your Eucalyptus cloud. The following two " +
2527
"parameters will be necessary for registration:</p>" +
2528
"<div style=\"padding-left: 2em;\">" +
2529
"<p>Cloud URL: <span id=\"rs-cloud-url\"/></p>" +
2530
"<p>Cloud ID: <span id=\"rs-cloud-id\"/></p>" +
2532
"<p>If you already have an account with RightScale, you can " +
2533
"register this cloud now:</p>" +
2534
"<div style=\"padding-left: 2em; padding-bottom: 1em;\">" +
2535
"<a href=\"\" id=\"rs-anchor\">" +
2536
"Register this cloud with RightScale" +
2539
rightScalePanel.add(new InlineLabel(
2541
cloudInfo.getInternalHostPort() +
2542
cloudInfo.getServicePath()
2545
rightScalePanel.add(new InlineLabel(
2546
cloudInfo.getCloudId()
2549
Anchor rightScaleAnchor = Anchor.wrap(
2550
rightScalePanel.getElementById("rs-anchor"));
2552
rightScaleAnchor.addClickHandler(new ClickHandler() {
2553
public void onClick(ClickEvent event) {
2554
event.preventDefault();
2555
new RightscaleDialog().center();
2559
servicesPanel.add(new SectionWidget(
2565
servicesPanel.add(new SectionWidget(
2567
"<p>With commercial support you have the certainty that your " +
2568
"bugs and issues will be responded to promptly. Canonical " +
2569
"provides business day and 24/7 for Ubuntu Enterprise Cloud. " +
2570
"For more details on the service please see:</p>" +
2571
"<div style=\"padding-left: 2em; padding-bottom: 1em;\">" +
2572
"<a href=\"http://www.ubuntu.com/cloud/support\">" +
2577
parent.add(servicesPanel);
2580
2335
public void displayFirstTimeConfiguration()
2582
2337
displayStatusPage("Loading first-time configuration page...");