[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 | /** |
---|
[200] | 39 | * 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 "[:]". |
---|
[197] | 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 | */ |
---|
[200] | 46 | // Pickup the Tomcat/Catalina logDirectory else use the current dir. |
---|
| 47 | def catalinaBase = System.properties.getProperty('catalina.base') |
---|
| 48 | def logDirectory = catalinaBase ? "${catalinaBase}/logs" : '.' |
---|
[197] | 49 | |
---|
| 50 | log4j = { |
---|
| 51 | appenders { |
---|
| 52 | // Use if we want to prevent creation of a stacktrace.log file. |
---|
| 53 | 'null' name:'stacktrace' |
---|
| 54 | |
---|
| 55 | // Use this if we want to modify the default appender called 'stdout'. |
---|
| 56 | console name:'stdout', layout:pattern(conversionPattern: '[%t] %-5p %c{2} %x - %m%n') |
---|
| 57 | |
---|
| 58 | // Custom log file. |
---|
| 59 | rollingFile name:"appLog", |
---|
| 60 | file:"${logDirectory}/${appName}.log".toString(), |
---|
[358] | 61 | maxFileSize:'300kB', |
---|
[197] | 62 | maxBackupIndex:0, |
---|
| 63 | layout:pattern(conversionPattern: '%d{[EEE, dd-MMM-yyyy @ HH:mm:ss.SSS]} [%t] %-5p %c %x - %m%n') |
---|
[55] | 64 | } |
---|
[197] | 65 | |
---|
| 66 | // Configure the root logger to output to stdout and appLog appenders. |
---|
| 67 | root { |
---|
| 68 | error 'stdout','appLog' |
---|
| 69 | additivity = true |
---|
| 70 | } |
---|
| 71 | |
---|
| 72 | // This is for the builtin stuff and from the default Grails-1.1.1 config. |
---|
| 73 | error 'org.codehaus.groovy.grails.web.servlet', // controllers |
---|
| 74 | 'org.codehaus.groovy.grails.web.pages', // GSP |
---|
| 75 | 'org.codehaus.groovy.grails.web.sitemesh', // layouts |
---|
| 76 | 'org.codehaus.groovy.grails.web.mapping.filter', // URL mapping |
---|
| 77 | 'org.codehaus.groovy.grails.web.mapping', // URL mapping |
---|
| 78 | 'org.codehaus.groovy.grails.commons', // core / classloading |
---|
| 79 | 'org.codehaus.groovy.grails.plugins', // plugins |
---|
| 80 | 'org.codehaus.groovy.grails.orm.hibernate', // hibernate integration |
---|
| 81 | 'org.springframework', |
---|
| 82 | 'org.hibernate' |
---|
| 83 | |
---|
| 84 | warn 'org.mortbay.log' // Jetty |
---|
| 85 | |
---|
| 86 | error "grails.app" // Set the default log level for our app code. |
---|
| 87 | info "grails.app.bootstrap" // Set the log level per type and per type.class |
---|
[291] | 88 | error "grails.app.service.AuthService" |
---|
[197] | 89 | error "grails.app.service.NavigationService" |
---|
[199] | 90 | error "grails.app.service.com.zeddware.grails.plugins.filterpane.FilterService" |
---|
[200] | 91 | |
---|
| 92 | // Move anything that should behave differently into this section. |
---|
| 93 | switch(environment) { |
---|
| 94 | case 'development': |
---|
| 95 | debug "grails.app.service" |
---|
| 96 | debug "grails.app.controller" |
---|
| 97 | break |
---|
| 98 | case 'test': |
---|
| 99 | debug "grails.app.service" |
---|
| 100 | debug "grails.app.controller" |
---|
| 101 | break |
---|
| 102 | case 'production': |
---|
| 103 | warn "grails.app.service" |
---|
| 104 | warn "grails.app.controller" |
---|
[414] | 105 | info "grails.app.service.AssetCsvService" |
---|
[418] | 106 | info "grails.app.service.InventoryCsvService" |
---|
[200] | 107 | break |
---|
| 108 | } |
---|
[55] | 109 | } |
---|
| 110 | |
---|
[197] | 111 | /** |
---|
| 112 | * Environment specific configuration. |
---|
| 113 | */ |
---|
| 114 | environments { |
---|
| 115 | |
---|
| 116 | production { |
---|
| 117 | grails.serverURL = "http://www.changeme.com" // Set serverURL stem for creating absolute links. |
---|
[55] | 118 | } |
---|
| 119 | |
---|
[197] | 120 | development { |
---|
| 121 | grails.serverURL = "http://localhost:8080/${appName}" // Set serverURL stem for creating absolute links. |
---|
| 122 | } |
---|
[55] | 123 | |
---|
[197] | 124 | test { |
---|
| 125 | grails.serverURL = "http://localhost:8080/${appName}" // Set serverURL stem for creating absolute links. |
---|
| 126 | } |
---|
| 127 | |
---|
| 128 | } // end environments |
---|
| 129 | |
---|
[199] | 130 | /** |
---|
| 131 | * Navigation plugin menu. |
---|
| 132 | * The top level titles are taken from i18n message bundles. |
---|
| 133 | * Subitems i18n message bundles are not currently resolving with this plugin. |
---|
| 134 | */ |
---|
[139] | 135 | navigation.nav = [ |
---|
| 136 | [order:10, controller:'appCore', title:'home', action:'start', |
---|
| 137 | subItems: [ |
---|
| 138 | [order:10, controller:'appCore', title:'Start', action:'start', isVisible: { true }], |
---|
[149] | 139 | [order:20, controller:'appCore', title:'Manager', action:'manager', isVisible: { authenticateService.ifAnyGranted('ROLE_Manager,ROLE_AppAdmin') }], |
---|
[139] | 140 | [order:30, controller:'appCore', title:'Admin', action:'appAdmin', isVisible: { authenticateService.ifAllGranted('ROLE_AppAdmin') }], |
---|
| 141 | [order:90, controller:'appCore', title:'Timeout', action:'changeSessionTimeout', isVisible: { params.action == 'changeSessionTimeout' }], |
---|
| 142 | [order:91, controller:'appCore', title:'Password', action:'changePassword', isVisible: { params.action == 'changePassword' }], |
---|
| 143 | ] |
---|
| 144 | ], |
---|
| 145 | [order:20, controller:'taskDetailed', title:'tasks', action:'search', |
---|
| 146 | subItems: [ |
---|
[215] | 147 | [order:10, controller:'taskDetailed', title:'Search', action:'search', isVisible: { true }], |
---|
| 148 | [order:11, controller:'taskDetailed', title:'Calendar', action:'searchCalendar', isVisible: { true }], |
---|
[418] | 149 | [order:20, controller:'taskDetailed', title:'+Scheduled', action:'create', isVisible: { true }], |
---|
| 150 | [order:30, controller:'taskDetailed', title:'+Callout', action:'createImmediateCallout', isVisible: { true }], |
---|
[139] | 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 | ], |
---|
[306] | 163 | [order:40, controller:'assetDetailed', title:'assets', action:'search', |
---|
[139] | 164 | subItems: [ |
---|
[306] | 165 | [order:10, controller:'assetDetailed', title:'Search', action:'search', isVisible: { true }], |
---|
[139] | 166 | [order:20, controller:'assetDetailed', title:'Create', action:'create', isVisible: { true }], |
---|
| 167 | [order:90, controller:'assetDetailed', title:'Show', action:'show', isVisible: { params.action == 'show' }], |
---|
[353] | 168 | [order:91, controller:'assetDetailed', title:'Edit', action:'edit', isVisible: { params.action == 'edit' }], |
---|
| 169 | [order:99, controller:'assetSubItemDetailed', title:'Sub Items', action:'search', isVisible: { true }] |
---|
[139] | 170 | ] |
---|
| 171 | ] |
---|
| 172 | ] |
---|
[58] | 173 | |
---|
[199] | 174 | /** |
---|
| 175 | * Navigation plugin alternate menu. |
---|
[367] | 176 | * The alternate menu top level titles are not displayed anywhere. |
---|
[199] | 177 | * Subitems i18n message bundles are not currently resolving with this plugin. |
---|
| 178 | */ |
---|
[147] | 179 | navigation.navAlt = [ |
---|
| 180 | [order:10, controller:'person', title:'person', action:'list', |
---|
| 181 | subItems: [ |
---|
| 182 | [order:10, controller:'person', title:'Person List', action:'list', isVisible: { true }], |
---|
| 183 | [order:20, controller:'person', title:'Create', action:'create', isVisible: { true }], |
---|
| 184 | [order:90, controller:'person', title:'Show', action:'show', isVisible: { params.action == 'show' }], |
---|
| 185 | [order:91, controller:'person', title:'Edit', action:'edit', isVisible: { params.action == 'edit' }] |
---|
| 186 | ] |
---|
| 187 | ], |
---|
[367] | 188 | [order:20, controller:'taskProcedureDetailed', title:'taskProcedure', action:'list', |
---|
[147] | 189 | subItems: [ |
---|
| 190 | [order:10, controller:'taskProcedureDetailed', title:'Task Procedure List', action:'list', isVisible: { true }], |
---|
| 191 | [order:20, controller:'taskProcedureDetailed', title:'Create', action:'create', isVisible: { true }], |
---|
| 192 | [order:90, controller:'taskProcedureDetailed', title:'Show', action:'show', isVisible: { params.action == 'show' }], |
---|
| 193 | [order:91, controller:'taskProcedureDetailed', title:'Edit', action:'edit', isVisible: { params.action == 'edit' }] |
---|
| 194 | ] |
---|
[367] | 195 | ], |
---|
| 196 | [order:30, controller:'assetSubItemDetailed', title:'assetSubItem', action:'search', |
---|
| 197 | subItems: [ |
---|
| 198 | [order:10, controller:'assetSubItemDetailed', title:'Sub Item Search', action:'search', isVisible: { true }], |
---|
| 199 | [order:20, controller:'assetSubItemDetailed', title:'Create', action:'create', isVisible: { true }], |
---|
| 200 | [order:90, controller:'assetSubItemDetailed', title:'Show', action:'show', isVisible: { params.action == 'show' }], |
---|
| 201 | [order:91, controller:'assetSubItemDetailed', title:'Edit', action:'edit', isVisible: { params.action == 'edit' }] |
---|
| 202 | ] |
---|
| 203 | ], |
---|
| 204 | [order:40, controller:'maintenancePolicyDetailed', title:'maintenancePolicy', action:'list', |
---|
| 205 | subItems: [ |
---|
| 206 | [order:10, controller:'maintenancePolicyDetailed', title:'Maintenance Policy List', action:'list', isVisible: { true }], |
---|
| 207 | [order:20, controller:'maintenancePolicyDetailed', title:'Create', action:'create', isVisible: { true }], |
---|
| 208 | [order:90, controller:'maintenancePolicyDetailed', title:'Show', action:'show', isVisible: { params.action == 'show' }], |
---|
| 209 | [order:91, controller:'maintenancePolicyDetailed', title:'Edit', action:'edit', isVisible: { params.action == 'edit' }] |
---|
| 210 | ] |
---|
[374] | 211 | ], |
---|
| 212 | [order:50, controller:'supplierDetailed', title:'supplier', action:'list', |
---|
| 213 | subItems: [ |
---|
| 214 | [order:10, controller:'supplierDetailed', title:'Supplier List', action:'list', isVisible: { true }], |
---|
| 215 | [order:20, controller:'supplierDetailed', title:'Create', action:'create', isVisible: { true }], |
---|
| 216 | [order:90, controller:'supplierDetailed', title:'Show', action:'show', isVisible: { params.action == 'show' }], |
---|
| 217 | [order:91, controller:'supplierDetailed', title:'Edit', action:'edit', isVisible: { params.action == 'edit' }] |
---|
| 218 | ] |
---|
| 219 | ], |
---|
| 220 | [order:60, controller:'manufacturerDetailed', title:'manufacturer', action:'list', |
---|
| 221 | subItems: [ |
---|
| 222 | [order:10, controller:'manufacturerDetailed', title:'Manufacturer List', action:'list', isVisible: { true }], |
---|
| 223 | [order:20, controller:'manufacturerDetailed', title:'Create', action:'create', isVisible: { true }], |
---|
| 224 | [order:90, controller:'manufacturerDetailed', title:'Show', action:'show', isVisible: { params.action == 'show' }], |
---|
| 225 | [order:91, controller:'manufacturerDetailed', title:'Edit', action:'edit', isVisible: { params.action == 'edit' }] |
---|
| 226 | ] |
---|
[377] | 227 | ], |
---|
| 228 | [order:70, controller:'inventoryStoreDetailed', title:'inventoryStore', action:'list', |
---|
| 229 | subItems: [ |
---|
| 230 | [order:10, controller:'inventoryStoreDetailed', title:'Inventory Store List', action:'list', isVisible: { true }], |
---|
| 231 | [order:20, controller:'inventoryStoreDetailed', title:'Create', action:'create', isVisible: { true }], |
---|
| 232 | [order:90, controller:'inventoryStoreDetailed', title:'Show', action:'show', isVisible: { params.action == 'show' }], |
---|
| 233 | [order:91, controller:'inventoryStoreDetailed', title:'Edit', action:'edit', isVisible: { params.action == 'edit' }] |
---|
| 234 | ] |
---|
| 235 | ], |
---|
| 236 | [order:80, controller:'inventoryLocationDetailed', title:'inventoryLocation', action:'list', |
---|
| 237 | subItems: [ |
---|
| 238 | [order:10, controller:'inventoryLocationDetailed', title:'Inventory Location List', action:'list', isVisible: { true }], |
---|
| 239 | [order:20, controller:'inventoryLocationDetailed', title:'Create', action:'create', isVisible: { true }], |
---|
| 240 | [order:90, controller:'inventoryLocationDetailed', title:'Show', action:'show', isVisible: { params.action == 'show' }], |
---|
| 241 | [order:91, controller:'inventoryLocationDetailed', title:'Edit', action:'edit', isVisible: { params.action == 'edit' }] |
---|
| 242 | ] |
---|
[380] | 243 | ], |
---|
| 244 | [order:90, controller:'inventoryGroupDetailed', title:'inventoryGroup', action:'list', |
---|
| 245 | subItems: [ |
---|
| 246 | [order:10, controller:'inventoryGroupDetailed', title:'Inventory Group List', action:'list', isVisible: { true }], |
---|
| 247 | [order:20, controller:'inventoryGroupDetailed', title:'Create', action:'create', isVisible: { true }], |
---|
| 248 | [order:90, controller:'inventoryGroupDetailed', title:'Show', action:'show', isVisible: { params.action == 'show' }], |
---|
| 249 | [order:91, controller:'inventoryGroupDetailed', title:'Edit', action:'edit', isVisible: { params.action == 'edit' }] |
---|
| 250 | ] |
---|
[383] | 251 | ], |
---|
| 252 | [order:100, controller:'manufacturerTypeDetailed', title:'manufacturerType', action:'list', |
---|
| 253 | subItems: [ |
---|
| 254 | [order:10, controller:'manufacturerTypeDetailed', title:'Manufacturer Type List', action:'list', isVisible: { true }], |
---|
| 255 | [order:20, controller:'manufacturerTypeDetailed', title:'Create', action:'create', isVisible: { true }], |
---|
| 256 | [order:90, controller:'manufacturerTypeDetailed', title:'Show', action:'show', isVisible: { params.action == 'show' }], |
---|
| 257 | [order:91, controller:'manufacturerTypeDetailed', title:'Edit', action:'edit', isVisible: { params.action == 'edit' }] |
---|
| 258 | ] |
---|
| 259 | ], |
---|
| 260 | [order:110, controller:'supplierTypeDetailed', title:'supplierType', action:'list', |
---|
| 261 | subItems: [ |
---|
| 262 | [order:10, controller:'supplierTypeDetailed', title:'Supplier Type List', action:'list', isVisible: { true }], |
---|
| 263 | [order:20, controller:'supplierTypeDetailed', title:'Create', action:'create', isVisible: { true }], |
---|
| 264 | [order:90, controller:'supplierTypeDetailed', title:'Show', action:'show', isVisible: { params.action == 'show' }], |
---|
| 265 | [order:91, controller:'supplierTypeDetailed', title:'Edit', action:'edit', isVisible: { params.action == 'edit' }] |
---|
| 266 | ] |
---|
[385] | 267 | ], |
---|
[386] | 268 | [order:120, controller:'siteDetailed', title:'site', action:'list', |
---|
[385] | 269 | subItems: [ |
---|
| 270 | [order:10, controller:'siteDetailed', title:'Site List', action:'list', isVisible: { true }], |
---|
| 271 | [order:20, controller:'siteDetailed', title:'Create', action:'create', isVisible: { true }], |
---|
| 272 | [order:90, controller:'siteDetailed', title:'Show', action:'show', isVisible: { params.action == 'show' }], |
---|
| 273 | [order:91, controller:'siteDetailed', title:'Edit', action:'edit', isVisible: { params.action == 'edit' }] |
---|
| 274 | ] |
---|
| 275 | ], |
---|
[386] | 276 | [order:130, controller:'sectionDetailed', title:'section', action:'list', |
---|
[385] | 277 | subItems: [ |
---|
| 278 | [order:10, controller:'sectionDetailed', title:'Section List', action:'list', isVisible: { true }], |
---|
| 279 | [order:20, controller:'sectionDetailed', title:'Create', action:'create', isVisible: { true }], |
---|
| 280 | [order:90, controller:'sectionDetailed', title:'Show', action:'show', isVisible: { params.action == 'show' }], |
---|
| 281 | [order:91, controller:'sectionDetailed', title:'Edit', action:'edit', isVisible: { params.action == 'edit' }] |
---|
| 282 | ] |
---|
[386] | 283 | ], |
---|
[387] | 284 | [order:140, controller:'extendedAttributeTypeDetailed', title:'extendedAttributeType', action:'list', |
---|
[386] | 285 | subItems: [ |
---|
| 286 | [order:10, controller:'extendedAttributeTypeDetailed', title:'Attribute Type List', action:'list', isVisible: { true }], |
---|
| 287 | [order:20, controller:'extendedAttributeTypeDetailed', title:'Create', action:'create', isVisible: { true }], |
---|
| 288 | [order:90, controller:'extendedAttributeTypeDetailed', title:'Show', action:'show', isVisible: { params.action == 'show' }], |
---|
| 289 | [order:91, controller:'extendedAttributeTypeDetailed', title:'Edit', action:'edit', isVisible: { params.action == 'edit' }] |
---|
| 290 | ] |
---|
[412] | 291 | ], |
---|
| 292 | [order:150, controller:'departmentDetailed', title:'department', action:'list', |
---|
| 293 | subItems: [ |
---|
| 294 | [order:10, controller:'departmentDetailed', title:'Department List', action:'list', isVisible: { true }], |
---|
| 295 | [order:20, controller:'departmentDetailed', title:'Create', action:'create', isVisible: { true }], |
---|
| 296 | [order:90, controller:'departmentDetailed', title:'Show', action:'show', isVisible: { params.action == 'show' }], |
---|
| 297 | [order:91, controller:'departmentDetailed', title:'Edit', action:'edit', isVisible: { params.action == 'edit' }] |
---|
| 298 | ] |
---|
[147] | 299 | ] |
---|
| 300 | ] |
---|
[199] | 301 | |
---|
| 302 | /** |
---|
| 303 | * Some custom globals. |
---|
| 304 | */ |
---|
| 305 | taskRecurringScheduleJob.repeatInterval=10 |
---|