Changeset 1859 for trunk/grails-app
- Timestamp:
- May 23, 2011, 12:19:55 PM (10 years ago)
- Location:
- trunk/grails-app
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/conf/Config.groovy
r1784 r1859 22 22 23 23 // the external configuration to override the default 24 // configuration (e.g. ~/.grails-config/ci-gscf.properties) 25 "file:${userHome}/.grails-config/${grails.util.GrailsUtil.environment}-${appName}.properties", 26 27 // or in /etc/gscf/ (e.g. /etc/gscf/ci.properties) 28 "file:/etc/${appName}/${grails.util.GrailsUtil.environment}.properties" 24 // configuration (e.g. ~/.gscf/ci.properties) 25 "file:${userHome}/.${appName}/${grails.util.GrailsUtil.environment}.properties" 29 26 ] 30 27 -
trunk/grails-app/conf/config-ci.properties
r1854 r1859 9 9 10 10 # DATABASE 11 dataSource.driverClassName=org.postgresql.Driver 12 dataSource.dialect=org.hibernate.dialect.PostgreSQLDialect 13 dataSource.url=jdbc:postgresql://localhost:5432/gscf-ci 14 dataSource.dbCreate=update 15 dataSource.username=gscf 16 dataSource.password=dbnp 11 dataSource.driverClassName=org.hsqldb.jdbcDriver 12 dataSource.url=jdbc:hsqldb:mem:devDB 13 dataSource.dbCreate=create-drop 14 dataSource.username=sa 15 dataSource.password= 17 16 #dataSource.logSql=true 18 17 … … 34 33 authentication.users.admin.email=admin@dbnp.org 35 34 authentication.users.admin.administrator=true 36 authentication.users.user.username=user37 authentication.users.user.password=useR123!38 authentication.users.user.email=user@dbnp.org39 authentication.users.user.administrator=false35 #authentication.users.user.username=user 36 #authentication.users.user.password=useR123! 37 #authentication.users.user.email=user@dbnp.org 38 #authentication.users.user.administrator=false -
trunk/grails-app/conf/config-dbnptest.properties
r1705 r1859 34 34 authentication.users.admin.email=admin@dbnp.org 35 35 authentication.users.admin.administrator=true 36 authentication.users.user.username=user37 authentication.users.user.password=useR123!38 authentication.users.user.email=user@dbnp.org39 authentication.users.user.administrator=false36 #authentication.users.user.username=user 37 #authentication.users.user.password=useR123! 38 #authentication.users.user.email=user@dbnp.org 39 #authentication.users.user.administrator=false -
trunk/grails-app/conf/config-nmcdsptest.properties
r1705 r1859 9 9 10 10 # DATABASE 11 dataSource.driverClassName=org.postgresql.Driver 12 dataSource.dialect=org.hibernate.dialect.PostgreSQLDialect 13 dataSource.url=jdbc:postgresql://localhost:5432/gscf-test 14 dataSource.dbCreate=update 15 dataSource.username=gscf 16 dataSource.password=dbnp 17 #dataSource.logSql=false 11 dataSource.driverClassName=org.hsqldb.jdbcDriver 12 dataSource.url=jdbc:hsqldb:mem:devDB 13 dataSource.dbCreate=create-drop 14 dataSource.username=sa 15 dataSource.password= 16 #dataSource.logSql=true 18 17 19 18 # SpringSecurity E-Mail Settings … … 34 33 authentication.users.admin.email=admin@dbnp.org 35 34 authentication.users.admin.administrator=true 36 authentication.users.user.username=user37 authentication.users.user.password=useR123!38 authentication.users.user.email=user@dbnp.org39 authentication.users.user.administrator=false35 #authentication.users.user.username=user 36 #authentication.users.user.password=useR123! 37 #authentication.users.user.email=user@dbnp.org 38 #authentication.users.user.administrator=false -
trunk/grails-app/conf/config-production.properties
r1705 r1859 9 9 10 10 # DATABASE 11 dataSource.driverClassName=org.postgresql.Driver 12 dataSource.dialect=org.hibernate.dialect.PostgreSQLDialect 13 dataSource.url=jdbc:postgresql://localhost:5432/gscf-www 14 dataSource.dbCreate=update 15 dataSource.username=gscf 16 dataSource.password=dbnp 11 dataSource.driverClassName=org.hsqldb.jdbcDriver 12 dataSource.url=jdbc:hsqldb:mem:devDB 13 dataSource.dbCreate=create-drop 14 dataSource.username=sa 15 dataSource.password= 17 16 #dataSource.logSql=true 18 17 … … 34 33 authentication.users.admin.email=admin@dbnp.org 35 34 authentication.users.admin.administrator=true 36 authentication.users.user.username=user37 authentication.users.user.password=useR123!38 authentication.users.user.email=user@dbnp.org39 authentication.users.user.administrator=false35 #authentication.users.user.username=user 36 #authentication.users.user.password=useR123! 37 #authentication.users.user.email=user@dbnp.org 38 #authentication.users.user.administrator=false -
trunk/grails-app/conf/config-test.properties
r1705 r1859 33 33 authentication.users.admin.email=admin@dbnp.org 34 34 authentication.users.admin.administrator=true 35 authentication.users.user.username=user36 authentication.users.user.password=useR123!37 authentication.users.user.email=user@dbnp.org38 authentication.users.user.administrator=false35 #authentication.users.user.username=user 36 #authentication.users.user.password=useR123! 37 #authentication.users.user.email=user@dbnp.org 38 #authentication.users.user.administrator=false -
trunk/grails-app/conf/config-www.properties
r1754 r1859 9 9 10 10 # DATABASE 11 dataSource.driverClassName=org.postgresql.Driver 12 dataSource.dialect=org.hibernate.dialect.PostgreSQLDialect 13 dataSource.url=jdbc:postgresql://localhost:5432/gscf-www 14 dataSource.dbCreate=update 15 dataSource.username=gscf 16 dataSource.password=dbnp 11 dataSource.driverClassName=org.hsqldb.jdbcDriver 12 dataSource.url=jdbc:hsqldb:mem:devDB 13 dataSource.dbCreate=create-drop 14 dataSource.username=sa 15 dataSource.password= 17 16 #dataSource.logSql=true 18 17 -
trunk/grails-app/controllers/HomeController.groovy
r1754 r1859 21 21 */ 22 22 class HomeController { 23 def springSecurityService 23 24 def authenticationService 24 25 def dataSource … … 117 118 118 119 // miscelaneous 119 facebookLikeUrl : '/' 120 facebookLikeUrl : '/', 121 db : db 120 122 ] 121 123 } 122 124 125 /** 126 * Quicksearch Closure 127 */ 123 128 def ajaxQuickSearch = { 124 129 def query = params.name_startsWith … … 174 179 } 175 180 } 181 182 /** 183 * Log the user in as admin and jump to the setup wizard 184 */ 185 def setup = { 186 def config = ConfigurationHolder.config 187 def db = config.dataSource.driverClassName 188 def user = authenticationService.getLoggedInUser() 189 190 // are we using the in-memory database in a non-development environment? 191 if (db == "org.hsqldb.jdbcDriver" && grails.util.GrailsUtil.environment == GrailsApplication.ENV_DEVELOPMENT) { 192 // log in as administrator 193 springSecurityService.reauthenticate( 194 config.authentication.users.admin.username, 195 config.authentication.users.admin.password 196 ) 197 198 // and jump to the setup controller 199 redirect(controller:"setup") 200 } 201 202 redirect(controller:"home") 203 } 176 204 } -
trunk/grails-app/controllers/generic/installation/SetupController.groovy
r1846 r1859 320 320 flow.page = 6 321 321 }.to "save" 322 on("previous").to " pageThree"322 on("previous").to "email" 323 323 on("toPageOne").to "configuration" 324 324 on("toPageTwo").to "database" … … 475 475 def loadPropertiesFile(flow) { 476 476 // config 477 def configPath = new File("${System.getProperty("user.home")}/ etc/${meta(name: 'app.name')}/")478 def configFile = new File("${System.getProperty("user.home")}/ etc/${meta(name: 'app.name')}/${grails.util.GrailsUtil.environment}.properties")477 def configPath = new File("${System.getProperty("user.home")}/.${meta(name: 'app.name')}/") 478 def configFile = new File("${System.getProperty("user.home")}/.${meta(name: 'app.name')}/${grails.util.GrailsUtil.environment}.properties") 479 479 480 480 // add configuration information to the flow scope -
trunk/grails-app/views/home/index.gsp
r1848 r1859 313 313 314 314 <div style="clear:both;display:block;"> 315 <g:if env="development" test="${db == "org.hsqldb.jdbcDriver"}"></g:if><g:else test="${db == "org.hsqldb.jdbcDriver"}"> 316 <div style="width:100%;font-size:14pt;color:#ff6f20;text-align:justify;">Warning: You are currently using the in-memory database! Click <g:link controller="home" action="setup">here</g:link> to configure your application.</div> 317 </g:else> 315 318 <div style="margin-right:8px;width:472px;display:inline-block;float:left;zoom:1;*display:inline;"> 316 319 <h1>Introduction</h1> -
trunk/grails-app/views/setup/pages/_database.gsp
r1846 r1859 13 13 %> 14 14 <af:page> 15 <script type="text/javascript"> 16 var previous = ""; 17 var presetValues = { 18 'org.postgresql.Driver' : { 19 'url' : 'jdbc:postgresql://localhost:5432/${meta(name: 'app.name')}-${grails.util.GrailsUtil.environment}', 20 'username' : '${meta(name: 'app.name')}', 21 'password' : 'dbnp' 22 }, 23 'org.hsqldb.jdbcDriver' : { 24 'url' : 'jdbc:hsqldb:mem:${grails.util.GrailsUtil.environment}Database', 25 'username' : 'sa', 26 'password' : '' 27 } 28 } 29 30 $(document).ready(function(){ 31 var select = $('select[name="dataSource.driverClassName"]'); 32 select.bind('change',function() { 33 prefilFields($(this)); 34 }); 35 prefilFields(select); 36 }); 37 38 function prefilFields(selectElement) { 39 var url = $('input[name="dataSource.url"]'); 40 var username = $('input[name="dataSource.username"]'); 41 var password = $('input[name="dataSource.password"]'); 42 var db = $('option:selected',selectElement).val(); 43 44 // remember values? 45 if (previous) { 46 if (url.val()) presetValues[previous]['url'] = url.val(); 47 if (username.val()) presetValues[previous]['username'] = username.val(); 48 if (password.val()) presetValues[previous]['password'] = password.val(); 49 } 50 51 // change input fields 52 url.val(presetValues[db]['url']); 53 username.val(presetValues[db]['username']); 54 password.val(presetValues[db]['password']); 55 56 // remember selection 57 previous = db; 58 } 59 </script> 15 60 <h1>Database configuration</h1> 16 61 -
trunk/grails-app/views/setup/pages/_email.gsp
r1846 r1859 21 21 </span> 22 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;">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')) ? configInfo?.properties.getProperty('grails.plugins.springsecurity.ui.forgotPassword.emailFrom') : 'info@mydomain.com')}" style="width: 300px;"> 24 24 The from address used for communication to the users. 25 25 </af:textFieldElement> … … 33 33 </span> 34 34 35 <af:textFieldElement name="grails.serverURL" description="serverl url" error="grails.serverURL" value="${ configInfo?.properties.getProperty('grails.serverURL')}" style="width: 300px;">35 <af:textFieldElement name="grails.serverURL" description="serverl url" error="grails.serverURL" value="${((configInfo?.properties.getProperty('grails.serverURL')) ? configInfo?.properties.getProperty('grails.serverURL') : 'http://localhost:8080')}" style="width: 300px;"> 36 36 The server URL this application will be served on. 37 37 </af:textFieldElement>
Note: See TracChangeset
for help on using the changeset viewer.