PageRenderTime 13ms CodeModel.GetById 2ms app.highlight 5ms RepoModel.GetById 1ms app.codeStats 1ms

/demo/exe/templates/website/db_test.tmpl

http://github.com/ThomasLocke/yolk
Go Template | 88 lines | 88 code | 0 blank | 0 comment | 0 complexity | 777d3a9ba8480c04ef6468c19553beaa MD5 | raw file
 1@@-----------------------------------------------------------------------------
 2@@--                                                                         --
 3@@--                               Yolk                                      --
 4@@--                                                                         --
 5@@--                Copyright (C) 2000-2012, Thomas Løcke                    --
 6@@--                                                                         --
 7@@-- This is free software;  you can redistribute it and/or modify it        --
 8@@-- under terms of the  GNU General Public License  as published by the     --
 9@@-- Free Software  Foundation;  either version 3,  or (at your  option) any --
10@@-- later version. This library is distributed in the hope that it will be  --
11@@-- useful, but WITHOUT ANY WARRANTY;  without even the implied warranty of --
12@@-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.                    --
13@@-- You should have received a copy of the GNU General Public License and   --
14@@-- a copy of the GCC Runtime Library Exception along with this program;    --
15@@-- see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see   --
16@@-- <http://www.gnu.org/licenses/>.                                         --
17@@--                                                                         --
18@@-----------------------------------------------------------------------------
19<!DOCTYPE html>
20<html>
21    <head>
22        <meta charset="utf-8"/>
23        <link rel="stylesheet" type="text/css" href="/css/index.css"/>
24        <link rel="icon" href="/images/favicon.ico" type="image/x-icon"/>
25        <title>
26            Yolk Web Toolbox
27        </title>
28    </head>
29<body>
30    <h3>PostgreSQL test</h3>
31    @@IF@@ @_POSTGRESQL_SETUP_@
32        <p>
33            Connection to PostgreSQL database succeeded.
34        </p>
35        <p>
36            The test will now proceed with creating a table, inserting and querying some data and finally dropping the table.
37        </p>
38        <h4>Test output</h4>
39        <ul>
40            @@TABLE@@
41                <li>@_POSTGRESQL_MESSAGES_@</li>
42            @@END_TABLE@@
43            @@IF@@ @_POSTGRESQL_SUCCESS_@
44                <li class="green">Test successfully completed!</li>
45            @@ELSE@@
46                <li class="red">Test failed!</li>
47            @@END_IF@@
48        </ul>
49    @@ELSE@@
50        <p>
51            In order to test if Yolk can connect and interact with a PostgreSQL database, you must create an empty PostgreSQL database and then set the four database parameters in configuration/my_config.ini accordingly:
52        </p>
53        <ul>
54            <li>DB_Host</li>
55            <li>DB_Name</li>
56            <li>DB_Password</li>
57            <li>DB_User</li>
58        </ul>
59        <p>
60           You do not need to create any tables in the DB_Name database.
61        </p>
62        <p>
63            When you've done this, simply refresh this page, or drop this test and go back to the <a href="/">main page</a>.
64        </p>
65    @@END_IF@@
66    <h3>SQLite test</h3>
67    <p>
68        Connection to SQLite database succeeded.
69    </p>
70    <p>
71        The test will now proceed with inserting, querying and deleting some data.
72    </p>
73    <h4>Test output</h4>
74    <ul>
75        @@TABLE@@
76            <li>@_SQLITE_MESSAGES_@</li>
77        @@END_TABLE@@
78        @@IF@@ @_SQLITE_SUCCESS_@
79            <li class="green">Test successfully completed!</li>
80        @@ELSE@@
81            <li class="red">Test failed!</li>
82        @@END_IF@@
83    </ul>
84    <p>
85        If all went well, go back to the <a href="/">main page</a>. If you have some red output, check the log files, fix the error and try again.
86    </p>
87</body>
88</html>