efmarshall / h2database

Automatically exported from code.google.com/p/h2database
0 stars 0 forks source link

Web Console in an IFrame not fully supported #554

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Embedding the web console in an IFrame on another page within my 
application disables some javascirpt features. It seems the auto complete and 
clicking on a table to 
insert it into the query doesn't work. It doesn't seem to like not being 
the top level frame?

The question has been raised at the H2 Database google groups with a suggested 
solution to the problem.
see: https://groups.google.com/forum/#!topic/h2-database/0u3AU1b43cI

What steps will reproduce the problem?
(simple SQL scripts or simple standalone applications are preferred)
1. Start the Web Console
2. Embedd it in an iframe
3. Try clicking on a table name

What is the expected output? What do you see instead?
the select query should appear in the sql statement textarea. 

What version of the product are you using? On what operating system, file
system, and virtual machine?
h2 version: 1.3.175

Do you know a workaround?
No

What is your use case, meaning why do you need this feature?

How important/urgent is the problem for you?

Please provide any additional information below.

Original issue reported on code.google.com by anders.s...@gmail.com on 24 Mar 2014 at 5:44

GoogleCodeExporter commented 9 years ago
We are happy to accept patches if you want to work on this.

Original comment by noelgrandin on 25 Mar 2014 at 7:52

GoogleCodeExporter commented 9 years ago
I have attached a patch that fully supports embedding the web console in an 
iframe.

The patch is tested in
* Chrome (Version 33.0.1750.149)
* Firefox (27.0.1)
* IE8

The patch replaces the references to the top frame with references to the 
parent frame in the javascript code (as suggested Noel Grandin in the following 
discussion https://groups.google.com/forum/#!topic/h2-database/0u3AU1b43cI).

The patch also removes some javascript from the jsp pages that runs on page 
load e.g. in admin.jsp:

-    <script type="text/javascript">
-        <!--
-        if (self != top) {
-            top.location = "admin.jsp";
-        }
-        //-->
-    </script>

Not sure what the purpose of this code is but it makes it impossible to load 
the page in an iframe. This is probably some legacy code which is never used, 
but correct me if I'm wrong. The svn history does not tell the story behind 
this code since it is not available.

Is there something more I can do?

Original comment by anders.s...@gmail.com on 28 Mar 2014 at 1:34

Attachments:

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Attaching the a html file that can be used for testing the web console embedded 
in an iframe.

Original comment by anders.s...@gmail.com on 28 Mar 2014 at 1:39

Attachments:

GoogleCodeExporter commented 9 years ago
Sorry this took so long.
Committed in revision 5617.
Will be available in version 1.3.177

Original comment by noelgrandin on 17 Apr 2014 at 7:43