[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', |
---|
| 21 | all: '*/*', |
---|
| 22 | json: ['application/json','text/json'], |
---|
| 23 | form: 'application/x-www-form-urlencoded', |
---|
| 24 | multipartForm: 'multipart/form-data' |
---|
| 25 | ] |
---|
| 26 | // The default codec used to encode data with ${} |
---|
| 27 | grails.views.default.codec="none" // none, html, base64 |
---|
| 28 | grails.views.gsp.encoding="UTF-8" |
---|
| 29 | grails.converters.encoding="UTF-8" |
---|
| 30 | |
---|
| 31 | // enabled native2ascii conversion of i18n properties files |
---|
| 32 | grails.enable.native2ascii = true |
---|
| 33 | |
---|
| 34 | // set per-environment serverURL stem for creating absolute links |
---|
| 35 | environments { |
---|
| 36 | production { |
---|
| 37 | grails.serverURL = "http://www.changeme.com" |
---|
| 38 | } |
---|
| 39 | } |
---|
| 40 | |
---|
| 41 | // log4j configuration |
---|
| 42 | log4j { |
---|
| 43 | appender.stdout = "org.apache.log4j.ConsoleAppender" |
---|
| 44 | appender.'stdout.layout'="org.apache.log4j.PatternLayout" |
---|
| 45 | appender.'stdout.layout.ConversionPattern'='[%r] %c{2} %m%n' |
---|
| 46 | appender.stacktraceLog = "org.apache.log4j.FileAppender" |
---|
| 47 | appender.'stacktraceLog.layout'="org.apache.log4j.PatternLayout" |
---|
| 48 | appender.'stacktraceLog.layout.ConversionPattern'='[%r] %c{2} %m%n' |
---|
| 49 | appender.'stacktraceLog.File'="stacktrace.log" |
---|
| 50 | rootLogger="error,stdout" |
---|
| 51 | logger { |
---|
| 52 | grails="error" |
---|
| 53 | StackTrace="error,stacktraceLog" |
---|
| 54 | org { |
---|
| 55 | codehaus.groovy.grails.web.servlet="error" // controllers |
---|
| 56 | codehaus.groovy.grails.web.pages="error" // GSP |
---|
| 57 | codehaus.groovy.grails.web.sitemesh="error" // layouts |
---|
| 58 | codehaus.groovy.grails."web.mapping.filter"="error" // URL mapping |
---|
| 59 | codehaus.groovy.grails."web.mapping"="error" // URL mapping |
---|
| 60 | codehaus.groovy.grails.commons="info" // core / classloading |
---|
| 61 | codehaus.groovy.grails.plugins="error" // plugins |
---|
| 62 | codehaus.groovy.grails.orm.hibernate="error" // hibernate integration |
---|
| 63 | springframework="off" |
---|
| 64 | hibernate="off" |
---|
| 65 | } |
---|
| 66 | } |
---|
| 67 | additivity.StackTrace=false |
---|
| 68 | } |
---|
| 69 | |
---|
[139] | 70 | //log4j.logger.org.springframework.security='off,stdout' |
---|
[55] | 71 | |
---|
[139] | 72 | /** Navigation plugin menu. |
---|
| 73 | * The top level titles are taken from i18n message bundles. |
---|
| 74 | * Subitems i18n message bundles are not currently resolving with this plugin. |
---|
| 75 | */ |
---|
| 76 | navigation.nav = [ |
---|
| 77 | [order:10, controller:'appCore', title:'home', action:'start', |
---|
| 78 | subItems: [ |
---|
| 79 | [order:10, controller:'appCore', title:'Start', action:'start', isVisible: { true }], |
---|
[149] | 80 | [order:20, controller:'appCore', title:'Manager', action:'manager', isVisible: { authenticateService.ifAnyGranted('ROLE_Manager,ROLE_AppAdmin') }], |
---|
[139] | 81 | [order:30, controller:'appCore', title:'Admin', action:'appAdmin', isVisible: { authenticateService.ifAllGranted('ROLE_AppAdmin') }], |
---|
| 82 | [order:90, controller:'appCore', title:'Timeout', action:'changeSessionTimeout', isVisible: { params.action == 'changeSessionTimeout' }], |
---|
| 83 | [order:91, controller:'appCore', title:'Password', action:'changePassword', isVisible: { params.action == 'changePassword' }], |
---|
| 84 | ] |
---|
| 85 | ], |
---|
| 86 | [order:20, controller:'taskDetailed', title:'tasks', action:'search', |
---|
| 87 | subItems: [ |
---|
[155] | 88 | [order:10, controller:'taskDetailed', title:'Search', action:'search', isVisible: { params.action != 'searchCalendar'}], |
---|
| 89 | [order:11, controller:'taskDetailed', title:'Calendar', action:'searchCalendar', isVisible: { params.action == 'searchCalendar' }], |
---|
[139] | 90 | [order:20, controller:'taskDetailed', title:'Create', action:'create', isVisible: { true }], |
---|
| 91 | [order:90, controller:'taskDetailed', title:'Show', action:'show', isVisible: { params.action == 'show' }], |
---|
| 92 | [order:91, controller:'taskDetailed', title:'Edit', action:'edit', isVisible: { params.action == 'edit' }] |
---|
| 93 | ] |
---|
| 94 | ], |
---|
| 95 | [order:30, controller:'inventoryItemDetailed', title:'inventory', action:'search', |
---|
| 96 | subItems: [ |
---|
| 97 | [order:10, controller:'inventoryItemDetailed', title:'Search', action:'search', isVisible: { true }], |
---|
| 98 | [order:20, controller:'inventoryItemDetailed', title:'Create', action:'create', isVisible: { true }], |
---|
| 99 | [order:90, controller:'inventoryItemDetailed', title:'Show', action:'show', isVisible: { params.action == 'show' }], |
---|
| 100 | [order:91, controller:'inventoryItemDetailed', title:'Edit', action:'edit', isVisible: { params.action == 'edit' }] |
---|
| 101 | ] |
---|
| 102 | ], |
---|
| 103 | [order:40, controller:'assetDetailed', title:'assets', action:'search', |
---|
| 104 | subItems: [ |
---|
| 105 | [order:10, controller:'assetDetailed', title:'Search', action:'search', isVisible: { true }], |
---|
| 106 | [order:20, controller:'assetDetailed', title:'Create', action:'create', isVisible: { true }], |
---|
| 107 | [order:90, controller:'assetDetailed', title:'Show', action:'show', isVisible: { params.action == 'show' }], |
---|
| 108 | [order:91, controller:'assetDetailed', title:'Edit', action:'edit', isVisible: { params.action == 'edit' }] |
---|
| 109 | ] |
---|
| 110 | ] |
---|
| 111 | ] |
---|
[58] | 112 | |
---|
[147] | 113 | /** Navigation plugin alternate menu. |
---|
| 114 | * The alternate top level titles are not displayed anywhere. |
---|
| 115 | * Subitems i18n message bundles are not currently resolving with this plugin. |
---|
| 116 | */ |
---|
| 117 | navigation.navAlt = [ |
---|
| 118 | [order:10, controller:'person', title:'person', action:'list', |
---|
| 119 | subItems: [ |
---|
| 120 | [order:10, controller:'person', title:'Person List', action:'list', isVisible: { true }], |
---|
| 121 | [order:20, controller:'person', title:'Create', action:'create', isVisible: { true }], |
---|
| 122 | [order:90, controller:'person', title:'Show', action:'show', isVisible: { params.action == 'show' }], |
---|
| 123 | [order:91, controller:'person', title:'Edit', action:'edit', isVisible: { params.action == 'edit' }] |
---|
| 124 | ] |
---|
| 125 | ], |
---|
| 126 | [order:20, controller:'taskProcedureDetailed', title:'task', action:'list', |
---|
| 127 | subItems: [ |
---|
| 128 | [order:10, controller:'taskProcedureDetailed', title:'Task Procedure List', action:'list', isVisible: { true }], |
---|
| 129 | [order:20, controller:'taskProcedureDetailed', title:'Create', action:'create', isVisible: { true }], |
---|
| 130 | [order:90, controller:'taskProcedureDetailed', title:'Show', action:'show', isVisible: { params.action == 'show' }], |
---|
| 131 | [order:91, controller:'taskProcedureDetailed', title:'Edit', action:'edit', isVisible: { params.action == 'edit' }] |
---|
| 132 | ] |
---|
| 133 | ] |
---|
| 134 | ] |
---|