root / hci / trunk / eneraptor-web-app / grails-app / views / config / dbExec.gsp @ 67
History | View | Annotate | Download (1.65 KB)
1 | 6 | alexbesir | <html> |
---|---|---|---|
2 | |||
3 | <head> |
||
4 | <title>Configuration » Manual SQL querying</title> |
||
5 | <meta name="layout" content="main" /> |
||
6 | </head> |
||
7 | |||
8 | <body> |
||
9 | |||
10 | <g:if test="${sqlResult}"> |
||
11 | <erptr:box title="SQL query result"> |
||
12 | <p>The SQL query has been executed. Result:</p> |
||
13 | <div> |
||
14 | |||
15 | <g:if test="${wasError}"> |
||
16 | <g:each in="${sqlResult}" var="row"> |
||
17 | <p>${row.toString()}</p> |
||
18 | </g:each> |
||
19 | </g:if> |
||
20 | <g:else> |
||
21 | |||
22 | <table width="100%"> |
||
23 | <thead> |
||
24 | <tr> |
||
25 | <g:each in="${keys}" var="key"> |
||
26 | <th>${key}</th> |
||
27 | </g:each> |
||
28 | </tr> |
||
29 | </thead> |
||
30 | <tbody> |
||
31 | <g:each in="${sqlResult}" var="row"> |
||
32 | <tr> |
||
33 | <g:each in="${keys}" var="key"> |
||
34 | <td>${row[key.toString()]}</td> |
||
35 | </g:each> |
||
36 | </tr> |
||
37 | </g:each> |
||
38 | </tbody> |
||
39 | </table> |
||
40 | |||
41 | </g:else> |
||
42 | |||
43 | </div> |
||
44 | </erptr:box> |
||
45 | </g:if> |
||
46 | |||
47 | <erptr:box title="Manual SQL querying"> |
||
48 | |||
49 | <p style="color:red;"><erptr:icon w="error" /><i>Caution: Changing database contents and configuration may cause system errors and as a result the HCI may stop working. Use only if you are completely sure of what you are doing.</i></p> |
||
50 | |||
51 | <g:form name="sqlQueryForm" action="dbExec"> |
||
52 | |||
53 | <p>SQL query:</p> |
||
54 | |||
55 | <g:textArea name="sqlQuery" style="width:100%;height:150px;"></g:textArea> |
||
56 | |||
57 | <br /><br /> |
||
58 | |||
59 | <g:submitButton name="sqlQueryFormSubmit" value="Execute" /> |
||
60 | |||
61 | <div style="float:right;"> |
||
62 | <g:link target="_blank" url="http://www.postgresql.org/docs/9.0/static/sql.html"><erptr:icon w="help" />SQL language documentation</g:link> |
||
63 | </div> |
||
64 | |||
65 | </g:form> |
||
66 | |||
67 | </erptr:box> |
||
68 | |||
69 | </body> |
||
70 | |||
71 | </html> |