Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update master after release 4.3.1 #322

Merged
merged 76 commits into from
Apr 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
485769f
[maven-release-plugin] prepare for next development iteration
Nov 23, 2023
62a44f8
add 'search by node name' predefined query
stoerr Dec 7, 2023
a4319a1
closes #308 set master branch automatically after release
stoerr Dec 7, 2023
4ee4360
closes #316 return all restrictions if there are multiple restrictions
stoerr Dec 7, 2023
af0df5c
Merge pull request #317 from ist-dresden/bugfix/316-acl-viewer-issue-…
stoerr Dec 7, 2023
f35f1a7
very raw frame for initial caconfig view
stoerr Dec 20, 2023
9e1d617
raw partial display of configuration
stoerr Dec 21, 2023
ec7b649
display collections as well
stoerr Dec 21, 2023
fa45364
moving towards bootstrap design
stoerr Dec 21, 2023
b640643
partial layout of single configurations
stoerr Dec 22, 2023
2e34ab6
only show ca view where it is appropriate
stoerr Dec 22, 2023
b4643cf
partial layout for collection configurations
stoerr Dec 22, 2023
7a8dd31
dispatch views
stoerr Dec 22, 2023
548b253
raw list
stoerr Jan 2, 2024
c55c21a
dependency fixes
stoerr Jan 4, 2024
bdd622e
bugfix: resize editor properly in groovy execution pane
stoerr Jan 4, 2024
ad6de05
browser: interpret properties that could be a path as path
stoerr Jan 10, 2024
fee824f
continuing configuration views
stoerr Jan 11, 2024
283bfb2
turn list configurations view into table
stoerr Jan 11, 2024
2550149
refactoring
stoerr Jan 11, 2024
0ba24e9
JSP refactoring 2 - move toolbar into the files and introduce detail…
stoerr Jan 11, 2024
d7b79c4
continue
stoerr Jan 11, 2024
d47114d
fixes
stoerr Jan 11, 2024
daf77f3
fix configuration view for single configurations
stoerr Jan 11, 2024
ca376de
fix configuration view for collection configuration items
stoerr Jan 11, 2024
6ce76bf
add short form of data to collectionView.jsp
stoerr Jan 11, 2024
37f5988
link locations in eff conf view
stoerr Jan 11, 2024
3a07870
yaml object dumper for easy viewing object hierarchies
stoerr Jan 16, 2024
ed6c829
how configuration inheritance
stoerr Jan 16, 2024
d3de848
display collection inheritance in effectiveConfigurationsView.jsp
stoerr Jan 16, 2024
f606f3f
insert data-path
stoerr Jan 17, 2024
5e9de64
fix listconfigurationsview
stoerr Jan 17, 2024
0577b4b
fix client library loading
stoerr Jan 17, 2024
49bf45f
functionality to create configuration nodes / configuration collecti…
stoerr Jan 22, 2024
79e1feb
implement adding / deleting configurations from list
stoerr Jan 22, 2024
746d905
refactoring - split toolbar / content
stoerr Jan 23, 2024
99fda80
refactoring: lazily loaded content
stoerr Jan 23, 2024
2527a18
make an (yet empty) dialog appear for caconfig properties
stoerr Jan 23, 2024
5a7d260
intermediate state
stoerr Jan 24, 2024
334ac71
basic frame for AI service
stoerr Jan 31, 2024
3cfe9f2
AI service primitive implementation
stoerr Jan 31, 2024
bf82918
display more details about the sling model
stoerr Feb 1, 2024
406f1b9
recycle property dialog javascript - works a bit
stoerr Feb 1, 2024
c039ca2
add reloading and fix null display
stoerr Feb 1, 2024
f438113
fixes
stoerr Feb 1, 2024
6d2fd37
display description; layout fix
stoerr Feb 1, 2024
fd669cf
use browser.setPath instead of href to change location
stoerr Feb 1, 2024
46f728d
fix multiple attribute values
stoerr Feb 1, 2024
bed9133
re #320 remove spaces from nodetype on creation since that'd lead to…
stoerr Feb 8, 2024
a81eddc
how required property in dialog
stoerr Feb 8, 2024
fd8bef0
display properties properly in dialog
stoerr Feb 8, 2024
f97473c
make mandatoriness violations red
stoerr Feb 8, 2024
dc2bdcf
bugfixes
stoerr Feb 8, 2024
a1c1cc9
Merge pull request #319 from ist-dresden/feature/caconfigbrowser
stoerr Feb 9, 2024
c434856
Update version to 4.3.0-SNAPSHOT Sling CA Config Editor added
invalid-email-address Feb 9, 2024
8fc1de5
add aigenerate dialog
stoerr Feb 9, 2024
c9afb6b
finish implementation of AI query generation
stoerr Feb 14, 2024
aeea910
ave state of popup
stoerr Feb 15, 2024
9e14d07
Merge pull request #321 JCR query generator
stoerr Feb 15, 2024
e0c15b4
remove model default configuration to make future changes easier
stoerr Feb 15, 2024
1aae0de
richtext trumbowyg autogrowOnEnter + urlProtocol ; try to trim rend…
stoerr May 25, 2023
f1beaf2
fix
stoerr Feb 15, 2024
50dfd6e
use autoInstallSinglePackage instead of autoInstallPackage for AEM in…
stoerr Feb 15, 2024
7652b0f
add aem aigenerate resource type
stoerr Feb 15, 2024
9c6d768
[maven-release-plugin] prepare release composum-nodes-4.3.0
Feb 15, 2024
475b7a0
[maven-release-plugin] prepare for next development iteration
Feb 15, 2024
30a79ec
experiment to avoid strange problem advancing master branch next time
stoerr Feb 15, 2024
83049c4
fix missing resourceType
stoerr Feb 16, 2024
02b9568
only display effective configurations if they aren't just defaults
stoerr Feb 16, 2024
cf557e8
fix configRef path lookup
stoerr Feb 16, 2024
ace6364
re #323 remove guava because that's not contained in Sling 12 anymore.
stoerr Feb 28, 2024
8336b38
Merge pull request #324 from ist-dresden/feature/323-composum-nodes-n…
stoerr Mar 21, 2024
8fc8477
fixing effective view in comparison to ConfigurationWebConsolePlugin…
stoerr Mar 21, 2024
d7a43d1
more fixes for configuration display
stoerr Mar 21, 2024
74b3bbb
Merge pull request #325 from ist-dresden/bugfix/caconfig
stoerr Mar 21, 2024
49ddfe3
[maven-release-plugin] prepare release composum-nodes-4.3.1
Mar 21, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions .github/workflows/createerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ jobs:

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 3

- name: print configuration
run: |
Expand Down Expand Up @@ -177,6 +175,16 @@ jobs:
pwd
$MVNCMD nexus-staging:drop

- name: Set master branch to released version
if: ${{ github.event.inputs.dryrun == 'false' }}
run: |
# we are now at the "prepare for next development iteration" commit, the commit with the release is the previous one.
# We need to set the master branch to that commit, and then push it.
git fetch --all
git branch temp develop~1
git push origin temp:master
git branch -d temp

- name: List target files even if recipe fails
if: always()
run: |
Expand Down
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ Servers
build
# Maven
target
# Groovy
.groovy
# some source repos
.svn
# File Vault
Expand Down
2 changes: 1 addition & 1 deletion commons/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.composum.nodes</groupId>
<artifactId>composum-nodes</artifactId>
<version>4.2.3</version>
<version>4.3.1</version>
</parent>

<artifactId>composum-nodes-commons</artifactId>
Expand Down
16 changes: 16 additions & 0 deletions commons/src/main/java/com/composum/sling/core/ResourceHandle.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,15 @@

import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import javax.annotation.Nonnull;
import javax.jcr.Node;
import javax.jcr.PropertyType;
import javax.jcr.RepositoryException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Collections;
import java.util.EnumMap;
import java.util.List;
import java.util.Map;
Expand Down Expand Up @@ -544,4 +547,17 @@ public Calendar getLastModified() {
return lastModified;
}

/**
* Returns the children as immutable list - sometimes better for iteration.
*/
@Nonnull
public List<Resource> getChildrenList() {
List<Resource> children = new ArrayList<>();
Iterable<Resource> rawChildren = super.getChildren();
if (rawChildren != null) {
rawChildren.forEach(children::add);
}
return Collections.unmodifiableList(children);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ public NodeParameters getFormParameters(SlingHttpServletRequest request) {
params.path = XSS.filter(request.getParameter(PARAM_PATH));
params.before = XSS.filter(request.getParameter(PARAM_BEFORE));
params.index = XSS.filter(request.getParameter(PARAM_INDEX));
params.type = XSS.filter(request.getParameter(PARAM_TYPE));
params.type = StringUtils.trim(XSS.filter(request.getParameter(PARAM_TYPE)));
params.title = XSS.filter(request.getParameter(PARAM_TITLE));
params.mimeType = XSS.filter(request.getParameter(PARAM_MIME_TYPE));
params.resourceType = XSS.filter(request.getParameter(PARAM_RESOURCE_TYPE));
Expand Down
20 changes: 12 additions & 8 deletions commons/src/main/java/com/composum/sling/core/util/JsonUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -858,18 +858,12 @@ public static String getValueTarget(@Nullable final Resource resource,
return target.getPath();
}
}
boolean checkAsRelativePath = false;
if (StringUtils.isNotBlank(name)) {
switch (name) {
case PROP_RESOURCE_TYPE:
case PROP_RESOURCE_SUPER_TYPE:
if (!value.startsWith("/")) {
for (String root : resolver.getSearchPath()) {
target = resolver.getResource(root + value);
if (target != null) {
return target.getPath();
}
}
}
checkAsRelativePath = true;
break;
case PROP_UUID:
break;
Expand All @@ -888,9 +882,19 @@ public static String getValueTarget(@Nullable final Resource resource,
} catch (Exception ignore) {
}
}
// heuristics whether it could be a path: it should contain at least a slash but no whitespace
checkAsRelativePath = value.contains("/") && !value.matches(".*\\s+.*");
break;
}
}
if (checkAsRelativePath) {
for (String root : resolver.getSearchPath()) {
target = resolver.getResource(root + value);
if (target != null) {
return target.getPath();
}
}
}
}
return null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@
import org.apache.sling.api.resource.Resource;
import org.apache.sling.api.resource.ResourceResolver;

import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.util.*;
import java.util.function.Function;
import java.util.stream.Stream;
import java.util.stream.StreamSupport;

import javax.annotation.Nonnull;
import javax.annotation.Nullable;

import groovyjarjarantlr4.v4.runtime.misc.NotNull;

/**
* A set of utility functions related to the handling of Sling Resources, without going down to JCR specifics.
Expand Down Expand Up @@ -173,7 +174,7 @@ public static Stream<Resource> descendantsStream(@Nullable Resource resource) {
* @param leafFilter if this returns true, this assumes the resource is a leaf and does not return it's descendants.
* @return a stream running through the resource and it's the descendants, not null
*/
@NotNull
@Nonnull
public static Stream<Resource> descendantsStream(@Nullable Resource resource,
@Nullable Function<Resource, Boolean> leafFilter) {
if (resource == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
this.ace.navigateFileStart();
}, this));
this.$el.resize(_.bind(this.resize, this));
this.$el.on('splitpaneresize', _.bind(this.resize, this));

this.$('.editor-toolbar .start-editing').click(_.bind(this.openEditDialog, this));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
editorSelector: '.rich-editor',
defaultOptions: {
semantic: true,
autogrowOnEnter: true,
urlProtocol: true,
btns: [
['bold', 'italic', 'underline', 'strikethrough', 'code'],
['superscript', 'subscript'], ['removeformat'],
Expand Down
19 changes: 18 additions & 1 deletion console/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.composum.nodes</groupId>
<artifactId>composum-nodes</artifactId>
<version>4.2.3</version>
<version>4.3.1</version>
</parent>

<artifactId>composum-nodes-console</artifactId>
Expand Down Expand Up @@ -85,6 +85,7 @@
<Import-Package>
org.apache.sling.api.resource.*;version="[2.10,3)",
org.apache.sling.spi.resource.*;version="[1.1,2]",
javax.annotation.*;version="[0,4)",
*
</Import-Package>
<Export-Package>
Expand Down Expand Up @@ -222,6 +223,18 @@
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.discovery.api</artifactId>
</dependency>
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.caconfig.api</artifactId>
</dependency>
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.caconfig.spi</artifactId>
</dependency>
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.caconfig.impl</artifactId>
</dependency>

<!-- JCR API, Jackrabbit -->
<dependency>
Expand Down Expand Up @@ -324,6 +337,10 @@
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
</dependency>

</dependencies>
<profiles>
Expand Down
56 changes: 56 additions & 0 deletions console/src/main/java/com/composum/sling/nodes/ai/AIService.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
package com.composum.sling.nodes.ai;

import java.io.IOException;

import javax.annotation.Nonnull;
import javax.annotation.Nullable;

/**
* AI related services.
*/
public interface AIService {

public static enum ResponseFormat {
TEXT,
/**
* Returns only json; important: the prompt must contain a request to return JSON!
*/
JSON
}

/**
* Whether the service is configured.
*/
boolean isAvailable();

/**
* Simplest AI related service: execute a prompt and return the response of the AI.
*
* @param systemprompt a system prompt to be used in addition to the prompt
* @param prompt the prompt to be used
* @param responseFormat the format of the response, default {@link ResponseFormat#TEXT}.
* @return the response of the AI
*/
@Nonnull
String prompt(@Nullable String systemprompt, @Nonnull String prompt, @Nullable ResponseFormat responseFormat) throws AIServiceException;

/**
* Something went wrong.
*/
public class AIServiceException extends Exception {
public AIServiceException(String message) {
super(message);
}

public AIServiceException(String message, IOException e) {
super(message, e);
}
}

public class AIServiceNotAvailableException extends AIServiceException {
public AIServiceNotAvailableException() {
super("AI Service not available");
}
}

}
Loading
Loading