├── bundle └── src │ ├── test │ ├── java │ │ └── .gitignore │ └── resources │ │ └── Script.groovy │ └── main │ ├── resources │ ├── email-fail.template │ └── email-success.template │ ├── groovy │ └── org │ │ └── cid15 │ │ └── aem │ │ └── groovy │ │ └── console │ │ ├── response │ │ ├── SaveScriptResponse.groovy │ │ ├── impl │ │ │ └── DefaultSaveScriptResponse.groovy │ │ └── RunScriptResponse.groovy │ │ ├── components │ │ ├── AboutPanel.groovy │ │ ├── Scheduler.groovy │ │ ├── ImportsPanel.groovy │ │ ├── ActiveJobsPanel.groovy │ │ ├── HistoryPanel.groovy │ │ ├── BindingsPanel.groovy │ │ └── Body.groovy │ │ ├── api │ │ ├── context │ │ │ ├── JobScriptContext.groovy │ │ │ ├── ScriptData.groovy │ │ │ ├── ServletScriptContext.groovy │ │ │ └── ScriptContext.groovy │ │ ├── StarImportExtensionProvider.groovy │ │ ├── CompilationCustomizerExtensionProvider.groovy │ │ ├── ScriptMetaClassExtensionProvider.groovy │ │ ├── BindingExtensionProvider.groovy │ │ ├── impl │ │ │ ├── ScheduledJobScriptContext.groovy │ │ │ ├── RequestScriptData.groovy │ │ │ └── RequestScriptContext.groovy │ │ ├── ActiveJob.groovy │ │ ├── StarImport.groovy │ │ ├── BindingVariable.groovy │ │ └── JobProperties.groovy │ │ ├── notification │ │ ├── NotificationService.groovy │ │ └── EmailNotificationService.groovy │ │ ├── servlets │ │ ├── AbstractJsonResponseServlet.groovy │ │ ├── ScriptSavingServlet.groovy │ │ └── ScriptDownloadServlet.groovy │ │ ├── utils │ │ └── GroovyScriptUtils.groovy │ │ ├── extension │ │ ├── ExtensionService.groovy │ │ └── impl │ │ │ └── DefaultStarImportExtensionProvider.groovy │ │ ├── table │ │ └── Table.groovy │ │ ├── GroovyConsoleService.groovy │ │ ├── audit │ │ ├── AuditRecord.groovy │ │ └── AuditService.groovy │ │ ├── job │ │ ├── event │ │ │ ├── impl │ │ │ │ └── DefaultGroovyConsoleEmailNotificationEventHandler.groovy │ │ │ └── AbstractGroovyConsoleScheduledJobEventHandler.groovy │ │ └── consumer │ │ │ └── GroovyConsoleScheduledJobConsumer.groovy │ │ ├── configuration │ │ ├── ConfigurationService.groovy │ │ └── impl │ │ │ └── DefaultConfigurationService.groovy │ │ └── constants │ │ └── GroovyConsoleConstants.groovy │ └── java │ └── org │ └── cid15 │ └── aem │ └── groovy │ └── console │ └── configuration │ └── impl │ └── ConfigurationServiceProperties.java ├── src └── site │ └── screenshot.png ├── .gitignore ├── ui.apps ├── src │ └── main │ │ └── content │ │ ├── jcr_root │ │ └── apps │ │ │ └── groovyconsole │ │ │ ├── clientlibs │ │ │ ├── css.txt │ │ │ ├── resources │ │ │ │ ├── img │ │ │ │ │ ├── sort_asc.png │ │ │ │ │ ├── sort_both.png │ │ │ │ │ ├── sort_desc.png │ │ │ │ │ ├── ajax-loader.gif │ │ │ │ │ ├── sort_asc_disabled.png │ │ │ │ │ └── sort_desc_disabled.png │ │ │ │ └── fonts │ │ │ │ │ ├── glyphicons-halflings-regular.eot │ │ │ │ │ ├── glyphicons-halflings-regular.ttf │ │ │ │ │ ├── glyphicons-halflings-regular.woff │ │ │ │ │ └── glyphicons-halflings-regular.woff2 │ │ │ ├── .content.xml │ │ │ ├── js │ │ │ │ ├── services.js │ │ │ │ ├── theme-gruvbox.js │ │ │ │ ├── theme-kuroir.js │ │ │ │ ├── theme-xcode.js │ │ │ │ ├── theme-clouds.js │ │ │ │ ├── theme-nord_dark.js │ │ │ │ ├── theme-eclipse.js │ │ │ │ ├── theme-solarized_dark.js │ │ │ │ ├── theme-vibrant_ink.js │ │ │ │ ├── theme-merbivore.js │ │ │ │ ├── theme-github.js │ │ │ │ ├── theme-solarized_light.js │ │ │ │ ├── theme-idle_fingers.js │ │ │ │ ├── theme-dawn.js │ │ │ │ ├── theme-kr_theme.js │ │ │ │ ├── local-storage.js │ │ │ │ ├── theme-monokai.js │ │ │ │ ├── theme-clouds_midnight.js │ │ │ │ ├── theme-merbivore_soft.js │ │ │ │ ├── theme-cobalt.js │ │ │ │ ├── theme-gob.js │ │ │ │ ├── theme-twilight.js │ │ │ │ ├── theme-tomorrow.js │ │ │ │ ├── theme-pastel_on_dark.js │ │ │ │ ├── theme-dracula.js │ │ │ │ ├── theme-mono_industrial.js │ │ │ │ ├── theme-textmate.js │ │ │ │ ├── theme-tomorrow_night.js │ │ │ │ ├── theme-chrome.js │ │ │ │ └── theme-crimson_editor.js │ │ │ ├── js.txt │ │ │ └── css │ │ │ │ └── console.css │ │ │ ├── components │ │ │ ├── .content.xml │ │ │ └── console │ │ │ │ ├── head.html │ │ │ │ ├── .content.xml │ │ │ │ ├── headlibs.html │ │ │ │ ├── enhancements.html │ │ │ │ ├── data.html │ │ │ │ ├── imports.html │ │ │ │ ├── bindings.html │ │ │ │ ├── active-jobs.html │ │ │ │ ├── opendialog.xml │ │ │ │ ├── about.html │ │ │ │ ├── scheduled-jobs.html │ │ │ │ ├── toolbar.html │ │ │ │ ├── savedialog.xml │ │ │ │ ├── body.html │ │ │ │ ├── history.html │ │ │ │ └── builders.html │ │ │ ├── templates │ │ │ ├── .content.xml │ │ │ └── console │ │ │ │ └── .content.xml │ │ │ └── .content.xml │ │ └── META-INF │ │ └── vault │ │ └── filter.xml └── pom.xml ├── all └── src │ └── main │ └── content │ └── META-INF │ └── vault │ └── filter.xml ├── ui.config ├── src │ └── main │ │ └── content │ │ ├── META-INF │ │ └── vault │ │ │ └── filter.xml │ │ └── jcr_root │ │ └── apps │ │ └── groovyconsole │ │ └── osgiconfig │ │ └── config │ │ ├── org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.amended-groovy-console.xml │ │ └── org.apache.sling.jcr.repoinit.RepositoryInitializer-groovyconsole.config └── pom.xml ├── ui.content ├── src │ └── main │ │ └── content │ │ ├── META-INF │ │ └── vault │ │ │ └── filter.xml │ │ └── jcr_root │ │ └── var │ │ └── groovyconsole │ │ ├── .content.xml │ │ └── scripts │ │ ├── samples │ │ ├── FindPagesWithProperty.groovy │ │ ├── DeleteOsgiConfigurations.groovy │ │ ├── FindPagesWithTemplate.groovy │ │ ├── ListTemplates.groovy │ │ ├── .content.xml │ │ ├── UpdatePageTitles.groovy │ │ ├── FulltextQuery.groovy │ │ ├── FindReferences.groovy │ │ ├── UpdateOsgiConfiguration.groovy │ │ ├── JcrSearch.groovy │ │ ├── FindOrphanedComponents.groovy │ │ ├── CreateOsgiConfigurations.groovy │ │ └── CreatePackage.groovy │ │ └── .content.xml └── pom.xml ├── LICENSE ├── .github └── workflows │ └── maven.yml └── ui.apps.structure └── pom.xml /bundle/src/test/java/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore -------------------------------------------------------------------------------- /bundle/src/test/resources/Script.groovy: -------------------------------------------------------------------------------- 1 | println "BEER" -------------------------------------------------------------------------------- /src/site/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CID15/aem-groovy-console/HEAD/src/site/screenshot.png -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .idea 3 | *.iml 4 | *.iws 5 | .project 6 | .metadata 7 | .classpath 8 | .settings/ 9 | target/ -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/groovyconsole/clientlibs/css.txt: -------------------------------------------------------------------------------- 1 | #base=css 2 | 3 | bootstrap.css 4 | bootstrap-theme.css 5 | daterangepicker.css 6 | datatables.css 7 | console.css -------------------------------------------------------------------------------- /ui.apps/src/main/content/META-INF/vault/filter.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /all/src/main/content/META-INF/vault/filter.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /bundle/src/main/resources/email-fail.template: -------------------------------------------------------------------------------- 1 |

Script executed by $username on $timestamp.

2 |
Script
3 |
$script
4 |
Stack Trace
5 |
$stackTrace
-------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/groovyconsole/components/.content.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/groovyconsole/templates/.content.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /ui.config/src/main/content/META-INF/vault/filter.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /ui.content/src/main/content/META-INF/vault/filter.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/groovyconsole/clientlibs/resources/img/sort_asc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CID15/aem-groovy-console/HEAD/ui.apps/src/main/content/jcr_root/apps/groovyconsole/clientlibs/resources/img/sort_asc.png -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/groovyconsole/clientlibs/resources/img/sort_both.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CID15/aem-groovy-console/HEAD/ui.apps/src/main/content/jcr_root/apps/groovyconsole/clientlibs/resources/img/sort_both.png -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/groovyconsole/clientlibs/resources/img/sort_desc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CID15/aem-groovy-console/HEAD/ui.apps/src/main/content/jcr_root/apps/groovyconsole/clientlibs/resources/img/sort_desc.png -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/groovyconsole/clientlibs/resources/img/ajax-loader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CID15/aem-groovy-console/HEAD/ui.apps/src/main/content/jcr_root/apps/groovyconsole/clientlibs/resources/img/ajax-loader.gif -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/groovyconsole/clientlibs/resources/img/sort_asc_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CID15/aem-groovy-console/HEAD/ui.apps/src/main/content/jcr_root/apps/groovyconsole/clientlibs/resources/img/sort_asc_disabled.png -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/groovyconsole/clientlibs/resources/img/sort_desc_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CID15/aem-groovy-console/HEAD/ui.apps/src/main/content/jcr_root/apps/groovyconsole/clientlibs/resources/img/sort_desc_disabled.png -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/var/groovyconsole/.content.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /bundle/src/main/groovy/org/cid15/aem/groovy/console/response/SaveScriptResponse.groovy: -------------------------------------------------------------------------------- 1 | package org.cid15.aem.groovy.console.response 2 | 3 | /** 4 | * Response for saved scripts. 5 | */ 6 | interface SaveScriptResponse { 7 | 8 | String getScriptName() 9 | } 10 | -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/var/groovyconsole/scripts/samples/FindPagesWithProperty.groovy: -------------------------------------------------------------------------------- 1 | getPage("/content/we-retail").recurse { page -> 2 | def content = page.node 3 | 4 | if (content && !content.get("hideInNav")) { 5 | println page.path 6 | } 7 | } -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/groovyconsole/clientlibs/resources/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CID15/aem-groovy-console/HEAD/ui.apps/src/main/content/jcr_root/apps/groovyconsole/clientlibs/resources/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/groovyconsole/clientlibs/resources/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CID15/aem-groovy-console/HEAD/ui.apps/src/main/content/jcr_root/apps/groovyconsole/clientlibs/resources/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/groovyconsole/clientlibs/resources/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CID15/aem-groovy-console/HEAD/ui.apps/src/main/content/jcr_root/apps/groovyconsole/clientlibs/resources/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/groovyconsole/clientlibs/resources/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CID15/aem-groovy-console/HEAD/ui.apps/src/main/content/jcr_root/apps/groovyconsole/clientlibs/resources/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/var/groovyconsole/scripts/samples/DeleteOsgiConfigurations.groovy: -------------------------------------------------------------------------------- 1 | import org.osgi.service.cm.ConfigurationAdmin 2 | 3 | def admin = getService(ConfigurationAdmin) 4 | 5 | admin.listConfigurations("(service.factoryPid=com.day.cq.compat.migration.factory.location)")*.delete() -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/var/groovyconsole/scripts/samples/FindPagesWithTemplate.groovy: -------------------------------------------------------------------------------- 1 | getPage("/content/we-retail").recurse { page -> 2 | def content = page.node 3 | 4 | if (content && "/conf/we-retail/settings/wcm/templates/section-page" == content.get("cq:template")) { 5 | println page.path 6 | } 7 | } -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/var/groovyconsole/scripts/samples/ListTemplates.groovy: -------------------------------------------------------------------------------- 1 | def templates = [] as TreeSet 2 | 3 | getPage("/content/we-retail").recurse { page -> 4 | def template = page?.template?.path 5 | 6 | if (template) { 7 | templates.add(template) 8 | } 9 | } 10 | 11 | templates.each { 12 | println it 13 | } -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/var/groovyconsole/scripts/.content.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/var/groovyconsole/scripts/samples/.content.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | -------------------------------------------------------------------------------- /bundle/src/main/groovy/org/cid15/aem/groovy/console/components/AboutPanel.groovy: -------------------------------------------------------------------------------- 1 | package org.cid15.aem.groovy.console.components 2 | 3 | import org.apache.sling.api.resource.Resource 4 | import org.apache.sling.models.annotations.Model 5 | 6 | @Model(adaptables = Resource) 7 | class AboutPanel { 8 | 9 | String getVersion() { 10 | GroovySystem.version 11 | } 12 | } -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/groovyconsole/components/console/head.html: -------------------------------------------------------------------------------- 1 | 4 | 5 | ${head.title} -------------------------------------------------------------------------------- /bundle/src/main/groovy/org/cid15/aem/groovy/console/response/impl/DefaultSaveScriptResponse.groovy: -------------------------------------------------------------------------------- 1 | package org.cid15.aem.groovy.console.response.impl 2 | 3 | import groovy.transform.Immutable 4 | import org.cid15.aem.groovy.console.response.SaveScriptResponse 5 | 6 | @Immutable 7 | class DefaultSaveScriptResponse implements SaveScriptResponse { 8 | 9 | String scriptName 10 | } 11 | -------------------------------------------------------------------------------- /ui.config/src/main/content/jcr_root/apps/groovyconsole/osgiconfig/config/org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.amended-groovy-console.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | -------------------------------------------------------------------------------- /bundle/src/main/resources/email-success.template: -------------------------------------------------------------------------------- 1 |

Script executed by $username on $timestamp.

2 |
Script
3 |
$script
<% 4 | if (result) { 5 | out << "
Result
" 6 | out << "
${result}
" 7 | } 8 | 9 | if (output) { 10 | out << "
Output
" 11 | out << "
${output}
" 12 | } 13 | %>
Running Time
14 |
$runningTime
-------------------------------------------------------------------------------- /ui.config/src/main/content/jcr_root/apps/groovyconsole/osgiconfig/config/org.apache.sling.jcr.repoinit.RepositoryInitializer-groovyconsole.config: -------------------------------------------------------------------------------- 1 | scripts=[ 2 | " 3 | create path /var/groovyconsole/audit(sling:Folder) 4 | 5 | create service user aem-groovy-console-service with path system/aem-groovy-console 6 | set ACL for aem-groovy-console-service 7 | allow jcr:all on / 8 | allow jcr:all on /var/groovyconsole/audit 9 | end 10 | "] 11 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/groovyconsole/components/console/.content.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/var/groovyconsole/scripts/samples/UpdatePageTitles.groovy: -------------------------------------------------------------------------------- 1 | import com.day.cq.commons.jcr.JcrConstants 2 | import com.day.cq.wcm.api.NameConstants 3 | 4 | getPage("/content/we-retail").recurse { page -> 5 | def content = page.node 6 | 7 | if (content) { 8 | def title = content.get(JcrConstants.JCR_TITLE) 9 | 10 | content.set(NameConstants.PN_PAGE_TITLE, "$title | We Retail") 11 | } 12 | } 13 | 14 | save() -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/groovyconsole/clientlibs/.content.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/var/groovyconsole/scripts/samples/FulltextQuery.groovy: -------------------------------------------------------------------------------- 1 | def predicates = [ 2 | "path": "/content/we-retail", 3 | "type": "cq:Page", 4 | "fulltext": "Biking" 5 | ] 6 | 7 | def query = createQuery(predicates) 8 | 9 | query.hitsPerPage = 10 10 | 11 | def result = query.result 12 | 13 | println "${result.totalMatches} hits, execution time = ${result.executionTime}s\n--" 14 | 15 | result.hits.each { hit -> 16 | println "hit path = ${hit.node.path}" 17 | } -------------------------------------------------------------------------------- /bundle/src/main/groovy/org/cid15/aem/groovy/console/api/context/JobScriptContext.groovy: -------------------------------------------------------------------------------- 1 | package org.cid15.aem.groovy.console.api.context 2 | 3 | import org.cid15.aem.groovy.console.api.JobProperties 4 | 5 | /** 6 | * Script context for scheduled jobs. 7 | */ 8 | interface JobScriptContext extends ScriptContext { 9 | 10 | /** 11 | * 12 | * @return 13 | */ 14 | String getJobId() 15 | 16 | /** 17 | * 18 | * @return 19 | */ 20 | JobProperties getJobProperties() 21 | } -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/groovyconsole/templates/console/.content.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/var/groovyconsole/scripts/samples/FindReferences.groovy: -------------------------------------------------------------------------------- 1 | import com.day.cq.wcm.commons.ReferenceSearch 2 | 3 | def referenceSearch = new ReferenceSearch() 4 | 5 | referenceSearch.setSearchRoot("content/we-retail") 6 | 7 | def map = referenceSearch.search(resourceResolver, "Biking") 8 | def data = [] 9 | 10 | map.each { path, info -> 11 | info.properties.each { ref -> 12 | data.add([path, ref]) 13 | } 14 | } 15 | 16 | table { 17 | columns("Page", "Reference") 18 | rows(data) 19 | } -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Licensed under the Apache License, Version 2.0 (the "License"); 2 | you may not use this file except in compliance with the License. 3 | You may obtain a copy of the License at 4 | 5 | http://www.apache.org/licenses/LICENSE-2.0 6 | 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/groovyconsole/components/console/headlibs.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /bundle/src/main/groovy/org/cid15/aem/groovy/console/notification/NotificationService.groovy: -------------------------------------------------------------------------------- 1 | package org.cid15.aem.groovy.console.notification 2 | 3 | import org.cid15.aem.groovy.console.response.RunScriptResponse 4 | 5 | /** 6 | * Services may implement this interface to provide additional notifications for Groovy Console script executions. 7 | */ 8 | interface NotificationService { 9 | 10 | /** 11 | * Send a notification for the given script response. 12 | * 13 | * @param response script execution response 14 | */ 15 | void notify(RunScriptResponse response) 16 | } 17 | -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/var/groovyconsole/scripts/samples/UpdateOsgiConfiguration.groovy: -------------------------------------------------------------------------------- 1 | import org.osgi.service.cm.ConfigurationAdmin 2 | 3 | def admin = getService(ConfigurationAdmin) 4 | 5 | def config = admin.getConfiguration("org.apache.sling.jcr.resource.internal.JcrResourceResolverFactoryImpl") 6 | 7 | def properties = config.properties 8 | 9 | def mappings = properties.get("resource.resolver.mapping") as List 10 | 11 | mappings.add("/content/we-retail/:/wr/") 12 | 13 | properties.put("resource.resolver.mapping", mappings.toArray(new String[0])) 14 | 15 | config.update(properties) -------------------------------------------------------------------------------- /bundle/src/main/groovy/org/cid15/aem/groovy/console/api/StarImportExtensionProvider.groovy: -------------------------------------------------------------------------------- 1 | package org.cid15.aem.groovy.console.api 2 | 3 | /** 4 | * Services may implement this interface to supply additional star imports to the compiler configuration for Groovy 5 | * script execution. 6 | */ 7 | interface StarImportExtensionProvider { 8 | 9 | /** 10 | * Get the star imports to add to the script compiler. All imports provided by extension services will be merged 11 | * prior to script execution. 12 | * 13 | * @return set of star imports 14 | */ 15 | Set getStarImports() 16 | } -------------------------------------------------------------------------------- /bundle/src/main/groovy/org/cid15/aem/groovy/console/api/CompilationCustomizerExtensionProvider.groovy: -------------------------------------------------------------------------------- 1 | package org.cid15.aem.groovy.console.api 2 | 3 | import org.codehaus.groovy.control.customizers.CompilationCustomizer 4 | 5 | /** 6 | * Services may implement this interface to customize the compiler configuration for Groovy script execution. 7 | */ 8 | interface CompilationCustomizerExtensionProvider { 9 | 10 | /** 11 | * Get a list of compilation customizers for Groovy script execution. 12 | * 13 | * @return list of compilation customizers 14 | */ 15 | List getCompilationCustomizers() 16 | } -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/groovyconsole/.content.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 13 | 14 | -------------------------------------------------------------------------------- /bundle/src/main/groovy/org/cid15/aem/groovy/console/components/Scheduler.groovy: -------------------------------------------------------------------------------- 1 | package org.cid15.aem.groovy.console.components 2 | 3 | import org.cid15.aem.groovy.console.configuration.ConfigurationService 4 | import org.apache.sling.api.SlingHttpServletRequest 5 | import org.apache.sling.models.annotations.Model 6 | import org.apache.sling.models.annotations.injectorspecific.OSGiService 7 | 8 | @Model(adaptables = SlingHttpServletRequest) 9 | class Scheduler { 10 | 11 | @OSGiService 12 | private ConfigurationService configurationService 13 | 14 | boolean isEmailEnabled() { 15 | configurationService.emailEnabled 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /bundle/src/main/groovy/org/cid15/aem/groovy/console/components/ImportsPanel.groovy: -------------------------------------------------------------------------------- 1 | package org.cid15.aem.groovy.console.components 2 | 3 | import org.cid15.aem.groovy.console.api.StarImport 4 | import org.apache.sling.api.resource.Resource 5 | import org.apache.sling.models.annotations.Model 6 | import org.apache.sling.models.annotations.injectorspecific.OSGiService 7 | import org.cid15.aem.groovy.console.extension.ExtensionService 8 | 9 | @Model(adaptables = Resource) 10 | class ImportsPanel { 11 | 12 | @OSGiService 13 | private ExtensionService extensionService 14 | 15 | Set getStarImports() { 16 | extensionService.starImports as TreeSet 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /bundle/src/main/groovy/org/cid15/aem/groovy/console/components/ActiveJobsPanel.groovy: -------------------------------------------------------------------------------- 1 | package org.cid15.aem.groovy.console.components 2 | 3 | import org.cid15.aem.groovy.console.GroovyConsoleService 4 | import org.cid15.aem.groovy.console.api.ActiveJob 5 | import org.apache.sling.api.SlingHttpServletRequest 6 | import org.apache.sling.models.annotations.Model 7 | import org.apache.sling.models.annotations.injectorspecific.OSGiService 8 | 9 | @Model(adaptables = SlingHttpServletRequest) 10 | class ActiveJobsPanel { 11 | 12 | @OSGiService 13 | private GroovyConsoleService groovyConsoleService 14 | 15 | List getActiveJobs() { 16 | groovyConsoleService.activeJobs 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /bundle/src/main/groovy/org/cid15/aem/groovy/console/api/ScriptMetaClassExtensionProvider.groovy: -------------------------------------------------------------------------------- 1 | package org.cid15.aem.groovy.console.api 2 | 3 | import org.cid15.aem.groovy.console.api.context.ScriptContext 4 | 5 | /** 6 | * Services may implement this interface to supply additional metamethods to apply to the Script metaclass. 7 | */ 8 | interface ScriptMetaClassExtensionProvider { 9 | 10 | /** 11 | * Get a closure to register a metaclass for the script to be executed. 12 | * 13 | * @param scriptContext current script execution context 14 | * @return a closure containing metamethods to register for scripts 15 | */ 16 | Closure getScriptMetaClass(ScriptContext scriptContext) 17 | } 18 | -------------------------------------------------------------------------------- /bundle/src/main/groovy/org/cid15/aem/groovy/console/api/context/ScriptData.groovy: -------------------------------------------------------------------------------- 1 | package org.cid15.aem.groovy.console.api.context 2 | 3 | import org.apache.sling.api.resource.ResourceResolver 4 | 5 | /** 6 | * Script data for saving scripts. 7 | */ 8 | interface ScriptData { 9 | 10 | /** 11 | * Resource resolver for saving scripts. 12 | * 13 | * @return resource resolver 14 | */ 15 | ResourceResolver getResourceResolver() 16 | 17 | /** 18 | * File name to be saved. 19 | * 20 | * @return file name 21 | */ 22 | String getFileName() 23 | 24 | /** 25 | * Script content to be saved. 26 | * 27 | * @return script content 28 | */ 29 | String getScript() 30 | } -------------------------------------------------------------------------------- /bundle/src/main/groovy/org/cid15/aem/groovy/console/api/context/ServletScriptContext.groovy: -------------------------------------------------------------------------------- 1 | package org.cid15.aem.groovy.console.api.context 2 | 3 | import org.apache.sling.api.SlingHttpServletRequest 4 | import org.apache.sling.api.SlingHttpServletResponse 5 | 6 | /** 7 | * Script context for scripts executed by a servlet (e.g. the default POST servlet execution). 8 | */ 9 | interface ServletScriptContext extends ScriptContext { 10 | 11 | /** 12 | * Get the servlet request. 13 | * 14 | * @return request 15 | */ 16 | SlingHttpServletRequest getRequest() 17 | 18 | /** 19 | * Get the servlet response. 20 | * 21 | * @return response 22 | */ 23 | SlingHttpServletResponse getResponse() 24 | } -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/groovyconsole/components/console/enhancements.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

4 | Enhancements 5 |

6 |
7 |
8 |
9 |

See the AEM Groovy Extension documentation here for details on registered metaclasses.

10 |
11 |
12 |
-------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/var/groovyconsole/scripts/samples/JcrSearch.groovy: -------------------------------------------------------------------------------- 1 | def start = getPage("/content/we-retail") 2 | 3 | def query = createXPathQuery(start, "Bike") 4 | 5 | println "query = ${query.statement}" 6 | 7 | def result = query.execute() 8 | 9 | def rows = result.rows 10 | 11 | println "found ${rows.size} result(s)" 12 | 13 | rows.each { row -> 14 | println row.path 15 | } 16 | 17 | def createXPathQuery(page, term) { 18 | def queryManager = session.workspace.queryManager 19 | 20 | def statement = "/jcr:root${page.path}//element(*, cq:Page)[jcr:contains(., \'$term\')]/(rep:excerpt(.)) order by @jcr:score descending" 21 | 22 | def query = queryManager.createQuery(statement, "xpath") 23 | 24 | query 25 | } -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/groovyconsole/clientlibs/js/services.js: -------------------------------------------------------------------------------- 1 | $(function () { 2 | $.getJSON('/bin/groovyconsole/services', function (services) { 3 | $('#services-list').typeahead({ 4 | source: Object.keys(services), 5 | updater: function (key) { 6 | var declaration = services[key]; 7 | 8 | scriptEditor.navigateFileEnd(); 9 | 10 | if (scriptEditor.getCursorPosition().column > 0) { 11 | scriptEditor.insert('\n\n'); 12 | } 13 | 14 | scriptEditor.insert(declaration); 15 | 16 | return ''; 17 | } 18 | }); 19 | 20 | $('#btn-group-services').fadeIn('fast'); 21 | }); 22 | }); -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/groovyconsole/components/console/data.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

4 | Data 5 |

6 |
7 |
8 |
9 |

Editor contents will be added to the script bindings in a variable named data. JSON data will be converted to a map. If data is not valid JSON, the data variable will be of type String.

10 | 11 |
12 |
13 |
14 |
-------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/groovyconsole/components/console/imports.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

4 | Imports 5 |

6 |
7 |
8 |
9 |

Additional packages imported into all scripts.

10 | 13 |
14 |
15 |
-------------------------------------------------------------------------------- /bundle/src/main/groovy/org/cid15/aem/groovy/console/api/BindingExtensionProvider.groovy: -------------------------------------------------------------------------------- 1 | package org.cid15.aem.groovy.console.api 2 | 3 | import org.cid15.aem.groovy.console.api.context.ScriptContext 4 | 5 | /** 6 | * Services may implement this interface to supply additional binding values for Groovy script executions. 7 | */ 8 | interface BindingExtensionProvider { 9 | 10 | /** 11 | * Get the binding variables for this script execution. All bindings provided by extension services will be merged 12 | * prior to script execution. 13 | * 14 | * @param scriptContext context for current script execution 15 | * @return map of binding variables for request 16 | */ 17 | Map getBindingVariables(ScriptContext scriptContext) 18 | } -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/var/groovyconsole/scripts/samples/FindOrphanedComponents.groovy: -------------------------------------------------------------------------------- 1 | import com.day.cq.wcm.api.components.ComponentManager 2 | 3 | def componentManager = resourceResolver.adaptTo(ComponentManager) 4 | 5 | def validResourceTypes = componentManager.components*.resourceType 6 | 7 | def data = [] 8 | 9 | getPage("/content/we-retail").recurse { page -> 10 | def content = page.node 11 | 12 | content?.recurse { node -> 13 | def resourceType = node.get("sling:resourceType") 14 | 15 | if (resourceType && !validResourceTypes.contains(resourceType)) { 16 | data.add([node.path, resourceType]) 17 | } 18 | } 19 | } 20 | 21 | table { 22 | columns("Component Path", "Invalid Resource Type") 23 | rows(data) 24 | } -------------------------------------------------------------------------------- /bundle/src/main/groovy/org/cid15/aem/groovy/console/components/HistoryPanel.groovy: -------------------------------------------------------------------------------- 1 | package org.cid15.aem.groovy.console.components 2 | 3 | import org.cid15.aem.groovy.console.audit.AuditService 4 | import org.apache.sling.api.SlingHttpServletRequest 5 | import org.apache.sling.models.annotations.Model 6 | import org.apache.sling.models.annotations.injectorspecific.OSGiService 7 | import org.apache.sling.models.annotations.injectorspecific.Self 8 | 9 | @Model(adaptables = SlingHttpServletRequest) 10 | class HistoryPanel { 11 | 12 | @OSGiService 13 | private AuditService auditService 14 | 15 | @Self 16 | private SlingHttpServletRequest request 17 | 18 | Boolean isHasAuditRecords() { 19 | !auditService.getAllAuditRecords(request.resourceResolver.userID).empty 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /bundle/src/main/groovy/org/cid15/aem/groovy/console/servlets/AbstractJsonResponseServlet.groovy: -------------------------------------------------------------------------------- 1 | package org.cid15.aem.groovy.console.servlets 2 | 3 | import com.google.common.net.MediaType 4 | import org.cid15.aem.groovy.console.constants.GroovyConsoleConstants 5 | import groovy.json.JsonBuilder 6 | import org.apache.sling.api.SlingHttpServletResponse 7 | import org.apache.sling.api.servlets.SlingAllMethodsServlet 8 | 9 | abstract class AbstractJsonResponseServlet extends SlingAllMethodsServlet { 10 | 11 | void writeJsonResponse(SlingHttpServletResponse response, json) { 12 | response.contentType = MediaType.JSON_UTF_8.withoutParameters().toString() 13 | response.characterEncoding = GroovyConsoleConstants.CHARSET 14 | 15 | new JsonBuilder(json).writeTo(response.writer) 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/var/groovyconsole/scripts/samples/CreateOsgiConfigurations.groovy: -------------------------------------------------------------------------------- 1 | import org.osgi.service.cm.ConfigurationAdmin 2 | 3 | def loggers = [ 4 | "com.day.cq.dam": "dam", 5 | "org.cid15.aem.groovy.console": "groovyconsole" 6 | ] 7 | 8 | def admin = getService(ConfigurationAdmin) 9 | 10 | loggers.each { loggerName, fileName -> 11 | def config = admin.createFactoryConfiguration("org.apache.sling.commons.log.LogManager.factory.config", 12 | "slinginstall:org.apache.sling.commons.log-5.0.0.jar") 13 | 14 | def properties = [ 15 | "org.apache.sling.commons.log.level": "debug", 16 | "org.apache.sling.commons.log.file": "logs/" + fileName + ".log", 17 | "org.apache.sling.commons.log.names": loggerName 18 | ] 19 | 20 | config.update(properties as Hashtable) 21 | } -------------------------------------------------------------------------------- /bundle/src/main/groovy/org/cid15/aem/groovy/console/response/RunScriptResponse.groovy: -------------------------------------------------------------------------------- 1 | package org.cid15.aem.groovy.console.response 2 | 3 | import org.cid15.aem.groovy.console.api.JobProperties 4 | 5 | /** 6 | * Response for script executions. 7 | */ 8 | interface RunScriptResponse { 9 | 10 | /** 11 | * Get the date of script execution. 12 | * 13 | * @return execution date 14 | */ 15 | Calendar getDate() 16 | 17 | String getScript() 18 | 19 | String getData() 20 | 21 | String getResult() 22 | 23 | String getOutput() 24 | 25 | String getExceptionStackTrace() 26 | 27 | String getRunningTime() 28 | 29 | String getUserId() 30 | 31 | String getJobId() 32 | 33 | JobProperties getJobProperties() 34 | 35 | String getMediaType() 36 | 37 | String getOutputFileName() 38 | } 39 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/groovyconsole/components/console/bindings.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

4 | Bindings 5 |

6 |
7 |
8 |
9 |

The binding variables listed below are available for use in all scripts.

10 | 13 |
14 |
15 |
-------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/groovyconsole/components/console/active-jobs.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Active Jobs

4 |
5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 |
IDStart TimeTitleDescriptionScript
${job.id}${job.formattedStartTime}${job.title}${job.description}${job.script}
25 |
-------------------------------------------------------------------------------- /bundle/src/main/groovy/org/cid15/aem/groovy/console/api/impl/ScheduledJobScriptContext.groovy: -------------------------------------------------------------------------------- 1 | package org.cid15.aem.groovy.console.api.impl 2 | 3 | import groovy.transform.TupleConstructor 4 | import org.apache.sling.api.resource.ResourceResolver 5 | import org.cid15.aem.groovy.console.api.JobProperties 6 | import org.cid15.aem.groovy.console.api.context.JobScriptContext 7 | 8 | @TupleConstructor 9 | class ScheduledJobScriptContext implements JobScriptContext { 10 | 11 | ResourceResolver resourceResolver 12 | 13 | ByteArrayOutputStream outputStream 14 | 15 | PrintStream printStream 16 | 17 | String jobId 18 | 19 | JobProperties jobProperties 20 | 21 | @Override 22 | String getScript() { 23 | jobProperties.script 24 | } 25 | 26 | @Override 27 | String getData() { 28 | jobProperties.data 29 | } 30 | 31 | @Override 32 | String getUserId() { 33 | resourceResolver.userID 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /bundle/src/main/groovy/org/cid15/aem/groovy/console/utils/GroovyScriptUtils.groovy: -------------------------------------------------------------------------------- 1 | package org.cid15.aem.groovy.console.utils 2 | 3 | final class GroovyScriptUtils { 4 | 5 | /** 6 | * Get the script preview for display in data tables. 7 | * 8 | * @param script Groovy script 9 | * @return first line of script 10 | */ 11 | static final String getScriptPreview(String script) { 12 | def lines = script.readLines() 13 | 14 | def scriptPreview = new StringBuilder() 15 | 16 | if (lines.first().length() > 50) { 17 | scriptPreview.append(lines.first().take(50)) 18 | scriptPreview.append(" [...]") 19 | } else { 20 | scriptPreview.append(lines.first()) 21 | 22 | if (lines.size() > 1) { 23 | scriptPreview.append(" [...]") 24 | } 25 | } 26 | 27 | scriptPreview.toString() 28 | } 29 | 30 | private GroovyScriptUtils() { 31 | 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /.github/workflows/maven.yml: -------------------------------------------------------------------------------- 1 | # This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time 2 | # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven 3 | 4 | # This workflow uses actions that are not certified by GitHub. 5 | # They are provided by a third-party and are governed by 6 | # separate terms of service, privacy policy, and support 7 | # documentation. 8 | 9 | name: Java CI with Maven 10 | 11 | on: 12 | push: 13 | branches: [ "main" ] 14 | pull_request: 15 | branches: [ "main" ] 16 | 17 | jobs: 18 | build: 19 | runs-on: ubuntu-latest 20 | steps: 21 | - uses: actions/checkout@v4 22 | - name: Set up JDK 11 23 | uses: actions/setup-java@v4 24 | with: 25 | java-version: '11' 26 | distribution: 'temurin' 27 | cache: maven 28 | - name: Build with Maven 29 | run: mvn -B package --file pom.xml 30 | -------------------------------------------------------------------------------- /bundle/src/main/groovy/org/cid15/aem/groovy/console/extension/ExtensionService.groovy: -------------------------------------------------------------------------------- 1 | package org.cid15.aem.groovy.console.extension 2 | 3 | import org.cid15.aem.groovy.console.api.BindingExtensionProvider 4 | import org.cid15.aem.groovy.console.api.CompilationCustomizerExtensionProvider 5 | import org.cid15.aem.groovy.console.api.context.ScriptContext 6 | import org.cid15.aem.groovy.console.api.StarImportExtensionProvider 7 | 8 | /** 9 | * Service that dynamically binds extensions providing additional script bindings, star imports, and script metaclasses. 10 | */ 11 | interface ExtensionService extends BindingExtensionProvider, CompilationCustomizerExtensionProvider, 12 | StarImportExtensionProvider { 13 | 14 | /** 15 | * Get a list of all script metaclass closures for bound extensions. 16 | * 17 | * @param scriptContext current script execution context 18 | * @return list of metaclass closures 19 | */ 20 | List getScriptMetaClasses(ScriptContext scriptContext) 21 | } -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/groovyconsole/components/console/opendialog.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 17 | 21 | -------------------------------------------------------------------------------- /bundle/src/main/groovy/org/cid15/aem/groovy/console/api/ActiveJob.groovy: -------------------------------------------------------------------------------- 1 | package org.cid15.aem.groovy.console.api 2 | 3 | import org.cid15.aem.groovy.console.utils.GroovyScriptUtils 4 | import groovy.transform.Memoized 5 | import groovy.transform.TupleConstructor 6 | import org.apache.sling.event.jobs.Job 7 | import org.cid15.aem.groovy.console.constants.GroovyConsoleConstants 8 | 9 | @TupleConstructor 10 | class ActiveJob { 11 | 12 | Job job 13 | 14 | String getFormattedStartTime() { 15 | job.processingStarted.format(GroovyConsoleConstants.DATE_FORMAT_DISPLAY) 16 | } 17 | 18 | String getId() { 19 | job.id 20 | } 21 | 22 | String getTitle() { 23 | jobProperties.jobTitle 24 | } 25 | 26 | String getDescription() { 27 | jobProperties.jobDescription 28 | } 29 | 30 | String getScript() { 31 | GroovyScriptUtils.getScriptPreview(jobProperties.script) 32 | } 33 | 34 | @Memoized 35 | JobProperties getJobProperties() { 36 | JobProperties.fromJob(job) 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /bundle/src/main/groovy/org/cid15/aem/groovy/console/api/StarImport.groovy: -------------------------------------------------------------------------------- 1 | package org.cid15.aem.groovy.console.api 2 | 3 | import groovy.transform.Sortable 4 | import groovy.transform.ToString 5 | 6 | /** 7 | * Star import with optional link to documentation. 8 | */ 9 | @ToString(includePackage = false, includeNames = true) 10 | @Sortable(includes = "packageName") 11 | class StarImport { 12 | 13 | /** Star import package name. */ 14 | String packageName 15 | 16 | /** Optional link to documentation (Javadoc/Groovydoc). */ 17 | String link 18 | 19 | /** 20 | * Create a new star import for the given package name. 21 | * 22 | * @param packageName package name 23 | */ 24 | StarImport(String packageName) { 25 | this.packageName = packageName 26 | } 27 | 28 | /** 29 | * Create a new star import for the given package name and documentation link. 30 | * 31 | * @param packageName package name 32 | * @param link link to documentation URL 33 | */ 34 | StarImport(String packageName, String link) { 35 | this.packageName = packageName 36 | this.link = link 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /bundle/src/main/groovy/org/cid15/aem/groovy/console/servlets/ScriptSavingServlet.groovy: -------------------------------------------------------------------------------- 1 | package org.cid15.aem.groovy.console.servlets 2 | 3 | import org.cid15.aem.groovy.console.GroovyConsoleService 4 | import org.cid15.aem.groovy.console.api.impl.RequestScriptData 5 | import org.apache.sling.api.SlingHttpServletRequest 6 | import org.apache.sling.api.SlingHttpServletResponse 7 | import org.osgi.service.component.annotations.Component 8 | import org.osgi.service.component.annotations.Reference 9 | 10 | import javax.servlet.Servlet 11 | import javax.servlet.ServletException 12 | 13 | @Component(service = Servlet, immediate = true, property = [ 14 | "sling.servlet.paths=/bin/groovyconsole/save" 15 | ]) 16 | class ScriptSavingServlet extends AbstractJsonResponseServlet { 17 | 18 | @Reference 19 | private GroovyConsoleService consoleService 20 | 21 | @Override 22 | protected void doPost(SlingHttpServletRequest request, SlingHttpServletResponse response) throws 23 | ServletException, IOException { 24 | def scriptData = new RequestScriptData(request) 25 | 26 | writeJsonResponse(response, consoleService.saveScript(scriptData)) 27 | } 28 | } -------------------------------------------------------------------------------- /bundle/src/main/groovy/org/cid15/aem/groovy/console/api/impl/RequestScriptData.groovy: -------------------------------------------------------------------------------- 1 | package org.cid15.aem.groovy.console.api.impl 2 | 3 | import groovy.transform.TupleConstructor 4 | import org.apache.sling.api.SlingHttpServletRequest 5 | import org.apache.sling.api.resource.ResourceResolver 6 | import org.cid15.aem.groovy.console.api.context.ScriptData 7 | 8 | import static org.cid15.aem.groovy.console.constants.GroovyConsoleConstants.EXTENSION_GROOVY 9 | import static org.cid15.aem.groovy.console.constants.GroovyConsoleConstants.FILE_NAME 10 | import static org.cid15.aem.groovy.console.constants.GroovyConsoleConstants.SCRIPT 11 | 12 | @TupleConstructor 13 | class RequestScriptData implements ScriptData { 14 | 15 | SlingHttpServletRequest request 16 | 17 | @Override 18 | ResourceResolver getResourceResolver() { 19 | request.resourceResolver 20 | } 21 | 22 | @Override 23 | String getFileName() { 24 | def name = request.getParameter(FILE_NAME) 25 | 26 | name.endsWith(EXTENSION_GROOVY) ? name : "$name$EXTENSION_GROOVY" 27 | } 28 | 29 | @Override 30 | String getScript() { 31 | request.getParameter(SCRIPT) 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/groovyconsole/components/console/about.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

4 | About 5 |

6 |
7 |
8 |
9 | 15 |
16 |
17 |
-------------------------------------------------------------------------------- /bundle/src/main/groovy/org/cid15/aem/groovy/console/api/impl/RequestScriptContext.groovy: -------------------------------------------------------------------------------- 1 | package org.cid15.aem.groovy.console.api.impl 2 | 3 | import groovy.transform.TupleConstructor 4 | import org.apache.sling.api.SlingHttpServletRequest 5 | import org.apache.sling.api.SlingHttpServletResponse 6 | import org.apache.sling.api.resource.ResourceResolver 7 | import org.cid15.aem.groovy.console.api.context.ServletScriptContext 8 | 9 | import static org.cid15.aem.groovy.console.constants.GroovyConsoleConstants.DATA 10 | 11 | /** 12 | * Script context for request-based (i.e. via the console) script executions. 13 | */ 14 | @TupleConstructor 15 | class RequestScriptContext implements ServletScriptContext { 16 | 17 | SlingHttpServletRequest request 18 | 19 | SlingHttpServletResponse response 20 | 21 | ByteArrayOutputStream outputStream 22 | 23 | PrintStream printStream 24 | 25 | String script 26 | 27 | @Override 28 | ResourceResolver getResourceResolver() { 29 | request.resourceResolver 30 | } 31 | 32 | @Override 33 | String getUserId() { 34 | request.resourceResolver.userID 35 | } 36 | 37 | @Override 38 | String getData() { 39 | request.getParameter(DATA) 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/groovyconsole/components/console/scheduled-jobs.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

4 | Scheduled Jobs 5 |

6 |
7 |
8 |
9 |
10 | 11 | 12 |
13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 |
TitleDescriptionScriptCron ExpressionNext Execution
31 |
32 |
-------------------------------------------------------------------------------- /bundle/src/main/groovy/org/cid15/aem/groovy/console/api/context/ScriptContext.groovy: -------------------------------------------------------------------------------- 1 | package org.cid15.aem.groovy.console.api.context 2 | 3 | import org.apache.sling.api.resource.ResourceResolver 4 | 5 | /** 6 | * Context variables for Groovy script execution. 7 | */ 8 | interface ScriptContext { 9 | 10 | /** 11 | * Resource resolver for script execution. 12 | * 13 | * @return resource resolver 14 | */ 15 | ResourceResolver getResourceResolver() 16 | 17 | /** 18 | * Stream for capturing script output. 19 | * 20 | * @return output stream 21 | */ 22 | ByteArrayOutputStream getOutputStream() 23 | 24 | /** 25 | * Print stream for use in script binding. 26 | * 27 | * @return print stream 28 | */ 29 | PrintStream getPrintStream() 30 | 31 | /** 32 | * Groovy script content to be executed. 33 | * 34 | * @return script content 35 | */ 36 | String getScript() 37 | 38 | /** 39 | * JSON or String data to be consumed by script. 40 | * 41 | * @return data 42 | */ 43 | String getData() 44 | 45 | /** 46 | * User ID for current request or session. 47 | * 48 | * @return user ID 49 | */ 50 | String getUserId() 51 | } 52 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/groovyconsole/clientlibs/js.txt: -------------------------------------------------------------------------------- 1 | #base=js 2 | 3 | datatables.js 4 | jquery-ui.min.js 5 | moment.min.js 6 | daterangepicker.js 7 | bootstrap3-typeahead.js 8 | ace.js 9 | ext-language_tools.js 10 | mode-groovy.js 11 | mode-json.js 12 | worker-json.js 13 | theme-ambiance.js 14 | theme-chaos.js 15 | theme-chrome.js 16 | theme-clouds.js 17 | theme-clouds_midnight.js 18 | theme-cobalt.js 19 | theme-crimson_editor.js 20 | theme-dawn.js 21 | theme-dracula.js 22 | theme-dreamweaver.js 23 | theme-eclipse.js 24 | theme-github.js 25 | theme-gob.js 26 | theme-gruvbox.js 27 | theme-idle_fingers.js 28 | theme-iplastic.js 29 | theme-katzenmilch.js 30 | theme-kr_theme.js 31 | theme-kuroir.js 32 | theme-merbivore.js 33 | theme-merbivore_soft.js 34 | theme-mono_industrial.js 35 | theme-monokai.js 36 | theme-nord_dark.js 37 | theme-pastel_on_dark.js 38 | theme-solarized_dark.js 39 | theme-solarized_light.js 40 | theme-sqlserver.js 41 | theme-terminal.js 42 | theme-textmate.js 43 | theme-tomorrow.js 44 | theme-tomorrow_night.js 45 | theme-tomorrow_night_blue.js 46 | theme-tomorrow_night_bright.js 47 | theme-tomorrow_night_eighties.js 48 | theme-twilight.js 49 | theme-vibrant_ink.js 50 | theme-xcode.js 51 | modernizr.custom.2.6.2.js 52 | console.js 53 | services.js 54 | audit.js 55 | scheduled-jobs.js 56 | local-storage.js -------------------------------------------------------------------------------- /bundle/src/main/groovy/org/cid15/aem/groovy/console/components/BindingsPanel.groovy: -------------------------------------------------------------------------------- 1 | package org.cid15.aem.groovy.console.components 2 | 3 | import org.cid15.aem.groovy.console.api.BindingVariable 4 | import org.cid15.aem.groovy.console.api.impl.RequestScriptContext 5 | import groovy.transform.Memoized 6 | import org.apache.sling.api.SlingHttpServletRequest 7 | import org.apache.sling.api.SlingHttpServletResponse 8 | import org.apache.sling.models.annotations.Model 9 | import org.apache.sling.models.annotations.injectorspecific.OSGiService 10 | import org.apache.sling.models.annotations.injectorspecific.ScriptVariable 11 | import org.apache.sling.models.annotations.injectorspecific.Self 12 | import org.cid15.aem.groovy.console.extension.ExtensionService 13 | 14 | @Model(adaptables = SlingHttpServletRequest) 15 | class BindingsPanel { 16 | 17 | @Self 18 | private SlingHttpServletRequest request 19 | 20 | @ScriptVariable 21 | private SlingHttpServletResponse response 22 | 23 | @OSGiService 24 | private ExtensionService extensionService 25 | 26 | @Memoized 27 | Map getBindingVariables() { 28 | def scriptContext = new RequestScriptContext( 29 | request: request, 30 | response: response 31 | ) 32 | 33 | extensionService.getBindingVariables(scriptContext) 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /bundle/src/main/groovy/org/cid15/aem/groovy/console/table/Table.groovy: -------------------------------------------------------------------------------- 1 | package org.cid15.aem.groovy.console.table 2 | 3 | class Table { 4 | 5 | List columns = [] 6 | 7 | List> rows = [] 8 | 9 | void columns(String... columnNames) { 10 | assert !columns, "columns are already defined" 11 | 12 | columns.addAll(columnNames) 13 | } 14 | 15 | void columns(List columnNames) { 16 | assert !columns, "columns are already defined" 17 | 18 | columns.addAll(columnNames) 19 | } 20 | 21 | void row(String... row) { 22 | assert columns, "columns must be defined before adding a row" 23 | assert row.length == columns.size(), "row data size does not match number of columns" 24 | 25 | rows.add(row as List) 26 | } 27 | 28 | void row(List row) { 29 | assert columns, "columns must be defined before adding a row" 30 | assert row.size() == columns.size(), "row data size does not match number of columns" 31 | 32 | rows.add(row) 33 | } 34 | 35 | void rows(List> rows) { 36 | assert columns, "columns must be defined before adding rows" 37 | 38 | rows.each { row -> 39 | assert row.size() == columns.size(), "one or more row data sizes does not match number of columns" 40 | } 41 | 42 | this.rows.addAll(rows) 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/groovyconsole/components/console/toolbar.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /bundle/src/main/groovy/org/cid15/aem/groovy/console/notification/EmailNotificationService.groovy: -------------------------------------------------------------------------------- 1 | package org.cid15.aem.groovy.console.notification 2 | 3 | import org.cid15.aem.groovy.console.response.RunScriptResponse 4 | 5 | /** 6 | * Services may implement this interface to send email notifications for Groovy Console script executions. 7 | */ 8 | interface EmailNotificationService extends NotificationService { 9 | 10 | /** 11 | * Send an email notification for given script response and recipients, optionally attaching the script output. 12 | * 13 | * @param response script execution response 14 | * @param recipients email to recipients 15 | * @param attachOutput if true, attach the script output file 16 | */ 17 | void notify(RunScriptResponse response, Set recipients, boolean attachOutput) 18 | 19 | /** 20 | * Send an email notification for given script response and recipients, with the provided success/failure 21 | * templates, optionally attaching the script output. 22 | * 23 | * @param response script execution response 24 | * @param recipients email to recipients 25 | * @param successTemplate GStringTemplate for successful executions 26 | * @param failureTemplate GStringTemplate for failed executions 27 | * @param attachOutput if true, attach the script output file 28 | */ 29 | void notify(RunScriptResponse response, Set recipients, String successTemplate, 30 | String failureTemplate, boolean attachOutput) 31 | } 32 | -------------------------------------------------------------------------------- /bundle/src/main/groovy/org/cid15/aem/groovy/console/GroovyConsoleService.groovy: -------------------------------------------------------------------------------- 1 | package org.cid15.aem.groovy.console 2 | 3 | import org.cid15.aem.groovy.console.api.ActiveJob 4 | import org.cid15.aem.groovy.console.api.JobProperties 5 | import org.cid15.aem.groovy.console.api.context.ScriptContext 6 | import org.cid15.aem.groovy.console.api.context.ScriptData 7 | import org.cid15.aem.groovy.console.response.RunScriptResponse 8 | import org.cid15.aem.groovy.console.response.SaveScriptResponse 9 | 10 | /** 11 | * Service for executing and saving Groovy scripts. 12 | */ 13 | interface GroovyConsoleService { 14 | 15 | /** 16 | * Run a Groovy script with the given script context. 17 | * 18 | * @param scriptContext script context 19 | * @return response containing script output 20 | */ 21 | RunScriptResponse runScript(ScriptContext scriptContext) 22 | 23 | /** 24 | * Save a Groovy script with the file name and content provided in the given script data. 25 | * 26 | * @param scriptData script data 27 | * @return response containing the name of the saved script 28 | */ 29 | SaveScriptResponse saveScript(ScriptData scriptData) 30 | 31 | /** 32 | * Run or schedule a Groovy Console job execution. 33 | * 34 | * @param jobProperties job properties 35 | * @return true if job was successfully added 36 | */ 37 | boolean addScheduledJob(JobProperties jobProperties) 38 | 39 | /** 40 | * Get a list of all active jobs. 41 | * 42 | * @return list of active jobs 43 | */ 44 | List getActiveJobs() 45 | } -------------------------------------------------------------------------------- /bundle/src/main/groovy/org/cid15/aem/groovy/console/api/BindingVariable.groovy: -------------------------------------------------------------------------------- 1 | package org.cid15.aem.groovy.console.api 2 | 3 | import groovy.transform.ToString 4 | 5 | /** 6 | * Groovy script binding variable with optional link to documentation. 7 | */ 8 | @ToString(includePackage = false, includeNames = true) 9 | class BindingVariable { 10 | 11 | /** Binding value. */ 12 | Object value 13 | 14 | /** Binding variable type. */ 15 | Class type 16 | 17 | /** Optional link to documentation (Javadoc/Groovydoc). */ 18 | String link 19 | 20 | /** 21 | * Create a new binding variable with the given value. Type of variable will be derived from it's class. 22 | * 23 | * @param value binding value 24 | */ 25 | BindingVariable(Object value) { 26 | this.value = value 27 | this.type = value.class 28 | } 29 | 30 | /** 31 | * Create a new binding variable with the given value and type. 32 | * 33 | * @param value binding value 34 | * @param type binding variable type 35 | */ 36 | BindingVariable(Object value, Class type) { 37 | this.value = value 38 | this.type = type 39 | } 40 | 41 | /** 42 | * Create a new binding variable with the given value, type, and documentation link. 43 | * 44 | * @param value binding value 45 | * @param type binding variable type 46 | * @param link link to documentation URL 47 | */ 48 | BindingVariable(Object value, Class type, String link) { 49 | this.value = value 50 | this.type = type 51 | this.link = link 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/groovyconsole/components/console/savedialog.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 12 | 13 | 22 | 23 | 24 | 25 | 30 | -------------------------------------------------------------------------------- /bundle/src/main/groovy/org/cid15/aem/groovy/console/audit/AuditRecord.groovy: -------------------------------------------------------------------------------- 1 | package org.cid15.aem.groovy.console.audit 2 | 3 | import com.day.text.Text 4 | import groovy.transform.ToString 5 | import org.apache.sling.api.resource.Resource 6 | import org.cid15.aem.groovy.console.response.RunScriptResponse 7 | import org.cid15.aem.groovy.console.response.impl.DefaultRunScriptResponse 8 | 9 | @ToString(includePackage = false, includes = ["path"]) 10 | class AuditRecord implements RunScriptResponse { 11 | 12 | private static final Integer DEPTH_RELATIVE_PATH = 3 13 | 14 | final String path 15 | 16 | @Delegate 17 | final RunScriptResponse response 18 | 19 | AuditRecord(Resource resource) { 20 | path = resource.path 21 | response = DefaultRunScriptResponse.fromAuditRecordResource(resource) 22 | } 23 | 24 | String getDownloadUrl() { 25 | def downloadUrl = null 26 | 27 | if (output) { 28 | downloadUrl = "/bin/groovyconsole/download?userId=$userId&script=$relativePath" 29 | } 30 | 31 | downloadUrl 32 | } 33 | 34 | String getRelativePath() { 35 | (path - Text.getAbsoluteParent(path, DEPTH_RELATIVE_PATH)).substring(1) 36 | } 37 | 38 | String getException() { 39 | def exception = "" 40 | 41 | if (exceptionStackTrace) { 42 | def firstLine = exceptionStackTrace.readLines().first() 43 | 44 | if (firstLine.contains(":")) { 45 | exception = firstLine.substring(0, firstLine.indexOf(":")) 46 | } else { 47 | exception = firstLine 48 | } 49 | } 50 | 51 | exception 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /ui.apps.structure/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | 6 | org.cid15.aem.groovy.console 7 | aem-groovy-console 8 | 18.0.3-SNAPSHOT 9 | 10 | 11 | aem-groovy-console-ui.apps.structure 12 | content-package 13 | AEM Groovy Console - Repository Structure Package 14 | 15 | Empty package that defines the structure of the Adobe Experience Manager repository the Code packages in this project deploy into. 16 | Any roots in the Code packages of this project should have their parent enumerated in the Filters list below. 17 | 18 | 19 | 20 | 21 | 22 | org.apache.jackrabbit 23 | filevault-package-maven-plugin 24 | true 25 | 26 | 27 | none 28 | 29 | 30 | 31 | /apps 32 | /apps/groovyconsole 33 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /bundle/src/main/groovy/org/cid15/aem/groovy/console/job/event/impl/DefaultGroovyConsoleEmailNotificationEventHandler.groovy: -------------------------------------------------------------------------------- 1 | package org.cid15.aem.groovy.console.job.event.impl 2 | 3 | import org.cid15.aem.groovy.console.audit.AuditService 4 | import org.cid15.aem.groovy.console.notification.EmailNotificationService 5 | import groovy.util.logging.Slf4j 6 | import org.apache.sling.event.jobs.NotificationConstants 7 | import org.cid15.aem.groovy.console.job.event.AbstractGroovyConsoleScheduledJobEventHandler 8 | import org.cid15.aem.groovy.console.response.RunScriptResponse 9 | import org.osgi.service.component.annotations.Component 10 | import org.osgi.service.component.annotations.Reference 11 | import org.osgi.service.event.EventHandler 12 | import org.osgi.service.event.propertytypes.EventFilter 13 | import org.osgi.service.event.propertytypes.EventTopics 14 | 15 | @Component(service = EventHandler, immediate = true) 16 | @EventTopics(NotificationConstants.TOPIC_JOB_FINISHED) 17 | @EventFilter("(event.job.topic=groovyconsole/job*)") 18 | @Slf4j("LOG") 19 | class DefaultGroovyConsoleEmailNotificationEventHandler extends AbstractGroovyConsoleScheduledJobEventHandler { 20 | 21 | @Reference 22 | private EmailNotificationService emailNotificationService 23 | 24 | @Reference 25 | private AuditService auditService 26 | 27 | @Override 28 | protected void handleScheduledJobEvent(RunScriptResponse response) { 29 | if (response.jobProperties?.emailTo) { 30 | emailNotificationService.notify(response, response.jobProperties.emailTo, true) 31 | } else { 32 | LOG.debug("missing job properties and/or email recipients for script execution, ignoring...") 33 | } 34 | } 35 | 36 | @Override 37 | protected AuditService getAuditService() { 38 | auditService 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /bundle/src/main/groovy/org/cid15/aem/groovy/console/servlets/ScriptDownloadServlet.groovy: -------------------------------------------------------------------------------- 1 | package org.cid15.aem.groovy.console.servlets 2 | 3 | import com.google.common.net.HttpHeaders 4 | import org.cid15.aem.groovy.console.audit.AuditService 5 | import org.apache.sling.api.SlingHttpServletRequest 6 | import org.apache.sling.api.SlingHttpServletResponse 7 | import org.apache.sling.api.servlets.SlingSafeMethodsServlet 8 | import org.cid15.aem.groovy.console.constants.GroovyConsoleConstants 9 | import org.osgi.service.component.annotations.Component 10 | import org.osgi.service.component.annotations.Reference 11 | 12 | import javax.servlet.Servlet 13 | 14 | import static javax.servlet.http.HttpServletResponse.SC_BAD_REQUEST 15 | 16 | @Component(service = Servlet, immediate = true, property = [ 17 | "sling.servlet.paths=/bin/groovyconsole/download" 18 | ]) 19 | class ScriptDownloadServlet extends SlingSafeMethodsServlet { 20 | 21 | @Reference 22 | private AuditService auditService 23 | 24 | @Override 25 | protected void doGet(SlingHttpServletRequest request, SlingHttpServletResponse response) { 26 | def userId = request.getParameter(GroovyConsoleConstants.USER_ID) 27 | def script = request.getParameter(GroovyConsoleConstants.SCRIPT) 28 | 29 | def auditRecord = auditService.getAuditRecord(userId, script) 30 | 31 | if (auditRecord) { 32 | response.setHeader(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=${auditRecord.outputFileName}") 33 | 34 | response.contentType = auditRecord.mediaType 35 | response.characterEncoding = GroovyConsoleConstants.CHARSET 36 | response.contentLength = auditRecord.output.length() 37 | response.outputStream.write(auditRecord.output.getBytes(GroovyConsoleConstants.CHARSET)) 38 | } else { 39 | response.status = SC_BAD_REQUEST 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /bundle/src/main/groovy/org/cid15/aem/groovy/console/job/event/AbstractGroovyConsoleScheduledJobEventHandler.groovy: -------------------------------------------------------------------------------- 1 | package org.cid15.aem.groovy.console.job.event 2 | 3 | import org.cid15.aem.groovy.console.audit.AuditService 4 | import groovy.util.logging.Slf4j 5 | import org.apache.sling.event.jobs.NotificationConstants 6 | import org.cid15.aem.groovy.console.response.RunScriptResponse 7 | import org.osgi.service.event.Event 8 | import org.osgi.service.event.EventHandler 9 | 10 | /** 11 | * Event handler base class that can be extended to implement custom handling of 12 | * completed scheduled job executions. 13 | */ 14 | @Slf4j("LOG") 15 | abstract class AbstractGroovyConsoleScheduledJobEventHandler implements EventHandler { 16 | 17 | @Override 18 | final void handleEvent(Event event) { 19 | LOG.debug("handling completed scheduled job with properties : {}", event.propertyNames 20 | .collectEntries { propertyName -> [propertyName, event.getProperty(propertyName)] }) 21 | 22 | def jobId = event.getProperty(NotificationConstants.NOTIFICATION_PROPERTY_JOB_ID) as String 23 | def auditRecord = getAuditService().getAuditRecord(jobId) 24 | 25 | if (auditRecord) { 26 | LOG.info("found audit record for job ID : {}, {}, handling event...", jobId, auditRecord) 27 | 28 | handleScheduledJobEvent(auditRecord) 29 | } else { 30 | LOG.error("audit record not found for job ID : {}", jobId) 31 | } 32 | } 33 | 34 | /** 35 | * Handle the scheduled job completion event for the given script execution response. 36 | * 37 | * @param response script execution response 38 | */ 39 | protected abstract void handleScheduledJobEvent(RunScriptResponse response) 40 | 41 | /** 42 | * Get the audit service. 43 | * 44 | * @return audit service 45 | */ 46 | protected abstract AuditService getAuditService() 47 | } 48 | -------------------------------------------------------------------------------- /bundle/src/main/groovy/org/cid15/aem/groovy/console/configuration/ConfigurationService.groovy: -------------------------------------------------------------------------------- 1 | package org.cid15.aem.groovy.console.configuration 2 | 3 | import org.apache.sling.api.SlingHttpServletRequest 4 | 5 | /** 6 | * Groovy console configuration service. 7 | */ 8 | interface ConfigurationService { 9 | 10 | /** 11 | * Check if the current user has permission to execute Groovy scripts in the console. 12 | * 13 | * @param request current execution request 14 | * @return true if user has permission 15 | */ 16 | boolean hasPermission(SlingHttpServletRequest request) 17 | 18 | /** 19 | * Check if the current user has permission to scheduled jobs in the console. 20 | * 21 | * @param request current execution request 22 | * @return true if user has permission 23 | */ 24 | boolean hasScheduledJobPermission(SlingHttpServletRequest request) 25 | 26 | /** 27 | * Check if email is enabled. 28 | * 29 | * @return true if email is enabled 30 | */ 31 | boolean isEmailEnabled() 32 | 33 | /** 34 | * Get the set of configured email recipients for Groovy script notifications. 35 | * 36 | * @return set of email addresses 37 | */ 38 | Set getEmailRecipients() 39 | 40 | /** 41 | * Check if auditing is disabled. 42 | * 43 | * @return true if auditing is disabled 44 | */ 45 | boolean isAuditDisabled() 46 | 47 | /** 48 | * Check if all audit records should be displayed in the History panel. By default, 49 | * only records for the current user will be displayed. 50 | * 51 | * @return if true, display all audit records 52 | */ 53 | boolean isDisplayAllAuditRecords() 54 | 55 | /** 56 | * Get the thread timeout value in seconds. Scripts will be interrupted when the timeout value is reached. If zero, no timeout will be enforced. 57 | * 58 | * @return thread timeout 59 | */ 60 | long getThreadTimeout() 61 | } -------------------------------------------------------------------------------- /bundle/src/main/groovy/org/cid15/aem/groovy/console/job/consumer/GroovyConsoleScheduledJobConsumer.groovy: -------------------------------------------------------------------------------- 1 | package org.cid15.aem.groovy.console.job.consumer 2 | 3 | import com.google.common.base.Charsets 4 | import org.cid15.aem.groovy.console.GroovyConsoleService 5 | import org.cid15.aem.groovy.console.api.impl.ScheduledJobScriptContext 6 | import groovy.util.logging.Slf4j 7 | import org.apache.sling.api.resource.ResourceResolverFactory 8 | import org.apache.sling.event.jobs.Job 9 | import org.apache.sling.event.jobs.consumer.JobConsumer 10 | import org.cid15.aem.groovy.console.api.JobProperties 11 | import org.osgi.service.component.annotations.Component 12 | import org.osgi.service.component.annotations.Reference 13 | 14 | @Component(service = JobConsumer, immediate = true, property = [ 15 | "job.topics=groovyconsole/job" 16 | ]) 17 | @Slf4j("LOG") 18 | class GroovyConsoleScheduledJobConsumer implements JobConsumer { 19 | 20 | @Reference 21 | private ResourceResolverFactory resourceResolverFactory 22 | 23 | @Reference 24 | private GroovyConsoleService groovyConsoleService 25 | 26 | @Override 27 | JobResult process(Job job) { 28 | LOG.debug("executing groovy console job with properties : {}", job.propertyNames.collectEntries { propertyName -> 29 | [propertyName, job.getProperty(propertyName)] 30 | }) 31 | 32 | resourceResolverFactory.getServiceResourceResolver(null).withCloseable { resourceResolver -> 33 | def outputStream = new ByteArrayOutputStream() 34 | 35 | def scriptContext = new ScheduledJobScriptContext( 36 | resourceResolver: resourceResolver, 37 | outputStream: outputStream, 38 | printStream: new PrintStream(outputStream, true, Charsets.UTF_8.name()), 39 | jobId: job.id, 40 | jobProperties: JobProperties.fromJob(job) 41 | ) 42 | 43 | groovyConsoleService.runScript(scriptContext) 44 | 45 | JobResult.OK 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /bundle/src/main/groovy/org/cid15/aem/groovy/console/components/Body.groovy: -------------------------------------------------------------------------------- 1 | package org.cid15.aem.groovy.console.components 2 | 3 | import org.cid15.aem.groovy.console.GroovyConsoleService 4 | import org.cid15.aem.groovy.console.audit.AuditRecord 5 | import org.cid15.aem.groovy.console.audit.AuditService 6 | import org.cid15.aem.groovy.console.configuration.ConfigurationService 7 | import groovy.json.JsonBuilder 8 | import org.apache.sling.api.SlingHttpServletRequest 9 | import org.apache.sling.models.annotations.Model 10 | import org.apache.sling.models.annotations.injectorspecific.OSGiService 11 | import org.apache.sling.models.annotations.injectorspecific.Self 12 | 13 | import javax.annotation.PostConstruct 14 | 15 | import static org.cid15.aem.groovy.console.constants.GroovyConsoleConstants.SCRIPT 16 | import static org.cid15.aem.groovy.console.constants.GroovyConsoleConstants.USER_ID 17 | 18 | @Model(adaptables = SlingHttpServletRequest) 19 | class Body { 20 | 21 | @OSGiService 22 | private AuditService auditService 23 | 24 | @OSGiService 25 | private ConfigurationService configurationService 26 | 27 | @OSGiService 28 | private GroovyConsoleService groovyConsoleService 29 | 30 | @Self 31 | private SlingHttpServletRequest request 32 | 33 | private AuditRecord auditRecord 34 | 35 | @PostConstruct 36 | void init() { 37 | def userId = request.getParameter(USER_ID) 38 | def script = request.getParameter(SCRIPT) 39 | 40 | if (script) { 41 | auditRecord = auditService.getAuditRecord(userId, script) 42 | } 43 | } 44 | 45 | String getAuditRecordJson() { 46 | auditRecord ? new JsonBuilder(auditRecord).toString() : null 47 | } 48 | 49 | boolean isHasScheduledJobPermission() { 50 | configurationService.hasScheduledJobPermission(request) 51 | } 52 | 53 | boolean isHasActiveJobs() { 54 | groovyConsoleService.activeJobs 55 | } 56 | 57 | boolean isAuditEnabled() { 58 | !configurationService.auditDisabled 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /bundle/src/main/groovy/org/cid15/aem/groovy/console/extension/impl/DefaultStarImportExtensionProvider.groovy: -------------------------------------------------------------------------------- 1 | package org.cid15.aem.groovy.console.extension.impl 2 | 3 | import com.google.common.collect.ImmutableSet 4 | import org.cid15.aem.groovy.console.api.StarImport 5 | import org.cid15.aem.groovy.console.api.StarImportExtensionProvider 6 | import org.osgi.service.component.annotations.Component 7 | 8 | @Component(service = StarImportExtensionProvider, immediate = true) 9 | class DefaultStarImportExtensionProvider implements StarImportExtensionProvider { 10 | 11 | private static final String AEM_JAVADOC_PREFIX = "https://helpx.adobe" + 12 | ".com/experience-manager/6-5/sites/developing/using/reference-materials/javadoc" 13 | 14 | private static final String JCR_JAVADOC_PREFIX = "https://docs.adobe.com/docs/en/spec/javax.jcr/javadocs/jcr-2.0" 15 | 16 | private static final String SLING_JAVADOC_PREFIX = "http://sling.apache.org/apidocs/sling9" 17 | 18 | private static final String JAVADOC_SUFFIX = "package-summary.html" 19 | 20 | private static final Set IMPORTS = ImmutableSet.of( 21 | new StarImport("com.day.cq.dam.api", "$AEM_JAVADOC_PREFIX/com/day/cq/dam/api/$JAVADOC_SUFFIX"), 22 | new StarImport("com.day.cq.search", "$AEM_JAVADOC_PREFIX/com/day/cq/search/$JAVADOC_SUFFIX"), 23 | new StarImport("com.day.cq.tagging", "$AEM_JAVADOC_PREFIX/com/day/cq/tagging/$JAVADOC_SUFFIX"), 24 | new StarImport("com.day.cq.wcm.api", "$AEM_JAVADOC_PREFIX/com/day/cq/wcm/api/$JAVADOC_SUFFIX"), 25 | new StarImport("com.day.cq.replication", "$AEM_JAVADOC_PREFIX/com/day/cq/replication/$JAVADOC_SUFFIX"), 26 | new StarImport("javax.jcr", "$JCR_JAVADOC_PREFIX/javax/jcr/$JAVADOC_SUFFIX"), 27 | new StarImport("org.apache.sling.api", "$SLING_JAVADOC_PREFIX/org/apache/sling/api/$JAVADOC_SUFFIX"), 28 | new StarImport("org.apache.sling.api.resource", 29 | "$SLING_JAVADOC_PREFIX/org/apache/sling/api/resource/$JAVADOC_SUFFIX") 30 | ) 31 | 32 | @Override 33 | Set getStarImports() { 34 | IMPORTS 35 | } 36 | } -------------------------------------------------------------------------------- /ui.config/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | 6 | org.cid15.aem.groovy.console 7 | aem-groovy-console 8 | 18.0.3-SNAPSHOT 9 | 10 | 11 | aem-groovy-console-ui.config 12 | content-package 13 | AEM Groovy Console - UI config 14 | 15 | 16 | src/content/jcr_root 17 | 18 | 19 | org.apache.jackrabbit 20 | filevault-package-maven-plugin 21 | 22 | container 23 | false 24 | 25 | 26 | org.cid15.aem.groovy.console 27 | aem-groovy-console-ui.apps.structure 28 | 29 | 30 | 31 | 32 | 33 | com.day.jcr.vault 34 | content-package-maven-plugin 35 | 36 | 37 | 38 | 39 | 40 | 41 | org.cid15.aem.groovy.console 42 | aem-groovy-console-ui.apps.structure 43 | ${project.version} 44 | zip 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/var/groovyconsole/scripts/samples/CreatePackage.groovy: -------------------------------------------------------------------------------- 1 | import groovy.transform.Field 2 | 3 | @Field packagesPath = "/etc/packages" 4 | @Field packageName = "groovy-console-history" 5 | @Field definitionPath = "$packagesPath/${packageName}.zip/jcr:content/vlt:definition" 6 | 7 | def definitionNode = getOrAddDefinitionNode() 8 | def filterNode = getOrAddFilterNode(definitionNode) 9 | 10 | ["/var/groovyconsole/audit"].eachWithIndex { path, i -> 11 | def f = filterNode.addNode("filter$i") 12 | 13 | f.set("mode", "replace") 14 | f.set("root", path) 15 | f.set("rules", new String[0]) 16 | } 17 | 18 | save() 19 | 20 | def getOrAddDefinitionNode() { 21 | def definitionNode 22 | 23 | if (session.nodeExists(definitionPath)) { 24 | definitionNode = getNode(definitionPath) 25 | } else { 26 | def fileNode = getNode(packagesPath).addNode("${packageName}.zip", "nt:file") 27 | 28 | def contentNode = fileNode.addNode("jcr:content", "nt:resource") 29 | 30 | contentNode.addMixin("vlt:Package") 31 | contentNode.set("jcr:mimeType", "application/zip") 32 | 33 | def stream = new ByteArrayInputStream("".bytes) 34 | def binary = session.valueFactory.createBinary(stream) 35 | 36 | contentNode.set("jcr:data", binary) 37 | 38 | definitionNode = contentNode.addNode("vlt:definition", "vlt:PackageDefinition") 39 | 40 | definitionNode.set("sling:resourceType", "cq/packaging/components/pack/definition") 41 | definitionNode.set("name", packageName) 42 | definitionNode.set("path", "$packagesPath/$packageName") 43 | } 44 | 45 | definitionNode 46 | } 47 | 48 | def getOrAddFilterNode(definitionNode) { 49 | def filterNode 50 | 51 | if (definitionNode.hasNode("filter")) { 52 | filterNode = definitionNode.getNode("filter") 53 | 54 | filterNode.nodes.each { 55 | it.remove() 56 | } 57 | } else { 58 | filterNode = definitionNode.addNode("filter") 59 | 60 | filterNode.set("sling:resourceType", "cq/packaging/components/pack/definition/filterlist") 61 | } 62 | 63 | filterNode 64 | } -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/groovyconsole/clientlibs/css/console.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding-top: 60px; 3 | padding-bottom: 30px; 4 | } 5 | 6 | #script-editor { 7 | position: relative; 8 | height: 400px; 9 | } 10 | 11 | #data-editor { 12 | position: relative; 13 | height: 200px; 14 | } 15 | 16 | #loader { 17 | display: inline-block; 18 | margin-left: 5px; 19 | visibility: hidden; 20 | } 21 | 22 | #toolbar-group { 23 | margin-top: 10px; 24 | margin-bottom: 10px; 25 | } 26 | 27 | #message-success, #message-error { 28 | margin-top: 20px; 29 | } 30 | 31 | .services-form { 32 | margin-top: 0; 33 | margin-bottom: 0; 34 | } 35 | 36 | #btn-group-services { 37 | display: none; 38 | } 39 | 40 | #services-list { 41 | width: 250px; 42 | } 43 | 44 | .typeahead { 45 | z-index: 1051; 46 | } 47 | 48 | .ace_editor_wrapper { 49 | border: 1px solid #DDD; 50 | border-radius: 4px; 51 | margin: 10px 0; 52 | } 53 | 54 | .ace_scroller { 55 | border-top-right-radius: 4px; 56 | border-bottom-right-radius: 4px; 57 | } 58 | 59 | .panel-row { 60 | margin-right: 0; 61 | margin-left: 0; 62 | padding-left: 15px; 63 | padding-right: 15px; 64 | } 65 | 66 | code { 67 | color: #333; 68 | background-color: #e8e8e8; 69 | border-color: #ddd; 70 | } 71 | 72 | td.open-record, td.download-record, td.delete-record { 73 | cursor: pointer; 74 | } 75 | 76 | td.edit-scheduled-job, td.delete-scheduled-job { 77 | cursor: pointer; 78 | } 79 | 80 | .delete-all { 81 | padding-right: 15px; 82 | } 83 | 84 | .scrollable-menu { 85 | height: auto; 86 | max-height: 500px; 87 | overflow-x: hidden; 88 | } 89 | 90 | #history .form-group { 91 | margin-bottom: 0; 92 | } 93 | 94 | #result-table table { 95 | background-color: #f5f5f5; 96 | } 97 | 98 | #history table { 99 | width: 100% !important; 100 | } 101 | 102 | #history td { 103 | vertical-align: middle; 104 | } 105 | 106 | #scheduled-jobs table { 107 | width: 100% !important; 108 | } 109 | 110 | #scheduled-jobs td { 111 | vertical-align: middle; 112 | } 113 | 114 | .popover { 115 | max-width: 100%; 116 | } -------------------------------------------------------------------------------- /bundle/src/main/java/org/cid15/aem/groovy/console/configuration/impl/ConfigurationServiceProperties.java: -------------------------------------------------------------------------------- 1 | package org.cid15.aem.groovy.console.configuration.impl; 2 | 3 | import org.osgi.service.metatype.annotations.AttributeDefinition; 4 | import org.osgi.service.metatype.annotations.ObjectClassDefinition; 5 | 6 | @ObjectClassDefinition(name = "Groovy Console Configuration Service") 7 | public @interface ConfigurationServiceProperties { 8 | 9 | @AttributeDefinition(name = "Email Enabled?", 10 | description = "Check to enable email notification on completion of script execution.") 11 | boolean emailEnabled() default false; 12 | 13 | @AttributeDefinition(name = "Email Recipients", 14 | description = "Email addresses to receive notification.", cardinality = 20) 15 | String[] emailRecipients() default {}; 16 | 17 | @AttributeDefinition(name = "Script Execution Allowed Groups", 18 | description = "List of group names that are authorized to use the console. By default, only the 'admin' user has permission to execute scripts.", 19 | cardinality = 20) 20 | String[] allowedGroups() default {}; 21 | 22 | @AttributeDefinition(name = "Scheduled Jobs Allowed Groups", 23 | description = "List of group names that are authorized to schedule jobs. By default, only the 'admin' user has permission to schedule jobs.", 24 | cardinality = 20) 25 | String[] allowedScheduledJobsGroups() default {}; 26 | 27 | @AttributeDefinition(name = "Vanity Path Enabled?", 28 | description = "Enables /groovyconsole vanity path.") 29 | boolean vanityPathEnabled() default false; 30 | 31 | @AttributeDefinition(name = "Audit Disabled?", description = "Disables auditing of script execution history.") 32 | boolean auditDisabled() default false; 33 | 34 | @AttributeDefinition(name = "Display All Audit Records?", 35 | description = "If enabled, all audit records (including records for other users) will be displayed in the console history.") 36 | boolean auditDisplayAll() default false; 37 | 38 | @AttributeDefinition(name = "Thread Timeout", 39 | description = "Time in seconds that scripts are allowed to execute before being interrupted. If 0, no timeout is enforced.") 40 | long threadTimeout() default 0; 41 | } -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/groovyconsole/clientlibs/js/theme-gruvbox.js: -------------------------------------------------------------------------------- 1 | ace.define("ace/theme/gruvbox",["require","exports","module","ace/lib/dom"], function(require, exports, module) { 2 | 3 | exports.isDark = true; 4 | exports.cssClass = "ace-gruvbox"; 5 | exports.cssText = ".ace-gruvbox .ace_gutter-active-line {\ 6 | background-color: #3C3836;\ 7 | }\ 8 | .ace-gruvbox {\ 9 | color: #EBDAB4;\ 10 | background-color: #1D2021;\ 11 | }\ 12 | .ace-gruvbox .ace_invisible {\ 13 | color: #504945;\ 14 | }\ 15 | .ace-gruvbox .ace_marker-layer .ace_selection {\ 16 | background: rgba(179, 101, 57, 0.75)\ 17 | }\ 18 | .ace-gruvbox.ace_multiselect .ace_selection.ace_start {\ 19 | box-shadow: 0 0 3px 0px #002240;\ 20 | }\ 21 | .ace-gruvbox .ace_keyword {\ 22 | color: #8ec07c;\ 23 | }\ 24 | .ace-gruvbox .ace_comment {\ 25 | font-style: italic;\ 26 | color: #928375;\ 27 | }\ 28 | .ace-gruvbox .ace-statement {\ 29 | color: red;\ 30 | }\ 31 | .ace-gruvbox .ace_variable {\ 32 | color: #84A598;\ 33 | }\ 34 | .ace-gruvbox .ace_variable.ace_language {\ 35 | color: #D2879B;\ 36 | }\ 37 | .ace-gruvbox .ace_constant {\ 38 | color: #C2859A;\ 39 | }\ 40 | .ace-gruvbox .ace_constant.ace_language {\ 41 | color: #C2859A;\ 42 | }\ 43 | .ace-gruvbox .ace_constant.ace_numeric {\ 44 | color: #C2859A;\ 45 | }\ 46 | .ace-gruvbox .ace_string {\ 47 | color: #B8BA37;\ 48 | }\ 49 | .ace-gruvbox .ace_support {\ 50 | color: #F9BC41;\ 51 | }\ 52 | .ace-gruvbox .ace_support.ace_function {\ 53 | color: #F84B3C;\ 54 | }\ 55 | .ace-gruvbox .ace_storage {\ 56 | color: #8FBF7F;\ 57 | }\ 58 | .ace-gruvbox .ace_keyword.ace_operator {\ 59 | color: #EBDAB4;\ 60 | }\ 61 | .ace-gruvbox .ace_punctuation.ace_operator {\ 62 | color: yellow;\ 63 | }\ 64 | .ace-gruvbox .ace_marker-layer .ace_active-line {\ 65 | background: #3C3836;\ 66 | }\ 67 | .ace-gruvbox .ace_marker-layer .ace_selected-word {\ 68 | border-radius: 4px;\ 69 | border: 8px solid #3f475d;\ 70 | }\ 71 | .ace-gruvbox .ace_print-margin {\ 72 | width: 5px;\ 73 | background: #3C3836;\ 74 | }\ 75 | .ace-gruvbox .ace_indent-guide {\ 76 | background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNQUFD4z6Crq/sfAAuYAuYl+7lfAAAAAElFTkSuQmCC\") right repeat-y;\ 77 | }"; 78 | 79 | var dom = require("../lib/dom"); 80 | dom.importCssString(exports.cssText, exports.cssClass); 81 | 82 | }); (function() { 83 | ace.require(["ace/theme/gruvbox"], function(m) { 84 | if (typeof module == "object" && typeof exports == "object" && module) { 85 | module.exports = m; 86 | } 87 | }); 88 | })(); 89 | -------------------------------------------------------------------------------- /bundle/src/main/groovy/org/cid15/aem/groovy/console/audit/AuditService.groovy: -------------------------------------------------------------------------------- 1 | package org.cid15.aem.groovy.console.audit 2 | 3 | import org.cid15.aem.groovy.console.response.RunScriptResponse 4 | 5 | interface AuditService { 6 | 7 | /** 8 | * Create an audit record for the given script execution response. 9 | * 10 | * @param response response containing execution result or exception 11 | */ 12 | AuditRecord createAuditRecord(RunScriptResponse response) 13 | 14 | /** 15 | * Delete all audit records. 16 | * 17 | * @param userId user that owns the audit records 18 | */ 19 | void deleteAllAuditRecords(String userId) 20 | 21 | /** 22 | * Delete an audit record. 23 | * 24 | * @param userId user that owns the audit record 25 | * @param relativePath relative path to audit record from parent audit resource 26 | */ 27 | void deleteAuditRecord(String userId, String relativePath) 28 | 29 | /** 30 | * Get all audit records. 31 | * 32 | * @param userId user that owns the audit records 33 | * @return all audit records 34 | */ 35 | List getAllAuditRecords(String userId) 36 | 37 | /** 38 | * Get all audit records for scheduled jobs. 39 | * 40 | * @return all audit records for scheduled jobs 41 | */ 42 | List getAllScheduledJobAuditRecords() 43 | 44 | /** 45 | * Get the audit record for the given job ID. 46 | * 47 | * @param jobId Sling-generated ID for the job 48 | * @return audit record or null if not found 49 | */ 50 | AuditRecord getAuditRecord(String jobId) 51 | 52 | /** 53 | * Get the audit record at the given relative path. 54 | * 55 | * @param userId user that owns the audit record 56 | * @param relativePath relative path to audit record from parent audit node 57 | * @return audit record or null if none exists 58 | */ 59 | AuditRecord getAuditRecord(String userId, String relativePath) 60 | 61 | /** 62 | * Get a list of audit records for the given date range. 63 | * 64 | * @param userId user that owns the audit records 65 | * @param startDate start date 66 | * @param endDate end date 67 | * @return list of audit records in the given date range 68 | */ 69 | List getAuditRecords(String userId, Calendar startDate, Calendar endDate) 70 | 71 | /** 72 | * Get a list of scheduled job audit records for the given date range. 73 | * 74 | * @param startDate start date 75 | * @param endDate end date 76 | * @return list of scheduled job audit records in the given date range 77 | */ 78 | List getScheduledJobAuditRecords(Calendar startDate, Calendar endDate) 79 | } 80 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/groovyconsole/clientlibs/js/theme-kuroir.js: -------------------------------------------------------------------------------- 1 | ace.define("ace/theme/kuroir",["require","exports","module","ace/lib/dom"], function(require, exports, module) { 2 | 3 | exports.isDark = false; 4 | exports.cssClass = "ace-kuroir"; 5 | exports.cssText = "\ 6 | .ace-kuroir .ace_gutter {\ 7 | background: #e8e8e8;\ 8 | color: #333;\ 9 | }\ 10 | .ace-kuroir .ace_print-margin {\ 11 | width: 1px;\ 12 | background: #e8e8e8;\ 13 | }\ 14 | .ace-kuroir {\ 15 | background-color: #E8E9E8;\ 16 | color: #363636;\ 17 | }\ 18 | .ace-kuroir .ace_cursor {\ 19 | color: #202020;\ 20 | }\ 21 | .ace-kuroir .ace_marker-layer .ace_selection {\ 22 | background: rgba(245, 170, 0, 0.57);\ 23 | }\ 24 | .ace-kuroir.ace_multiselect .ace_selection.ace_start {\ 25 | box-shadow: 0 0 3px 0px #E8E9E8;\ 26 | }\ 27 | .ace-kuroir .ace_marker-layer .ace_step {\ 28 | background: rgb(198, 219, 174);\ 29 | }\ 30 | .ace-kuroir .ace_marker-layer .ace_bracket {\ 31 | margin: -1px 0 0 -1px;\ 32 | border: 1px solid rgba(0, 0, 0, 0.29);\ 33 | }\ 34 | .ace-kuroir .ace_marker-layer .ace_active-line {\ 35 | background: rgba(203, 220, 47, 0.22);\ 36 | }\ 37 | .ace-kuroir .ace_gutter-active-line {\ 38 | background-color: rgba(203, 220, 47, 0.22);\ 39 | }\ 40 | .ace-kuroir .ace_marker-layer .ace_selected-word {\ 41 | border: 1px solid rgba(245, 170, 0, 0.57);\ 42 | }\ 43 | .ace-kuroir .ace_invisible {\ 44 | color: #BFBFBF\ 45 | }\ 46 | .ace-kuroir .ace_fold {\ 47 | border-color: #363636;\ 48 | }\ 49 | .ace-kuroir .ace_constant{color:#CD6839;}.ace-kuroir .ace_constant.ace_numeric{color:#9A5925;}.ace-kuroir .ace_support{color:#104E8B;}.ace-kuroir .ace_support.ace_function{color:#005273;}.ace-kuroir .ace_support.ace_constant{color:#CF6A4C;}.ace-kuroir .ace_storage{color:#A52A2A;}.ace-kuroir .ace_invalid.ace_illegal{color:#FD1224;\ 50 | background-color:rgba(255, 6, 0, 0.15);}.ace-kuroir .ace_invalid.ace_deprecated{text-decoration:underline;\ 51 | font-style:italic;\ 52 | color:#FD1732;\ 53 | background-color:#E8E9E8;}.ace-kuroir .ace_string{color:#639300;}.ace-kuroir .ace_string.ace_regexp{color:#417E00;\ 54 | background-color:#C9D4BE;}.ace-kuroir .ace_comment{color:rgba(148, 148, 148, 0.91);\ 55 | background-color:rgba(220, 220, 220, 0.56);}.ace-kuroir .ace_variable{color:#009ACD;}.ace-kuroir .ace_meta.ace_tag{color:#005273;}.ace-kuroir .ace_markup.ace_heading{color:#B8012D;\ 56 | background-color:rgba(191, 97, 51, 0.051);}.ace-kuroir .ace_markup.ace_list{color:#8F5B26;}\ 57 | "; 58 | 59 | var dom = require("../lib/dom"); 60 | dom.importCssString(exports.cssText, exports.cssClass); 61 | }); (function() { 62 | ace.require(["ace/theme/kuroir"], function(m) { 63 | if (typeof module == "object" && typeof exports == "object" && module) { 64 | module.exports = m; 65 | } 66 | }); 67 | })(); 68 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/groovyconsole/clientlibs/js/theme-xcode.js: -------------------------------------------------------------------------------- 1 | ace.define("ace/theme/xcode",["require","exports","module","ace/lib/dom"], function(require, exports, module) { 2 | 3 | exports.isDark = false; 4 | exports.cssClass = "ace-xcode"; 5 | exports.cssText = "\ 6 | .ace-xcode .ace_gutter {\ 7 | background: #e8e8e8;\ 8 | color: #333\ 9 | }\ 10 | .ace-xcode .ace_print-margin {\ 11 | width: 1px;\ 12 | background: #e8e8e8\ 13 | }\ 14 | .ace-xcode {\ 15 | background-color: #FFFFFF;\ 16 | color: #000000\ 17 | }\ 18 | .ace-xcode .ace_cursor {\ 19 | color: #000000\ 20 | }\ 21 | .ace-xcode .ace_marker-layer .ace_selection {\ 22 | background: #B5D5FF\ 23 | }\ 24 | .ace-xcode.ace_multiselect .ace_selection.ace_start {\ 25 | box-shadow: 0 0 3px 0px #FFFFFF;\ 26 | }\ 27 | .ace-xcode .ace_marker-layer .ace_step {\ 28 | background: rgb(198, 219, 174)\ 29 | }\ 30 | .ace-xcode .ace_marker-layer .ace_bracket {\ 31 | margin: -1px 0 0 -1px;\ 32 | border: 1px solid #BFBFBF\ 33 | }\ 34 | .ace-xcode .ace_marker-layer .ace_active-line {\ 35 | background: rgba(0, 0, 0, 0.071)\ 36 | }\ 37 | .ace-xcode .ace_gutter-active-line {\ 38 | background-color: rgba(0, 0, 0, 0.071)\ 39 | }\ 40 | .ace-xcode .ace_marker-layer .ace_selected-word {\ 41 | border: 1px solid #B5D5FF\ 42 | }\ 43 | .ace-xcode .ace_constant.ace_language,\ 44 | .ace-xcode .ace_keyword,\ 45 | .ace-xcode .ace_meta,\ 46 | .ace-xcode .ace_variable.ace_language {\ 47 | color: #C800A4\ 48 | }\ 49 | .ace-xcode .ace_invisible {\ 50 | color: #BFBFBF\ 51 | }\ 52 | .ace-xcode .ace_constant.ace_character,\ 53 | .ace-xcode .ace_constant.ace_other {\ 54 | color: #275A5E\ 55 | }\ 56 | .ace-xcode .ace_constant.ace_numeric {\ 57 | color: #3A00DC\ 58 | }\ 59 | .ace-xcode .ace_entity.ace_other.ace_attribute-name,\ 60 | .ace-xcode .ace_support.ace_constant,\ 61 | .ace-xcode .ace_support.ace_function {\ 62 | color: #450084\ 63 | }\ 64 | .ace-xcode .ace_fold {\ 65 | background-color: #C800A4;\ 66 | border-color: #000000\ 67 | }\ 68 | .ace-xcode .ace_entity.ace_name.ace_tag,\ 69 | .ace-xcode .ace_support.ace_class,\ 70 | .ace-xcode .ace_support.ace_type {\ 71 | color: #790EAD\ 72 | }\ 73 | .ace-xcode .ace_storage {\ 74 | color: #C900A4\ 75 | }\ 76 | .ace-xcode .ace_string {\ 77 | color: #DF0002\ 78 | }\ 79 | .ace-xcode .ace_comment {\ 80 | color: #008E00\ 81 | }\ 82 | .ace-xcode .ace_indent-guide {\ 83 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==) right repeat-y\ 84 | }"; 85 | 86 | var dom = require("../lib/dom"); 87 | dom.importCssString(exports.cssText, exports.cssClass); 88 | }); (function() { 89 | ace.require(["ace/theme/xcode"], function(m) { 90 | if (typeof module == "object" && typeof exports == "object" && module) { 91 | module.exports = m; 92 | } 93 | }); 94 | })(); 95 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/groovyconsole/components/console/body.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | 9 | 10 | 13 | 14 |
15 | 16 | 17 |
18 | 19 |
20 | 21 | 25 | 26 | 34 | 35 | 39 | 40 | 41 | 42 | 46 | 47 | 48 | 49 |
50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 |
59 |
60 | 61 | -------------------------------------------------------------------------------- /ui.apps/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | 6 | org.cid15.aem.groovy.console 7 | aem-groovy-console 8 | 18.0.3-SNAPSHOT 9 | 10 | 11 | aem-groovy-console-ui.apps 12 | content-package 13 | AEM Groovy Console - UI apps 14 | 15 | 16 | src/main/content/jcr_root 17 | 18 | 19 | org.apache.jackrabbit 20 | filevault-package-maven-plugin 21 | true 22 | 23 | ${package.group} 24 | aem-groovy-console-ui.apps 25 | application 26 | 27 | none 28 | 29 | 30 | 31 | org.cid15.aem.groovy.console 32 | aem-groovy-console-ui.apps.structure 33 | 34 | 35 | 36 | 37 | 38 | com.day.jcr.vault 39 | content-package-maven-plugin 40 | true 41 | 42 | true 43 | true 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | org.cid15.aem.groovy.console 52 | aem-groovy-console-bundle 53 | ${project.version} 54 | 55 | 56 | org.cid15.aem.groovy.console 57 | aem-groovy-console-ui.apps.structure 58 | ${project.version} 59 | zip 60 | 61 | 62 | com.adobe.aem 63 | aem-sdk-api 64 | 65 | 66 | 67 | -------------------------------------------------------------------------------- /ui.content/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | 6 | org.cid15.aem.groovy.console 7 | aem-groovy-console 8 | 18.0.3-SNAPSHOT 9 | 10 | 11 | aem-groovy-console-ui.content 12 | content-package 13 | AEM Groovy Console - UI content 14 | 15 | 16 | 17 | 18 | org.apache.jackrabbit 19 | filevault-package-maven-plugin 20 | 21 | ${package.group} 22 | aem-groovy-console-ui.content 23 | content 24 | 25 | none 26 | 27 | 28 | 29 | 30 | /conf 31 | 32 | 33 | 34 | 35 | 36 | org.cid15.aem.groovy.console 37 | aem-groovy-console-ui.apps 38 | 39 | 40 | 41 | 42 | 43 | com.day.jcr.vault 44 | content-package-maven-plugin 45 | true 46 | 47 | true 48 | true 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | org.cid15.aem.groovy.console 57 | aem-groovy-console-bundle 58 | ${project.version} 59 | 60 | 61 | org.cid15.aem.groovy.console 62 | aem-groovy-console-ui.apps 63 | ${project.version} 64 | zip 65 | 66 | 67 | com.adobe.aem 68 | aem-sdk-api 69 | 70 | 71 | 72 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/groovyconsole/components/console/history.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

4 | History 5 |

6 |
7 |
8 |
9 |
10 | 11 | 12 |
13 | 14 |
15 |
16 | 17 |
18 |
19 | 20 | 21 | 24 | 25 |
26 |
27 |
28 | 29 |
30 | 33 |
34 |
35 |
36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 |
DateJob TitleScript
52 | 53 | 66 |
67 |
-------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/groovyconsole/clientlibs/js/theme-clouds.js: -------------------------------------------------------------------------------- 1 | ace.define("ace/theme/clouds",["require","exports","module","ace/lib/dom"], function(require, exports, module) { 2 | 3 | exports.isDark = false; 4 | exports.cssClass = "ace-clouds"; 5 | exports.cssText = ".ace-clouds .ace_gutter {\ 6 | background: #ebebeb;\ 7 | color: #333\ 8 | }\ 9 | .ace-clouds .ace_print-margin {\ 10 | width: 1px;\ 11 | background: #e8e8e8\ 12 | }\ 13 | .ace-clouds {\ 14 | background-color: #FFFFFF;\ 15 | color: #000000\ 16 | }\ 17 | .ace-clouds .ace_cursor {\ 18 | color: #000000\ 19 | }\ 20 | .ace-clouds .ace_marker-layer .ace_selection {\ 21 | background: #BDD5FC\ 22 | }\ 23 | .ace-clouds.ace_multiselect .ace_selection.ace_start {\ 24 | box-shadow: 0 0 3px 0px #FFFFFF;\ 25 | }\ 26 | .ace-clouds .ace_marker-layer .ace_step {\ 27 | background: rgb(255, 255, 0)\ 28 | }\ 29 | .ace-clouds .ace_marker-layer .ace_bracket {\ 30 | margin: -1px 0 0 -1px;\ 31 | border: 1px solid #BFBFBF\ 32 | }\ 33 | .ace-clouds .ace_marker-layer .ace_active-line {\ 34 | background: #FFFBD1\ 35 | }\ 36 | .ace-clouds .ace_gutter-active-line {\ 37 | background-color : #dcdcdc\ 38 | }\ 39 | .ace-clouds .ace_marker-layer .ace_selected-word {\ 40 | border: 1px solid #BDD5FC\ 41 | }\ 42 | .ace-clouds .ace_invisible {\ 43 | color: #BFBFBF\ 44 | }\ 45 | .ace-clouds .ace_keyword,\ 46 | .ace-clouds .ace_meta,\ 47 | .ace-clouds .ace_support.ace_constant.ace_property-value {\ 48 | color: #AF956F\ 49 | }\ 50 | .ace-clouds .ace_keyword.ace_operator {\ 51 | color: #484848\ 52 | }\ 53 | .ace-clouds .ace_keyword.ace_other.ace_unit {\ 54 | color: #96DC5F\ 55 | }\ 56 | .ace-clouds .ace_constant.ace_language {\ 57 | color: #39946A\ 58 | }\ 59 | .ace-clouds .ace_constant.ace_numeric {\ 60 | color: #46A609\ 61 | }\ 62 | .ace-clouds .ace_constant.ace_character.ace_entity {\ 63 | color: #BF78CC\ 64 | }\ 65 | .ace-clouds .ace_invalid {\ 66 | background-color: #FF002A\ 67 | }\ 68 | .ace-clouds .ace_fold {\ 69 | background-color: #AF956F;\ 70 | border-color: #000000\ 71 | }\ 72 | .ace-clouds .ace_storage,\ 73 | .ace-clouds .ace_support.ace_class,\ 74 | .ace-clouds .ace_support.ace_function,\ 75 | .ace-clouds .ace_support.ace_other,\ 76 | .ace-clouds .ace_support.ace_type {\ 77 | color: #C52727\ 78 | }\ 79 | .ace-clouds .ace_string {\ 80 | color: #5D90CD\ 81 | }\ 82 | .ace-clouds .ace_comment {\ 83 | color: #BCC8BA\ 84 | }\ 85 | .ace-clouds .ace_entity.ace_name.ace_tag,\ 86 | .ace-clouds .ace_entity.ace_other.ace_attribute-name {\ 87 | color: #606060\ 88 | }\ 89 | .ace-clouds .ace_indent-guide {\ 90 | background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==\") right repeat-y\ 91 | }"; 92 | 93 | var dom = require("../lib/dom"); 94 | dom.importCssString(exports.cssText, exports.cssClass); 95 | }); (function() { 96 | ace.require(["ace/theme/clouds"], function(m) { 97 | if (typeof module == "object" && typeof exports == "object" && module) { 98 | module.exports = m; 99 | } 100 | }); 101 | })(); 102 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/groovyconsole/components/console/builders.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

4 | Builders 5 |

6 |
7 |
8 |
9 |

Additional binding variables are provided for the following builders. The instances named below are available for use in all scripts. Builders use a special syntax to create a structured tree of data (in this case, content in the JCR).

10 |
    11 |
  • nodeBuilder - Each "node" in the syntax tree corresponds to a Node in the repository. A new Node is created only if there is no existing node for the current name. 12 |
    13 | nodeBuilder.etc {
    14 |     satirists("sling:Folder") {
    15 |         bierce(firstName: "Ambrose", lastName: "Bierce", birthDate: Calendar.instance.updated(year: 1842, month: 5, date: 24))
    16 |         mencken(firstName: "H.L.", lastName: "Mencken", birthDate: Calendar.instance.updated(year: 1880, month: 8, date: 12))
    17 |         other("sling:Folder", "jcr:title": "Other")
    18 |     }
    19 | }
    20 |
      21 |
    • A single string argument represents the node type name for the node ("satirists").
    • 22 |
    • A map argument uses the provided key:value pairs to set property values on the node ("bierce" and "mencken").
    • 23 |
    • Both string and map arguments will set the node type and property value(s) for the node ("other").
    • 24 |
    25 |
  • 26 |
  • pageBuilder - Each "node" in the syntax tree corresponds to a cq:Page node, unless the node is a descendant of a "jcr:content" node, in which case nodes are treated in the same manner as described for the Node builder above. 27 |
    28 | pageBuilder.content {
    29 |     beer {
    30 |         styles("Styles") {
    31 |             "jcr:content"("jcr:lastModifiedBy": "me", "jcr:lastModified": Calendar.instance) {
    32 |                 data("sling:Folder")
    33 |             }
    34 |             dubbel("Dubbel")
    35 |             tripel("Tripel")
    36 |             saison("Saison")
    37 |         }
    38 |         breweries("Breweries", "jcr:lastModifiedBy": "me", "jcr:lastModified": Calendar.instance)
    39 |     }
    40 | }
    41 |
      42 |
    • A single string argument is used to set the page title rather than the node type ("styles").
    • 43 |
    • Descendants of "jcr:content" nodes are not created with the cq:Page type by default and can have their own node type specified as described for the Node builder ("data").
    • 44 |
    • Page properties can be passed directly as arguments on the page node without explicitly creating a jcr:content node first ("breweries").
    • 45 |
    46 |
  • 47 |
48 |
49 |
50 |
-------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/groovyconsole/clientlibs/js/theme-nord_dark.js: -------------------------------------------------------------------------------- 1 | ace.define("ace/theme/nord_dark",["require","exports","module","ace/lib/dom"], function(require, exports, module) { 2 | 3 | exports.isDark = true; 4 | exports.cssClass = "ace-nord-dark"; 5 | exports.cssText = ".ace-nord-dark .ace_gutter {\ 6 | color: #616e88;\ 7 | }\ 8 | .ace-nord-dark .ace_print-margin {\ 9 | width: 1px;\ 10 | background: #4c566a;\ 11 | }\ 12 | .ace-nord-dark {\ 13 | background-color: #2e3440;\ 14 | color: #d8dee9;\ 15 | }\ 16 | .ace-nord-dark .ace_entity.ace_other.ace_attribute-name,\ 17 | .ace-nord-dark .ace_storage {\ 18 | color: #d8dee9;\ 19 | }\ 20 | .ace-nord-dark .ace_cursor {\ 21 | color: #d8dee9;\ 22 | },\ 23 | .ace-nord-dark .ace_string.ace_regexp {\ 24 | color: #bf616a;\ 25 | }\ 26 | .ace-nord-dark .ace_marker-layer .ace_active-line {\ 27 | background: #434c5ecc;\ 28 | }\ 29 | .ace-nord-dark .ace_marker-layer .ace_selection {\ 30 | background: #434c5ecc;\ 31 | }\ 32 | .ace-nord-dark.ace_multiselect .ace_selection.ace_start {\ 33 | box-shadow: 0 0 3px 0px #2e3440;\ 34 | }\ 35 | .ace-nord-dark .ace_marker-layer .ace_step {\ 36 | background: #ebcb8b;\ 37 | }\ 38 | .ace-nord-dark .ace_marker-layer .ace_bracket {\ 39 | margin: -1px 0 0 -1px;\ 40 | border: 1px solid #88c0d066;\ 41 | }\ 42 | .ace-nord-dark .ace_gutter-active-line {\ 43 | background-color: #434c5ecc;\ 44 | }\ 45 | .ace-nord-dark .ace_marker-layer .ace_selected-word {\ 46 | border: 1px solid #88c0d066;\ 47 | }\ 48 | .ace-nord-dark .ace_invisible {\ 49 | color: #4c566a;\ 50 | }\ 51 | .ace-nord-dark .ace_keyword,\ 52 | .ace-nord-dark .ace_meta,\ 53 | .ace-nord-dark .ace_support.ace_class,\ 54 | .ace-nord-dark .ace_support.ace_type {\ 55 | color: #81a1c1;\ 56 | }\ 57 | .ace-nord-dark .ace_constant.ace_character,\ 58 | .ace-nord-dark .ace_constant.ace_other {\ 59 | color: #d8dee9;\ 60 | }\ 61 | .ace-nord-dark .ace_constant.ace_language {\ 62 | color: #5e81ac;\ 63 | }\ 64 | .ace-nord-dark .ace_constant.ace_escape {\ 65 | color: #ebcB8b;\ 66 | }\ 67 | .ace-nord-dark .ace_constant.ace_numeric {\ 68 | color: #b48ead;\ 69 | }\ 70 | .ace-nord-dark .ace_fold {\ 71 | background-color: #4c566a;\ 72 | border-color: #d8dee9;\ 73 | }\ 74 | .ace-nord-dark .ace_entity.ace_name.ace_function,\ 75 | .ace-nord-dark .ace_entity.ace_name.ace_tag,\ 76 | .ace-nord-dark .ace_support.ace_function,\ 77 | .ace-nord-dark .ace_variable,\ 78 | .ace-nord-dark .ace_variable.ace_language {\ 79 | color: #8fbcbb;\ 80 | }\ 81 | .ace-nord-dark .ace_string {\ 82 | color: #a3be8c;\ 83 | }\ 84 | .ace-nord-dark .ace_comment {\ 85 | color: #616e88;\ 86 | }\ 87 | .ace-nord-dark .ace_indent-guide {\ 88 | box-shadow: inset -1px 0 0 0 #434c5eb3;\ 89 | }\ 90 | "; 91 | exports.$selectionColorConflict = true; 92 | 93 | var dom = require("../lib/dom"); 94 | dom.importCssString(exports.cssText, exports.cssClass); 95 | }); (function() { 96 | ace.require(["ace/theme/nord_dark"], function(m) { 97 | if (typeof module == "object" && typeof exports == "object" && module) { 98 | module.exports = m; 99 | } 100 | }); 101 | })(); 102 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/groovyconsole/clientlibs/js/theme-eclipse.js: -------------------------------------------------------------------------------- 1 | ace.define("ace/theme/eclipse",["require","exports","module","ace/lib/dom"], function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.isDark = false; 5 | exports.cssText = ".ace-eclipse .ace_gutter {\ 6 | background: #ebebeb;\ 7 | border-right: 1px solid rgb(159, 159, 159);\ 8 | color: rgb(136, 136, 136);\ 9 | }\ 10 | .ace-eclipse .ace_print-margin {\ 11 | width: 1px;\ 12 | background: #ebebeb;\ 13 | }\ 14 | .ace-eclipse {\ 15 | background-color: #FFFFFF;\ 16 | color: black;\ 17 | }\ 18 | .ace-eclipse .ace_fold {\ 19 | background-color: rgb(60, 76, 114);\ 20 | }\ 21 | .ace-eclipse .ace_cursor {\ 22 | color: black;\ 23 | }\ 24 | .ace-eclipse .ace_storage,\ 25 | .ace-eclipse .ace_keyword,\ 26 | .ace-eclipse .ace_variable {\ 27 | color: rgb(127, 0, 85);\ 28 | }\ 29 | .ace-eclipse .ace_constant.ace_buildin {\ 30 | color: rgb(88, 72, 246);\ 31 | }\ 32 | .ace-eclipse .ace_constant.ace_library {\ 33 | color: rgb(6, 150, 14);\ 34 | }\ 35 | .ace-eclipse .ace_function {\ 36 | color: rgb(60, 76, 114);\ 37 | }\ 38 | .ace-eclipse .ace_string {\ 39 | color: rgb(42, 0, 255);\ 40 | }\ 41 | .ace-eclipse .ace_comment {\ 42 | color: rgb(113, 150, 130);\ 43 | }\ 44 | .ace-eclipse .ace_comment.ace_doc {\ 45 | color: rgb(63, 95, 191);\ 46 | }\ 47 | .ace-eclipse .ace_comment.ace_doc.ace_tag {\ 48 | color: rgb(127, 159, 191);\ 49 | }\ 50 | .ace-eclipse .ace_constant.ace_numeric {\ 51 | color: darkblue;\ 52 | }\ 53 | .ace-eclipse .ace_tag {\ 54 | color: rgb(25, 118, 116);\ 55 | }\ 56 | .ace-eclipse .ace_type {\ 57 | color: rgb(127, 0, 127);\ 58 | }\ 59 | .ace-eclipse .ace_xml-pe {\ 60 | color: rgb(104, 104, 91);\ 61 | }\ 62 | .ace-eclipse .ace_marker-layer .ace_selection {\ 63 | background: rgb(181, 213, 255);\ 64 | }\ 65 | .ace-eclipse .ace_marker-layer .ace_bracket {\ 66 | margin: -1px 0 0 -1px;\ 67 | border: 1px solid rgb(192, 192, 192);\ 68 | }\ 69 | .ace-eclipse .ace_meta.ace_tag {\ 70 | color:rgb(25, 118, 116);\ 71 | }\ 72 | .ace-eclipse .ace_invisible {\ 73 | color: #ddd;\ 74 | }\ 75 | .ace-eclipse .ace_entity.ace_other.ace_attribute-name {\ 76 | color:rgb(127, 0, 127);\ 77 | }\ 78 | .ace-eclipse .ace_marker-layer .ace_step {\ 79 | background: rgb(255, 255, 0);\ 80 | }\ 81 | .ace-eclipse .ace_active-line {\ 82 | background: rgb(232, 242, 254);\ 83 | }\ 84 | .ace-eclipse .ace_gutter-active-line {\ 85 | background-color : #DADADA;\ 86 | }\ 87 | .ace-eclipse .ace_marker-layer .ace_selected-word {\ 88 | border: 1px solid rgb(181, 213, 255);\ 89 | }\ 90 | .ace-eclipse .ace_indent-guide {\ 91 | background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==\") right repeat-y;\ 92 | }"; 93 | 94 | exports.cssClass = "ace-eclipse"; 95 | 96 | var dom = require("../lib/dom"); 97 | dom.importCssString(exports.cssText, exports.cssClass); 98 | }); (function() { 99 | ace.require(["ace/theme/eclipse"], function(m) { 100 | if (typeof module == "object" && typeof exports == "object" && module) { 101 | module.exports = m; 102 | } 103 | }); 104 | })(); 105 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/groovyconsole/clientlibs/js/theme-solarized_dark.js: -------------------------------------------------------------------------------- 1 | ace.define("ace/theme/solarized_dark",["require","exports","module","ace/lib/dom"], function(require, exports, module) { 2 | 3 | exports.isDark = true; 4 | exports.cssClass = "ace-solarized-dark"; 5 | exports.cssText = ".ace-solarized-dark .ace_gutter {\ 6 | background: #01313f;\ 7 | color: #d0edf7\ 8 | }\ 9 | .ace-solarized-dark .ace_print-margin {\ 10 | width: 1px;\ 11 | background: #33555E\ 12 | }\ 13 | .ace-solarized-dark {\ 14 | background-color: #002B36;\ 15 | color: #93A1A1\ 16 | }\ 17 | .ace-solarized-dark .ace_entity.ace_other.ace_attribute-name,\ 18 | .ace-solarized-dark .ace_storage {\ 19 | color: #93A1A1\ 20 | }\ 21 | .ace-solarized-dark .ace_cursor,\ 22 | .ace-solarized-dark .ace_string.ace_regexp {\ 23 | color: #D30102\ 24 | }\ 25 | .ace-solarized-dark .ace_marker-layer .ace_active-line,\ 26 | .ace-solarized-dark .ace_marker-layer .ace_selection {\ 27 | background: rgba(255, 255, 255, 0.1)\ 28 | }\ 29 | .ace-solarized-dark.ace_multiselect .ace_selection.ace_start {\ 30 | box-shadow: 0 0 3px 0px #002B36;\ 31 | }\ 32 | .ace-solarized-dark .ace_marker-layer .ace_step {\ 33 | background: rgb(102, 82, 0)\ 34 | }\ 35 | .ace-solarized-dark .ace_marker-layer .ace_bracket {\ 36 | margin: -1px 0 0 -1px;\ 37 | border: 1px solid rgba(147, 161, 161, 0.50)\ 38 | }\ 39 | .ace-solarized-dark .ace_gutter-active-line {\ 40 | background-color: #0d3440\ 41 | }\ 42 | .ace-solarized-dark .ace_marker-layer .ace_selected-word {\ 43 | border: 1px solid #073642\ 44 | }\ 45 | .ace-solarized-dark .ace_invisible {\ 46 | color: rgba(147, 161, 161, 0.50)\ 47 | }\ 48 | .ace-solarized-dark .ace_keyword,\ 49 | .ace-solarized-dark .ace_meta,\ 50 | .ace-solarized-dark .ace_support.ace_class,\ 51 | .ace-solarized-dark .ace_support.ace_type {\ 52 | color: #859900\ 53 | }\ 54 | .ace-solarized-dark .ace_constant.ace_character,\ 55 | .ace-solarized-dark .ace_constant.ace_other {\ 56 | color: #CB4B16\ 57 | }\ 58 | .ace-solarized-dark .ace_constant.ace_language {\ 59 | color: #B58900\ 60 | }\ 61 | .ace-solarized-dark .ace_constant.ace_numeric {\ 62 | color: #D33682\ 63 | }\ 64 | .ace-solarized-dark .ace_fold {\ 65 | background-color: #268BD2;\ 66 | border-color: #93A1A1\ 67 | }\ 68 | .ace-solarized-dark .ace_entity.ace_name.ace_function,\ 69 | .ace-solarized-dark .ace_entity.ace_name.ace_tag,\ 70 | .ace-solarized-dark .ace_support.ace_function,\ 71 | .ace-solarized-dark .ace_variable,\ 72 | .ace-solarized-dark .ace_variable.ace_language {\ 73 | color: #268BD2\ 74 | }\ 75 | .ace-solarized-dark .ace_string {\ 76 | color: #2AA198\ 77 | }\ 78 | .ace-solarized-dark .ace_comment {\ 79 | font-style: italic;\ 80 | color: #657B83\ 81 | }\ 82 | .ace-solarized-dark .ace_indent-guide {\ 83 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNg0Db1ZVCxc/sPAAd4AlUHlLenAAAAAElFTkSuQmCC) right repeat-y\ 84 | }"; 85 | 86 | var dom = require("../lib/dom"); 87 | dom.importCssString(exports.cssText, exports.cssClass); 88 | }); (function() { 89 | ace.require(["ace/theme/solarized_dark"], function(m) { 90 | if (typeof module == "object" && typeof exports == "object" && module) { 91 | module.exports = m; 92 | } 93 | }); 94 | })(); 95 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/groovyconsole/clientlibs/js/theme-vibrant_ink.js: -------------------------------------------------------------------------------- 1 | ace.define("ace/theme/vibrant_ink",["require","exports","module","ace/lib/dom"], function(require, exports, module) { 2 | 3 | exports.isDark = true; 4 | exports.cssClass = "ace-vibrant-ink"; 5 | exports.cssText = ".ace-vibrant-ink .ace_gutter {\ 6 | background: #1a1a1a;\ 7 | color: #BEBEBE\ 8 | }\ 9 | .ace-vibrant-ink .ace_print-margin {\ 10 | width: 1px;\ 11 | background: #1a1a1a\ 12 | }\ 13 | .ace-vibrant-ink {\ 14 | background-color: #0F0F0F;\ 15 | color: #FFFFFF\ 16 | }\ 17 | .ace-vibrant-ink .ace_cursor {\ 18 | color: #FFFFFF\ 19 | }\ 20 | .ace-vibrant-ink .ace_marker-layer .ace_selection {\ 21 | background: #6699CC\ 22 | }\ 23 | .ace-vibrant-ink.ace_multiselect .ace_selection.ace_start {\ 24 | box-shadow: 0 0 3px 0px #0F0F0F;\ 25 | }\ 26 | .ace-vibrant-ink .ace_marker-layer .ace_step {\ 27 | background: rgb(102, 82, 0)\ 28 | }\ 29 | .ace-vibrant-ink .ace_marker-layer .ace_bracket {\ 30 | margin: -1px 0 0 -1px;\ 31 | border: 1px solid #404040\ 32 | }\ 33 | .ace-vibrant-ink .ace_marker-layer .ace_active-line {\ 34 | background: #333333\ 35 | }\ 36 | .ace-vibrant-ink .ace_gutter-active-line {\ 37 | background-color: #333333\ 38 | }\ 39 | .ace-vibrant-ink .ace_marker-layer .ace_selected-word {\ 40 | border: 1px solid #6699CC\ 41 | }\ 42 | .ace-vibrant-ink .ace_invisible {\ 43 | color: #404040\ 44 | }\ 45 | .ace-vibrant-ink .ace_keyword,\ 46 | .ace-vibrant-ink .ace_meta {\ 47 | color: #FF6600\ 48 | }\ 49 | .ace-vibrant-ink .ace_constant,\ 50 | .ace-vibrant-ink .ace_constant.ace_character,\ 51 | .ace-vibrant-ink .ace_constant.ace_character.ace_escape,\ 52 | .ace-vibrant-ink .ace_constant.ace_other {\ 53 | color: #339999\ 54 | }\ 55 | .ace-vibrant-ink .ace_constant.ace_numeric {\ 56 | color: #99CC99\ 57 | }\ 58 | .ace-vibrant-ink .ace_invalid,\ 59 | .ace-vibrant-ink .ace_invalid.ace_deprecated {\ 60 | color: #CCFF33;\ 61 | background-color: #000000\ 62 | }\ 63 | .ace-vibrant-ink .ace_fold {\ 64 | background-color: #FFCC00;\ 65 | border-color: #FFFFFF\ 66 | }\ 67 | .ace-vibrant-ink .ace_entity.ace_name.ace_function,\ 68 | .ace-vibrant-ink .ace_support.ace_function,\ 69 | .ace-vibrant-ink .ace_variable {\ 70 | color: #FFCC00\ 71 | }\ 72 | .ace-vibrant-ink .ace_variable.ace_parameter {\ 73 | font-style: italic\ 74 | }\ 75 | .ace-vibrant-ink .ace_string {\ 76 | color: #66FF00\ 77 | }\ 78 | .ace-vibrant-ink .ace_string.ace_regexp {\ 79 | color: #44B4CC\ 80 | }\ 81 | .ace-vibrant-ink .ace_comment {\ 82 | color: #9933CC\ 83 | }\ 84 | .ace-vibrant-ink .ace_entity.ace_other.ace_attribute-name {\ 85 | font-style: italic;\ 86 | color: #99CC99\ 87 | }\ 88 | .ace-vibrant-ink .ace_indent-guide {\ 89 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYNDTc/oPAALPAZ7hxlbYAAAAAElFTkSuQmCC) right repeat-y\ 90 | }"; 91 | 92 | var dom = require("../lib/dom"); 93 | dom.importCssString(exports.cssText, exports.cssClass); 94 | }); (function() { 95 | ace.require(["ace/theme/vibrant_ink"], function(m) { 96 | if (typeof module == "object" && typeof exports == "object" && module) { 97 | module.exports = m; 98 | } 99 | }); 100 | })(); 101 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/groovyconsole/clientlibs/js/theme-merbivore.js: -------------------------------------------------------------------------------- 1 | ace.define("ace/theme/merbivore",["require","exports","module","ace/lib/dom"], function(require, exports, module) { 2 | 3 | exports.isDark = true; 4 | exports.cssClass = "ace-merbivore"; 5 | exports.cssText = ".ace-merbivore .ace_gutter {\ 6 | background: #202020;\ 7 | color: #E6E1DC\ 8 | }\ 9 | .ace-merbivore .ace_print-margin {\ 10 | width: 1px;\ 11 | background: #555651\ 12 | }\ 13 | .ace-merbivore {\ 14 | background-color: #161616;\ 15 | color: #E6E1DC\ 16 | }\ 17 | .ace-merbivore .ace_cursor {\ 18 | color: #FFFFFF\ 19 | }\ 20 | .ace-merbivore .ace_marker-layer .ace_selection {\ 21 | background: #454545\ 22 | }\ 23 | .ace-merbivore.ace_multiselect .ace_selection.ace_start {\ 24 | box-shadow: 0 0 3px 0px #161616;\ 25 | }\ 26 | .ace-merbivore .ace_marker-layer .ace_step {\ 27 | background: rgb(102, 82, 0)\ 28 | }\ 29 | .ace-merbivore .ace_marker-layer .ace_bracket {\ 30 | margin: -1px 0 0 -1px;\ 31 | border: 1px solid #404040\ 32 | }\ 33 | .ace-merbivore .ace_marker-layer .ace_active-line {\ 34 | background: #333435\ 35 | }\ 36 | .ace-merbivore .ace_gutter-active-line {\ 37 | background-color: #333435\ 38 | }\ 39 | .ace-merbivore .ace_marker-layer .ace_selected-word {\ 40 | border: 1px solid #454545\ 41 | }\ 42 | .ace-merbivore .ace_invisible {\ 43 | color: #404040\ 44 | }\ 45 | .ace-merbivore .ace_entity.ace_name.ace_tag,\ 46 | .ace-merbivore .ace_keyword,\ 47 | .ace-merbivore .ace_meta,\ 48 | .ace-merbivore .ace_meta.ace_tag,\ 49 | .ace-merbivore .ace_storage,\ 50 | .ace-merbivore .ace_support.ace_function {\ 51 | color: #FC6F09\ 52 | }\ 53 | .ace-merbivore .ace_constant,\ 54 | .ace-merbivore .ace_constant.ace_character,\ 55 | .ace-merbivore .ace_constant.ace_character.ace_escape,\ 56 | .ace-merbivore .ace_constant.ace_other,\ 57 | .ace-merbivore .ace_support.ace_type {\ 58 | color: #1EDAFB\ 59 | }\ 60 | .ace-merbivore .ace_constant.ace_character.ace_escape {\ 61 | color: #519F50\ 62 | }\ 63 | .ace-merbivore .ace_constant.ace_language {\ 64 | color: #FDC251\ 65 | }\ 66 | .ace-merbivore .ace_constant.ace_library,\ 67 | .ace-merbivore .ace_string,\ 68 | .ace-merbivore .ace_support.ace_constant {\ 69 | color: #8DFF0A\ 70 | }\ 71 | .ace-merbivore .ace_constant.ace_numeric {\ 72 | color: #58C554\ 73 | }\ 74 | .ace-merbivore .ace_invalid {\ 75 | color: #FFFFFF;\ 76 | background-color: #990000\ 77 | }\ 78 | .ace-merbivore .ace_fold {\ 79 | background-color: #FC6F09;\ 80 | border-color: #E6E1DC\ 81 | }\ 82 | .ace-merbivore .ace_comment {\ 83 | font-style: italic;\ 84 | color: #AD2EA4\ 85 | }\ 86 | .ace-merbivore .ace_entity.ace_other.ace_attribute-name {\ 87 | color: #FFFF89\ 88 | }\ 89 | .ace-merbivore .ace_indent-guide {\ 90 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWMQFxf3ZXB1df0PAAdsAmERTkEHAAAAAElFTkSuQmCC) right repeat-y\ 91 | }"; 92 | 93 | var dom = require("../lib/dom"); 94 | dom.importCssString(exports.cssText, exports.cssClass); 95 | }); (function() { 96 | ace.require(["ace/theme/merbivore"], function(m) { 97 | if (typeof module == "object" && typeof exports == "object" && module) { 98 | module.exports = m; 99 | } 100 | }); 101 | })(); 102 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/groovyconsole/clientlibs/js/theme-github.js: -------------------------------------------------------------------------------- 1 | ace.define("ace/theme/github",["require","exports","module","ace/lib/dom"], function(require, exports, module) { 2 | 3 | exports.isDark = false; 4 | exports.cssClass = "ace-github"; 5 | exports.cssText = "\ 6 | .ace-github .ace_gutter {\ 7 | background: #e8e8e8;\ 8 | color: #AAA;\ 9 | }\ 10 | .ace-github {\ 11 | background: #fff;\ 12 | color: #000;\ 13 | }\ 14 | .ace-github .ace_keyword {\ 15 | font-weight: bold;\ 16 | }\ 17 | .ace-github .ace_string {\ 18 | color: #D14;\ 19 | }\ 20 | .ace-github .ace_variable.ace_class {\ 21 | color: teal;\ 22 | }\ 23 | .ace-github .ace_constant.ace_numeric {\ 24 | color: #099;\ 25 | }\ 26 | .ace-github .ace_constant.ace_buildin {\ 27 | color: #0086B3;\ 28 | }\ 29 | .ace-github .ace_support.ace_function {\ 30 | color: #0086B3;\ 31 | }\ 32 | .ace-github .ace_comment {\ 33 | color: #998;\ 34 | font-style: italic;\ 35 | }\ 36 | .ace-github .ace_variable.ace_language {\ 37 | color: #0086B3;\ 38 | }\ 39 | .ace-github .ace_paren {\ 40 | font-weight: bold;\ 41 | }\ 42 | .ace-github .ace_boolean {\ 43 | font-weight: bold;\ 44 | }\ 45 | .ace-github .ace_string.ace_regexp {\ 46 | color: #009926;\ 47 | font-weight: normal;\ 48 | }\ 49 | .ace-github .ace_variable.ace_instance {\ 50 | color: teal;\ 51 | }\ 52 | .ace-github .ace_constant.ace_language {\ 53 | font-weight: bold;\ 54 | }\ 55 | .ace-github .ace_cursor {\ 56 | color: black;\ 57 | }\ 58 | .ace-github.ace_focus .ace_marker-layer .ace_active-line {\ 59 | background: rgb(255, 255, 204);\ 60 | }\ 61 | .ace-github .ace_marker-layer .ace_active-line {\ 62 | background: rgb(245, 245, 245);\ 63 | }\ 64 | .ace-github .ace_marker-layer .ace_selection {\ 65 | background: rgb(181, 213, 255);\ 66 | }\ 67 | .ace-github.ace_multiselect .ace_selection.ace_start {\ 68 | box-shadow: 0 0 3px 0px white;\ 69 | }\ 70 | .ace-github.ace_nobold .ace_line > span {\ 71 | font-weight: normal !important;\ 72 | }\ 73 | .ace-github .ace_marker-layer .ace_step {\ 74 | background: rgb(252, 255, 0);\ 75 | }\ 76 | .ace-github .ace_marker-layer .ace_stack {\ 77 | background: rgb(164, 229, 101);\ 78 | }\ 79 | .ace-github .ace_marker-layer .ace_bracket {\ 80 | margin: -1px 0 0 -1px;\ 81 | border: 1px solid rgb(192, 192, 192);\ 82 | }\ 83 | .ace-github .ace_gutter-active-line {\ 84 | background-color : rgba(0, 0, 0, 0.07);\ 85 | }\ 86 | .ace-github .ace_marker-layer .ace_selected-word {\ 87 | background: rgb(250, 250, 255);\ 88 | border: 1px solid rgb(200, 200, 250);\ 89 | }\ 90 | .ace-github .ace_invisible {\ 91 | color: #BFBFBF\ 92 | }\ 93 | .ace-github .ace_print-margin {\ 94 | width: 1px;\ 95 | background: #e8e8e8;\ 96 | }\ 97 | .ace-github .ace_indent-guide {\ 98 | background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==\") right repeat-y;\ 99 | }"; 100 | 101 | var dom = require("../lib/dom"); 102 | dom.importCssString(exports.cssText, exports.cssClass); 103 | }); (function() { 104 | ace.require(["ace/theme/github"], function(m) { 105 | if (typeof module == "object" && typeof exports == "object" && module) { 106 | module.exports = m; 107 | } 108 | }); 109 | })(); 110 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/groovyconsole/clientlibs/js/theme-solarized_light.js: -------------------------------------------------------------------------------- 1 | ace.define("ace/theme/solarized_light",["require","exports","module","ace/lib/dom"], function(require, exports, module) { 2 | 3 | exports.isDark = false; 4 | exports.cssClass = "ace-solarized-light"; 5 | exports.cssText = ".ace-solarized-light .ace_gutter {\ 6 | background: #fbf1d3;\ 7 | color: #333\ 8 | }\ 9 | .ace-solarized-light .ace_print-margin {\ 10 | width: 1px;\ 11 | background: #e8e8e8\ 12 | }\ 13 | .ace-solarized-light {\ 14 | background-color: #FDF6E3;\ 15 | color: #586E75\ 16 | }\ 17 | .ace-solarized-light .ace_cursor {\ 18 | color: #000000\ 19 | }\ 20 | .ace-solarized-light .ace_marker-layer .ace_selection {\ 21 | background: rgba(7, 54, 67, 0.09)\ 22 | }\ 23 | .ace-solarized-light.ace_multiselect .ace_selection.ace_start {\ 24 | box-shadow: 0 0 3px 0px #FDF6E3;\ 25 | }\ 26 | .ace-solarized-light .ace_marker-layer .ace_step {\ 27 | background: rgb(255, 255, 0)\ 28 | }\ 29 | .ace-solarized-light .ace_marker-layer .ace_bracket {\ 30 | margin: -1px 0 0 -1px;\ 31 | border: 1px solid rgba(147, 161, 161, 0.50)\ 32 | }\ 33 | .ace-solarized-light .ace_marker-layer .ace_active-line {\ 34 | background: #EEE8D5\ 35 | }\ 36 | .ace-solarized-light .ace_gutter-active-line {\ 37 | background-color : #EDE5C1\ 38 | }\ 39 | .ace-solarized-light .ace_marker-layer .ace_selected-word {\ 40 | border: 1px solid #7f9390\ 41 | }\ 42 | .ace-solarized-light .ace_invisible {\ 43 | color: rgba(147, 161, 161, 0.50)\ 44 | }\ 45 | .ace-solarized-light .ace_keyword,\ 46 | .ace-solarized-light .ace_meta,\ 47 | .ace-solarized-light .ace_support.ace_class,\ 48 | .ace-solarized-light .ace_support.ace_type {\ 49 | color: #859900\ 50 | }\ 51 | .ace-solarized-light .ace_constant.ace_character,\ 52 | .ace-solarized-light .ace_constant.ace_other {\ 53 | color: #CB4B16\ 54 | }\ 55 | .ace-solarized-light .ace_constant.ace_language {\ 56 | color: #B58900\ 57 | }\ 58 | .ace-solarized-light .ace_constant.ace_numeric {\ 59 | color: #D33682\ 60 | }\ 61 | .ace-solarized-light .ace_fold {\ 62 | background-color: #268BD2;\ 63 | border-color: #586E75\ 64 | }\ 65 | .ace-solarized-light .ace_entity.ace_name.ace_function,\ 66 | .ace-solarized-light .ace_entity.ace_name.ace_tag,\ 67 | .ace-solarized-light .ace_support.ace_function,\ 68 | .ace-solarized-light .ace_variable,\ 69 | .ace-solarized-light .ace_variable.ace_language {\ 70 | color: #268BD2\ 71 | }\ 72 | .ace-solarized-light .ace_storage {\ 73 | color: #073642\ 74 | }\ 75 | .ace-solarized-light .ace_string {\ 76 | color: #2AA198\ 77 | }\ 78 | .ace-solarized-light .ace_string.ace_regexp {\ 79 | color: #D30102\ 80 | }\ 81 | .ace-solarized-light .ace_comment,\ 82 | .ace-solarized-light .ace_entity.ace_other.ace_attribute-name {\ 83 | color: #93A1A1\ 84 | }\ 85 | .ace-solarized-light .ace_indent-guide {\ 86 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYHjy8NJ/AAjgA5fzQUmBAAAAAElFTkSuQmCC) right repeat-y\ 87 | }"; 88 | 89 | var dom = require("../lib/dom"); 90 | dom.importCssString(exports.cssText, exports.cssClass); 91 | }); (function() { 92 | ace.require(["ace/theme/solarized_light"], function(m) { 93 | if (typeof module == "object" && typeof exports == "object" && module) { 94 | module.exports = m; 95 | } 96 | }); 97 | })(); 98 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/groovyconsole/clientlibs/js/theme-idle_fingers.js: -------------------------------------------------------------------------------- 1 | ace.define("ace/theme/idle_fingers",["require","exports","module","ace/lib/dom"], function(require, exports, module) { 2 | 3 | exports.isDark = true; 4 | exports.cssClass = "ace-idle-fingers"; 5 | exports.cssText = ".ace-idle-fingers .ace_gutter {\ 6 | background: #3b3b3b;\ 7 | color: rgb(153,153,153)\ 8 | }\ 9 | .ace-idle-fingers .ace_print-margin {\ 10 | width: 1px;\ 11 | background: #3b3b3b\ 12 | }\ 13 | .ace-idle-fingers {\ 14 | background-color: #323232;\ 15 | color: #FFFFFF\ 16 | }\ 17 | .ace-idle-fingers .ace_cursor {\ 18 | color: #91FF00\ 19 | }\ 20 | .ace-idle-fingers .ace_marker-layer .ace_selection {\ 21 | background: rgba(90, 100, 126, 0.88)\ 22 | }\ 23 | .ace-idle-fingers.ace_multiselect .ace_selection.ace_start {\ 24 | box-shadow: 0 0 3px 0px #323232;\ 25 | }\ 26 | .ace-idle-fingers .ace_marker-layer .ace_step {\ 27 | background: rgb(102, 82, 0)\ 28 | }\ 29 | .ace-idle-fingers .ace_marker-layer .ace_bracket {\ 30 | margin: -1px 0 0 -1px;\ 31 | border: 1px solid #404040\ 32 | }\ 33 | .ace-idle-fingers .ace_marker-layer .ace_active-line {\ 34 | background: #353637\ 35 | }\ 36 | .ace-idle-fingers .ace_gutter-active-line {\ 37 | background-color: #353637\ 38 | }\ 39 | .ace-idle-fingers .ace_marker-layer .ace_selected-word {\ 40 | border: 1px solid rgba(90, 100, 126, 0.88)\ 41 | }\ 42 | .ace-idle-fingers .ace_invisible {\ 43 | color: #404040\ 44 | }\ 45 | .ace-idle-fingers .ace_keyword,\ 46 | .ace-idle-fingers .ace_meta {\ 47 | color: #CC7833\ 48 | }\ 49 | .ace-idle-fingers .ace_constant,\ 50 | .ace-idle-fingers .ace_constant.ace_character,\ 51 | .ace-idle-fingers .ace_constant.ace_character.ace_escape,\ 52 | .ace-idle-fingers .ace_constant.ace_other,\ 53 | .ace-idle-fingers .ace_support.ace_constant {\ 54 | color: #6C99BB\ 55 | }\ 56 | .ace-idle-fingers .ace_invalid {\ 57 | color: #FFFFFF;\ 58 | background-color: #FF0000\ 59 | }\ 60 | .ace-idle-fingers .ace_fold {\ 61 | background-color: #CC7833;\ 62 | border-color: #FFFFFF\ 63 | }\ 64 | .ace-idle-fingers .ace_support.ace_function {\ 65 | color: #B83426\ 66 | }\ 67 | .ace-idle-fingers .ace_variable.ace_parameter {\ 68 | font-style: italic\ 69 | }\ 70 | .ace-idle-fingers .ace_string {\ 71 | color: #A5C261\ 72 | }\ 73 | .ace-idle-fingers .ace_string.ace_regexp {\ 74 | color: #CCCC33\ 75 | }\ 76 | .ace-idle-fingers .ace_comment {\ 77 | font-style: italic;\ 78 | color: #BC9458\ 79 | }\ 80 | .ace-idle-fingers .ace_meta.ace_tag {\ 81 | color: #FFE5BB\ 82 | }\ 83 | .ace-idle-fingers .ace_entity.ace_name {\ 84 | color: #FFC66D\ 85 | }\ 86 | .ace-idle-fingers .ace_collab.ace_user1 {\ 87 | color: #323232;\ 88 | background-color: #FFF980\ 89 | }\ 90 | .ace-idle-fingers .ace_indent-guide {\ 91 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWMwMjLyZYiPj/8PAAreAwAI1+g0AAAAAElFTkSuQmCC) right repeat-y\ 92 | }"; 93 | 94 | var dom = require("../lib/dom"); 95 | dom.importCssString(exports.cssText, exports.cssClass); 96 | }); (function() { 97 | ace.require(["ace/theme/idle_fingers"], function(m) { 98 | if (typeof module == "object" && typeof exports == "object" && module) { 99 | module.exports = m; 100 | } 101 | }); 102 | })(); 103 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/groovyconsole/clientlibs/js/theme-dawn.js: -------------------------------------------------------------------------------- 1 | ace.define("ace/theme/dawn",["require","exports","module","ace/lib/dom"], function(require, exports, module) { 2 | 3 | exports.isDark = false; 4 | exports.cssClass = "ace-dawn"; 5 | exports.cssText = ".ace-dawn .ace_gutter {\ 6 | background: #ebebeb;\ 7 | color: #333\ 8 | }\ 9 | .ace-dawn .ace_print-margin {\ 10 | width: 1px;\ 11 | background: #e8e8e8\ 12 | }\ 13 | .ace-dawn {\ 14 | background-color: #F9F9F9;\ 15 | color: #080808\ 16 | }\ 17 | .ace-dawn .ace_cursor {\ 18 | color: #000000\ 19 | }\ 20 | .ace-dawn .ace_marker-layer .ace_selection {\ 21 | background: rgba(39, 95, 255, 0.30)\ 22 | }\ 23 | .ace-dawn.ace_multiselect .ace_selection.ace_start {\ 24 | box-shadow: 0 0 3px 0px #F9F9F9;\ 25 | }\ 26 | .ace-dawn .ace_marker-layer .ace_step {\ 27 | background: rgb(255, 255, 0)\ 28 | }\ 29 | .ace-dawn .ace_marker-layer .ace_bracket {\ 30 | margin: -1px 0 0 -1px;\ 31 | border: 1px solid rgba(75, 75, 126, 0.50)\ 32 | }\ 33 | .ace-dawn .ace_marker-layer .ace_active-line {\ 34 | background: rgba(36, 99, 180, 0.12)\ 35 | }\ 36 | .ace-dawn .ace_gutter-active-line {\ 37 | background-color : #dcdcdc\ 38 | }\ 39 | .ace-dawn .ace_marker-layer .ace_selected-word {\ 40 | border: 1px solid rgba(39, 95, 255, 0.30)\ 41 | }\ 42 | .ace-dawn .ace_invisible {\ 43 | color: rgba(75, 75, 126, 0.50)\ 44 | }\ 45 | .ace-dawn .ace_keyword,\ 46 | .ace-dawn .ace_meta {\ 47 | color: #794938\ 48 | }\ 49 | .ace-dawn .ace_constant,\ 50 | .ace-dawn .ace_constant.ace_character,\ 51 | .ace-dawn .ace_constant.ace_character.ace_escape,\ 52 | .ace-dawn .ace_constant.ace_other {\ 53 | color: #811F24\ 54 | }\ 55 | .ace-dawn .ace_invalid.ace_illegal {\ 56 | text-decoration: underline;\ 57 | font-style: italic;\ 58 | color: #F8F8F8;\ 59 | background-color: #B52A1D\ 60 | }\ 61 | .ace-dawn .ace_invalid.ace_deprecated {\ 62 | text-decoration: underline;\ 63 | font-style: italic;\ 64 | color: #B52A1D\ 65 | }\ 66 | .ace-dawn .ace_support {\ 67 | color: #691C97\ 68 | }\ 69 | .ace-dawn .ace_support.ace_constant {\ 70 | color: #B4371F\ 71 | }\ 72 | .ace-dawn .ace_fold {\ 73 | background-color: #794938;\ 74 | border-color: #080808\ 75 | }\ 76 | .ace-dawn .ace_list,\ 77 | .ace-dawn .ace_markup.ace_list,\ 78 | .ace-dawn .ace_support.ace_function {\ 79 | color: #693A17\ 80 | }\ 81 | .ace-dawn .ace_storage {\ 82 | font-style: italic;\ 83 | color: #A71D5D\ 84 | }\ 85 | .ace-dawn .ace_string {\ 86 | color: #0B6125\ 87 | }\ 88 | .ace-dawn .ace_string.ace_regexp {\ 89 | color: #CF5628\ 90 | }\ 91 | .ace-dawn .ace_comment {\ 92 | font-style: italic;\ 93 | color: #5A525F\ 94 | }\ 95 | .ace-dawn .ace_heading,\ 96 | .ace-dawn .ace_markup.ace_heading {\ 97 | color: #19356D\ 98 | }\ 99 | .ace-dawn .ace_variable {\ 100 | color: #234A97\ 101 | }\ 102 | .ace-dawn .ace_indent-guide {\ 103 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYLh/5+x/AAizA4hxNNsZAAAAAElFTkSuQmCC) right repeat-y\ 104 | }"; 105 | 106 | var dom = require("../lib/dom"); 107 | dom.importCssString(exports.cssText, exports.cssClass); 108 | }); (function() { 109 | ace.require(["ace/theme/dawn"], function(m) { 110 | if (typeof module == "object" && typeof exports == "object" && module) { 111 | module.exports = m; 112 | } 113 | }); 114 | })(); 115 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/groovyconsole/clientlibs/js/theme-kr_theme.js: -------------------------------------------------------------------------------- 1 | ace.define("ace/theme/kr_theme",["require","exports","module","ace/lib/dom"], function(require, exports, module) { 2 | 3 | exports.isDark = true; 4 | exports.cssClass = "ace-kr-theme"; 5 | exports.cssText = ".ace-kr-theme .ace_gutter {\ 6 | background: #1c1917;\ 7 | color: #FCFFE0\ 8 | }\ 9 | .ace-kr-theme .ace_print-margin {\ 10 | width: 1px;\ 11 | background: #1c1917\ 12 | }\ 13 | .ace-kr-theme {\ 14 | background-color: #0B0A09;\ 15 | color: #FCFFE0\ 16 | }\ 17 | .ace-kr-theme .ace_cursor {\ 18 | color: #FF9900\ 19 | }\ 20 | .ace-kr-theme .ace_marker-layer .ace_selection {\ 21 | background: rgba(170, 0, 255, 0.45)\ 22 | }\ 23 | .ace-kr-theme.ace_multiselect .ace_selection.ace_start {\ 24 | box-shadow: 0 0 3px 0px #0B0A09;\ 25 | }\ 26 | .ace-kr-theme .ace_marker-layer .ace_step {\ 27 | background: rgb(102, 82, 0)\ 28 | }\ 29 | .ace-kr-theme .ace_marker-layer .ace_bracket {\ 30 | margin: -1px 0 0 -1px;\ 31 | border: 1px solid rgba(255, 177, 111, 0.32)\ 32 | }\ 33 | .ace-kr-theme .ace_marker-layer .ace_active-line {\ 34 | background: #38403D\ 35 | }\ 36 | .ace-kr-theme .ace_gutter-active-line {\ 37 | background-color : #38403D\ 38 | }\ 39 | .ace-kr-theme .ace_marker-layer .ace_selected-word {\ 40 | border: 1px solid rgba(170, 0, 255, 0.45)\ 41 | }\ 42 | .ace-kr-theme .ace_invisible {\ 43 | color: rgba(255, 177, 111, 0.32)\ 44 | }\ 45 | .ace-kr-theme .ace_keyword,\ 46 | .ace-kr-theme .ace_meta {\ 47 | color: #949C8B\ 48 | }\ 49 | .ace-kr-theme .ace_constant,\ 50 | .ace-kr-theme .ace_constant.ace_character,\ 51 | .ace-kr-theme .ace_constant.ace_character.ace_escape,\ 52 | .ace-kr-theme .ace_constant.ace_other {\ 53 | color: rgba(210, 117, 24, 0.76)\ 54 | }\ 55 | .ace-kr-theme .ace_invalid {\ 56 | color: #F8F8F8;\ 57 | background-color: #A41300\ 58 | }\ 59 | .ace-kr-theme .ace_support {\ 60 | color: #9FC28A\ 61 | }\ 62 | .ace-kr-theme .ace_support.ace_constant {\ 63 | color: #C27E66\ 64 | }\ 65 | .ace-kr-theme .ace_fold {\ 66 | background-color: #949C8B;\ 67 | border-color: #FCFFE0\ 68 | }\ 69 | .ace-kr-theme .ace_support.ace_function {\ 70 | color: #85873A\ 71 | }\ 72 | .ace-kr-theme .ace_storage {\ 73 | color: #FFEE80\ 74 | }\ 75 | .ace-kr-theme .ace_string {\ 76 | color: rgba(164, 161, 181, 0.8)\ 77 | }\ 78 | .ace-kr-theme .ace_string.ace_regexp {\ 79 | color: rgba(125, 255, 192, 0.65)\ 80 | }\ 81 | .ace-kr-theme .ace_comment {\ 82 | font-style: italic;\ 83 | color: #706D5B\ 84 | }\ 85 | .ace-kr-theme .ace_variable {\ 86 | color: #D1A796\ 87 | }\ 88 | .ace-kr-theme .ace_list,\ 89 | .ace-kr-theme .ace_markup.ace_list {\ 90 | background-color: #0F0040\ 91 | }\ 92 | .ace-kr-theme .ace_variable.ace_language {\ 93 | color: #FF80E1\ 94 | }\ 95 | .ace-kr-theme .ace_meta.ace_tag {\ 96 | color: #BABD9C\ 97 | }\ 98 | .ace-kr-theme .ace_indent-guide {\ 99 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYFBXV/8PAAJoAXX4kT2EAAAAAElFTkSuQmCC) right repeat-y\ 100 | }"; 101 | 102 | var dom = require("../lib/dom"); 103 | dom.importCssString(exports.cssText, exports.cssClass); 104 | }); (function() { 105 | ace.require(["ace/theme/kr_theme"], function(m) { 106 | if (typeof module == "object" && typeof exports == "object" && module) { 107 | module.exports = m; 108 | } 109 | }); 110 | })(); 111 | -------------------------------------------------------------------------------- /bundle/src/main/groovy/org/cid15/aem/groovy/console/configuration/impl/DefaultConfigurationService.groovy: -------------------------------------------------------------------------------- 1 | package org.cid15.aem.groovy.console.configuration.impl 2 | 3 | import groovy.transform.Synchronized 4 | import groovy.util.logging.Slf4j 5 | import org.apache.jackrabbit.api.security.user.User 6 | import org.apache.jackrabbit.api.security.user.UserManager 7 | import org.apache.sling.api.SlingHttpServletRequest 8 | import org.apache.sling.api.resource.ResourceResolverFactory 9 | import org.cid15.aem.groovy.console.configuration.ConfigurationService 10 | import org.osgi.service.component.annotations.Activate 11 | import org.osgi.service.component.annotations.Component 12 | import org.osgi.service.component.annotations.Modified 13 | import org.osgi.service.component.annotations.Reference 14 | import org.osgi.service.metatype.annotations.Designate 15 | 16 | @Component(service = ConfigurationService, immediate = true) 17 | @Designate(ocd = ConfigurationServiceProperties) 18 | @Slf4j("LOG") 19 | class DefaultConfigurationService implements ConfigurationService { 20 | 21 | @Reference 22 | private ResourceResolverFactory resourceResolverFactory 23 | 24 | private boolean emailEnabled 25 | 26 | private Set emailRecipients 27 | 28 | private Set allowedGroups 29 | 30 | private Set allowedScheduledJobsGroups 31 | 32 | private boolean auditDisabled 33 | 34 | private boolean displayAllAuditRecords 35 | 36 | private long threadTimeout 37 | 38 | @Override 39 | boolean hasPermission(SlingHttpServletRequest request) { 40 | isAdminOrAllowedGroupMember(request, allowedGroups) 41 | } 42 | 43 | @Override 44 | boolean hasScheduledJobPermission(SlingHttpServletRequest request) { 45 | isAdminOrAllowedGroupMember(request, allowedScheduledJobsGroups) 46 | } 47 | 48 | @Override 49 | boolean isEmailEnabled() { 50 | emailEnabled 51 | } 52 | 53 | @Override 54 | Set getEmailRecipients() { 55 | emailRecipients 56 | } 57 | 58 | @Override 59 | boolean isAuditDisabled() { 60 | auditDisabled 61 | } 62 | 63 | @Override 64 | boolean isDisplayAllAuditRecords() { 65 | displayAllAuditRecords 66 | } 67 | 68 | @Override 69 | long getThreadTimeout() { 70 | threadTimeout 71 | } 72 | 73 | @Activate 74 | @Modified 75 | @Synchronized 76 | void activate(ConfigurationServiceProperties properties) { 77 | emailEnabled = properties.emailEnabled() 78 | emailRecipients = (properties.emailRecipients() ?: []).findAll() as Set 79 | allowedGroups = (properties.allowedGroups() ?: []).findAll() as Set 80 | allowedScheduledJobsGroups = (properties.allowedScheduledJobsGroups() ?: []).findAll() as Set 81 | auditDisabled = properties.auditDisabled() 82 | displayAllAuditRecords = properties.auditDisplayAll() 83 | threadTimeout = properties.threadTimeout() 84 | } 85 | 86 | private boolean isAdminOrAllowedGroupMember(SlingHttpServletRequest request, Set groupIds) { 87 | resourceResolverFactory.getServiceResourceResolver(null).withCloseable { resourceResolver -> 88 | def user = resourceResolver.adaptTo(UserManager).getAuthorizable(request.userPrincipal) as User 89 | def memberOfGroupIds = user.memberOf()*.ID 90 | 91 | LOG.debug("member of group IDs : {}, allowed group IDs : {}", memberOfGroupIds, groupIds) 92 | 93 | user.admin || (groupIds ? memberOfGroupIds.intersect(groupIds as Iterable) : false) 94 | } 95 | } 96 | } 97 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/groovyconsole/clientlibs/js/local-storage.js: -------------------------------------------------------------------------------- 1 | GroovyConsole.localStorage = function () { 2 | 3 | var SCRIPT_EDITOR = 'script'; 4 | var DATA_EDITOR = 'data'; 5 | var EDITOR_HEIGHT = 'groovyconsole.editor.height'; 6 | var EDITOR_CONTENT = 'groovyconsole.editor.content'; 7 | var THEME = 'groovyconsole.theme'; 8 | var SCRIPT_NAME = 'groovyconsole.script.name'; 9 | 10 | function getValue(propertyName, defaultValue, editorName) { 11 | var name = propertyName; 12 | 13 | if (typeof editorName !== 'undefined') { 14 | name = propertyName + '.' + editorName; 15 | } 16 | 17 | if (Modernizr.localstorage) { 18 | return window.localStorage[name] || defaultValue || ''; 19 | } 20 | 21 | return defaultValue || ''; 22 | } 23 | 24 | function saveValue(propertyName, value, editorName) { 25 | var name = propertyName; 26 | 27 | if (typeof editorName !== 'undefined') { 28 | name = propertyName + '.' + editorName; 29 | } 30 | 31 | if (Modernizr.localstorage) { 32 | window.localStorage[name] = value; 33 | } 34 | } 35 | 36 | function clearValue(name) { 37 | if (Modernizr.localstorage) { 38 | window.localStorage[name] = ''; 39 | } 40 | } 41 | 42 | return { 43 | saveScriptEditorHeight: function (value) { 44 | saveValue(EDITOR_HEIGHT, value, SCRIPT_EDITOR); 45 | }, 46 | 47 | saveDataEditorHeight: function (value) { 48 | saveValue(EDITOR_HEIGHT, value, DATA_EDITOR); 49 | }, 50 | 51 | getScriptEditorHeight: function () { 52 | return getValue(EDITOR_HEIGHT, $('#script-editor').css('height'), SCRIPT_EDITOR); 53 | }, 54 | 55 | getDataEditorHeight: function () { 56 | return getValue(EDITOR_HEIGHT, $('#data-editor').css('height'), DATA_EDITOR); 57 | }, 58 | 59 | saveScriptEditorContent: function (value) { 60 | saveValue(EDITOR_CONTENT, value, SCRIPT_EDITOR); 61 | }, 62 | 63 | saveDataEditorContent: function (value) { 64 | saveValue(EDITOR_CONTENT, value, DATA_EDITOR); 65 | }, 66 | 67 | getScriptEditorContent: function () { 68 | return getValue(EDITOR_CONTENT, '', SCRIPT_EDITOR); 69 | }, 70 | 71 | getDataEditorContent: function () { 72 | return getValue(EDITOR_CONTENT, '', DATA_EDITOR); 73 | }, 74 | 75 | saveTheme: function (value) { 76 | saveValue(THEME, value); 77 | }, 78 | 79 | getTheme: function () { 80 | return getValue(THEME, 'ace/theme/idle_fingers'); 81 | }, 82 | 83 | saveScriptName: function (scriptPath) { 84 | var scriptName; 85 | 86 | if (scriptPath.indexOf('.groovy') > 0) { 87 | var nameStart = scriptPath.lastIndexOf('/') + 1; 88 | var nameEnd = scriptPath.indexOf('.'); 89 | 90 | scriptName = scriptPath.substring(nameStart, nameEnd); 91 | } else { 92 | scriptName = scriptPath; 93 | } 94 | 95 | saveValue(SCRIPT_NAME, scriptName); 96 | }, 97 | 98 | getScriptName: function () { 99 | return getValue(SCRIPT_NAME, ''); 100 | }, 101 | 102 | clearScriptName: function () { 103 | return clearValue(SCRIPT_NAME); 104 | } 105 | }; 106 | }(); -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/groovyconsole/clientlibs/js/theme-monokai.js: -------------------------------------------------------------------------------- 1 | ace.define("ace/theme/monokai",["require","exports","module","ace/lib/dom"], function(require, exports, module) { 2 | 3 | exports.isDark = true; 4 | exports.cssClass = "ace-monokai"; 5 | exports.cssText = ".ace-monokai .ace_gutter {\ 6 | background: #2F3129;\ 7 | color: #8F908A\ 8 | }\ 9 | .ace-monokai .ace_print-margin {\ 10 | width: 1px;\ 11 | background: #555651\ 12 | }\ 13 | .ace-monokai {\ 14 | background-color: #272822;\ 15 | color: #F8F8F2\ 16 | }\ 17 | .ace-monokai .ace_cursor {\ 18 | color: #F8F8F0\ 19 | }\ 20 | .ace-monokai .ace_marker-layer .ace_selection {\ 21 | background: #49483E\ 22 | }\ 23 | .ace-monokai.ace_multiselect .ace_selection.ace_start {\ 24 | box-shadow: 0 0 3px 0px #272822;\ 25 | }\ 26 | .ace-monokai .ace_marker-layer .ace_step {\ 27 | background: rgb(102, 82, 0)\ 28 | }\ 29 | .ace-monokai .ace_marker-layer .ace_bracket {\ 30 | margin: -1px 0 0 -1px;\ 31 | border: 1px solid #49483E\ 32 | }\ 33 | .ace-monokai .ace_marker-layer .ace_active-line {\ 34 | background: #202020\ 35 | }\ 36 | .ace-monokai .ace_gutter-active-line {\ 37 | background-color: #272727\ 38 | }\ 39 | .ace-monokai .ace_marker-layer .ace_selected-word {\ 40 | border: 1px solid #49483E\ 41 | }\ 42 | .ace-monokai .ace_invisible {\ 43 | color: #52524d\ 44 | }\ 45 | .ace-monokai .ace_entity.ace_name.ace_tag,\ 46 | .ace-monokai .ace_keyword,\ 47 | .ace-monokai .ace_meta.ace_tag,\ 48 | .ace-monokai .ace_storage {\ 49 | color: #F92672\ 50 | }\ 51 | .ace-monokai .ace_punctuation,\ 52 | .ace-monokai .ace_punctuation.ace_tag {\ 53 | color: #fff\ 54 | }\ 55 | .ace-monokai .ace_constant.ace_character,\ 56 | .ace-monokai .ace_constant.ace_language,\ 57 | .ace-monokai .ace_constant.ace_numeric,\ 58 | .ace-monokai .ace_constant.ace_other {\ 59 | color: #AE81FF\ 60 | }\ 61 | .ace-monokai .ace_invalid {\ 62 | color: #F8F8F0;\ 63 | background-color: #F92672\ 64 | }\ 65 | .ace-monokai .ace_invalid.ace_deprecated {\ 66 | color: #F8F8F0;\ 67 | background-color: #AE81FF\ 68 | }\ 69 | .ace-monokai .ace_support.ace_constant,\ 70 | .ace-monokai .ace_support.ace_function {\ 71 | color: #66D9EF\ 72 | }\ 73 | .ace-monokai .ace_fold {\ 74 | background-color: #A6E22E;\ 75 | border-color: #F8F8F2\ 76 | }\ 77 | .ace-monokai .ace_storage.ace_type,\ 78 | .ace-monokai .ace_support.ace_class,\ 79 | .ace-monokai .ace_support.ace_type {\ 80 | font-style: italic;\ 81 | color: #66D9EF\ 82 | }\ 83 | .ace-monokai .ace_entity.ace_name.ace_function,\ 84 | .ace-monokai .ace_entity.ace_other,\ 85 | .ace-monokai .ace_entity.ace_other.ace_attribute-name,\ 86 | .ace-monokai .ace_variable {\ 87 | color: #A6E22E\ 88 | }\ 89 | .ace-monokai .ace_variable.ace_parameter {\ 90 | font-style: italic;\ 91 | color: #FD971F\ 92 | }\ 93 | .ace-monokai .ace_string {\ 94 | color: #E6DB74\ 95 | }\ 96 | .ace-monokai .ace_comment {\ 97 | color: #75715E\ 98 | }\ 99 | .ace-monokai .ace_indent-guide {\ 100 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWPQ0FD0ZXBzd/wPAAjVAoxeSgNeAAAAAElFTkSuQmCC) right repeat-y\ 101 | }"; 102 | 103 | var dom = require("../lib/dom"); 104 | dom.importCssString(exports.cssText, exports.cssClass); 105 | }); (function() { 106 | ace.require(["ace/theme/monokai"], function(m) { 107 | if (typeof module == "object" && typeof exports == "object" && module) { 108 | module.exports = m; 109 | } 110 | }); 111 | })(); 112 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/groovyconsole/clientlibs/js/theme-clouds_midnight.js: -------------------------------------------------------------------------------- 1 | ace.define("ace/theme/clouds_midnight",["require","exports","module","ace/lib/dom"], function(require, exports, module) { 2 | 3 | exports.isDark = true; 4 | exports.cssClass = "ace-clouds-midnight"; 5 | exports.cssText = ".ace-clouds-midnight .ace_gutter {\ 6 | background: #232323;\ 7 | color: #929292\ 8 | }\ 9 | .ace-clouds-midnight .ace_print-margin {\ 10 | width: 1px;\ 11 | background: #232323\ 12 | }\ 13 | .ace-clouds-midnight {\ 14 | background-color: #191919;\ 15 | color: #929292\ 16 | }\ 17 | .ace-clouds-midnight .ace_cursor {\ 18 | color: #7DA5DC\ 19 | }\ 20 | .ace-clouds-midnight .ace_marker-layer .ace_selection {\ 21 | background: #000000\ 22 | }\ 23 | .ace-clouds-midnight.ace_multiselect .ace_selection.ace_start {\ 24 | box-shadow: 0 0 3px 0px #191919;\ 25 | }\ 26 | .ace-clouds-midnight .ace_marker-layer .ace_step {\ 27 | background: rgb(102, 82, 0)\ 28 | }\ 29 | .ace-clouds-midnight .ace_marker-layer .ace_bracket {\ 30 | margin: -1px 0 0 -1px;\ 31 | border: 1px solid #BFBFBF\ 32 | }\ 33 | .ace-clouds-midnight .ace_marker-layer .ace_active-line {\ 34 | background: rgba(215, 215, 215, 0.031)\ 35 | }\ 36 | .ace-clouds-midnight .ace_gutter-active-line {\ 37 | background-color: rgba(215, 215, 215, 0.031)\ 38 | }\ 39 | .ace-clouds-midnight .ace_marker-layer .ace_selected-word {\ 40 | border: 1px solid #000000\ 41 | }\ 42 | .ace-clouds-midnight .ace_invisible {\ 43 | color: #666\ 44 | }\ 45 | .ace-clouds-midnight .ace_keyword,\ 46 | .ace-clouds-midnight .ace_meta,\ 47 | .ace-clouds-midnight .ace_support.ace_constant.ace_property-value {\ 48 | color: #927C5D\ 49 | }\ 50 | .ace-clouds-midnight .ace_keyword.ace_operator {\ 51 | color: #4B4B4B\ 52 | }\ 53 | .ace-clouds-midnight .ace_keyword.ace_other.ace_unit {\ 54 | color: #366F1A\ 55 | }\ 56 | .ace-clouds-midnight .ace_constant.ace_language {\ 57 | color: #39946A\ 58 | }\ 59 | .ace-clouds-midnight .ace_constant.ace_numeric {\ 60 | color: #46A609\ 61 | }\ 62 | .ace-clouds-midnight .ace_constant.ace_character.ace_entity {\ 63 | color: #A165AC\ 64 | }\ 65 | .ace-clouds-midnight .ace_invalid {\ 66 | color: #FFFFFF;\ 67 | background-color: #E92E2E\ 68 | }\ 69 | .ace-clouds-midnight .ace_fold {\ 70 | background-color: #927C5D;\ 71 | border-color: #929292\ 72 | }\ 73 | .ace-clouds-midnight .ace_storage,\ 74 | .ace-clouds-midnight .ace_support.ace_class,\ 75 | .ace-clouds-midnight .ace_support.ace_function,\ 76 | .ace-clouds-midnight .ace_support.ace_other,\ 77 | .ace-clouds-midnight .ace_support.ace_type {\ 78 | color: #E92E2E\ 79 | }\ 80 | .ace-clouds-midnight .ace_string {\ 81 | color: #5D90CD\ 82 | }\ 83 | .ace-clouds-midnight .ace_comment {\ 84 | color: #3C403B\ 85 | }\ 86 | .ace-clouds-midnight .ace_entity.ace_name.ace_tag,\ 87 | .ace-clouds-midnight .ace_entity.ace_other.ace_attribute-name {\ 88 | color: #606060\ 89 | }\ 90 | .ace-clouds-midnight .ace_indent-guide {\ 91 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYHB3d/8PAAOIAdULw8qMAAAAAElFTkSuQmCC) right repeat-y\ 92 | }"; 93 | 94 | var dom = require("../lib/dom"); 95 | dom.importCssString(exports.cssText, exports.cssClass); 96 | }); (function() { 97 | ace.require(["ace/theme/clouds_midnight"], function(m) { 98 | if (typeof module == "object" && typeof exports == "object" && module) { 99 | module.exports = m; 100 | } 101 | }); 102 | })(); 103 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/groovyconsole/clientlibs/js/theme-merbivore_soft.js: -------------------------------------------------------------------------------- 1 | ace.define("ace/theme/merbivore_soft",["require","exports","module","ace/lib/dom"], function(require, exports, module) { 2 | 3 | exports.isDark = true; 4 | exports.cssClass = "ace-merbivore-soft"; 5 | exports.cssText = ".ace-merbivore-soft .ace_gutter {\ 6 | background: #262424;\ 7 | color: #E6E1DC\ 8 | }\ 9 | .ace-merbivore-soft .ace_print-margin {\ 10 | width: 1px;\ 11 | background: #262424\ 12 | }\ 13 | .ace-merbivore-soft {\ 14 | background-color: #1C1C1C;\ 15 | color: #E6E1DC\ 16 | }\ 17 | .ace-merbivore-soft .ace_cursor {\ 18 | color: #FFFFFF\ 19 | }\ 20 | .ace-merbivore-soft .ace_marker-layer .ace_selection {\ 21 | background: #494949\ 22 | }\ 23 | .ace-merbivore-soft.ace_multiselect .ace_selection.ace_start {\ 24 | box-shadow: 0 0 3px 0px #1C1C1C;\ 25 | }\ 26 | .ace-merbivore-soft .ace_marker-layer .ace_step {\ 27 | background: rgb(102, 82, 0)\ 28 | }\ 29 | .ace-merbivore-soft .ace_marker-layer .ace_bracket {\ 30 | margin: -1px 0 0 -1px;\ 31 | border: 1px solid #404040\ 32 | }\ 33 | .ace-merbivore-soft .ace_marker-layer .ace_active-line {\ 34 | background: #333435\ 35 | }\ 36 | .ace-merbivore-soft .ace_gutter-active-line {\ 37 | background-color: #333435\ 38 | }\ 39 | .ace-merbivore-soft .ace_marker-layer .ace_selected-word {\ 40 | border: 1px solid #494949\ 41 | }\ 42 | .ace-merbivore-soft .ace_invisible {\ 43 | color: #404040\ 44 | }\ 45 | .ace-merbivore-soft .ace_entity.ace_name.ace_tag,\ 46 | .ace-merbivore-soft .ace_keyword,\ 47 | .ace-merbivore-soft .ace_meta,\ 48 | .ace-merbivore-soft .ace_meta.ace_tag,\ 49 | .ace-merbivore-soft .ace_storage {\ 50 | color: #FC803A\ 51 | }\ 52 | .ace-merbivore-soft .ace_constant,\ 53 | .ace-merbivore-soft .ace_constant.ace_character,\ 54 | .ace-merbivore-soft .ace_constant.ace_character.ace_escape,\ 55 | .ace-merbivore-soft .ace_constant.ace_other,\ 56 | .ace-merbivore-soft .ace_support.ace_type {\ 57 | color: #68C1D8\ 58 | }\ 59 | .ace-merbivore-soft .ace_constant.ace_character.ace_escape {\ 60 | color: #B3E5B4\ 61 | }\ 62 | .ace-merbivore-soft .ace_constant.ace_language {\ 63 | color: #E1C582\ 64 | }\ 65 | .ace-merbivore-soft .ace_constant.ace_library,\ 66 | .ace-merbivore-soft .ace_string,\ 67 | .ace-merbivore-soft .ace_support.ace_constant {\ 68 | color: #8EC65F\ 69 | }\ 70 | .ace-merbivore-soft .ace_constant.ace_numeric {\ 71 | color: #7FC578\ 72 | }\ 73 | .ace-merbivore-soft .ace_invalid,\ 74 | .ace-merbivore-soft .ace_invalid.ace_deprecated {\ 75 | color: #FFFFFF;\ 76 | background-color: #FE3838\ 77 | }\ 78 | .ace-merbivore-soft .ace_fold {\ 79 | background-color: #FC803A;\ 80 | border-color: #E6E1DC\ 81 | }\ 82 | .ace-merbivore-soft .ace_comment,\ 83 | .ace-merbivore-soft .ace_meta {\ 84 | font-style: italic;\ 85 | color: #AC4BB8\ 86 | }\ 87 | .ace-merbivore-soft .ace_entity.ace_other.ace_attribute-name {\ 88 | color: #EAF1A3\ 89 | }\ 90 | .ace-merbivore-soft .ace_indent-guide {\ 91 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWOQkpLyZfD09PwPAAfYAnaStpHRAAAAAElFTkSuQmCC) right repeat-y\ 92 | }"; 93 | 94 | var dom = require("../lib/dom"); 95 | dom.importCssString(exports.cssText, exports.cssClass); 96 | }); (function() { 97 | ace.require(["ace/theme/merbivore_soft"], function(m) { 98 | if (typeof module == "object" && typeof exports == "object" && module) { 99 | module.exports = m; 100 | } 101 | }); 102 | })(); 103 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/groovyconsole/clientlibs/js/theme-cobalt.js: -------------------------------------------------------------------------------- 1 | ace.define("ace/theme/cobalt",["require","exports","module","ace/lib/dom"], function(require, exports, module) { 2 | 3 | exports.isDark = true; 4 | exports.cssClass = "ace-cobalt"; 5 | exports.cssText = ".ace-cobalt .ace_gutter {\ 6 | background: #011e3a;\ 7 | color: rgb(128,145,160)\ 8 | }\ 9 | .ace-cobalt .ace_print-margin {\ 10 | width: 1px;\ 11 | background: #555555\ 12 | }\ 13 | .ace-cobalt {\ 14 | background-color: #002240;\ 15 | color: #FFFFFF\ 16 | }\ 17 | .ace-cobalt .ace_cursor {\ 18 | color: #FFFFFF\ 19 | }\ 20 | .ace-cobalt .ace_marker-layer .ace_selection {\ 21 | background: rgba(179, 101, 57, 0.75)\ 22 | }\ 23 | .ace-cobalt.ace_multiselect .ace_selection.ace_start {\ 24 | box-shadow: 0 0 3px 0px #002240;\ 25 | }\ 26 | .ace-cobalt .ace_marker-layer .ace_step {\ 27 | background: rgb(127, 111, 19)\ 28 | }\ 29 | .ace-cobalt .ace_marker-layer .ace_bracket {\ 30 | margin: -1px 0 0 -1px;\ 31 | border: 1px solid rgba(255, 255, 255, 0.15)\ 32 | }\ 33 | .ace-cobalt .ace_marker-layer .ace_active-line {\ 34 | background: rgba(0, 0, 0, 0.35)\ 35 | }\ 36 | .ace-cobalt .ace_gutter-active-line {\ 37 | background-color: rgba(0, 0, 0, 0.35)\ 38 | }\ 39 | .ace-cobalt .ace_marker-layer .ace_selected-word {\ 40 | border: 1px solid rgba(179, 101, 57, 0.75)\ 41 | }\ 42 | .ace-cobalt .ace_invisible {\ 43 | color: rgba(255, 255, 255, 0.15)\ 44 | }\ 45 | .ace-cobalt .ace_keyword,\ 46 | .ace-cobalt .ace_meta {\ 47 | color: #FF9D00\ 48 | }\ 49 | .ace-cobalt .ace_constant,\ 50 | .ace-cobalt .ace_constant.ace_character,\ 51 | .ace-cobalt .ace_constant.ace_character.ace_escape,\ 52 | .ace-cobalt .ace_constant.ace_other {\ 53 | color: #FF628C\ 54 | }\ 55 | .ace-cobalt .ace_invalid {\ 56 | color: #F8F8F8;\ 57 | background-color: #800F00\ 58 | }\ 59 | .ace-cobalt .ace_support {\ 60 | color: #80FFBB\ 61 | }\ 62 | .ace-cobalt .ace_support.ace_constant {\ 63 | color: #EB939A\ 64 | }\ 65 | .ace-cobalt .ace_fold {\ 66 | background-color: #FF9D00;\ 67 | border-color: #FFFFFF\ 68 | }\ 69 | .ace-cobalt .ace_support.ace_function {\ 70 | color: #FFB054\ 71 | }\ 72 | .ace-cobalt .ace_storage {\ 73 | color: #FFEE80\ 74 | }\ 75 | .ace-cobalt .ace_entity {\ 76 | color: #FFDD00\ 77 | }\ 78 | .ace-cobalt .ace_string {\ 79 | color: #3AD900\ 80 | }\ 81 | .ace-cobalt .ace_string.ace_regexp {\ 82 | color: #80FFC2\ 83 | }\ 84 | .ace-cobalt .ace_comment {\ 85 | font-style: italic;\ 86 | color: #0088FF\ 87 | }\ 88 | .ace-cobalt .ace_heading,\ 89 | .ace-cobalt .ace_markup.ace_heading {\ 90 | color: #C8E4FD;\ 91 | background-color: #001221\ 92 | }\ 93 | .ace-cobalt .ace_list,\ 94 | .ace-cobalt .ace_markup.ace_list {\ 95 | background-color: #130D26\ 96 | }\ 97 | .ace-cobalt .ace_variable {\ 98 | color: #CCCCCC\ 99 | }\ 100 | .ace-cobalt .ace_variable.ace_language {\ 101 | color: #FF80E1\ 102 | }\ 103 | .ace-cobalt .ace_meta.ace_tag {\ 104 | color: #9EFFFF\ 105 | }\ 106 | .ace-cobalt .ace_indent-guide {\ 107 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYHCLSvkPAAP3AgSDTRd4AAAAAElFTkSuQmCC) right repeat-y\ 108 | }\ 109 | "; 110 | 111 | var dom = require("../lib/dom"); 112 | dom.importCssString(exports.cssText, exports.cssClass); 113 | }); (function() { 114 | ace.require(["ace/theme/cobalt"], function(m) { 115 | if (typeof module == "object" && typeof exports == "object" && module) { 116 | module.exports = m; 117 | } 118 | }); 119 | })(); 120 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/groovyconsole/clientlibs/js/theme-gob.js: -------------------------------------------------------------------------------- 1 | ace.define("ace/theme/gob",["require","exports","module","ace/lib/dom"], function(require, exports, module) { 2 | 3 | exports.isDark = true; 4 | exports.cssClass = "ace-gob"; 5 | exports.cssText = ".ace-gob .ace_gutter {\ 6 | background: #0B1818;\ 7 | color: #03EE03\ 8 | }\ 9 | .ace-gob .ace_print-margin {\ 10 | width: 1px;\ 11 | background: #131313\ 12 | }\ 13 | .ace-gob {\ 14 | background-color: #0B0B0B;\ 15 | color: #00FF00\ 16 | }\ 17 | .ace-gob .ace_cursor {\ 18 | border-color: rgba(16, 248, 255, 0.90);\ 19 | background-color: rgba(16, 240, 248, 0.70);\ 20 | opacity: 0.4;\ 21 | }\ 22 | .ace-gob .ace_marker-layer .ace_selection {\ 23 | background: rgba(221, 240, 255, 0.20)\ 24 | }\ 25 | .ace-gob.ace_multiselect .ace_selection.ace_start {\ 26 | box-shadow: 0 0 3px 0px #141414;\ 27 | }\ 28 | .ace-gob .ace_marker-layer .ace_step {\ 29 | background: rgb(16, 128, 0)\ 30 | }\ 31 | .ace-gob .ace_marker-layer .ace_bracket {\ 32 | margin: -1px 0 0 -1px;\ 33 | border: 1px solid rgba(64, 255, 255, 0.25)\ 34 | }\ 35 | .ace-gob .ace_marker-layer .ace_active-line {\ 36 | background: rgba(255, 255, 255, 0.04)\ 37 | }\ 38 | .ace-gob .ace_gutter-active-line {\ 39 | background-color: rgba(255, 255, 255, 0.04)\ 40 | }\ 41 | .ace-gob .ace_marker-layer .ace_selected-word {\ 42 | border: 1px solid rgba(192, 240, 255, 0.20)\ 43 | }\ 44 | .ace-gob .ace_invisible {\ 45 | color: rgba(255, 255, 255, 0.25)\ 46 | }\ 47 | .ace-gob .ace_keyword,\ 48 | .ace-gob .ace_meta {\ 49 | color: #10D8E8\ 50 | }\ 51 | .ace-gob .ace_constant,\ 52 | .ace-gob .ace_constant.ace_character,\ 53 | .ace-gob .ace_constant.ace_character.ace_escape,\ 54 | .ace-gob .ace_constant.ace_other,\ 55 | .ace-gob .ace_heading,\ 56 | .ace-gob .ace_markup.ace_heading,\ 57 | .ace-gob .ace_support.ace_constant {\ 58 | color: #10F0A0\ 59 | }\ 60 | .ace-gob .ace_invalid.ace_illegal {\ 61 | color: #F8F8F8;\ 62 | background-color: rgba(86, 45, 86, 0.75)\ 63 | }\ 64 | .ace-gob .ace_invalid.ace_deprecated {\ 65 | text-decoration: underline;\ 66 | font-style: italic;\ 67 | color: #20F8C0\ 68 | }\ 69 | .ace-gob .ace_support {\ 70 | color: #20E8B0\ 71 | }\ 72 | .ace-gob .ace_fold {\ 73 | background-color: #50B8B8;\ 74 | border-color: #70F8F8\ 75 | }\ 76 | .ace-gob .ace_support.ace_function {\ 77 | color: #00F800\ 78 | }\ 79 | .ace-gob .ace_list,\ 80 | .ace-gob .ace_markup.ace_list,\ 81 | .ace-gob .ace_storage {\ 82 | color: #10FF98\ 83 | }\ 84 | .ace-gob .ace_entity.ace_name.ace_function,\ 85 | .ace-gob .ace_meta.ace_tag,\ 86 | .ace-gob .ace_variable {\ 87 | color: #00F868\ 88 | }\ 89 | .ace-gob .ace_string {\ 90 | color: #10F060\ 91 | }\ 92 | .ace-gob .ace_string.ace_regexp {\ 93 | color: #20F090;\ 94 | }\ 95 | .ace-gob .ace_comment {\ 96 | font-style: italic;\ 97 | color: #00E060;\ 98 | }\ 99 | .ace-gob .ace_variable {\ 100 | color: #00F888;\ 101 | }\ 102 | .ace-gob .ace_xml-pe {\ 103 | color: #488858;\ 104 | }\ 105 | .ace-gob .ace_indent-guide {\ 106 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWMQERFpYLC1tf0PAAgOAnPnhxyiAAAAAElFTkSuQmCC) right repeat-y\ 107 | }\ 108 | "; 109 | 110 | var dom = require("../lib/dom"); 111 | dom.importCssString(exports.cssText, exports.cssClass); 112 | }); (function() { 113 | ace.require(["ace/theme/gob"], function(m) { 114 | if (typeof module == "object" && typeof exports == "object" && module) { 115 | module.exports = m; 116 | } 117 | }); 118 | })(); 119 | -------------------------------------------------------------------------------- /bundle/src/main/groovy/org/cid15/aem/groovy/console/constants/GroovyConsoleConstants.groovy: -------------------------------------------------------------------------------- 1 | package org.cid15.aem.groovy.console.constants 2 | 3 | import com.google.common.base.Charsets 4 | import com.google.common.net.MediaType 5 | 6 | class GroovyConsoleConstants { 7 | 8 | public static final String SYSTEM_USER_NAME = "aem-groovy-console-service" 9 | 10 | public static final String PATH_CONSOLE_ROOT = "/var/groovyconsole" 11 | 12 | public static final String PATH_SCRIPTS_FOLDER = "$PATH_CONSOLE_ROOT/scripts" 13 | 14 | public static final String EXTENSION_GROOVY = ".groovy" 15 | 16 | public static final String CHARSET = Charsets.UTF_8.name() 17 | 18 | public static final String FORMAT_RUNNING_TIME = "HH:mm:ss.SSS" 19 | 20 | public static final String TIME_ZONE_RUNNING_TIME = "GMT" 21 | 22 | public static final String DATE_FORMAT_DISPLAY = "yyyy-MM-dd HH:mm:ss" 23 | 24 | public static final String DATE_FORMAT_FILE_NAME = "yyyy-MM-dd'T'HHmmss" 25 | 26 | // request parameters/properties 27 | 28 | public static final String SCHEDULED_JOB_ID = "scheduledJobId" 29 | 30 | public static final String JOB_ID = "jobId" 31 | 32 | public static final String JOB_TITLE = "jobTitle" 33 | 34 | public static final String JOB_DESCRIPTION = "jobDescription" 35 | 36 | public static final String FILE_NAME = "fileName" 37 | 38 | public static final String SCRIPT_PATH = "scriptPath" 39 | 40 | public static final String SCRIPT_PATHS = "scriptPaths" 41 | 42 | public static final String SCRIPT = "script" 43 | 44 | public static final String USER_ID = "userId" 45 | 46 | public static final String START_DATE = "startDate" 47 | 48 | public static final String END_DATE = "endDate" 49 | 50 | public static final String DATA = "data" 51 | 52 | public static final String CRON_EXPRESSION = "cronExpression" 53 | 54 | public static final String EMAIL_TO = "emailTo" 55 | 56 | public static final String DATE_CREATED = "dateCreated" 57 | 58 | public static final String RESULT = "result" 59 | 60 | public static final String OUTPUT = "output" 61 | 62 | public static final String MEDIA_TYPE = "mediaType" 63 | 64 | public static final String EXCEPTION_STACK_TRACE = "exceptionStackTrace" 65 | 66 | public static final String RUNNING_TIME = "runningTime" 67 | 68 | // job properties 69 | 70 | public static final String JOB_TOPIC = "groovyconsole/job" 71 | 72 | public static final Set JOB_PROPERTIES = [ 73 | JOB_TITLE, 74 | JOB_DESCRIPTION, 75 | SCRIPT, 76 | DATA, 77 | CRON_EXPRESSION, 78 | EMAIL_TO, 79 | MEDIA_TYPE 80 | ] as Set 81 | 82 | // audit 83 | 84 | public static final Set AUDIT_JOB_PROPERTIES = [ 85 | SCHEDULED_JOB_ID, 86 | JOB_TITLE, 87 | JOB_DESCRIPTION, 88 | CRON_EXPRESSION, 89 | EMAIL_TO, 90 | MEDIA_TYPE 91 | ] as Set 92 | 93 | public static final String AUDIT_NODE_NAME = "audit" 94 | 95 | public static final String AUDIT_RECORD_NODE_PREFIX = "record" 96 | 97 | public static final String AUDIT_PATH = "$PATH_CONSOLE_ROOT/$AUDIT_NODE_NAME" 98 | 99 | public static final Map MEDIA_TYPE_EXTENSIONS = [ 100 | (MediaType.CSV_UTF_8.withoutParameters().toString()): "csv", 101 | (MediaType.PLAIN_TEXT_UTF_8.withoutParameters().toString()): "txt", 102 | (MediaType.HTML_UTF_8.withoutParameters().toString()): "html", 103 | (MediaType.XML_UTF_8.withoutParameters().toString()): "xml" 104 | ] 105 | 106 | private GroovyConsoleConstants() { 107 | 108 | } 109 | } 110 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/groovyconsole/clientlibs/js/theme-twilight.js: -------------------------------------------------------------------------------- 1 | ace.define("ace/theme/twilight",["require","exports","module","ace/lib/dom"], function(require, exports, module) { 2 | 3 | exports.isDark = true; 4 | exports.cssClass = "ace-twilight"; 5 | exports.cssText = ".ace-twilight .ace_gutter {\ 6 | background: #232323;\ 7 | color: #E2E2E2\ 8 | }\ 9 | .ace-twilight .ace_print-margin {\ 10 | width: 1px;\ 11 | background: #232323\ 12 | }\ 13 | .ace-twilight {\ 14 | background-color: #141414;\ 15 | color: #F8F8F8\ 16 | }\ 17 | .ace-twilight .ace_cursor {\ 18 | color: #A7A7A7\ 19 | }\ 20 | .ace-twilight .ace_marker-layer .ace_selection {\ 21 | background: rgba(221, 240, 255, 0.20)\ 22 | }\ 23 | .ace-twilight.ace_multiselect .ace_selection.ace_start {\ 24 | box-shadow: 0 0 3px 0px #141414;\ 25 | }\ 26 | .ace-twilight .ace_marker-layer .ace_step {\ 27 | background: rgb(102, 82, 0)\ 28 | }\ 29 | .ace-twilight .ace_marker-layer .ace_bracket {\ 30 | margin: -1px 0 0 -1px;\ 31 | border: 1px solid rgba(255, 255, 255, 0.25)\ 32 | }\ 33 | .ace-twilight .ace_marker-layer .ace_active-line {\ 34 | background: rgba(255, 255, 255, 0.031)\ 35 | }\ 36 | .ace-twilight .ace_gutter-active-line {\ 37 | background-color: rgba(255, 255, 255, 0.031)\ 38 | }\ 39 | .ace-twilight .ace_marker-layer .ace_selected-word {\ 40 | border: 1px solid rgba(221, 240, 255, 0.20)\ 41 | }\ 42 | .ace-twilight .ace_invisible {\ 43 | color: rgba(255, 255, 255, 0.25)\ 44 | }\ 45 | .ace-twilight .ace_keyword,\ 46 | .ace-twilight .ace_meta {\ 47 | color: #CDA869\ 48 | }\ 49 | .ace-twilight .ace_constant,\ 50 | .ace-twilight .ace_constant.ace_character,\ 51 | .ace-twilight .ace_constant.ace_character.ace_escape,\ 52 | .ace-twilight .ace_constant.ace_other,\ 53 | .ace-twilight .ace_heading,\ 54 | .ace-twilight .ace_markup.ace_heading,\ 55 | .ace-twilight .ace_support.ace_constant {\ 56 | color: #CF6A4C\ 57 | }\ 58 | .ace-twilight .ace_invalid.ace_illegal {\ 59 | color: #F8F8F8;\ 60 | background-color: rgba(86, 45, 86, 0.75)\ 61 | }\ 62 | .ace-twilight .ace_invalid.ace_deprecated {\ 63 | text-decoration: underline;\ 64 | font-style: italic;\ 65 | color: #D2A8A1\ 66 | }\ 67 | .ace-twilight .ace_support {\ 68 | color: #9B859D\ 69 | }\ 70 | .ace-twilight .ace_fold {\ 71 | background-color: #AC885B;\ 72 | border-color: #F8F8F8\ 73 | }\ 74 | .ace-twilight .ace_support.ace_function {\ 75 | color: #DAD085\ 76 | }\ 77 | .ace-twilight .ace_list,\ 78 | .ace-twilight .ace_markup.ace_list,\ 79 | .ace-twilight .ace_storage {\ 80 | color: #F9EE98\ 81 | }\ 82 | .ace-twilight .ace_entity.ace_name.ace_function,\ 83 | .ace-twilight .ace_meta.ace_tag,\ 84 | .ace-twilight .ace_variable {\ 85 | color: #AC885B\ 86 | }\ 87 | .ace-twilight .ace_string {\ 88 | color: #8F9D6A\ 89 | }\ 90 | .ace-twilight .ace_string.ace_regexp {\ 91 | color: #E9C062\ 92 | }\ 93 | .ace-twilight .ace_comment {\ 94 | font-style: italic;\ 95 | color: #5F5A60\ 96 | }\ 97 | .ace-twilight .ace_variable {\ 98 | color: #7587A6\ 99 | }\ 100 | .ace-twilight .ace_xml-pe {\ 101 | color: #494949\ 102 | }\ 103 | .ace-twilight .ace_indent-guide {\ 104 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWMQERFpYLC1tf0PAAgOAnPnhxyiAAAAAElFTkSuQmCC) right repeat-y\ 105 | }"; 106 | 107 | var dom = require("../lib/dom"); 108 | dom.importCssString(exports.cssText, exports.cssClass); 109 | }); (function() { 110 | ace.require(["ace/theme/twilight"], function(m) { 111 | if (typeof module == "object" && typeof exports == "object" && module) { 112 | module.exports = m; 113 | } 114 | }); 115 | })(); 116 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/groovyconsole/clientlibs/js/theme-tomorrow.js: -------------------------------------------------------------------------------- 1 | ace.define("ace/theme/tomorrow",["require","exports","module","ace/lib/dom"], function(require, exports, module) { 2 | 3 | exports.isDark = false; 4 | exports.cssClass = "ace-tomorrow"; 5 | exports.cssText = ".ace-tomorrow .ace_gutter {\ 6 | background: #f6f6f6;\ 7 | color: #4D4D4C\ 8 | }\ 9 | .ace-tomorrow .ace_print-margin {\ 10 | width: 1px;\ 11 | background: #f6f6f6\ 12 | }\ 13 | .ace-tomorrow {\ 14 | background-color: #FFFFFF;\ 15 | color: #4D4D4C\ 16 | }\ 17 | .ace-tomorrow .ace_cursor {\ 18 | color: #AEAFAD\ 19 | }\ 20 | .ace-tomorrow .ace_marker-layer .ace_selection {\ 21 | background: #D6D6D6\ 22 | }\ 23 | .ace-tomorrow.ace_multiselect .ace_selection.ace_start {\ 24 | box-shadow: 0 0 3px 0px #FFFFFF;\ 25 | }\ 26 | .ace-tomorrow .ace_marker-layer .ace_step {\ 27 | background: rgb(255, 255, 0)\ 28 | }\ 29 | .ace-tomorrow .ace_marker-layer .ace_bracket {\ 30 | margin: -1px 0 0 -1px;\ 31 | border: 1px solid #D1D1D1\ 32 | }\ 33 | .ace-tomorrow .ace_marker-layer .ace_active-line {\ 34 | background: #EFEFEF\ 35 | }\ 36 | .ace-tomorrow .ace_gutter-active-line {\ 37 | background-color : #dcdcdc\ 38 | }\ 39 | .ace-tomorrow .ace_marker-layer .ace_selected-word {\ 40 | border: 1px solid #D6D6D6\ 41 | }\ 42 | .ace-tomorrow .ace_invisible {\ 43 | color: #D1D1D1\ 44 | }\ 45 | .ace-tomorrow .ace_keyword,\ 46 | .ace-tomorrow .ace_meta,\ 47 | .ace-tomorrow .ace_storage,\ 48 | .ace-tomorrow .ace_storage.ace_type,\ 49 | .ace-tomorrow .ace_support.ace_type {\ 50 | color: #8959A8\ 51 | }\ 52 | .ace-tomorrow .ace_keyword.ace_operator {\ 53 | color: #3E999F\ 54 | }\ 55 | .ace-tomorrow .ace_constant.ace_character,\ 56 | .ace-tomorrow .ace_constant.ace_language,\ 57 | .ace-tomorrow .ace_constant.ace_numeric,\ 58 | .ace-tomorrow .ace_keyword.ace_other.ace_unit,\ 59 | .ace-tomorrow .ace_support.ace_constant,\ 60 | .ace-tomorrow .ace_variable.ace_parameter {\ 61 | color: #F5871F\ 62 | }\ 63 | .ace-tomorrow .ace_constant.ace_other {\ 64 | color: #666969\ 65 | }\ 66 | .ace-tomorrow .ace_invalid {\ 67 | color: #FFFFFF;\ 68 | background-color: #C82829\ 69 | }\ 70 | .ace-tomorrow .ace_invalid.ace_deprecated {\ 71 | color: #FFFFFF;\ 72 | background-color: #8959A8\ 73 | }\ 74 | .ace-tomorrow .ace_fold {\ 75 | background-color: #4271AE;\ 76 | border-color: #4D4D4C\ 77 | }\ 78 | .ace-tomorrow .ace_entity.ace_name.ace_function,\ 79 | .ace-tomorrow .ace_support.ace_function,\ 80 | .ace-tomorrow .ace_variable {\ 81 | color: #4271AE\ 82 | }\ 83 | .ace-tomorrow .ace_support.ace_class,\ 84 | .ace-tomorrow .ace_support.ace_type {\ 85 | color: #C99E00\ 86 | }\ 87 | .ace-tomorrow .ace_heading,\ 88 | .ace-tomorrow .ace_markup.ace_heading,\ 89 | .ace-tomorrow .ace_string {\ 90 | color: #718C00\ 91 | }\ 92 | .ace-tomorrow .ace_entity.ace_name.ace_tag,\ 93 | .ace-tomorrow .ace_entity.ace_other.ace_attribute-name,\ 94 | .ace-tomorrow .ace_meta.ace_tag,\ 95 | .ace-tomorrow .ace_string.ace_regexp,\ 96 | .ace-tomorrow .ace_variable {\ 97 | color: #C82829\ 98 | }\ 99 | .ace-tomorrow .ace_comment {\ 100 | color: #8E908C\ 101 | }\ 102 | .ace-tomorrow .ace_indent-guide {\ 103 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bdu3f/BwAlfgctduB85QAAAABJRU5ErkJggg==) right repeat-y\ 104 | }"; 105 | 106 | var dom = require("../lib/dom"); 107 | dom.importCssString(exports.cssText, exports.cssClass); 108 | }); (function() { 109 | ace.require(["ace/theme/tomorrow"], function(m) { 110 | if (typeof module == "object" && typeof exports == "object" && module) { 111 | module.exports = m; 112 | } 113 | }); 114 | })(); 115 | -------------------------------------------------------------------------------- /bundle/src/main/groovy/org/cid15/aem/groovy/console/api/JobProperties.groovy: -------------------------------------------------------------------------------- 1 | package org.cid15.aem.groovy.console.api 2 | 3 | import com.google.common.collect.ImmutableSet 4 | import groovy.transform.TupleConstructor 5 | import org.apache.sling.api.SlingHttpServletRequest 6 | import org.apache.sling.api.resource.ValueMap 7 | import org.apache.sling.event.jobs.Job 8 | 9 | import static org.cid15.aem.groovy.console.constants.GroovyConsoleConstants.CRON_EXPRESSION 10 | import static org.cid15.aem.groovy.console.constants.GroovyConsoleConstants.DATA 11 | import static org.cid15.aem.groovy.console.constants.GroovyConsoleConstants.DATE_CREATED 12 | import static org.cid15.aem.groovy.console.constants.GroovyConsoleConstants.EMAIL_TO 13 | import static org.cid15.aem.groovy.console.constants.GroovyConsoleConstants.JOB_DESCRIPTION 14 | import static org.cid15.aem.groovy.console.constants.GroovyConsoleConstants.JOB_PROPERTIES 15 | import static org.cid15.aem.groovy.console.constants.GroovyConsoleConstants.JOB_TITLE 16 | import static org.cid15.aem.groovy.console.constants.GroovyConsoleConstants.MEDIA_TYPE 17 | import static org.cid15.aem.groovy.console.constants.GroovyConsoleConstants.SCHEDULED_JOB_ID 18 | import static org.cid15.aem.groovy.console.constants.GroovyConsoleConstants.SCRIPT 19 | 20 | @TupleConstructor 21 | class JobProperties { 22 | 23 | private static final Set ALL_JOB_PROPERTIES = new ImmutableSet.Builder() 24 | .addAll(JOB_PROPERTIES) 25 | .add(DATE_CREATED) 26 | .add(SCHEDULED_JOB_ID) 27 | .build() 28 | 29 | Map properties 30 | 31 | static JobProperties fromRequest(SlingHttpServletRequest request) { 32 | def properties = JOB_PROPERTIES.collectEntries { propertyName -> 33 | [propertyName, request.getParameter(propertyName)] 34 | }.findAll { it.value != null } as Map 35 | 36 | properties[DATE_CREATED] = Calendar.instance 37 | properties[SCHEDULED_JOB_ID] = UUID.randomUUID().toString() 38 | 39 | new JobProperties(properties) 40 | } 41 | 42 | static JobProperties fromJob(Job job) { 43 | def properties = [:] as Map 44 | 45 | job.propertyNames.findAll { propertyName -> ALL_JOB_PROPERTIES.contains(propertyName) } 46 | .each { propertyName -> 47 | properties[propertyName] = job.getProperty(propertyName) 48 | } 49 | 50 | new JobProperties(properties) 51 | } 52 | 53 | static JobProperties fromValueMap(ValueMap valueMap) { 54 | def properties = [:] as Map 55 | 56 | valueMap.each { name, value -> 57 | if (ALL_JOB_PROPERTIES.contains(name)) { 58 | properties[name] = value 59 | } 60 | } 61 | 62 | new JobProperties(properties) 63 | } 64 | 65 | String getScheduledJobId() { 66 | properties.get(SCHEDULED_JOB_ID) 67 | } 68 | 69 | Set getEmailTo() { 70 | def emailTo = properties.get(EMAIL_TO) as String 71 | 72 | (emailTo ? emailTo.tokenize(",")*.trim() : []) as Set 73 | } 74 | 75 | String getJobTitle() { 76 | properties.get(JOB_TITLE) 77 | } 78 | 79 | String getJobDescription() { 80 | properties.get(JOB_DESCRIPTION) 81 | } 82 | 83 | String getScript() { 84 | properties.get(SCRIPT) 85 | } 86 | 87 | String getData() { 88 | properties.get(DATA) 89 | } 90 | 91 | String getCronExpression() { 92 | properties.get(CRON_EXPRESSION) 93 | } 94 | 95 | String getMediaType() { 96 | properties.get(MEDIA_TYPE) 97 | } 98 | 99 | Map toMap() { 100 | properties 101 | } 102 | } -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/groovyconsole/clientlibs/js/theme-pastel_on_dark.js: -------------------------------------------------------------------------------- 1 | ace.define("ace/theme/pastel_on_dark",["require","exports","module","ace/lib/dom"], function(require, exports, module) { 2 | 3 | exports.isDark = true; 4 | exports.cssClass = "ace-pastel-on-dark"; 5 | exports.cssText = ".ace-pastel-on-dark .ace_gutter {\ 6 | background: #353030;\ 7 | color: #8F938F\ 8 | }\ 9 | .ace-pastel-on-dark .ace_print-margin {\ 10 | width: 1px;\ 11 | background: #353030\ 12 | }\ 13 | .ace-pastel-on-dark {\ 14 | background-color: #2C2828;\ 15 | color: #8F938F\ 16 | }\ 17 | .ace-pastel-on-dark .ace_cursor {\ 18 | color: #A7A7A7\ 19 | }\ 20 | .ace-pastel-on-dark .ace_marker-layer .ace_selection {\ 21 | background: rgba(221, 240, 255, 0.20)\ 22 | }\ 23 | .ace-pastel-on-dark.ace_multiselect .ace_selection.ace_start {\ 24 | box-shadow: 0 0 3px 0px #2C2828;\ 25 | }\ 26 | .ace-pastel-on-dark .ace_marker-layer .ace_step {\ 27 | background: rgb(102, 82, 0)\ 28 | }\ 29 | .ace-pastel-on-dark .ace_marker-layer .ace_bracket {\ 30 | margin: -1px 0 0 -1px;\ 31 | border: 1px solid rgba(255, 255, 255, 0.25)\ 32 | }\ 33 | .ace-pastel-on-dark .ace_marker-layer .ace_active-line {\ 34 | background: rgba(255, 255, 255, 0.031)\ 35 | }\ 36 | .ace-pastel-on-dark .ace_gutter-active-line {\ 37 | background-color: rgba(255, 255, 255, 0.031)\ 38 | }\ 39 | .ace-pastel-on-dark .ace_marker-layer .ace_selected-word {\ 40 | border: 1px solid rgba(221, 240, 255, 0.20)\ 41 | }\ 42 | .ace-pastel-on-dark .ace_invisible {\ 43 | color: rgba(255, 255, 255, 0.25)\ 44 | }\ 45 | .ace-pastel-on-dark .ace_keyword,\ 46 | .ace-pastel-on-dark .ace_meta {\ 47 | color: #757aD8\ 48 | }\ 49 | .ace-pastel-on-dark .ace_constant,\ 50 | .ace-pastel-on-dark .ace_constant.ace_character,\ 51 | .ace-pastel-on-dark .ace_constant.ace_character.ace_escape,\ 52 | .ace-pastel-on-dark .ace_constant.ace_other {\ 53 | color: #4FB7C5\ 54 | }\ 55 | .ace-pastel-on-dark .ace_keyword.ace_operator {\ 56 | color: #797878\ 57 | }\ 58 | .ace-pastel-on-dark .ace_constant.ace_character {\ 59 | color: #AFA472\ 60 | }\ 61 | .ace-pastel-on-dark .ace_constant.ace_language {\ 62 | color: #DE8E30\ 63 | }\ 64 | .ace-pastel-on-dark .ace_constant.ace_numeric {\ 65 | color: #CCCCCC\ 66 | }\ 67 | .ace-pastel-on-dark .ace_invalid,\ 68 | .ace-pastel-on-dark .ace_invalid.ace_illegal {\ 69 | color: #F8F8F8;\ 70 | background-color: rgba(86, 45, 86, 0.75)\ 71 | }\ 72 | .ace-pastel-on-dark .ace_invalid.ace_deprecated {\ 73 | text-decoration: underline;\ 74 | font-style: italic;\ 75 | color: #D2A8A1\ 76 | }\ 77 | .ace-pastel-on-dark .ace_fold {\ 78 | background-color: #757aD8;\ 79 | border-color: #8F938F\ 80 | }\ 81 | .ace-pastel-on-dark .ace_support.ace_function {\ 82 | color: #AEB2F8\ 83 | }\ 84 | .ace-pastel-on-dark .ace_string {\ 85 | color: #66A968\ 86 | }\ 87 | .ace-pastel-on-dark .ace_string.ace_regexp {\ 88 | color: #E9C062\ 89 | }\ 90 | .ace-pastel-on-dark .ace_comment {\ 91 | color: #A6C6FF\ 92 | }\ 93 | .ace-pastel-on-dark .ace_variable {\ 94 | color: #BEBF55\ 95 | }\ 96 | .ace-pastel-on-dark .ace_variable.ace_language {\ 97 | color: #C1C144\ 98 | }\ 99 | .ace-pastel-on-dark .ace_xml-pe {\ 100 | color: #494949\ 101 | }\ 102 | .ace-pastel-on-dark .ace_indent-guide {\ 103 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYIiPj/8PAARgAh2NTMh8AAAAAElFTkSuQmCC) right repeat-y\ 104 | }"; 105 | 106 | var dom = require("../lib/dom"); 107 | dom.importCssString(exports.cssText, exports.cssClass); 108 | }); (function() { 109 | ace.require(["ace/theme/pastel_on_dark"], function(m) { 110 | if (typeof module == "object" && typeof exports == "object" && module) { 111 | module.exports = m; 112 | } 113 | }); 114 | })(); 115 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/groovyconsole/clientlibs/js/theme-dracula.js: -------------------------------------------------------------------------------- 1 | ace.define("ace/theme/dracula",["require","exports","module","ace/lib/dom"], function(require, exports, module) { 2 | 3 | exports.isDark = true; 4 | exports.cssClass = "ace-dracula"; 5 | exports.cssText = "\ 6 | .ace-dracula .ace_gutter {\ 7 | background: #282a36;\ 8 | color: rgb(144,145,148)\ 9 | }\ 10 | .ace-dracula .ace_print-margin {\ 11 | width: 1px;\ 12 | background: #44475a\ 13 | }\ 14 | .ace-dracula {\ 15 | background-color: #282a36;\ 16 | color: #f8f8f2\ 17 | }\ 18 | .ace-dracula .ace_cursor {\ 19 | color: #f8f8f0\ 20 | }\ 21 | .ace-dracula .ace_marker-layer .ace_selection {\ 22 | background: #44475a\ 23 | }\ 24 | .ace-dracula.ace_multiselect .ace_selection.ace_start {\ 25 | box-shadow: 0 0 3px 0px #282a36;\ 26 | border-radius: 2px\ 27 | }\ 28 | .ace-dracula .ace_marker-layer .ace_step {\ 29 | background: rgb(198, 219, 174)\ 30 | }\ 31 | .ace-dracula .ace_marker-layer .ace_bracket {\ 32 | margin: -1px 0 0 -1px;\ 33 | border: 1px solid #a29709\ 34 | }\ 35 | .ace-dracula .ace_marker-layer .ace_active-line {\ 36 | background: #44475a\ 37 | }\ 38 | .ace-dracula .ace_gutter-active-line {\ 39 | background-color: #44475a\ 40 | }\ 41 | .ace-dracula .ace_marker-layer .ace_selected-word {\ 42 | box-shadow: 0px 0px 0px 1px #a29709;\ 43 | border-radius: 3px;\ 44 | }\ 45 | .ace-dracula .ace_fold {\ 46 | background-color: #50fa7b;\ 47 | border-color: #f8f8f2\ 48 | }\ 49 | .ace-dracula .ace_keyword {\ 50 | color: #ff79c6\ 51 | }\ 52 | .ace-dracula .ace_constant.ace_language {\ 53 | color: #bd93f9\ 54 | }\ 55 | .ace-dracula .ace_constant.ace_numeric {\ 56 | color: #bd93f9\ 57 | }\ 58 | .ace-dracula .ace_constant.ace_character {\ 59 | color: #bd93f9\ 60 | }\ 61 | .ace-dracula .ace_constant.ace_character.ace_escape {\ 62 | color: #ff79c6\ 63 | }\ 64 | .ace-dracula .ace_constant.ace_other {\ 65 | color: #bd93f9\ 66 | }\ 67 | .ace-dracula .ace_support.ace_function {\ 68 | color: #8be9fd\ 69 | }\ 70 | .ace-dracula .ace_support.ace_constant {\ 71 | color: #6be5fd\ 72 | }\ 73 | .ace-dracula .ace_support.ace_class {\ 74 | font-style: italic;\ 75 | color: #66d9ef\ 76 | }\ 77 | .ace-dracula .ace_support.ace_type {\ 78 | font-style: italic;\ 79 | color: #66d9ef\ 80 | }\ 81 | .ace-dracula .ace_storage {\ 82 | color: #ff79c6\ 83 | }\ 84 | .ace-dracula .ace_storage.ace_type {\ 85 | font-style: italic;\ 86 | color: #8be9fd\ 87 | }\ 88 | .ace-dracula .ace_invalid {\ 89 | color: #F8F8F0;\ 90 | background-color: #ff79c6\ 91 | }\ 92 | .ace-dracula .ace_invalid.ace_deprecated {\ 93 | color: #F8F8F0;\ 94 | background-color: #bd93f9\ 95 | }\ 96 | .ace-dracula .ace_string {\ 97 | color: #f1fa8c\ 98 | }\ 99 | .ace-dracula .ace_comment {\ 100 | color: #6272a4\ 101 | }\ 102 | .ace-dracula .ace_variable {\ 103 | color: #50fa7b\ 104 | }\ 105 | .ace-dracula .ace_variable.ace_parameter {\ 106 | font-style: italic;\ 107 | color: #ffb86c\ 108 | }\ 109 | .ace-dracula .ace_entity.ace_other.ace_attribute-name {\ 110 | color: #50fa7b\ 111 | }\ 112 | .ace-dracula .ace_entity.ace_name.ace_function {\ 113 | color: #50fa7b\ 114 | }\ 115 | .ace-dracula .ace_entity.ace_name.ace_tag {\ 116 | color: #ff79c6\ 117 | }\ 118 | .ace-dracula .ace_invisible {\ 119 | color: #626680;\ 120 | }\ 121 | .ace-dracula .ace_indent-guide {\ 122 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYHB3d/8PAAOIAdULw8qMAAAAAElFTkSuQmCC) right repeat-y\ 123 | }"; 124 | exports.$selectionColorConflict = true; 125 | 126 | var dom = require("../lib/dom"); 127 | dom.importCssString(exports.cssText, exports.cssClass); 128 | }); (function() { 129 | ace.require(["ace/theme/dracula"], function(m) { 130 | if (typeof module == "object" && typeof exports == "object" && module) { 131 | module.exports = m; 132 | } 133 | }); 134 | })(); 135 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/groovyconsole/clientlibs/js/theme-mono_industrial.js: -------------------------------------------------------------------------------- 1 | ace.define("ace/theme/mono_industrial",["require","exports","module","ace/lib/dom"], function(require, exports, module) { 2 | 3 | exports.isDark = true; 4 | exports.cssClass = "ace-mono-industrial"; 5 | exports.cssText = ".ace-mono-industrial .ace_gutter {\ 6 | background: #1d2521;\ 7 | color: #C5C9C9\ 8 | }\ 9 | .ace-mono-industrial .ace_print-margin {\ 10 | width: 1px;\ 11 | background: #555651\ 12 | }\ 13 | .ace-mono-industrial {\ 14 | background-color: #222C28;\ 15 | color: #FFFFFF\ 16 | }\ 17 | .ace-mono-industrial .ace_cursor {\ 18 | color: #FFFFFF\ 19 | }\ 20 | .ace-mono-industrial .ace_marker-layer .ace_selection {\ 21 | background: rgba(145, 153, 148, 0.40)\ 22 | }\ 23 | .ace-mono-industrial.ace_multiselect .ace_selection.ace_start {\ 24 | box-shadow: 0 0 3px 0px #222C28;\ 25 | }\ 26 | .ace-mono-industrial .ace_marker-layer .ace_step {\ 27 | background: rgb(102, 82, 0)\ 28 | }\ 29 | .ace-mono-industrial .ace_marker-layer .ace_bracket {\ 30 | margin: -1px 0 0 -1px;\ 31 | border: 1px solid rgba(102, 108, 104, 0.50)\ 32 | }\ 33 | .ace-mono-industrial .ace_marker-layer .ace_active-line {\ 34 | background: rgba(12, 13, 12, 0.25)\ 35 | }\ 36 | .ace-mono-industrial .ace_gutter-active-line {\ 37 | background-color: rgba(12, 13, 12, 0.25)\ 38 | }\ 39 | .ace-mono-industrial .ace_marker-layer .ace_selected-word {\ 40 | border: 1px solid rgba(145, 153, 148, 0.40)\ 41 | }\ 42 | .ace-mono-industrial .ace_invisible {\ 43 | color: rgba(102, 108, 104, 0.50)\ 44 | }\ 45 | .ace-mono-industrial .ace_string {\ 46 | background-color: #151C19;\ 47 | color: #FFFFFF\ 48 | }\ 49 | .ace-mono-industrial .ace_keyword,\ 50 | .ace-mono-industrial .ace_meta {\ 51 | color: #A39E64\ 52 | }\ 53 | .ace-mono-industrial .ace_constant,\ 54 | .ace-mono-industrial .ace_constant.ace_character,\ 55 | .ace-mono-industrial .ace_constant.ace_character.ace_escape,\ 56 | .ace-mono-industrial .ace_constant.ace_numeric,\ 57 | .ace-mono-industrial .ace_constant.ace_other {\ 58 | color: #E98800\ 59 | }\ 60 | .ace-mono-industrial .ace_entity.ace_name.ace_function,\ 61 | .ace-mono-industrial .ace_keyword.ace_operator,\ 62 | .ace-mono-industrial .ace_variable {\ 63 | color: #A8B3AB\ 64 | }\ 65 | .ace-mono-industrial .ace_invalid {\ 66 | color: #FFFFFF;\ 67 | background-color: rgba(153, 0, 0, 0.68)\ 68 | }\ 69 | .ace-mono-industrial .ace_support.ace_constant {\ 70 | color: #C87500\ 71 | }\ 72 | .ace-mono-industrial .ace_fold {\ 73 | background-color: #A8B3AB;\ 74 | border-color: #FFFFFF\ 75 | }\ 76 | .ace-mono-industrial .ace_support.ace_function {\ 77 | color: #588E60\ 78 | }\ 79 | .ace-mono-industrial .ace_entity.ace_name,\ 80 | .ace-mono-industrial .ace_support.ace_class,\ 81 | .ace-mono-industrial .ace_support.ace_type {\ 82 | color: #5778B6\ 83 | }\ 84 | .ace-mono-industrial .ace_storage {\ 85 | color: #C23B00\ 86 | }\ 87 | .ace-mono-industrial .ace_variable.ace_language,\ 88 | .ace-mono-industrial .ace_variable.ace_parameter {\ 89 | color: #648BD2\ 90 | }\ 91 | .ace-mono-industrial .ace_comment {\ 92 | color: #666C68;\ 93 | background-color: #151C19\ 94 | }\ 95 | .ace-mono-industrial .ace_entity.ace_other.ace_attribute-name {\ 96 | color: #909993\ 97 | }\ 98 | .ace-mono-industrial .ace_entity.ace_name.ace_tag {\ 99 | color: #A65EFF\ 100 | }\ 101 | .ace-mono-industrial .ace_indent-guide {\ 102 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNQ1NbwZfALD/4PAAlTArlEC4r/AAAAAElFTkSuQmCC) right repeat-y\ 103 | }"; 104 | 105 | var dom = require("../lib/dom"); 106 | dom.importCssString(exports.cssText, exports.cssClass); 107 | }); (function() { 108 | ace.require(["ace/theme/mono_industrial"], function(m) { 109 | if (typeof module == "object" && typeof exports == "object" && module) { 110 | module.exports = m; 111 | } 112 | }); 113 | })(); 114 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/groovyconsole/clientlibs/js/theme-textmate.js: -------------------------------------------------------------------------------- 1 | ace.define("ace/theme/textmate",["require","exports","module","ace/lib/dom"], function(require, exports, module) { 2 | "use strict"; 3 | 4 | exports.isDark = false; 5 | exports.cssClass = "ace-tm"; 6 | exports.cssText = ".ace-tm .ace_gutter {\ 7 | background: #f0f0f0;\ 8 | color: #333;\ 9 | }\ 10 | .ace-tm .ace_print-margin {\ 11 | width: 1px;\ 12 | background: #e8e8e8;\ 13 | }\ 14 | .ace-tm .ace_fold {\ 15 | background-color: #6B72E6;\ 16 | }\ 17 | .ace-tm {\ 18 | background-color: #FFFFFF;\ 19 | color: black;\ 20 | }\ 21 | .ace-tm .ace_cursor {\ 22 | color: black;\ 23 | }\ 24 | .ace-tm .ace_invisible {\ 25 | color: rgb(191, 191, 191);\ 26 | }\ 27 | .ace-tm .ace_storage,\ 28 | .ace-tm .ace_keyword {\ 29 | color: blue;\ 30 | }\ 31 | .ace-tm .ace_constant {\ 32 | color: rgb(197, 6, 11);\ 33 | }\ 34 | .ace-tm .ace_constant.ace_buildin {\ 35 | color: rgb(88, 72, 246);\ 36 | }\ 37 | .ace-tm .ace_constant.ace_language {\ 38 | color: rgb(88, 92, 246);\ 39 | }\ 40 | .ace-tm .ace_constant.ace_library {\ 41 | color: rgb(6, 150, 14);\ 42 | }\ 43 | .ace-tm .ace_invalid {\ 44 | background-color: rgba(255, 0, 0, 0.1);\ 45 | color: red;\ 46 | }\ 47 | .ace-tm .ace_support.ace_function {\ 48 | color: rgb(60, 76, 114);\ 49 | }\ 50 | .ace-tm .ace_support.ace_constant {\ 51 | color: rgb(6, 150, 14);\ 52 | }\ 53 | .ace-tm .ace_support.ace_type,\ 54 | .ace-tm .ace_support.ace_class {\ 55 | color: rgb(109, 121, 222);\ 56 | }\ 57 | .ace-tm .ace_keyword.ace_operator {\ 58 | color: rgb(104, 118, 135);\ 59 | }\ 60 | .ace-tm .ace_string {\ 61 | color: rgb(3, 106, 7);\ 62 | }\ 63 | .ace-tm .ace_comment {\ 64 | color: rgb(76, 136, 107);\ 65 | }\ 66 | .ace-tm .ace_comment.ace_doc {\ 67 | color: rgb(0, 102, 255);\ 68 | }\ 69 | .ace-tm .ace_comment.ace_doc.ace_tag {\ 70 | color: rgb(128, 159, 191);\ 71 | }\ 72 | .ace-tm .ace_constant.ace_numeric {\ 73 | color: rgb(0, 0, 205);\ 74 | }\ 75 | .ace-tm .ace_variable {\ 76 | color: rgb(49, 132, 149);\ 77 | }\ 78 | .ace-tm .ace_xml-pe {\ 79 | color: rgb(104, 104, 91);\ 80 | }\ 81 | .ace-tm .ace_entity.ace_name.ace_function {\ 82 | color: #0000A2;\ 83 | }\ 84 | .ace-tm .ace_heading {\ 85 | color: rgb(12, 7, 255);\ 86 | }\ 87 | .ace-tm .ace_list {\ 88 | color:rgb(185, 6, 144);\ 89 | }\ 90 | .ace-tm .ace_meta.ace_tag {\ 91 | color:rgb(0, 22, 142);\ 92 | }\ 93 | .ace-tm .ace_string.ace_regex {\ 94 | color: rgb(255, 0, 0)\ 95 | }\ 96 | .ace-tm .ace_marker-layer .ace_selection {\ 97 | background: rgb(181, 213, 255);\ 98 | }\ 99 | .ace-tm.ace_multiselect .ace_selection.ace_start {\ 100 | box-shadow: 0 0 3px 0px white;\ 101 | }\ 102 | .ace-tm .ace_marker-layer .ace_step {\ 103 | background: rgb(252, 255, 0);\ 104 | }\ 105 | .ace-tm .ace_marker-layer .ace_stack {\ 106 | background: rgb(164, 229, 101);\ 107 | }\ 108 | .ace-tm .ace_marker-layer .ace_bracket {\ 109 | margin: -1px 0 0 -1px;\ 110 | border: 1px solid rgb(192, 192, 192);\ 111 | }\ 112 | .ace-tm .ace_marker-layer .ace_active-line {\ 113 | background: rgba(0, 0, 0, 0.07);\ 114 | }\ 115 | .ace-tm .ace_gutter-active-line {\ 116 | background-color : #dcdcdc;\ 117 | }\ 118 | .ace-tm .ace_marker-layer .ace_selected-word {\ 119 | background: rgb(250, 250, 255);\ 120 | border: 1px solid rgb(200, 200, 250);\ 121 | }\ 122 | .ace-tm .ace_indent-guide {\ 123 | background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==\") right repeat-y;\ 124 | }\ 125 | "; 126 | exports.$id = "ace/theme/textmate"; 127 | 128 | var dom = require("../lib/dom"); 129 | dom.importCssString(exports.cssText, exports.cssClass); 130 | }); (function() { 131 | ace.require(["ace/theme/textmate"], function(m) { 132 | if (typeof module == "object" && typeof exports == "object" && module) { 133 | module.exports = m; 134 | } 135 | }); 136 | })(); 137 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/groovyconsole/clientlibs/js/theme-tomorrow_night.js: -------------------------------------------------------------------------------- 1 | ace.define("ace/theme/tomorrow_night",["require","exports","module","ace/lib/dom"], function(require, exports, module) { 2 | 3 | exports.isDark = true; 4 | exports.cssClass = "ace-tomorrow-night"; 5 | exports.cssText = ".ace-tomorrow-night .ace_gutter {\ 6 | background: #25282c;\ 7 | color: #C5C8C6\ 8 | }\ 9 | .ace-tomorrow-night .ace_print-margin {\ 10 | width: 1px;\ 11 | background: #25282c\ 12 | }\ 13 | .ace-tomorrow-night {\ 14 | background-color: #1D1F21;\ 15 | color: #C5C8C6\ 16 | }\ 17 | .ace-tomorrow-night .ace_cursor {\ 18 | color: #AEAFAD\ 19 | }\ 20 | .ace-tomorrow-night .ace_marker-layer .ace_selection {\ 21 | background: #373B41\ 22 | }\ 23 | .ace-tomorrow-night.ace_multiselect .ace_selection.ace_start {\ 24 | box-shadow: 0 0 3px 0px #1D1F21;\ 25 | }\ 26 | .ace-tomorrow-night .ace_marker-layer .ace_step {\ 27 | background: rgb(102, 82, 0)\ 28 | }\ 29 | .ace-tomorrow-night .ace_marker-layer .ace_bracket {\ 30 | margin: -1px 0 0 -1px;\ 31 | border: 1px solid #4B4E55\ 32 | }\ 33 | .ace-tomorrow-night .ace_marker-layer .ace_active-line {\ 34 | background: #282A2E\ 35 | }\ 36 | .ace-tomorrow-night .ace_gutter-active-line {\ 37 | background-color: #282A2E\ 38 | }\ 39 | .ace-tomorrow-night .ace_marker-layer .ace_selected-word {\ 40 | border: 1px solid #373B41\ 41 | }\ 42 | .ace-tomorrow-night .ace_invisible {\ 43 | color: #4B4E55\ 44 | }\ 45 | .ace-tomorrow-night .ace_keyword,\ 46 | .ace-tomorrow-night .ace_meta,\ 47 | .ace-tomorrow-night .ace_storage,\ 48 | .ace-tomorrow-night .ace_storage.ace_type,\ 49 | .ace-tomorrow-night .ace_support.ace_type {\ 50 | color: #B294BB\ 51 | }\ 52 | .ace-tomorrow-night .ace_keyword.ace_operator {\ 53 | color: #8ABEB7\ 54 | }\ 55 | .ace-tomorrow-night .ace_constant.ace_character,\ 56 | .ace-tomorrow-night .ace_constant.ace_language,\ 57 | .ace-tomorrow-night .ace_constant.ace_numeric,\ 58 | .ace-tomorrow-night .ace_keyword.ace_other.ace_unit,\ 59 | .ace-tomorrow-night .ace_support.ace_constant,\ 60 | .ace-tomorrow-night .ace_variable.ace_parameter {\ 61 | color: #DE935F\ 62 | }\ 63 | .ace-tomorrow-night .ace_constant.ace_other {\ 64 | color: #CED1CF\ 65 | }\ 66 | .ace-tomorrow-night .ace_invalid {\ 67 | color: #CED2CF;\ 68 | background-color: #DF5F5F\ 69 | }\ 70 | .ace-tomorrow-night .ace_invalid.ace_deprecated {\ 71 | color: #CED2CF;\ 72 | background-color: #B798BF\ 73 | }\ 74 | .ace-tomorrow-night .ace_fold {\ 75 | background-color: #81A2BE;\ 76 | border-color: #C5C8C6\ 77 | }\ 78 | .ace-tomorrow-night .ace_entity.ace_name.ace_function,\ 79 | .ace-tomorrow-night .ace_support.ace_function,\ 80 | .ace-tomorrow-night .ace_variable {\ 81 | color: #81A2BE\ 82 | }\ 83 | .ace-tomorrow-night .ace_support.ace_class,\ 84 | .ace-tomorrow-night .ace_support.ace_type {\ 85 | color: #F0C674\ 86 | }\ 87 | .ace-tomorrow-night .ace_heading,\ 88 | .ace-tomorrow-night .ace_markup.ace_heading,\ 89 | .ace-tomorrow-night .ace_string {\ 90 | color: #B5BD68\ 91 | }\ 92 | .ace-tomorrow-night .ace_entity.ace_name.ace_tag,\ 93 | .ace-tomorrow-night .ace_entity.ace_other.ace_attribute-name,\ 94 | .ace-tomorrow-night .ace_meta.ace_tag,\ 95 | .ace-tomorrow-night .ace_string.ace_regexp,\ 96 | .ace-tomorrow-night .ace_variable {\ 97 | color: #CC6666\ 98 | }\ 99 | .ace-tomorrow-night .ace_comment {\ 100 | color: #969896\ 101 | }\ 102 | .ace-tomorrow-night .ace_indent-guide {\ 103 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYHB3d/8PAAOIAdULw8qMAAAAAElFTkSuQmCC) right repeat-y\ 104 | }"; 105 | 106 | var dom = require("../lib/dom"); 107 | dom.importCssString(exports.cssText, exports.cssClass); 108 | }); (function() { 109 | ace.require(["ace/theme/tomorrow_night"], function(m) { 110 | if (typeof module == "object" && typeof exports == "object" && module) { 111 | module.exports = m; 112 | } 113 | }); 114 | })(); 115 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/groovyconsole/clientlibs/js/theme-chrome.js: -------------------------------------------------------------------------------- 1 | ace.define("ace/theme/chrome",["require","exports","module","ace/lib/dom"], function(require, exports, module) { 2 | 3 | exports.isDark = false; 4 | exports.cssClass = "ace-chrome"; 5 | exports.cssText = ".ace-chrome .ace_gutter {\ 6 | background: #ebebeb;\ 7 | color: #333;\ 8 | overflow : hidden;\ 9 | }\ 10 | .ace-chrome .ace_print-margin {\ 11 | width: 1px;\ 12 | background: #e8e8e8;\ 13 | }\ 14 | .ace-chrome {\ 15 | background-color: #FFFFFF;\ 16 | color: black;\ 17 | }\ 18 | .ace-chrome .ace_cursor {\ 19 | color: black;\ 20 | }\ 21 | .ace-chrome .ace_invisible {\ 22 | color: rgb(191, 191, 191);\ 23 | }\ 24 | .ace-chrome .ace_constant.ace_buildin {\ 25 | color: rgb(88, 72, 246);\ 26 | }\ 27 | .ace-chrome .ace_constant.ace_language {\ 28 | color: rgb(88, 92, 246);\ 29 | }\ 30 | .ace-chrome .ace_constant.ace_library {\ 31 | color: rgb(6, 150, 14);\ 32 | }\ 33 | .ace-chrome .ace_invalid {\ 34 | background-color: rgb(153, 0, 0);\ 35 | color: white;\ 36 | }\ 37 | .ace-chrome .ace_fold {\ 38 | }\ 39 | .ace-chrome .ace_support.ace_function {\ 40 | color: rgb(60, 76, 114);\ 41 | }\ 42 | .ace-chrome .ace_support.ace_constant {\ 43 | color: rgb(6, 150, 14);\ 44 | }\ 45 | .ace-chrome .ace_support.ace_type,\ 46 | .ace-chrome .ace_support.ace_class\ 47 | .ace-chrome .ace_support.ace_other {\ 48 | color: rgb(109, 121, 222);\ 49 | }\ 50 | .ace-chrome .ace_variable.ace_parameter {\ 51 | font-style:italic;\ 52 | color:#FD971F;\ 53 | }\ 54 | .ace-chrome .ace_keyword.ace_operator {\ 55 | color: rgb(104, 118, 135);\ 56 | }\ 57 | .ace-chrome .ace_comment {\ 58 | color: #236e24;\ 59 | }\ 60 | .ace-chrome .ace_comment.ace_doc {\ 61 | color: #236e24;\ 62 | }\ 63 | .ace-chrome .ace_comment.ace_doc.ace_tag {\ 64 | color: #236e24;\ 65 | }\ 66 | .ace-chrome .ace_constant.ace_numeric {\ 67 | color: rgb(0, 0, 205);\ 68 | }\ 69 | .ace-chrome .ace_variable {\ 70 | color: rgb(49, 132, 149);\ 71 | }\ 72 | .ace-chrome .ace_xml-pe {\ 73 | color: rgb(104, 104, 91);\ 74 | }\ 75 | .ace-chrome .ace_entity.ace_name.ace_function {\ 76 | color: #0000A2;\ 77 | }\ 78 | .ace-chrome .ace_heading {\ 79 | color: rgb(12, 7, 255);\ 80 | }\ 81 | .ace-chrome .ace_list {\ 82 | color:rgb(185, 6, 144);\ 83 | }\ 84 | .ace-chrome .ace_marker-layer .ace_selection {\ 85 | background: rgb(181, 213, 255);\ 86 | }\ 87 | .ace-chrome .ace_marker-layer .ace_step {\ 88 | background: rgb(252, 255, 0);\ 89 | }\ 90 | .ace-chrome .ace_marker-layer .ace_stack {\ 91 | background: rgb(164, 229, 101);\ 92 | }\ 93 | .ace-chrome .ace_marker-layer .ace_bracket {\ 94 | margin: -1px 0 0 -1px;\ 95 | border: 1px solid rgb(192, 192, 192);\ 96 | }\ 97 | .ace-chrome .ace_marker-layer .ace_active-line {\ 98 | background: rgba(0, 0, 0, 0.07);\ 99 | }\ 100 | .ace-chrome .ace_gutter-active-line {\ 101 | background-color : #dcdcdc;\ 102 | }\ 103 | .ace-chrome .ace_marker-layer .ace_selected-word {\ 104 | background: rgb(250, 250, 255);\ 105 | border: 1px solid rgb(200, 200, 250);\ 106 | }\ 107 | .ace-chrome .ace_storage,\ 108 | .ace-chrome .ace_keyword,\ 109 | .ace-chrome .ace_meta.ace_tag {\ 110 | color: rgb(147, 15, 128);\ 111 | }\ 112 | .ace-chrome .ace_string.ace_regex {\ 113 | color: rgb(255, 0, 0)\ 114 | }\ 115 | .ace-chrome .ace_string {\ 116 | color: #1A1AA6;\ 117 | }\ 118 | .ace-chrome .ace_entity.ace_other.ace_attribute-name {\ 119 | color: #994409;\ 120 | }\ 121 | .ace-chrome .ace_indent-guide {\ 122 | background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==\") right repeat-y;\ 123 | }\ 124 | "; 125 | 126 | var dom = require("../lib/dom"); 127 | dom.importCssString(exports.cssText, exports.cssClass); 128 | }); (function() { 129 | ace.require(["ace/theme/chrome"], function(m) { 130 | if (typeof module == "object" && typeof exports == "object" && module) { 131 | module.exports = m; 132 | } 133 | }); 134 | })(); 135 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/groovyconsole/clientlibs/js/theme-crimson_editor.js: -------------------------------------------------------------------------------- 1 | ace.define("ace/theme/crimson_editor",["require","exports","module","ace/lib/dom"], function(require, exports, module) { 2 | exports.isDark = false; 3 | exports.cssText = ".ace-crimson-editor .ace_gutter {\ 4 | background: #ebebeb;\ 5 | color: #333;\ 6 | overflow : hidden;\ 7 | }\ 8 | .ace-crimson-editor .ace_gutter-layer {\ 9 | width: 100%;\ 10 | text-align: right;\ 11 | }\ 12 | .ace-crimson-editor .ace_print-margin {\ 13 | width: 1px;\ 14 | background: #e8e8e8;\ 15 | }\ 16 | .ace-crimson-editor {\ 17 | background-color: #FFFFFF;\ 18 | color: rgb(64, 64, 64);\ 19 | }\ 20 | .ace-crimson-editor .ace_cursor {\ 21 | color: black;\ 22 | }\ 23 | .ace-crimson-editor .ace_invisible {\ 24 | color: rgb(191, 191, 191);\ 25 | }\ 26 | .ace-crimson-editor .ace_identifier {\ 27 | color: black;\ 28 | }\ 29 | .ace-crimson-editor .ace_keyword {\ 30 | color: blue;\ 31 | }\ 32 | .ace-crimson-editor .ace_constant.ace_buildin {\ 33 | color: rgb(88, 72, 246);\ 34 | }\ 35 | .ace-crimson-editor .ace_constant.ace_language {\ 36 | color: rgb(255, 156, 0);\ 37 | }\ 38 | .ace-crimson-editor .ace_constant.ace_library {\ 39 | color: rgb(6, 150, 14);\ 40 | }\ 41 | .ace-crimson-editor .ace_invalid {\ 42 | text-decoration: line-through;\ 43 | color: rgb(224, 0, 0);\ 44 | }\ 45 | .ace-crimson-editor .ace_fold {\ 46 | }\ 47 | .ace-crimson-editor .ace_support.ace_function {\ 48 | color: rgb(192, 0, 0);\ 49 | }\ 50 | .ace-crimson-editor .ace_support.ace_constant {\ 51 | color: rgb(6, 150, 14);\ 52 | }\ 53 | .ace-crimson-editor .ace_support.ace_type,\ 54 | .ace-crimson-editor .ace_support.ace_class {\ 55 | color: rgb(109, 121, 222);\ 56 | }\ 57 | .ace-crimson-editor .ace_keyword.ace_operator {\ 58 | color: rgb(49, 132, 149);\ 59 | }\ 60 | .ace-crimson-editor .ace_string {\ 61 | color: rgb(128, 0, 128);\ 62 | }\ 63 | .ace-crimson-editor .ace_comment {\ 64 | color: rgb(76, 136, 107);\ 65 | }\ 66 | .ace-crimson-editor .ace_comment.ace_doc {\ 67 | color: rgb(0, 102, 255);\ 68 | }\ 69 | .ace-crimson-editor .ace_comment.ace_doc.ace_tag {\ 70 | color: rgb(128, 159, 191);\ 71 | }\ 72 | .ace-crimson-editor .ace_constant.ace_numeric {\ 73 | color: rgb(0, 0, 64);\ 74 | }\ 75 | .ace-crimson-editor .ace_variable {\ 76 | color: rgb(0, 64, 128);\ 77 | }\ 78 | .ace-crimson-editor .ace_xml-pe {\ 79 | color: rgb(104, 104, 91);\ 80 | }\ 81 | .ace-crimson-editor .ace_marker-layer .ace_selection {\ 82 | background: rgb(181, 213, 255);\ 83 | }\ 84 | .ace-crimson-editor .ace_marker-layer .ace_step {\ 85 | background: rgb(252, 255, 0);\ 86 | }\ 87 | .ace-crimson-editor .ace_marker-layer .ace_stack {\ 88 | background: rgb(164, 229, 101);\ 89 | }\ 90 | .ace-crimson-editor .ace_marker-layer .ace_bracket {\ 91 | margin: -1px 0 0 -1px;\ 92 | border: 1px solid rgb(192, 192, 192);\ 93 | }\ 94 | .ace-crimson-editor .ace_marker-layer .ace_active-line {\ 95 | background: rgb(232, 242, 254);\ 96 | }\ 97 | .ace-crimson-editor .ace_gutter-active-line {\ 98 | background-color : #dcdcdc;\ 99 | }\ 100 | .ace-crimson-editor .ace_meta.ace_tag {\ 101 | color:rgb(28, 2, 255);\ 102 | }\ 103 | .ace-crimson-editor .ace_marker-layer .ace_selected-word {\ 104 | background: rgb(250, 250, 255);\ 105 | border: 1px solid rgb(200, 200, 250);\ 106 | }\ 107 | .ace-crimson-editor .ace_string.ace_regex {\ 108 | color: rgb(192, 0, 192);\ 109 | }\ 110 | .ace-crimson-editor .ace_indent-guide {\ 111 | background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==\") right repeat-y;\ 112 | }"; 113 | 114 | exports.cssClass = "ace-crimson-editor"; 115 | 116 | var dom = require("../lib/dom"); 117 | dom.importCssString(exports.cssText, exports.cssClass); 118 | }); (function() { 119 | ace.require(["ace/theme/crimson_editor"], function(m) { 120 | if (typeof module == "object" && typeof exports == "object" && module) { 121 | module.exports = m; 122 | } 123 | }); 124 | })(); 125 | --------------------------------------------------------------------------------