Ignore:
Timestamp:
May 13, 2011, 6:42:42 PM (12 years ago)
Author:
work@…
Message:
  • working version of the setup wizard, see #185
Location:
trunk/grails-app/views/setup
Files:
3 added
5 edited
2 moved

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/views/setup/common/_on_page.gsp

    r1648 r1846  
    2424%>
    2525<script type="text/javascript">
    26         function onPage() {
    27                 if (console) {
    28                         console.log('calling onPage() which can be used to attach generic javascript handlers to DOM elements of a rendered page / partial');
    29                 }
    30         }
     26        function onPage() {
     27                if (console) {
     28                        attachHelpTooltips();
     29
     30                        // syntax highlighting
     31                        function path() {
     32                                var args = arguments,result = [];
     33                                for(var i = 0; i < args.length; i++) result.push(args[i].replace('@', 'http://alexgorbatchev.com/pub/sh/current/scripts/'));
     34                                return result
     35                        }
     36
     37                        SyntaxHighlighter.autoloader.apply(null, path(
     38                          'applescript            @shBrushAppleScript.js',
     39                          'bash shell             @shBrushBash.js',
     40                          'css                    @shBrushCss.js',
     41                          'diff patch pas         @shBrushDiff.js',
     42                          'groovy                 @shBrushGroovy.js',
     43                          'java                   @shBrushJava.js',
     44                          'jfx javafx             @shBrushJavaFX.js',
     45                          'js jscript javascript  @shBrushJScript.js',
     46                          'php                    @shBrushPhp.js',
     47                          'text plain             @shBrushPlain.js',
     48                          'py python              @shBrushPython.js',
     49                          'sql                    @shBrushSql.js',
     50                          'xml xhtml xslt html    @shBrushXml.js'
     51                        ));
     52                        SyntaxHighlighter.all();
     53                }
     54        }
    3155</script>
    3256
  • trunk/grails-app/views/setup/index.gsp

    r1651 r1846  
    1515<head>
    1616        <meta name="layout" content="main"/>
    17         <g:javascript library="jquery" plugin="jquery"/>
    1817        <link rel="stylesheet" href="${resource(dir: 'css', file: 'ajaxflow.css')}"/>
    1918        <link rel="stylesheet" href="${resource(dir: 'css', file: 'setupwizard.css')}"/>
     19        <link rel="stylesheet" href="${resource(dir: 'css', file: 'templates.css')}"/>
     20        <link type="text/css" rel="stylesheet" href="http://alexgorbatchev.com/pub/sh/current/styles/shCore.css" />
     21        <link type="text/css" rel="stylesheet" href="http://alexgorbatchev.com/pub/sh/current/styles/shThemeDefault.css" />
     22        <script src="http://alexgorbatchev.com/pub/sh/current/scripts/shCore.js"></script>
     23        <script src="http://alexgorbatchev.com/pub/sh/current/scripts/shAutoloader.js"></script>
     24        <script type="text/javascript" src="${resource(dir: 'js', file: 'tooltips.js', plugin: 'gdt')}"></script>
     25        <script type="text/javascript" src="${resource(dir: 'js', file: 'jquery.qtip-1.0.0-rc3.js', plugin: 'gdt')}"></script>
    2026</head>
    2127<body>
  • trunk/grails-app/views/setup/pages/_configuration_location.gsp

    r1651 r1846  
    44 *
    55 * @author Jeroen Wesbeek
    6  * @since  20110318
     6 * @since  20110513
    77 *
    88 * Revision information:
     
    1515<h1>Configuration file</h1>
    1616
    17 <font color="red"><b><i>NOTE: this wizard is in development!</i></b></font>
     17<g:if test="${configInfo.pathSummary && configInfo.fileSummary}">
     18        <span class="info">
     19                <span class="okay">The configuration file and path are okay!</span>
     20                Click next to continue...
     21        </span>
     22</g:if><g:else>
     23        <span class="info">
     24                <span class="warning">
     25                        You need to fix the configuration
     26                        <g:if test="${!configInfo.pathSummary && !configInfo.fileSummary}">path and file</g:if>
     27                        <g:elseif test="${!configInfo.pathSummary}">path</g:elseif>
     28                        <g:elseif test="${!configInfo.fileSummary}">file</g:elseif>
     29                        in order to continue
     30                </span>
     31                The application is currently using the default ${grails.util.GrailsUtil.environment} configuration. In the following
     32                steps you will configure the application to use a specific database and (if required) insert default templates and
     33                data.
     34        </span>
     35</g:else>
    1836
    19 <g:if test="${configInfo.pathSummary && configInfo.fileSummary}">
    20         OK!
    21 </g:if>
    22 <g:else>
    2337<div class="checklist">
    2438        <ul class="header">
     
    4357        </ul>
    4458</div>
    45 </g:else>
    4659
    4760</af:page>
  • trunk/grails-app/views/setup/pages/_database.gsp

    r1651 r1846  
    1313%>
    1414<af:page>
    15 <h1>Database configuration</h1>
     15        <h1>Database configuration</h1>
    1616
     17        <af:selectElement name="dataSource.driverClassName" description="database type" error="driver" optionKey="name" optionValue="description" from="[[name:'org.postgresql.Driver', description:'PostgreSQL (prefered)'],[name:'org.hsqldb.jdbcDriver', description: 'In memory']]" value="${configInfo?.properties.getProperty('dataSource.driverClassName')}">
     18                Choose the database of choice. Note that while this application in principle supports different database types, it is specifically developer for PostgreSQL. Choosing
     19                a different database may result in unexpected issues therefore choosing PostgreSQL here is advisable.
     20                Also note that the In Memory database exists only at runtime, which means the database is lost when the application is restarted!
     21        </af:selectElement>
     22        <af:textFieldElement name="dataSource.url" description="url" error="url" value="${configInfo?.properties.getProperty('dataSource.url')}" style="width: 300px;">
     23                The URL of your database, example » jdbc:postgresql://localhost:5432/gscf-ci
     24        </af:textFieldElement>
     25        <af:textFieldElement name="dataSource.username" description="username" error="username" value="${configInfo?.properties.getProperty('dataSource.username')}" style="width: 100px;">
     26                The username for this database
     27        </af:textFieldElement>
     28        <af:textFieldElement name="dataSource.password" description="password" error="password" value="${configInfo?.properties.getProperty('dataSource.password')}" style="width: 100px;">
     29                The password for this database
     30        </af:textFieldElement>
     31        <af:selectElement name="dataSource.dbCreate" description="database creation type" error="dbcreate" optionKey="name" optionValue="description" from="[[name:'update', description:'Create/Update the existing database if changes are required (prefered choice)'],[name:'create', description:'Create the database if required, but do not perform updates'],[name:'create-drop', description: 'Drop the exisiting database and create a fresh database']]" value="${configInfo?.properties.getProperty('dataSource.dbCreate')}">
     32                The application is able to automatically create and update your database. Choose what option suites you best.
     33        </af:selectElement>
     34
     35        <g:if test="${connection==false}">
     36        <span class="info">
     37                <span class="error">Could not connect to database</span>
     38                Please make sure the database settings are correct
     39                <g:if test="${configInfo?.properties.getProperty('dataSource.driverClassName') == 'org.postgresql.Driver'}">
     40                or create the database and database user if you did not yet do so.<br/>
     41
     42                First, as root, change to user postgres and start the Postgres console:
     43                <pre class="brush:plain">
     44                        su - postgres
     45                        psql
     46                </pre>
     47
     48                Then run the following commands:
     49                <pre class="brush:plain">
     50                        create database "${configInfo?.properties.getProperty('dataSource.url').split("/").last()}";
     51                        create user ${configInfo?.properties.getProperty('dataSource.username')} with password '${configInfo?.properties.getProperty('dataSource.password')}';
     52                        grant all privileges on database "${configInfo?.properties.getProperty('dataSource.url').split("/").last()}" to ${configInfo?.properties.getProperty('dataSource.username')};
     53                        ALTER DATABASE "${configInfo?.properties.getProperty('dataSource.url').split("/").last()}" OWNER TO ${configInfo?.properties.getProperty('dataSource.username')};
     54                </pre>
     55
     56                When finished, click <i>next</i> to try again.
     57                </g:if>
     58        </span>
     59        </g:if>
    1760
    1861</af:page>
  • trunk/grails-app/views/setup/pages/_email.gsp

    r1841 r1846  
    1313%>
    1414<af:page>
    15 <h1>Page Three</h1>
    16 <p>
    17 Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce est erat, lacinia in porttitor sed, egestas sed nunc. Maecenas mi diam, ornare ac pulvinar a, lacinia sit amet diam. In non nulla vel ligula rhoncus venenatis. Cras mauris nunc, bibendum eu vehicula a, varius non dui. Vestibulum sit amet lacus ac sapien condimentum aliquam. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Nulla ornare ipsum in odio posuere quis fermentum felis convallis. Nullam eleifend posuere sollicitudin. Integer ac augue eget tellus pulvinar molestie. Suspendisse potenti. Mauris at lectus mauris, ornare rutrum quam. Nullam lobortis, sapien eget porttitor euismod, felis est viverra odio, in molestie turpis magna in nibh. Mauris sollicitudin dignissim tincidunt. Ut ornare risus at ante semper rutrum.
    18 </p>
    19 <p>
    20 Suspendisse blandit imperdiet felis at aliquam. Vestibulum non convallis nisl. Sed nec risus urna, nec ultricies elit. Phasellus consectetur quam eget mauris vehicula blandit. Maecenas suscipit magna a felis porta vitae tristique nisi bibendum. Fusce sed sapien justo, at mollis orci. Nullam nisi nunc, fringilla ut pellentesque ultrices, viverra ac lectus. Pellentesque orci quam, tempus aliquet ornare id, pulvinar sed ligula. Etiam fermentum congue sagittis. Praesent dictum faucibus suscipit. Ut cursus convallis mi quis consectetur. Sed vel arcu sit amet neque laoreet blandit et cursus lacus.
    21 </p>
     15        <h1>Email and URL configuration</h1>
     16
     17        <span class="info">
     18                <span class="title">Email configuration</span>
     19                The application uses the default system mailer, which is probably postfix or sendmail, so you only need to
     20                configure what email adress will be used to send out emails to the users.
     21        </span>
     22
     23        <af:textFieldElement name="grails.plugins.springsecurity.ui.forgotPassword.emailFrom" description="from address" error="grails.plugins.springsecurity.ui.forgotPassword.emailFrom" value="${configInfo?.properties.getProperty('grails.plugins.springsecurity.ui.forgotPassword.emailFrom')}" style="width: 300px;">
     24                The from address used for communication to the users.
     25        </af:textFieldElement>
     26
     27        <span class="info">
     28                <span class="title">URL configuration</span>
     29                Define the URL the application will be running on. If you would like to run from Apache (preferable) and not directly from Tomcat
     30                see the Summary tab for an Apache virtual host configuration example.
     31                <li>running directly from tomcat: http://my.url:8080${org.codehaus.groovy.grails.web.context.ServletContextHolder.getServletContext().contextPath}</li>
     32                <li>running from Apache or Tomcat at port 80: http://my.url</li>
     33        </span>
     34
     35        <af:textFieldElement name="grails.serverURL" description="serverl url" error="grails.serverURL" value="${configInfo?.properties.getProperty('grails.serverURL')}" style="width: 300px;">
     36                The server URL this application will be served on.
     37        </af:textFieldElement>
     38
    2239</af:page>
  • trunk/grails-app/views/setup/pages/_final_page.gsp

    r1648 r1846  
    1313%>
    1414<af:page>
    15 <h1>Final Page</h1>
    16 <p>
    17 This concludes the example wizard. You can click <g:link action="index">here</g:link> to restart the wizard.
    18 </p>
     15        <h1>Final Page</h1>
     16
     17        This concludes the configuration wizard. Make sure to restart your tomcat container to load the new configuration.
     18        After restart you can <g:link controller="assayModule" action="list" class="icon icon_user_add">Manage Your Modules</g:link>
     19        (if you have any).
    1920</af:page>
  • trunk/grails-app/views/setup/pages/_summary.gsp

    r1841 r1846  
    44 *
    55 * @author Jeroen Wesbeek
    6  * @since  20110318
     6 * @since  20110513
    77 *
    88 * Revision information:
     
    1313%>
    1414<af:page>
    15 <h1>Page Four</h1>
    16 <p>
    17 Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque vitae porta justo. Vestibulum vulputate porta orci sed feugiat. In convallis euismod neque in consectetur. Sed nibh eros, venenatis vitae porta sed, fringilla id ante. Vivamus aliquam congue semper. Duis feugiat sapien id erat dignissim congue a eget velit. Suspendisse imperdiet odio ut urna ullamcorper elementum. Morbi et elit lectus. Nulla imperdiet, libero quis faucibus volutpat, mi tellus porta sem, sed facilisis erat augue sit amet massa. Pellentesque rutrum leo arcu. Fusce sit amet venenatis lacus. Cras venenatis nibh eget est malesuada pretium. Suspendisse eget lectus dui. Etiam mauris tortor, tempus a pulvinar sit amet, condimentum at justo. Nulla suscipit augue eu augue ultricies accumsan tincidunt elit mollis.
    18 </p>
    19 <p>
    20 Mauris euismod felis in arcu mattis accumsan. Cras luctus feugiat lectus, ut blandit nisi ullamcorper sit amet. In dapibus tristique justo, nec egestas arcu ullamcorper vitae. Phasellus sagittis pharetra lorem non convallis. Curabitur pulvinar tellus non arcu vestibulum in elementum ante varius. Proin est magna, sollicitudin at dictum ut, gravida at sem. Sed in urna massa. Aliquam et urna ac erat malesuada rutrum tincidunt vitae purus. Ut mollis nisl vel enim condimentum dapibus. Etiam tristique augue ullamcorper sem placerat vitae congue nibh semper. Maecenas in adipiscing purus. Sed sem eros, convallis vel mollis pretium, consectetur sed ligula. Aliquam erat volutpat. Donec aliquet purus eget nunc dapibus in semper magna malesuada. Nunc ornare egestas elementum. Pellentesque vulputate commodo est, vel sagittis libero molestie non. In hac habitasse platea dictumst. Ut pharetra quam quis nunc eleifend quis sodales justo molestie. Nunc eu bibendum lectus.
    21 </p>
     15        <h1>Summary</h1>
     16
     17        <span class="info">
     18                <span class="title">New application configuration</span>
     19                Congratulations, you just finished setting up and configuring the application. Below you see the configuration
     20                file (${configInfo.file}) you have just created.
     21        </span>
     22
     23        Configuration file: ${configInfo.file}<br/>
     24
     25
     26
     27        <pre class="brush:plain">${configInfo.file.text}</pre>
     28
    2229</af:page>
Note: See TracChangeset for help on using the changeset viewer.