Changeset 127
- Timestamp:
- May 6, 2009, 3:40:07 AM (16 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/doc/Definitions/TaskTerms.txt
r116 r127 1 Intro 2 3 * Tasks may have one parent task and many sub tasks. 4 * Tasks may have a recurring schedule. 5 * Tasks with an enabled recurring schedule automatically generate subTasks. 6 * Tasks may have many "work done" or "fault" entries. 7 1 8 Task terms and definitions. 2 9 … … 54 61 - Default = Normal. 55 62 - Of Class TaskPriority. 56 - One of Low, Normal, High, Immediate.63 - One of Normal, Low, High, Immediate. 57 64 - Automagically set to High if Unscheduled Breakin? 58 65 - Automagically set to ? -
trunk/grails-app/conf/BootStrap.groovy
r125 r127 242 242 def taskPriorityInstance 243 243 244 taskPriorityInstance = new TaskPriority(name:"Normal") 245 BootStrapSaveAndTest(taskPriorityInstance) 246 244 247 taskPriorityInstance = new TaskPriority(name:"Low") 245 BootStrapSaveAndTest(taskPriorityInstance)246 247 taskPriorityInstance = new TaskPriority(name:"Normal")248 248 BootStrapSaveAndTest(taskPriorityInstance) 249 249 -
trunk/grails-app/conf/SecurityConfig.groovy
r126 r127 1 1 security { 2 3 def authenticateService 2 4 3 5 // see DefaultSecurityConfig.groovy for all settable/overridable properties … … 46 48 47 49 //We always want to go to the home page so that bookmarks are not used. 48 defaultTargetUrl = '/appCore/ home'50 defaultTargetUrl = '/appCore/welcome' 49 51 alwaysUseDefaultTargetUrl = true 50 52 … … 61 63 cacheUsers = false 62 64 65 // //List for and events and run the closure(s) that follow. 66 // //Unfortunately the session is not available yet so many things can't be done here, us an defaultTargetUrl and controller. 67 // useSecurityEventListener = true 68 // 69 // onAuthenticationSuccessEvent = { e, appCtx -> 70 // def p = e.source.principal 71 // def personInstance = Person.findByLoginName(p.username) 72 // println p.username 73 // println personInstance.loginName 74 // println personInstance.firstName 75 // } 76 63 77 } -
trunk/grails-app/controllers/AppCoreController.groovy
r106 r127 10 10 //def allowedMethods = [delete:'POST', save:'POST', update:'POST'] 11 11 12 def welcome = { 13 def personInstance = Person.get(authenticateService.userDomain().id) 14 flash.message = "Welcome, ${personInstance.firstName} ${personInstance.lastName}." 15 16 def sess = getSession() 17 sess.setMaxInactiveInterval(personInstance.sessionTimeout) 18 redirect(action:home) 19 } 20 12 21 def home = { 13 22 } … … 15 24 def options = { 16 25 } 26 27 def changeSessionTimeout = { 28 if (request.method == 'GET') { 29 def personInstance = Person.get(authenticateService.userDomain().id) 30 return [ personInstance : personInstance ] 31 } 32 if (request.method == 'POST') { 33 def personInstance = Person.get(authenticateService.userDomain().id) 34 // personInstance.sessionTimeout = params.sessionTimeout.toInteger() 35 personInstance.properties = params 36 if (!personInstance.hasErrors() && personInstance.save()) { 37 def sess = getSession() 38 sess.setMaxInactiveInterval(personInstance.sessionTimeout) 39 flash.message = "Session timeout changed." 40 redirect(action:options) 41 } 42 else { 43 render(view:'changeSessionTimeout',model:[personInstance:personInstance]) 44 } 45 } 46 } 17 47 18 48 def changePassword = { -
trunk/grails-app/domain/MaintenanceAction.groovy
r124 r127 1 class MaintenanceAction { 1 class TaskAction { 2 Task task 2 3 MaintenancePolicy maintenancePolicy 3 PlannedMaintenance plannedMaintenance4 4 SystemSection systemSection 5 5 Asset asset … … 8 8 SubAssembly subAssembly 9 9 ComponentItem componentItem 10 String maintenanceAction10 String action 11 11 String reasoning = "" 12 Integer pmStepNumber12 Integer stepNumber 13 13 boolean isActive = true 14 14 15 15 // static hasMany = [] 16 16 17 static belongsTo = [PlannedMaintenance]17 // static belongsTo = [] 18 18 19 19 static constraints = { … … 24 24 subAssembly(blank:true, nullable:true) 25 25 componentItem(blank:true, nullable:true) 26 pmStepNumber(blank:true, nullable:true)26 stepNumber(blank:true, nullable:true) 27 27 } 28 28 -
trunk/grails-app/domain/Person.groovy
r93 r127 13 13 String lastName 14 14 String employeeID 15 16 /* Set after login by 'welcome' action, default to 12 hours, aka "sess.setMaxInactiveInterval(seconds) */ 17 Integer sessionTimeout = 720 15 18 16 19 /** MD5 Password */ … … 42 45 //So we need to use pass for validation then encode it for above. 43 46 pass(blank: false, minSize:4) 47 sessionTimeout(min:60, max:720) 44 48 45 49 } -
trunk/grails-app/domain/RecurringSchedule.groovy
r125 r127 1 class RecurringSchedule {1 class TaskRecurringSchedule { 2 2 3 3 Task task 4 // Task lastGeneratedSubTask 4 5 Period period 5 PlannedMaintenance plannedMaintenance6 6 7 7 Integer recurEvery 8 8 Date startDate = new Date() 9 Date last ExecutedDate9 Date lastGeneratedDate 10 10 Date nextDueDate 11 11 boolean isActive = true … … 16 16 17 17 static constraints = { 18 plannedMaintenance(blank:true, nullable:true) 19 lastExecutedDate(blank:true, nullable:true) 18 // lastGeneratedDate(blank:true, nullable:true) 20 19 } 21 20 -
trunk/grails-app/views/appCore/options.gsp
r73 r127 17 17 <div class="dialog"> 18 18 <a href="${createLink(action:'changePassword')}">Change Password</a> 19 19 <br /> 20 <br /> 21 <a href="${createLink(action:'changeSessionTimeout')}">Change Session Timeout</a> 20 22 </div> 21 23 </div>
Note: See TracChangeset
for help on using the changeset viewer.