CID15 / aem-groovy-console

The AEM Groovy Console provides an interface for running Groovy scripts in the AEM container. Scripts can be created to manipulate content in the JCR, call OSGi services, or execute arbitrary code using the CQ, Sling, or JCR APIs.
Other
26 stars 16 forks source link

Don't include /var in packages #4

Open kwin opened 3 years ago

kwin commented 3 years ago

Move samples from /var to /apps Set up ACLs and service users via repoinit

This closes #1

kwin commented 3 years ago

What is still missing is adjustments in the actual UI to make sure scripts in /apps/groovyconsole/samples can be selected.

bartosz-wesolowski-wttech commented 3 years ago

I wonder whether the apps is the correct location for sample scripts in context of open script and save script dialogs. Currently both dialogs works on the same path (var/groovyconsole/scripts) that is:

That set up allows to keep project related groovy scripts under /var/groovyconsole/scripts/project-name and then easily select them via path browser.

I have few ideas to make it work in the same manner for AEM as a Cloud Service:

  1. Move sample scripts under /conf/groovyconsole/scripts/samples and alter logic to use /conf/groovyconsole/scripts directory to store manually saved scripts. Also update root path for the Open script dialog to /conf/groovyconsole/scripts.
  2. Keep all groovy scripts (samples + custom project) under /apps and update the the path browser accordingly (/apps as root path) + ignore the fact that manually saved script will not be available via browser (I guess this functionality is rarely used and will not be popular for AEM in cloud)
  3. Change the path browser root directory to root / and keep the rest as is. User experience will not be as good but it will make it more flexible.

I tried to implement the last idea but I have a hard time to configure the Classic UI widget to use use / as root - but i guess it should be possible.

Personally I would choose the second approach but I wonder what do you think :)

Cheers, Bartek