Details
-
Type:
New Feature
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: Grails-Console 1.0
-
Fix Version/s: Grails-Console 1.2
-
Labels:None
-
Patch Submitted:Yes
-
Patch attached:Yes
Description
Sometimes I use console service to develop various scripts that run on our server (e.g. importing data). When the script gets somewhat lengthy, it becomes more difficult to manage, plus I have to copy and paste it to an editor to save it. This is very cumbersome, plus using an IDE can help during such script development.
I modified the console plugin to have a file mode. You can activate it by going to /console/file (and disable by going to /console/nofile). Then it expects the first line to be the file location/name, e.g. /tmp/MyScript.groovy, and it runs it.
This allows me to edit the file separately from the console plugin, which I found very useful.
I've been meaning to contribute my code changes for some time into GIT, but for now attaching my version here so that others can either merge them in themselves, or at least get access to this functionality.
-
Hide
- consoleNEW.zip
- 25/Apr/11 12:15 PM
- 108 kB
- Jean Barmash
-
- consoleNEW/application.properties 0.1 kB
- consoleNEW/ConsoleGrailsPlugin.groovy 0.4 kB
- consoleNEW/.../ConsoleController.groovy 2 kB
- consoleNEW/.../ConsoleService.groovy 2 kB
- consoleNEW/grails-app/.../console/index.gsp 2 kB
- consoleNEW/LICENSE.txt 11 kB
- consoleNEW/scripts/_Install.groovy 0.0 kB
- consoleNEW/scripts/_Uninstall.groovy 0.0 kB
- consoleNEW/scripts/_Upgrade.groovy 0.0 kB
- consoleNEW/web-app/.../grails-console.css 2 kB
- consoleNEW/web-app/.../grails.logo.png 7 kB
- consoleNEW/web-app/images/spinner.gif 0.7 kB
- consoleNEW/web-app/.../splitter/paneh.gif 3 kB
- consoleNEW/web-app/.../splitter/panehc.gif 1 kB
- consoleNEW/web-app/.../splitter/panev.gif 4 kB
- consoleNEW/web-app/.../splitter/panevc.gif 1 kB
- consoleNEW/web-app/.../groovycolors.css 3 kB
- consoleNEW/web-app/js/.../groovy/index.html 3 kB
- consoleNEW/web-app/.../groovy/parsegroovy.js 4 kB
- consoleNEW/web-app/.../tokenizegroovy.js 14 kB
- consoleNEW/web-app/js/.../css/csscolors.css 0.5 kB
- consoleNEW/web-app/js/.../css/docs.css 2 kB
- consoleNEW/web-app/js/.../css/font.js 0.6 kB
- consoleNEW/web-app/js/.../css/jscolors.css 0.6 kB
- consoleNEW/web-app/.../css/sparqlcolors.css 0.4 kB
- consoleNEW/web-app/js/.../css/xmlcolors.css 0.5 kB
- consoleNEW/web-app/js/.../js/codemirror.js 21 kB
- consoleNEW/web-app/js/.../js/editor.js 60 kB
- consoleNEW/web-app/js/.../js/highlight.js 2 kB
- consoleNEW/web-app/js/.../js/select.js 23 kB
I implemented this a bit differently, adding a text box to type the file path into and adding a button to execute its contents