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 | pdf: 'application/pdf', |
---|
22 | rtf: 'application/rtf', |
---|
23 | excel: 'application/vnd.ms-excel', |
---|
24 | ods: 'application/vnd.oasis.opendocument.spreadsheet', |
---|
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 | // enable Sitemesh preprocessing of GSP pages |
---|
36 | grails.views.gsp.sitemesh.preprocess = true |
---|
37 | // scaffolding templates configuration |
---|
38 | grails.scaffolding.templates.domainSuffix = 'Instance' |
---|
39 | |
---|
40 | // Set to false to use the new Grails 1.2 JSONBuilder in the render method |
---|
41 | grails.json.legacy.builder=false |
---|
42 | |
---|
43 | // enabled native2ascii conversion of i18n properties files |
---|
44 | grails.enable.native2ascii = true |
---|
45 | |
---|
46 | // whether to install the java.util.logging bridge for sl4j. Disable fo AppEngine! |
---|
47 | grails.logging.jul.usebridge = true |
---|
48 | // packages to include in Spring bean scanning |
---|
49 | grails.spring.bean.packages = [] |
---|
50 | |
---|
51 | |
---|
52 | /** |
---|
53 | * Log4j configuration. |
---|
54 | * Causing this file to reload (e.g. edit+save) may break the appLog destination |
---|
55 | * and further logs will be written to files or directories like "[:]". |
---|
56 | * For more info see http://logging.apache.org/log4j/1.2/manual.html |
---|
57 | * For log levels see http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/Level.html |
---|
58 | * Basic log levels are ALL < TRACE < DEBUG < INFO < WARN < ERROR < FATAL < OFF |
---|
59 | */ |
---|
60 | // Pickup the Tomcat/Catalina logDirectory else use the current dir. |
---|
61 | def catalinaBase = System.properties.getProperty('catalina.base') |
---|
62 | def logDirectory = catalinaBase ? "${catalinaBase}/logs" : '.' |
---|
63 | |
---|
64 | log4j = { |
---|
65 | appenders { |
---|
66 | // Use if we want to prevent creation of a stacktrace.log file. |
---|
67 | 'null' name:'stacktrace' |
---|
68 | |
---|
69 | // Use this if we want to modify the default appender called 'stdout'. |
---|
70 | console name:'stdout', layout:pattern(conversionPattern: '[%t] %-5p %c{2} %x - %m%n') |
---|
71 | |
---|
72 | // Custom log file. |
---|
73 | rollingFile name:"appLog", |
---|
74 | file:"${logDirectory}/${appName}.log".toString(), |
---|
75 | maxFileSize:'300kB', |
---|
76 | maxBackupIndex:0, |
---|
77 | layout:pattern(conversionPattern: '%d{[EEE, dd-MMM-yyyy @ HH:mm:ss.SSS]} [%t] %-5p %c %x - %m%n') |
---|
78 | } |
---|
79 | |
---|
80 | // Configure the root logger to output to stdout and appLog appenders. |
---|
81 | root { |
---|
82 | error 'stdout','appLog' |
---|
83 | additivity = true |
---|
84 | } |
---|
85 | |
---|
86 | // This is for the built-in stuff and from the default Grails-1.2.1 config. |
---|
87 | error 'org.codehaus.groovy.grails.web.servlet', // controllers |
---|
88 | 'org.codehaus.groovy.grails.web.pages', // GSP |
---|
89 | 'org.codehaus.groovy.grails.web.sitemesh', // layouts |
---|
90 | 'org.codehaus.groovy.grails.web.mapping.filter', // URL mapping |
---|
91 | 'org.codehaus.groovy.grails.web.mapping', // URL mapping |
---|
92 | 'org.codehaus.groovy.grails.commons', // core / classloading |
---|
93 | 'org.codehaus.groovy.grails.plugins', // plugins |
---|
94 | 'org.codehaus.groovy.grails.orm.hibernate', // hibernate integration |
---|
95 | 'org.springframework', |
---|
96 | 'org.hibernate', |
---|
97 | 'net.sf.ehcache.hibernate' |
---|
98 | |
---|
99 | warn 'org.mortbay.log' // Jetty |
---|
100 | |
---|
101 | error "grails.app" // Set the default log level for our app code. |
---|
102 | info "grails.app.bootstrap" // Set the log level per type and per type.class |
---|
103 | error "grails.app.service.AuthService" |
---|
104 | error "grails.app.service.NavigationService" |
---|
105 | error "grails.app.service.com.zeddware.grails.plugins.filterpane.FilterService" |
---|
106 | |
---|
107 | // Move anything that should behave differently into this section. |
---|
108 | switch(environment) { |
---|
109 | case 'development': |
---|
110 | debug "grails.app.service" |
---|
111 | debug "grails.app.controller" |
---|
112 | break |
---|
113 | case 'test': |
---|
114 | debug "grails.app.service" |
---|
115 | debug "grails.app.controller" |
---|
116 | break |
---|
117 | case 'production': |
---|
118 | warn "grails.app.service" |
---|
119 | warn "grails.app.controller" |
---|
120 | debug "grails.app.service.AssetCsvService" |
---|
121 | debug "grails.app.service.PersonCsvService" |
---|
122 | debug "grails.app.service.InventoryCsvService" |
---|
123 | break |
---|
124 | } |
---|
125 | } |
---|
126 | |
---|
127 | /** |
---|
128 | * Environment specific configuration. |
---|
129 | */ |
---|
130 | environments { |
---|
131 | |
---|
132 | production { |
---|
133 | grails.serverURL = "http://www.changeme.com" // Set serverURL stem for creating absolute links. |
---|
134 | } |
---|
135 | |
---|
136 | development { |
---|
137 | grails.serverURL = "http://localhost:8080/${appName}" // Set serverURL stem for creating absolute links. |
---|
138 | } |
---|
139 | |
---|
140 | test { |
---|
141 | grails.serverURL = "http://localhost:8080/${appName}" // Set serverURL stem for creating absolute links. |
---|
142 | } |
---|
143 | |
---|
144 | } // end environments |
---|
145 | |
---|
146 | /** |
---|
147 | * Navigation plugin menu. |
---|
148 | * The top level titles are taken from i18n message bundles. |
---|
149 | * Subitems i18n message bundles are not currently resolving with this plugin. |
---|
150 | */ |
---|
151 | navigation.nav = [ |
---|
152 | [order:10, controller:'appCore', title:'home', action:'start', |
---|
153 | subItems: [ |
---|
154 | [order:10, controller:'appCore', title:'Start', action:'start', isVisible: { true }], |
---|
155 | [order:20, controller:'appCore', title:'Manager', action:'manager', isVisible: { authenticateService.ifAnyGranted('ROLE_Manager,ROLE_AppAdmin') }], |
---|
156 | [order:30, controller:'appCore', title:'Admin', action:'appAdmin', isVisible: { authenticateService.ifAllGranted('ROLE_AppAdmin') }], |
---|
157 | [order:90, controller:'appCore', title:'Timeout', action:'changeSessionTimeout', isVisible: { params.action == 'changeSessionTimeout' }], |
---|
158 | [order:91, controller:'appCore', title:'Password', action:'changePassword', isVisible: { params.action == 'changePassword' }], |
---|
159 | ] |
---|
160 | ], |
---|
161 | [order:20, controller:'taskDetailed', title:'tasks', action:'search', |
---|
162 | subItems: [ |
---|
163 | [order:10, controller:'taskDetailed', title:'Search', action:'search', isVisible: { true }], |
---|
164 | [order:11, controller:'taskDetailed', title:'Calendar', action:'searchCalendar', isVisible: { true }], |
---|
165 | [order:20, controller:'taskDetailed', title:'+Scheduled', action:'create', isVisible: { true }], |
---|
166 | [order:30, controller:'taskDetailed', title:'+Unsheduled', action:'createUnscheduled', isVisible: { true }], |
---|
167 | [order:40, controller:'taskDetailed', title:'+Callout', action:'createImmediateCallout', isVisible: { true }], |
---|
168 | [order:90, controller:'taskDetailed', title:'Show', action:'show', id:'nav', isVisible: { params.action == 'show' }], |
---|
169 | [order:91, controller:'taskDetailed', title:'Edit', action:'edit', id:'nav', isVisible: { params.action == 'edit' }] |
---|
170 | ] |
---|
171 | ], |
---|
172 | [order:30, controller:'inventoryItemDetailed', title:'inventory', action:'search', |
---|
173 | subItems: [ |
---|
174 | [order:10, controller:'inventoryItemDetailed', title:'Search', action:'search', isVisible: { true }], |
---|
175 | [order:20, controller:'inventoryItemDetailed', title:'Create', action:'create', isVisible: { true }], |
---|
176 | [order:90, controller:'inventoryItemDetailed', title:'Show', action:'show', isVisible: { params.action == 'show' }], |
---|
177 | [order:91, controller:'inventoryItemDetailed', title:'Edit', action:'edit', isVisible: { params.action == 'edit' }] |
---|
178 | ] |
---|
179 | ], |
---|
180 | [order:40, controller:'assetDetailed', title:'assets', action:'search', |
---|
181 | subItems: [ |
---|
182 | [order:10, controller:'assetDetailed', title:'Search', action:'search', isVisible: { true }], |
---|
183 | [order:20, controller:'assetDetailed', title:'Create', action:'create', isVisible: { true }], |
---|
184 | [order:90, controller:'assetDetailed', title:'Show', action:'show', isVisible: { params.action == 'show' }], |
---|
185 | [order:91, controller:'assetDetailed', title:'Edit', action:'edit', isVisible: { params.action == 'edit' }], |
---|
186 | [order:99, controller:'assetSubItemDetailed', title:'Sub Items', action:'search', isVisible: { true }] |
---|
187 | ] |
---|
188 | ] |
---|
189 | ] |
---|
190 | |
---|
191 | /** |
---|
192 | * Navigation plugin alternate menu. |
---|
193 | * The alternate menu top level titles are not displayed anywhere. |
---|
194 | * Subitems i18n message bundles are not currently resolving with this plugin. |
---|
195 | */ |
---|
196 | navigation.navAlt = [ |
---|
197 | [order:10, controller:'person', title:'person', action:'list', |
---|
198 | subItems: [ |
---|
199 | [order:10, controller:'person', title:'Person List', action:'list', isVisible: { true }], |
---|
200 | [order:20, controller:'person', title:'Create', action:'create', isVisible: { true }], |
---|
201 | [order:90, controller:'person', title:'Show', action:'show', isVisible: { params.action == 'show' }], |
---|
202 | [order:91, controller:'person', title:'Edit', action:'edit', isVisible: { params.action == 'edit' }] |
---|
203 | ] |
---|
204 | ], |
---|
205 | [order:20, controller:'taskProcedureDetailed', title:'taskProcedure', action:'list', |
---|
206 | subItems: [ |
---|
207 | [order:10, controller:'taskProcedureDetailed', title:'Task Procedure List', action:'list', isVisible: { true }], |
---|
208 | [order:20, controller:'taskProcedureDetailed', title:'Create', action:'create', isVisible: { true }], |
---|
209 | [order:90, controller:'taskProcedureDetailed', title:'Show', action:'show', isVisible: { params.action == 'show' }], |
---|
210 | [order:91, controller:'taskProcedureDetailed', title:'Edit', action:'edit', isVisible: { params.action == 'edit' }] |
---|
211 | ] |
---|
212 | ], |
---|
213 | [order:30, controller:'assetSubItemDetailed', title:'assetSubItem', action:'search', |
---|
214 | subItems: [ |
---|
215 | [order:10, controller:'assetSubItemDetailed', title:'Sub Item Search', action:'search', isVisible: { true }], |
---|
216 | [order:20, controller:'assetSubItemDetailed', title:'Create', action:'create', isVisible: { true }], |
---|
217 | [order:90, controller:'assetSubItemDetailed', title:'Show', action:'show', isVisible: { params.action == 'show' }], |
---|
218 | [order:91, controller:'assetSubItemDetailed', title:'Edit', action:'edit', isVisible: { params.action == 'edit' }] |
---|
219 | ] |
---|
220 | ], |
---|
221 | [order:40, controller:'maintenancePolicyDetailed', title:'maintenancePolicy', action:'list', |
---|
222 | subItems: [ |
---|
223 | [order:10, controller:'maintenancePolicyDetailed', title:'Maintenance Policy List', action:'list', isVisible: { true }], |
---|
224 | [order:20, controller:'maintenancePolicyDetailed', title:'Create', action:'create', isVisible: { true }], |
---|
225 | [order:90, controller:'maintenancePolicyDetailed', title:'Show', action:'show', isVisible: { params.action == 'show' }], |
---|
226 | [order:91, controller:'maintenancePolicyDetailed', title:'Edit', action:'edit', isVisible: { params.action == 'edit' }] |
---|
227 | ] |
---|
228 | ], |
---|
229 | [order:50, controller:'supplierDetailed', title:'supplier', action:'list', |
---|
230 | subItems: [ |
---|
231 | [order:10, controller:'supplierDetailed', title:'Supplier List', action:'list', isVisible: { true }], |
---|
232 | [order:20, controller:'supplierDetailed', title:'Create', action:'create', isVisible: { true }], |
---|
233 | [order:90, controller:'supplierDetailed', title:'Show', action:'show', isVisible: { params.action == 'show' }], |
---|
234 | [order:91, controller:'supplierDetailed', title:'Edit', action:'edit', isVisible: { params.action == 'edit' }] |
---|
235 | ] |
---|
236 | ], |
---|
237 | [order:60, controller:'manufacturerDetailed', title:'manufacturer', action:'list', |
---|
238 | subItems: [ |
---|
239 | [order:10, controller:'manufacturerDetailed', title:'Manufacturer List', action:'list', isVisible: { true }], |
---|
240 | [order:20, controller:'manufacturerDetailed', title:'Create', action:'create', isVisible: { true }], |
---|
241 | [order:90, controller:'manufacturerDetailed', title:'Show', action:'show', isVisible: { params.action == 'show' }], |
---|
242 | [order:91, controller:'manufacturerDetailed', title:'Edit', action:'edit', isVisible: { params.action == 'edit' }] |
---|
243 | ] |
---|
244 | ], |
---|
245 | [order:70, controller:'inventoryStoreDetailed', title:'inventoryStore', action:'list', |
---|
246 | subItems: [ |
---|
247 | [order:10, controller:'inventoryStoreDetailed', title:'Inventory Store List', action:'list', isVisible: { true }], |
---|
248 | [order:20, controller:'inventoryStoreDetailed', title:'Create', action:'create', isVisible: { true }], |
---|
249 | [order:90, controller:'inventoryStoreDetailed', title:'Show', action:'show', isVisible: { params.action == 'show' }], |
---|
250 | [order:91, controller:'inventoryStoreDetailed', title:'Edit', action:'edit', isVisible: { params.action == 'edit' }] |
---|
251 | ] |
---|
252 | ], |
---|
253 | [order:80, controller:'inventoryLocationDetailed', title:'inventoryLocation', action:'list', |
---|
254 | subItems: [ |
---|
255 | [order:10, controller:'inventoryLocationDetailed', title:'Inventory Location List', action:'list', isVisible: { true }], |
---|
256 | [order:20, controller:'inventoryLocationDetailed', title:'Create', action:'create', isVisible: { true }], |
---|
257 | [order:90, controller:'inventoryLocationDetailed', title:'Show', action:'show', isVisible: { params.action == 'show' }], |
---|
258 | [order:91, controller:'inventoryLocationDetailed', title:'Edit', action:'edit', isVisible: { params.action == 'edit' }] |
---|
259 | ] |
---|
260 | ], |
---|
261 | [order:90, controller:'inventoryGroupDetailed', title:'inventoryGroup', action:'list', |
---|
262 | subItems: [ |
---|
263 | [order:10, controller:'inventoryGroupDetailed', title:'Inventory Group List', action:'list', isVisible: { true }], |
---|
264 | [order:20, controller:'inventoryGroupDetailed', title:'Create', action:'create', isVisible: { true }], |
---|
265 | [order:90, controller:'inventoryGroupDetailed', title:'Show', action:'show', isVisible: { params.action == 'show' }], |
---|
266 | [order:91, controller:'inventoryGroupDetailed', title:'Edit', action:'edit', isVisible: { params.action == 'edit' }] |
---|
267 | ] |
---|
268 | ], |
---|
269 | [order:100, controller:'manufacturerTypeDetailed', title:'manufacturerType', action:'list', |
---|
270 | subItems: [ |
---|
271 | [order:10, controller:'manufacturerTypeDetailed', title:'Manufacturer Type List', action:'list', isVisible: { true }], |
---|
272 | [order:20, controller:'manufacturerTypeDetailed', title:'Create', action:'create', isVisible: { true }], |
---|
273 | [order:90, controller:'manufacturerTypeDetailed', title:'Show', action:'show', isVisible: { params.action == 'show' }], |
---|
274 | [order:91, controller:'manufacturerTypeDetailed', title:'Edit', action:'edit', isVisible: { params.action == 'edit' }] |
---|
275 | ] |
---|
276 | ], |
---|
277 | [order:110, controller:'supplierTypeDetailed', title:'supplierType', action:'list', |
---|
278 | subItems: [ |
---|
279 | [order:10, controller:'supplierTypeDetailed', title:'Supplier Type List', action:'list', isVisible: { true }], |
---|
280 | [order:20, controller:'supplierTypeDetailed', title:'Create', action:'create', isVisible: { true }], |
---|
281 | [order:90, controller:'supplierTypeDetailed', title:'Show', action:'show', isVisible: { params.action == 'show' }], |
---|
282 | [order:91, controller:'supplierTypeDetailed', title:'Edit', action:'edit', isVisible: { params.action == 'edit' }] |
---|
283 | ] |
---|
284 | ], |
---|
285 | [order:120, controller:'siteDetailed', title:'site', action:'list', |
---|
286 | subItems: [ |
---|
287 | [order:10, controller:'siteDetailed', title:'Site List', action:'list', isVisible: { true }], |
---|
288 | [order:20, controller:'siteDetailed', title:'Create', action:'create', isVisible: { true }], |
---|
289 | [order:90, controller:'siteDetailed', title:'Show', action:'show', isVisible: { params.action == 'show' }], |
---|
290 | [order:91, controller:'siteDetailed', title:'Edit', action:'edit', isVisible: { params.action == 'edit' }] |
---|
291 | ] |
---|
292 | ], |
---|
293 | [order:130, controller:'sectionDetailed', title:'section', action:'list', |
---|
294 | subItems: [ |
---|
295 | [order:10, controller:'sectionDetailed', title:'Section List', action:'list', isVisible: { true }], |
---|
296 | [order:20, controller:'sectionDetailed', title:'Create', action:'create', isVisible: { true }], |
---|
297 | [order:90, controller:'sectionDetailed', title:'Show', action:'show', isVisible: { params.action == 'show' }], |
---|
298 | [order:91, controller:'sectionDetailed', title:'Edit', action:'edit', isVisible: { params.action == 'edit' }] |
---|
299 | ] |
---|
300 | ], |
---|
301 | [order:140, controller:'extendedAttributeTypeDetailed', title:'extendedAttributeType', action:'list', |
---|
302 | subItems: [ |
---|
303 | [order:10, controller:'extendedAttributeTypeDetailed', title:'Attribute Type List', action:'list', isVisible: { true }], |
---|
304 | [order:20, controller:'extendedAttributeTypeDetailed', title:'Create', action:'create', isVisible: { true }], |
---|
305 | [order:90, controller:'extendedAttributeTypeDetailed', title:'Show', action:'show', isVisible: { params.action == 'show' }], |
---|
306 | [order:91, controller:'extendedAttributeTypeDetailed', title:'Edit', action:'edit', isVisible: { params.action == 'edit' }] |
---|
307 | ] |
---|
308 | ], |
---|
309 | [order:150, controller:'departmentDetailed', title:'department', action:'list', |
---|
310 | subItems: [ |
---|
311 | [order:10, controller:'departmentDetailed', title:'Department List', action:'list', isVisible: { true }], |
---|
312 | [order:20, controller:'departmentDetailed', title:'Create', action:'create', isVisible: { true }], |
---|
313 | [order:90, controller:'departmentDetailed', title:'Show', action:'show', isVisible: { params.action == 'show' }], |
---|
314 | [order:91, controller:'departmentDetailed', title:'Edit', action:'edit', isVisible: { params.action == 'edit' }] |
---|
315 | ] |
---|
316 | ], |
---|
317 | [order:160, controller:'productionReferenceDetailed', title:'productionReference', action:'list', |
---|
318 | subItems: [ |
---|
319 | [order:10, controller:'productionReferenceDetailed', title:'Production Reference List', action:'list', isVisible: { true }], |
---|
320 | [order:20, controller:'productionReferenceDetailed', title:'Create', action:'create', isVisible: { true }], |
---|
321 | [order:90, controller:'productionReferenceDetailed', title:'Show', action:'show', isVisible: { params.action == 'show' }], |
---|
322 | [order:91, controller:'productionReferenceDetailed', title:'Edit', action:'edit', isVisible: { params.action == 'edit' }] |
---|
323 | ] |
---|
324 | ], |
---|
325 | [order:170, controller:'costCodeDetailed', title:'costCode', action:'list', |
---|
326 | subItems: [ |
---|
327 | [order:10, controller:'costCodeDetailed', title:'Cost Code List', action:'list', isVisible: { true }], |
---|
328 | [order:20, controller:'costCodeDetailed', title:'Create', action:'create', isVisible: { true }], |
---|
329 | [order:90, controller:'costCodeDetailed', title:'Show', action:'show', isVisible: { params.action == 'show' }], |
---|
330 | [order:91, controller:'costCodeDetailed', title:'Edit', action:'edit', isVisible: { params.action == 'edit' }] |
---|
331 | ] |
---|
332 | ] |
---|
333 | ] |
---|
334 | |
---|
335 | /** |
---|
336 | * Some custom globals. |
---|
337 | */ |
---|
338 | taskRecurringScheduleJob.repeatInterval=10 |
---|