- Timestamp:
- Jan 5, 2010, 2:02:38 PM (15 years ago)
- Location:
- trunk/grails-app
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/controllers/AppCoreController.groovy
r237 r258 7 7 8 8 def personService 9 def appConfigService 9 10 def createDataService 10 def appConfigService11 def createBulkDataService 11 12 12 13 def index = { redirect(action:start,params:params) } … … 176 177 } 177 178 179 /** 180 * Allow admin to create bulk test data. 181 */ 182 @Secured(['ROLE_AppAdmin']) 183 def createBulkTestData = { 184 if(!createBulkDataService.create()) { 185 flash.message = "Bulk test data could not be created." 186 redirect(action: appAdmin) 187 return 188 } 189 190 // Success. 191 flash.message = "Bulk test data created." 192 redirect(action: appAdmin) 193 } 194 178 195 } // end of class. -
trunk/grails-app/services/CreateDataService.groovy
r252 r258 454 454 def taskGroupInstance 455 455 456 //TaskGroup #1 456 457 taskGroupInstance = new TaskGroup(name:"Engineering Activites", 457 458 description:"Engineering daily activities") 458 459 saveAndTest(taskGroupInstance) 459 460 461 //TaskGroup #2 460 462 taskGroupInstance = new TaskGroup(name:"Production Activites", 461 463 description:"Production daily activities") 462 464 saveAndTest(taskGroupInstance) 463 465 466 //TaskGroup #3 464 467 taskGroupInstance = new TaskGroup(name:"New Projects", 465 468 description:" ") -
trunk/grails-app/views/appCore/appAdmin.gsp
r237 r258 54 54 </tr> 55 55 56 <g:if env="development"> 57 <tr class="prop"> 58 <td valign="top" class="name"> 59 <label>Test:</label> 60 </td> 61 <td valign="top" class="value"> 62 <g:link action="createBulkTestData">Bulk</g:link> - Create a large volume of test data. 63 </td> 64 </tr> 65 </g:if> 66 56 67 </tbody> 57 68 </table>
Note: See TracChangeset
for help on using the changeset viewer.