VMware {code} Community
hcal
Contributor
Contributor
Jump to solution

Web Client SDK and iframe redirect

Greetings,

I am currently developing under the chassis-ui and chassis-service projects. I added a new summary view which creates an iFrame to show content from the following address "https://{ip}/auth.asp".

The iframe populates nicely.  After the adding an exception to the address on my browser, the window redirects to the address every time I open the tab.

Is there any option or alternative method to implementing this? If so, could you please provide an example.

Thank you!

here is a snippet of FrameView.mxml

<?xml version="1.0" encoding="utf-8"?>

<mx:HBox

    xmlns:mx="http://www.adobe.com/2006/mxml"

    xmlns:flexiframe="http://code.google.com/p/flex-iframe/"

    xmlns="*"

    creationComplete="iFrame.visible=true"

    >

    <flexiframe:IFrame id="iFrame"

                       source="https:/{ip}/auth.asp"

                       width="100%"

                       height="100%"

                       debug='true'

                       visible='true'

                       />

</mx:HBox>

0 Kudos
1 Solution

Accepted Solutions
laurentsd
VMware Employee
VMware Employee
Jump to solution

What SDK version are you using?  It looks like you are not familiar with the HTML-Bridge feature which was released in March 2014 with SDK 5.5.1.

Using the Flex-iFrame library directly in your Flex UI is not recommended and not supported.

Check out the HTML bridge documentation for the proper way to develop HTML plugins.

View solution in original post

0 Kudos
5 Replies
laurentsd
VMware Employee
VMware Employee
Jump to solution

What SDK version are you using?  It looks like you are not familiar with the HTML-Bridge feature which was released in March 2014 with SDK 5.5.1.

Using the Flex-iFrame library directly in your Flex UI is not recommended and not supported.

Check out the HTML bridge documentation for the proper way to develop HTML plugins.

0 Kudos
hcal
Contributor
Contributor
Jump to solution

I am using 6.0.

Where could i find documentation for the HTML bridge under web client sdk documentation..

I have been only been able to locate examples, which do not use iframe like functionality.

In respect to the html bridge examples, Would you recommend adding this functionality in javascript or html? would it be via iframe?

I appreciate your help! Thank you!

0 Kudos
Ina1
VMware Employee
VMware Employee
Jump to solution

You can open the …/vsphere-client-sdk/README.html file. It keeps links to all documentation including a bullet called /html-bridge. Go through the HTML tutorial and samples.

hcal
Contributor
Contributor
Jump to solution

Thank you for the helpful advice.

I got it to work (with the following code below), although i am still having experiencing trouble with the window redirecting when i open the tab.

With html, I can fix this with a view sandbox options.

I could not find type of functionality in the documentation, is there any type of alternative?

Thank you !

  <!-- Adding a VM Monitor tab -->

   <extension id="com.vmware.samples.vspherewssdk.vm.monitor">

      <extendedPoint>vsphere.core.vm.monitorViews</extendedPoint>

      <object>

         <name>#{monitorTab.label}</name>

         <componentClass className="com.vmware.vsphere.client.htmlbridge.HtmlView">

            <object>

               <root>

                  <url>{ip}</url>

               </root>

            </object>

         </componentClass>

      </object>

   </extension>  

0 Kudos
laurentsd
VMware Employee
VMware Employee
Jump to solution

The documentation does explain that if you use an absolute URL for your HTML views you need to handle the cross-domain issue with certificates. See this warning:

https URLs can also be used to display content from another domain in that view, but the content won't load the first time the user goes there, unless the certificate was already verified. http URLs won't work, modern browsers blocks insecure content inside the secure Web Client domain

0 Kudos