[55] | 1 | // locations to search for config files that get merged into the main config |
---|
| 2 | // config files can either be Java properties files or ConfigSlurper scripts |
---|
| 3 | |
---|
| 4 | // grails.config.locations = [ "classpath:${appName}-config.properties", |
---|
| 5 | // "classpath:${appName}-config.groovy", |
---|
| 6 | // "file:${userHome}/.grails/${appName}-config.properties", |
---|
| 7 | // "file:${userHome}/.grails/${appName}-config.groovy"] |
---|
| 8 | |
---|
| 9 | // if(System.properties["${appName}.config.location"]) { |
---|
| 10 | // grails.config.locations << "file:" + System.properties["${appName}.config.location"] |
---|
| 11 | // } |
---|
| 12 | grails.mime.file.extensions = true // enables the parsing of file extensions from URLs into the request format |
---|
| 13 | grails.mime.types = [ html: ['text/html','application/xhtml+xml'], |
---|
| 14 | xml: ['text/xml', 'application/xml'], |
---|
| 15 | text: 'text-plain', |
---|
| 16 | js: 'text/javascript', |
---|
| 17 | rss: 'application/rss+xml', |
---|
| 18 | atom: 'application/atom+xml', |
---|
| 19 | css: 'text/css', |
---|
| 20 | csv: 'text/csv', |
---|
[165] | 21 | pdf: 'application/pdf', |
---|
| 22 | rtf: 'application/rtf', |
---|
| 23 | excel: 'application/vnd.ms-excel', |
---|
| 24 | ods: 'application/vnd.oasis.opendocument.spreadsheet', |
---|
[55] | 25 | all: '*/*', |
---|
| 26 | json: ['application/json','text/json'], |
---|
| 27 | form: 'application/x-www-form-urlencoded', |
---|
| 28 | multipartForm: 'multipart/form-data' |
---|
| 29 | ] |
---|
| 30 | // The default codec used to encode data with ${} |
---|
| 31 | grails.views.default.codec="none" // none, html, base64 |
---|
| 32 | grails.views.gsp.encoding="UTF-8" |
---|
| 33 | grails.converters.encoding="UTF-8" |
---|
| 34 | |
---|
| 35 | // enabled native2ascii conversion of i18n properties files |
---|
| 36 | grails.enable.native2ascii = true |
---|
| 37 | |
---|
[197] | 38 | /** |
---|
| 39 | * Start of log4j configuration. |
---|
| 40 | * Causing this file to reload (e.g. edit/save) may break the appLog destination |
---|
| 41 | * and further logs will be written to files or directories like "[:]" |
---|
| 42 | * For more info see http://logging.apache.org/log4j/1.2/manual.html |
---|
| 43 | * For log levels see http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/Level.html |
---|
| 44 | * Basic log levels are ALL < TRACE < DEBUG < INFO < WARN < ERROR < FATAL < OFF |
---|
| 45 | */ |
---|
| 46 | def logDirectory = '.' |
---|
| 47 | |
---|
| 48 | log4j = { |
---|
| 49 | appenders { |
---|
| 50 | // Use if we want to prevent creation of a stacktrace.log file. |
---|
| 51 | // Beware that since we are using assingment above 'log4j =' this may override things you did not want to. |
---|
| 52 | 'null' name:'stacktrace' |
---|
| 53 | |
---|
| 54 | // Use this if we want to modify the default appender called 'stdout'. |
---|
| 55 | console name:'stdout', layout:pattern(conversionPattern: '[%t] %-5p %c{2} %x - %m%n') |
---|
| 56 | |
---|
| 57 | // Custom log file. |
---|
| 58 | rollingFile name:"appLog", |
---|
| 59 | file:"${logDirectory}/${appName}.log".toString(), |
---|
| 60 | maxFileSize:'1MB', |
---|
| 61 | maxBackupIndex:0, |
---|
| 62 | layout:pattern(conversionPattern: '%d{[EEE, dd-MMM-yyyy @ HH:mm:ss.SSS]} [%t] %-5p %c %x - %m%n') |
---|
[55] | 63 | } |
---|
[197] | 64 | |
---|
| 65 | // Configure the root logger to output to stdout and appLog appenders. |
---|
| 66 | root { |
---|
| 67 | error 'stdout','appLog' |
---|
| 68 | additivity = true |
---|
| 69 | } |
---|
| 70 | |
---|
| 71 | // This is for the builtin stuff and from the default Grails-1.1.1 config. |
---|
| 72 | error 'org.codehaus.groovy.grails.web.servlet', // controllers |
---|
| 73 | 'org.codehaus.groovy.grails.web.pages', // GSP |
---|
| 74 | 'org.codehaus.groovy.grails.web.sitemesh', // layouts |
---|
| 75 | 'org.codehaus.groovy.grails.web.mapping.filter', // URL mapping |
---|
| 76 | 'org.codehaus.groovy.grails.web.mapping', // URL mapping |
---|
| 77 | 'org.codehaus.groovy.grails.commons', // core / classloading |
---|
| 78 | 'org.codehaus.groovy.grails.plugins', // plugins |
---|
| 79 | 'org.codehaus.groovy.grails.orm.hibernate', // hibernate integration |
---|
| 80 | 'org.springframework', |
---|
| 81 | 'org.hibernate' |
---|
| 82 | |
---|
| 83 | warn 'org.mortbay.log' // Jetty |
---|
| 84 | |
---|
| 85 | error "grails.app" // Set the default log level for our app code. |
---|
| 86 | info "grails.app.bootstrap" // Set the log level per type and per type.class |
---|
| 87 | debug "grails.app.service" |
---|
| 88 | debug "grails.app.controller" |
---|
| 89 | error "grails.app.service.PersonService" |
---|
| 90 | error "grails.app.service.NavigationService" |
---|
[199] | 91 | error "grails.app.service.com.zeddware.grails.plugins.filterpane.FilterService" |
---|
[55] | 92 | } |
---|
| 93 | |
---|
[197] | 94 | /** |
---|
| 95 | * Environment specific configuration. |
---|
| 96 | */ |
---|
| 97 | environments { |
---|
| 98 | |
---|
| 99 | production { |
---|
| 100 | grails.serverURL = "http://www.changeme.com" // Set serverURL stem for creating absolute links. |
---|
| 101 | log4j { |
---|
| 102 | appenders { |
---|
| 103 | // Pickup the Tomcat/Catalina logDirectory else use the current dir. |
---|
| 104 | def catalinaBase = System.properties.getProperty('catalina.base') |
---|
| 105 | logDirectory = catalinaBase ? "${catalinaBase}/logs" : '.' |
---|
| 106 | |
---|
| 107 | rollingFile name:"appLog", |
---|
| 108 | file:"${logDirectory}/${appName}.log".toString(), |
---|
| 109 | maxFileSize:'1MB', |
---|
| 110 | maxBackupIndex:0, |
---|
| 111 | layout:pattern(conversionPattern: '%d{[EEE, dd-MMM-yyyy @ HH:mm:ss.SSS]} [%t] %-5p %c %x - %m%n') |
---|
| 112 | |
---|
| 113 | } |
---|
| 114 | error "grails.app" // Set the default log level for our app code. |
---|
| 115 | info "grails.app.bootstrap" // Set the log level per type and per type.class |
---|
| 116 | warn "grails.app.service" |
---|
| 117 | warn "grails.app.controller" |
---|
[55] | 118 | } |
---|
| 119 | } |
---|
| 120 | |
---|
[197] | 121 | development { |
---|
| 122 | grails.serverURL = "http://localhost:8080/${appName}" // Set serverURL stem for creating absolute links. |
---|
| 123 | } |
---|
[55] | 124 | |
---|
[197] | 125 | test { |
---|
| 126 | grails.serverURL = "http://localhost:8080/${appName}" // Set serverURL stem for creating absolute links. |
---|
| 127 | } |
---|
| 128 | |
---|
| 129 | } // end environments |
---|
| 130 | |
---|
[199] | 131 | /** |
---|
| 132 | * Navigation plugin menu. |
---|
| 133 | * The top level titles are taken from i18n message bundles. |
---|
| 134 | * Subitems i18n message bundles are not currently resolving with this plugin. |
---|
| 135 | */ |
---|
[139] | 136 | navigation.nav = [ |
---|
| 137 | [order:10, controller:'appCore', title:'home', action:'start', |
---|
| 138 | subItems: [ |
---|
| 139 | [order:10, controller:'appCore', title:'Start', action:'start', isVisible: { true }], |
---|
[149] | 140 | [order:20, controller:'appCore', title:'Manager', action:'manager', isVisible: { authenticateService.ifAnyGranted('ROLE_Manager,ROLE_AppAdmin') }], |
---|
[139] | 141 | [order:30, controller:'appCore', title:'Admin', action:'appAdmin', isVisible: { authenticateService.ifAllGranted('ROLE_AppAdmin') }], |
---|
| 142 | [order:90, controller:'appCore', title:'Timeout', action:'changeSessionTimeout', isVisible: { params.action == 'changeSessionTimeout' }], |
---|
| 143 | [order:91, controller:'appCore', title:'Password', action:'changePassword', isVisible: { params.action == 'changePassword' }], |
---|
| 144 | ] |
---|
| 145 | ], |
---|
| 146 | [order:20, controller:'taskDetailed', title:'tasks', action:'search', |
---|
| 147 | subItems: [ |
---|
[155] | 148 | [order:10, controller:'taskDetailed', title:'Search', action:'search', isVisible: { params.action != 'searchCalendar'}], |
---|
| 149 | [order:11, controller:'taskDetailed', title:'Calendar', action:'searchCalendar', isVisible: { params.action == 'searchCalendar' }], |
---|
[139] | 150 | [order:20, controller:'taskDetailed', title:'Create', action:'create', isVisible: { true }], |
---|
| 151 | [order:90, controller:'taskDetailed', title:'Show', action:'show', isVisible: { params.action == 'show' }], |
---|
| 152 | [order:91, controller:'taskDetailed', title:'Edit', action:'edit', isVisible: { params.action == 'edit' }] |
---|
| 153 | ] |
---|
| 154 | ], |
---|
| 155 | [order:30, controller:'inventoryItemDetailed', title:'inventory', action:'search', |
---|
| 156 | subItems: [ |
---|
| 157 | [order:10, controller:'inventoryItemDetailed', title:'Search', action:'search', isVisible: { true }], |
---|
| 158 | [order:20, controller:'inventoryItemDetailed', title:'Create', action:'create', isVisible: { true }], |
---|
| 159 | [order:90, controller:'inventoryItemDetailed', title:'Show', action:'show', isVisible: { params.action == 'show' }], |
---|
| 160 | [order:91, controller:'inventoryItemDetailed', title:'Edit', action:'edit', isVisible: { params.action == 'edit' }] |
---|
| 161 | ] |
---|
| 162 | ], |
---|
| 163 | [order:40, controller:'assetDetailed', title:'assets', action:'search', |
---|
| 164 | subItems: [ |
---|
| 165 | [order:10, controller:'assetDetailed', title:'Search', action:'search', isVisible: { true }], |
---|
| 166 | [order:20, controller:'assetDetailed', title:'Create', action:'create', isVisible: { true }], |
---|
| 167 | [order:90, controller:'assetDetailed', title:'Show', action:'show', isVisible: { params.action == 'show' }], |
---|
| 168 | [order:91, controller:'assetDetailed', title:'Edit', action:'edit', isVisible: { params.action == 'edit' }] |
---|
| 169 | ] |
---|
| 170 | ] |
---|
| 171 | ] |
---|
[58] | 172 | |
---|
[199] | 173 | /** |
---|
| 174 | * Navigation plugin alternate menu. |
---|
| 175 | * The alternate top level titles are not displayed anywhere. |
---|
| 176 | * Subitems i18n message bundles are not currently resolving with this plugin. |
---|
| 177 | */ |
---|
[147] | 178 | navigation.navAlt = [ |
---|
| 179 | [order:10, controller:'person', title:'person', action:'list', |
---|
| 180 | subItems: [ |
---|
| 181 | [order:10, controller:'person', title:'Person List', action:'list', isVisible: { true }], |
---|
| 182 | [order:20, controller:'person', title:'Create', action:'create', isVisible: { true }], |
---|
| 183 | [order:90, controller:'person', title:'Show', action:'show', isVisible: { params.action == 'show' }], |
---|
| 184 | [order:91, controller:'person', title:'Edit', action:'edit', isVisible: { params.action == 'edit' }] |
---|
| 185 | ] |
---|
| 186 | ], |
---|
| 187 | [order:20, controller:'taskProcedureDetailed', title:'task', action:'list', |
---|
| 188 | subItems: [ |
---|
| 189 | [order:10, controller:'taskProcedureDetailed', title:'Task Procedure List', action:'list', isVisible: { true }], |
---|
| 190 | [order:20, controller:'taskProcedureDetailed', title:'Create', action:'create', isVisible: { true }], |
---|
| 191 | [order:90, controller:'taskProcedureDetailed', title:'Show', action:'show', isVisible: { params.action == 'show' }], |
---|
| 192 | [order:91, controller:'taskProcedureDetailed', title:'Edit', action:'edit', isVisible: { params.action == 'edit' }] |
---|
| 193 | ] |
---|
| 194 | ] |
---|
| 195 | ] |
---|
[199] | 196 | |
---|
| 197 | /** |
---|
| 198 | * Some custom globals. |
---|
| 199 | */ |
---|
| 200 | taskRecurringScheduleJob.repeatInterval=10 |
---|