This is an automated email from the ASF dual-hosted git repository. danhaywood pushed a commit to branch ISIS-3110 in repository https://gitbox.apache.org/repos/asf/isis.git
commit 48424716839091776faf640499efef164ece12f0 Author: Dan Haywood <[email protected]> AuthorDate: Thu Aug 4 17:16:14 2022 +0100 ISIS-3110: polishing --- .../applib/services/commanddto/HasCommandDto.java | 2 + .../applib/services/iactn/HasInteractionDto.java | 2 + .../manager/AuthorizationManager.java | 1 - examples/demo/.run/DemoAppWicketJpa.run.xml | 2 +- .../demoapp/dom/domain/_changes/ChangesVm.java | 85 ++++++++++++++++ ...va => ExposeCapturedChanges_recentChanges.java} | 8 +- .../demo/domain/src/main/resources/application.yml | 2 +- .../config/application-port9090.properties | 20 ++++ .../main/java/demoapp/web/DemoAppManifestJdo.java | 2 + .../main/java/demoapp/web/DemoAppManifestJpa.java | 3 + .../HasInteractionId_commandLogEntry.java | 5 +- .../HasUsername_recentCommandsByUser.java | 6 +- .../contributions/Object_recentCommands.java | 2 +- .../commandlog/applib/dom/CommandLogEntry.java | 1 + .../applib/dom/CommandLogEntry.layout.fallback.xml | 111 +++++++++++---------- .../applib/dom/CommandLogEntryRepository.java | 12 ++- .../commandlog/jdo/dom/CommandLogEntry.java | 8 ++ .../commandlog/jpa/dom/CommandLogEntry.java | 7 ++ .../HasInteractionId_executionLogEntries.java | 6 +- .../HasUsername_recentExecutionsByUser.java} | 26 ++--- .../dom/ExecutionLogEntry.layout.fallback.xml | 87 ++++++++-------- .../ExecutionLogEntry_siblingExecutions.java | 3 +- .../HasUsername_recentSessionsForUser.java | 4 +- .../applib/dom/SessionLogEntry.layout.fallback.xml | 23 +++-- .../applib/dom/SessionLogEntryRepository.java | 3 + .../asciidoc/applib/value/Converter.java | 26 ----- .../bootstrap/css/bootstrap-overrides-all-v2.css | 1 + 27 files changed, 298 insertions(+), 160 deletions(-) diff --git a/api/applib/src/main/java/org/apache/isis/applib/services/commanddto/HasCommandDto.java b/api/applib/src/main/java/org/apache/isis/applib/services/commanddto/HasCommandDto.java index c6d986ac30..1fb1617079 100644 --- a/api/applib/src/main/java/org/apache/isis/applib/services/commanddto/HasCommandDto.java +++ b/api/applib/src/main/java/org/apache/isis/applib/services/commanddto/HasCommandDto.java @@ -26,6 +26,7 @@ import java.lang.annotation.Target; import org.apache.isis.applib.annotation.Editing; import org.apache.isis.applib.annotation.Property; import org.apache.isis.applib.annotation.PropertyLayout; +import org.apache.isis.applib.annotation.ValueSemantics; /** * Objects implementing this interface will be processed automatically by @@ -40,6 +41,7 @@ public interface HasCommandDto { @PropertyLayout( multiLine = 9 ) + @ValueSemantics(provider = "pretty-render") @Target({ ElementType.METHOD, ElementType.FIELD, ElementType.PARAMETER, ElementType.ANNOTATION_TYPE }) @Retention(RetentionPolicy.RUNTIME) @interface CommandDtoAnnot { diff --git a/api/applib/src/main/java/org/apache/isis/applib/services/iactn/HasInteractionDto.java b/api/applib/src/main/java/org/apache/isis/applib/services/iactn/HasInteractionDto.java index 909fc68408..4d22248081 100644 --- a/api/applib/src/main/java/org/apache/isis/applib/services/iactn/HasInteractionDto.java +++ b/api/applib/src/main/java/org/apache/isis/applib/services/iactn/HasInteractionDto.java @@ -26,6 +26,7 @@ import java.lang.annotation.Target; import org.apache.isis.applib.annotation.Editing; import org.apache.isis.applib.annotation.Property; import org.apache.isis.applib.annotation.PropertyLayout; +import org.apache.isis.applib.annotation.ValueSemantics; public interface HasInteractionDto { @@ -35,6 +36,7 @@ public interface HasInteractionDto { @PropertyLayout( multiLine = 9 ) + @ValueSemantics(provider = "pretty-render") @Target({ ElementType.METHOD, ElementType.FIELD, ElementType.PARAMETER, ElementType.ANNOTATION_TYPE }) @Retention(RetentionPolicy.RUNTIME) @interface InteractionDtoAnnot { diff --git a/core/security/src/main/java/org/apache/isis/core/security/authorization/manager/AuthorizationManager.java b/core/security/src/main/java/org/apache/isis/core/security/authorization/manager/AuthorizationManager.java index d5b86f9ab4..78f07dcdb0 100644 --- a/core/security/src/main/java/org/apache/isis/core/security/authorization/manager/AuthorizationManager.java +++ b/core/security/src/main/java/org/apache/isis/core/security/authorization/manager/AuthorizationManager.java @@ -50,7 +50,6 @@ public class AuthorizationManager { @Inject public AuthorizationManager( final List<Authorizor> authorizors, - // TODO: elsewhere we inject an Optional<X>, should use the same technique throughout... @org.springframework.lang.Nullable final AuthorizorChooser authorizorChooser) { this.authorizors = authorizors; val authorizorPrecedenceChooserToUse = authorizorChooser != null diff --git a/examples/demo/.run/DemoAppWicketJpa.run.xml b/examples/demo/.run/DemoAppWicketJpa.run.xml index 85f254d347..f768659871 100644 --- a/examples/demo/.run/DemoAppWicketJpa.run.xml +++ b/examples/demo/.run/DemoAppWicketJpa.run.xml @@ -1,6 +1,6 @@ <component name="ProjectRunConfigurationManager"> <configuration default="false" name="DemoAppWicketJpa" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot"> - <option name="ACTIVE_PROFILES" /> + <option name="ACTIVE_PROFILES" value="port9090" /> <module name="demo-wicket-jpa" /> <option name="SHORTEN_COMMAND_LINE" value="ARGS_FILE" /> <option name="SPRING_BOOT_MAIN_CLASS" value="demoapp.webapp.wicket.jpa.DemoAppWicketJpa" /> diff --git a/examples/demo/domain/src/main/java/demoapp/dom/domain/_changes/ChangesVm.java b/examples/demo/domain/src/main/java/demoapp/dom/domain/_changes/ChangesVm.java new file mode 100644 index 0000000000..a4c2c92af0 --- /dev/null +++ b/examples/demo/domain/src/main/java/demoapp/dom/domain/_changes/ChangesVm.java @@ -0,0 +1,85 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package demoapp.dom.domain._changes; + +import java.time.LocalDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +import javax.inject.Named; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +import org.apache.isis.applib.annotation.Action; +import org.apache.isis.applib.annotation.ActionLayout; +import org.apache.isis.applib.annotation.Collection; +import org.apache.isis.applib.annotation.CollectionLayout; +import org.apache.isis.applib.annotation.DomainObject; +import org.apache.isis.applib.annotation.MemberSupport; +import org.apache.isis.applib.annotation.Nature; +import org.apache.isis.applib.annotation.ObjectSupport; +import org.apache.isis.applib.annotation.Property; +import org.apache.isis.applib.annotation.PropertyLayout; +import org.apache.isis.applib.annotation.SemanticsOf; +import org.apache.isis.applib.annotation.ValueSemantics; +import org.apache.isis.applib.jaxb.JavaTimeXMLGregorianCalendarMarshalling; +import org.apache.isis.applib.jaxb.JavaUtilJaxbAdapters; +import org.apache.isis.applib.util.JaxbUtil; +import org.apache.isis.applib.util.schema.ChangesDtoUtils; +import org.apache.isis.schema.chg.v2.ChangesDto; +import org.apache.isis.schema.common.v2.OidsDto; + +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import lombok.val; + +import demoapp.dom._infra.asciidocdesc.HasAsciiDocDescription; +import demoapp.dom.domain.actions.Action.associateWith.child.ActionAssociateWithChildVm; + +@XmlRootElement(name = "root") +@XmlType +@XmlAccessorType(XmlAccessType.FIELD) +@Named("demo.ChangesVm") +@DomainObject( + nature=Nature.VIEW_MODEL +) +@NoArgsConstructor +public class ChangesVm { + + public String title() { + int numCreated = changesDto.getObjects().getCreated().getOid().size(); + int numUpdated = changesDto.getObjects().getUpdated().getOid().size(); + int numDeleted = changesDto.getObjects().getDeleted().getOid().size(); + LocalDateTime completedAt = JavaTimeXMLGregorianCalendarMarshalling.toLocalDateTime(changesDto.getCompletedAt()); + return String.format("%s: %d created, %d updated, %d deleted", completedAt, numCreated, numUpdated, numDeleted); + } + + @ValueSemantics(provider = "pretty-render") + @Getter @Setter + private ChangesDto changesDto; + + public ChangesVm(ChangesDto dto) { + this.changesDto = dto; + } +} diff --git a/examples/demo/domain/src/main/java/demoapp/dom/domain/_changes/ExposeCapturedChanges_changes.java b/examples/demo/domain/src/main/java/demoapp/dom/domain/_changes/ExposeCapturedChanges_recentChanges.java similarity index 90% rename from examples/demo/domain/src/main/java/demoapp/dom/domain/_changes/ExposeCapturedChanges_changes.java rename to examples/demo/domain/src/main/java/demoapp/dom/domain/_changes/ExposeCapturedChanges_recentChanges.java index 59ee9b38b1..38a98ac3ff 100644 --- a/examples/demo/domain/src/main/java/demoapp/dom/domain/_changes/ExposeCapturedChanges_changes.java +++ b/examples/demo/domain/src/main/java/demoapp/dom/domain/_changes/ExposeCapturedChanges_recentChanges.java @@ -34,7 +34,7 @@ import lombok.val; //tag::class[] @Collection @RequiredArgsConstructor -public class ExposeCapturedChanges_changes { +public class ExposeCapturedChanges_recentChanges { // ... //end::class[] @@ -42,12 +42,12 @@ public class ExposeCapturedChanges_changes { private final ExposeCapturedChanges exposeCapturedChanges; @MemberSupport - @ValueSemantics(provider = "pretty-render") //tag::class[] - public List<ChangesDto> coll() { - val list = new LinkedList<ChangesDto>(); + public List<ChangesVm> coll() { + val list = new LinkedList<ChangesVm>(); entityChangesSubscriberToCaptureChangesInMemory .streamChangedEntities() + .map(ChangesVm::new) .forEach(list::push); // reverse order return list; } diff --git a/examples/demo/domain/src/main/resources/application.yml b/examples/demo/domain/src/main/resources/application.yml index a64074828d..679497e67e 100644 --- a/examples/demo/domain/src/main/resources/application.yml +++ b/examples/demo/domain/src/main/resources/application.yml @@ -107,7 +107,7 @@ isis: # schema auto creation etc. ... persistence: schema: - autoCreateSchemas: isisExtSecman,isisExtCommandLog,isisExtExecutionLog,demo + autoCreateSchemas: isisExtSecman,isisExtCommandLog,isisExtExecutionLog,isisExtExecutionOutbox,isisExtSessionLog,isisExtAuditTrail,demo extensions: secman: diff --git a/examples/demo/domain/src/main/resources/config/application-port9090.properties b/examples/demo/domain/src/main/resources/config/application-port9090.properties new file mode 100644 index 0000000000..a3e498f865 --- /dev/null +++ b/examples/demo/domain/src/main/resources/config/application-port9090.properties @@ -0,0 +1,20 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +server.port=9090 diff --git a/examples/demo/web/src/main/java/demoapp/web/DemoAppManifestJdo.java b/examples/demo/web/src/main/java/demoapp/web/DemoAppManifestJdo.java index 0b4c8c6713..599961d44a 100644 --- a/examples/demo/web/src/main/java/demoapp/web/DemoAppManifestJdo.java +++ b/examples/demo/web/src/main/java/demoapp/web/DemoAppManifestJdo.java @@ -24,6 +24,7 @@ import org.apache.isis.extensions.commandlog.jdo.IsisModuleExtCommandLogPersiste import org.apache.isis.extensions.executionlog.jdo.IsisModuleExtExecutionLogPersistenceJdo; import org.apache.isis.extensions.executionoutbox.jdo.IsisModuleExtExecutionOutboxPersistenceJdo; import org.apache.isis.extensions.secman.jdo.IsisModuleExtSecmanPersistenceJdo; +import org.apache.isis.extensions.sessionlog.jdo.IsisModuleExtSessionLogPersistenceJdo; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; @@ -40,6 +41,7 @@ import demoapp.dom.DemoModuleJdo; // Security Manager Extension (secman) IsisModuleExtSecmanPersistenceJdo.class, + IsisModuleExtSessionLogPersistenceJdo.class, IsisModuleExtCommandLogPersistenceJdo.class, IsisModuleExtExecutionLogPersistenceJdo.class, IsisModuleExtExecutionOutboxPersistenceJdo.class, diff --git a/examples/demo/web/src/main/java/demoapp/web/DemoAppManifestJpa.java b/examples/demo/web/src/main/java/demoapp/web/DemoAppManifestJpa.java index ecd4188761..3d5ba0ea9b 100644 --- a/examples/demo/web/src/main/java/demoapp/web/DemoAppManifestJpa.java +++ b/examples/demo/web/src/main/java/demoapp/web/DemoAppManifestJpa.java @@ -23,6 +23,8 @@ import org.apache.isis.extensions.commandlog.jpa.IsisModuleExtCommandLogPersiste import org.apache.isis.extensions.executionlog.jpa.IsisModuleExtExecutionLogPersistenceJpa; import org.apache.isis.extensions.executionoutbox.jpa.IsisModuleExtExecutionOutboxPersistenceJpa; import org.apache.isis.extensions.secman.jpa.IsisModuleExtSecmanPersistenceJpa; +import org.apache.isis.extensions.sessionlog.jpa.IsisModuleExtSessionLogPersistenceJpa; + import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; @@ -38,6 +40,7 @@ import demoapp.dom.DemoModuleJpa; // Security Manager Extension (secman) IsisModuleExtSecmanPersistenceJpa.class, + IsisModuleExtSessionLogPersistenceJpa.class, IsisModuleExtCommandLogPersistenceJpa.class, IsisModuleExtExecutionLogPersistenceJpa.class, IsisModuleExtExecutionOutboxPersistenceJpa.class, diff --git a/extensions/core/commandlog/applib/src/main/java/org/apache/isis/extensions/commandlog/applib/contributions/HasInteractionId_commandLogEntry.java b/extensions/core/commandlog/applib/src/main/java/org/apache/isis/extensions/commandlog/applib/contributions/HasInteractionId_commandLogEntry.java index 9961cb3ac7..646a02e90c 100644 --- a/extensions/core/commandlog/applib/src/main/java/org/apache/isis/extensions/commandlog/applib/contributions/HasInteractionId_commandLogEntry.java +++ b/extensions/core/commandlog/applib/src/main/java/org/apache/isis/extensions/commandlog/applib/contributions/HasInteractionId_commandLogEntry.java @@ -23,6 +23,7 @@ package org.apache.isis.extensions.commandlog.applib.contributions; import javax.inject.Inject; import javax.inject.Provider; +import org.apache.isis.applib.annotation.MemberSupport; import org.apache.isis.applib.annotation.Property; import org.apache.isis.applib.mixins.system.HasInteractionId; import org.apache.isis.applib.services.command.Command; @@ -48,7 +49,7 @@ public class HasInteractionId_commandLogEntry { extends IsisModuleExtCommandLogApplib.PropertyDomainEvent<HasInteractionId_commandLogEntry, CommandLogEntry> { } - public CommandLogEntry prop() { + @MemberSupport public CommandLogEntry prop() { return queryResultsCacheProvider.get().execute(this::doProp, getClass(), "prop"); } @@ -60,7 +61,7 @@ public class HasInteractionId_commandLogEntry { * Hide if the contributee is a {@link CommandLogEntry}, because we don't want to navigate to ourselves, and there * are other ways to navigate to the parent or child commands. */ - public boolean hideProp() { + @MemberSupport public boolean hideProp() { return (hasInteractionId instanceof CommandLogEntry); } diff --git a/extensions/core/commandlog/applib/src/main/java/org/apache/isis/extensions/commandlog/applib/contributions/HasUsername_recentCommandsByUser.java b/extensions/core/commandlog/applib/src/main/java/org/apache/isis/extensions/commandlog/applib/contributions/HasUsername_recentCommandsByUser.java index 7bc8064de9..10528cccbb 100644 --- a/extensions/core/commandlog/applib/src/main/java/org/apache/isis/extensions/commandlog/applib/contributions/HasUsername_recentCommandsByUser.java +++ b/extensions/core/commandlog/applib/src/main/java/org/apache/isis/extensions/commandlog/applib/contributions/HasUsername_recentCommandsByUser.java @@ -25,6 +25,7 @@ import javax.inject.Inject; import org.apache.isis.applib.annotation.Collection; import org.apache.isis.applib.annotation.CollectionLayout; +import org.apache.isis.applib.annotation.MemberSupport; import org.apache.isis.applib.mixins.security.HasUsername; import org.apache.isis.extensions.commandlog.applib.IsisModuleExtCommandLogApplib; import org.apache.isis.extensions.commandlog.applib.dom.CommandLogEntry; @@ -41,6 +42,7 @@ import lombok.val; ) @CollectionLayout( defaultView = "table", + paged = 5, sequence = "3" ) public class HasUsername_recentCommandsByUser { @@ -53,13 +55,13 @@ public class HasUsername_recentCommandsByUser { this.hasUsername = hasUsername; } - public List<? extends CommandLogEntry> coll() { + @MemberSupport public List<? extends CommandLogEntry> coll() { val username = hasUsername.getUsername(); return username != null ? commandLogEntryRepository.findRecentByUsername(username) : Collections.emptyList(); } - public boolean hideColl() { + @MemberSupport public boolean hideColl() { return hasUsername.getUsername() == null; } diff --git a/extensions/core/commandlog/applib/src/main/java/org/apache/isis/extensions/commandlog/applib/contributions/Object_recentCommands.java b/extensions/core/commandlog/applib/src/main/java/org/apache/isis/extensions/commandlog/applib/contributions/Object_recentCommands.java index 8438b6e94e..ba1dea549d 100644 --- a/extensions/core/commandlog/applib/src/main/java/org/apache/isis/extensions/commandlog/applib/contributions/Object_recentCommands.java +++ b/extensions/core/commandlog/applib/src/main/java/org/apache/isis/extensions/commandlog/applib/contributions/Object_recentCommands.java @@ -67,7 +67,7 @@ public class Object_recentCommands { @MemberSupport public List<? extends CommandLogEntry> act() { return bookmarkService.bookmarkFor(domainObject) - .map(commandLogEntryRepository::findRecentByTarget) + .map(commandLogEntryRepository::findRecentByTargetOrResult) .orElse(Collections.emptyList()); } diff --git a/extensions/core/commandlog/applib/src/main/java/org/apache/isis/extensions/commandlog/applib/dom/CommandLogEntry.java b/extensions/core/commandlog/applib/src/main/java/org/apache/isis/extensions/commandlog/applib/dom/CommandLogEntry.java index 3e1bedd8c3..a52aaea8d2 100644 --- a/extensions/core/commandlog/applib/src/main/java/org/apache/isis/extensions/commandlog/applib/dom/CommandLogEntry.java +++ b/extensions/core/commandlog/applib/src/main/java/org/apache/isis/extensions/commandlog/applib/dom/CommandLogEntry.java @@ -118,6 +118,7 @@ implements Comparable<CommandLogEntry>, DomainChangeRecord, HasCommandDto { public static final String FIND_CURRENT = LOGICAL_TYPE_NAME + ".findCurrent"; public static final String FIND_COMPLETED = LOGICAL_TYPE_NAME + ".findCompleted"; public static final String FIND_RECENT_BY_TARGET = LOGICAL_TYPE_NAME + ".findRecentByTarget"; + public static final String FIND_RECENT_BY_TARGET_OR_RESULT = LOGICAL_TYPE_NAME + ".findRecentByTargetOrResult"; public static final String FIND_BY_TARGET_AND_TIMESTAMP_BETWEEN = LOGICAL_TYPE_NAME + ".findByTargetAndTimestampBetween"; public static final String FIND_BY_TARGET_AND_TIMESTAMP_AFTER = LOGICAL_TYPE_NAME + ".findByTargetAndTimestampAfter"; public static final String FIND_BY_TARGET_AND_TIMESTAMP_BEFORE = LOGICAL_TYPE_NAME + ".findByTargetAndTimestampBefore"; diff --git a/extensions/core/commandlog/applib/src/main/java/org/apache/isis/extensions/commandlog/applib/dom/CommandLogEntry.layout.fallback.xml b/extensions/core/commandlog/applib/src/main/java/org/apache/isis/extensions/commandlog/applib/dom/CommandLogEntry.layout.fallback.xml index 8ea038505b..0abef03d20 100644 --- a/extensions/core/commandlog/applib/src/main/java/org/apache/isis/extensions/commandlog/applib/dom/CommandLogEntry.layout.fallback.xml +++ b/extensions/core/commandlog/applib/src/main/java/org/apache/isis/extensions/commandlog/applib/dom/CommandLogEntry.layout.fallback.xml @@ -26,65 +26,66 @@ </bs3:col> </bs3:row> <bs3:row> - <bs3:col span="4"> - <bs3:row> - <bs3:col span="12"> - <cpt:fieldSet name="Identifiers" id="identifiers"> - <cpt:action id="clearHints" position="PANEL"/> - <cpt:action id="rebuildMetamodel" position="PANEL_DROPDOWN"/> - <cpt:action id="inspectMetamodel" position="PANEL_DROPDOWN"/> - <cpt:action id="downloadMetamodelXml" position="PANEL_DROPDOWN"/> - <cpt:action id="downloadLayoutXml" position="PANEL_DROPDOWN"/> - <cpt:action id="downloadJdoMetadata" position="PANEL_DROPDOWN"/> - <cpt:action id="recentCommands" position="PANEL_DROPDOWN"/> - <cpt:action id="recentExecutions" position="PANEL_DROPDOWN"/> - <cpt:action id="recentAuditTrailEntries" position="PANEL_DROPDOWN"/> - <cpt:action id="openRestApi" position="PANEL_DROPDOWN"/> - <cpt:property id="interactionId"/> - <cpt:property id="type"/> - </cpt:fieldSet> - <cpt:fieldSet name="Target" id="target"> - <cpt:property id="target"/> - <cpt:property id="targetLogicalTypeName"/> - <cpt:property id="logicalMemberIdentifier"/> - </cpt:fieldSet> - <cpt:fieldSet name="Who and When"> - <cpt:property id="username"/> - <cpt:property id="timestamp"/> - </cpt:fieldSet> - <cpt:fieldSet name="Other" id="other" unreferencedProperties="true"/> - </bs3:col> - </bs3:row> + <bs3:col span="3"> + <bs3:tabGroup> + <bs3:tab name="Identity"> + <bs3:row> + <bs3:col span="12"> + <cpt:fieldSet name="Identity" id="identity"> + <cpt:property id="interactionId"/> + <cpt:property id="type"/> + </cpt:fieldSet> + </bs3:col> + </bs3:row> + </bs3:tab> + <bs3:tab name="Metadata"> + <bs3:row> + <bs3:col span="12"> + <cpt:fieldSet name="Metadata" id="metadata"/> + </bs3:col> + </bs3:row> + </bs3:tab> + </bs3:tabGroup> + <cpt:fieldSet name="Target" id="target"> + <cpt:property id="target"/> + <cpt:property id="targetLogicalTypeName"> + <cpt:named>Logical Type Name</cpt:named> + </cpt:property> + <cpt:property id="logicalMemberIdentifier"> + <cpt:named>member Identifier</cpt:named> + </cpt:property> + </cpt:fieldSet> + <cpt:fieldSet name="Who and When"> + <cpt:property id="username"/> + <cpt:property id="timestamp"/> + </cpt:fieldSet> </bs3:col> - <bs3:col span="4"> + <bs3:col span="6"> <cpt:fieldSet name="Command DTO" id="commandDto"> - <cpt:property id="commandDto" labelPosition="NONE" multiLine="20"/> + <cpt:property id="commandDto" multiLine="30" labelPosition="TOP"/> </cpt:fieldSet> </bs3:col> - <bs3:col span="4"> - <bs3:row> - <bs3:col span="12"> - <cpt:fieldSet name="Execution" id="execution"> - <cpt:action id="retry" cssClassFa="fa-repeat" cssClass="btn-warning"/> - <cpt:action id="exclude" cssClassFa="fa-ban" cssClass="btn-warning"/> - <cpt:property id="executeIn"/> - <cpt:property id="parent"/> - <cpt:property id="replayState"/> - <cpt:property id="replayStateFailureReason"/> - </cpt:fieldSet> - <cpt:fieldSet name="Timings" id="timings"> - <cpt:property id="startedAt"/> - <cpt:property id="completedAt"/> - <cpt:property id="duration"/> - <cpt:property id="complete"/> - </cpt:fieldSet> - <cpt:fieldSet name="Results" id="results"> - <cpt:property id="resultSummary"/> - <cpt:property id="result"/> - <cpt:property id="exception" labelPosition="TOP"/> - </cpt:fieldSet> - </bs3:col> - </bs3:row> + <bs3:col span="3"> + <cpt:fieldSet name="Execution" id="execution"> + <cpt:action id="retry" cssClassFa="fa-repeat" cssClass="btn-warning"/> + <cpt:action id="exclude" cssClassFa="fa-ban" cssClass="btn-warning"/> + <cpt:property id="executeIn"/> + <cpt:property id="parent"/> + <cpt:property id="replayState"/> + <cpt:property id="replayStateFailureReason"/> + </cpt:fieldSet> + <cpt:fieldSet name="Timings" id="timings"> + <cpt:property id="startedAt"/> + <cpt:property id="completedAt"/> + <cpt:property id="duration"/> + <cpt:property id="complete"/> + </cpt:fieldSet> + <cpt:fieldSet name="Results" id="results"> + <cpt:property id="resultSummary"/> + <cpt:property id="result"/> + <cpt:property id="exception" labelPosition="TOP"/> + </cpt:fieldSet> + <cpt:fieldSet name="Other" id="other" unreferencedProperties="true"/> </bs3:col> </bs3:row> <bs3:row> diff --git a/extensions/core/commandlog/applib/src/main/java/org/apache/isis/extensions/commandlog/applib/dom/CommandLogEntryRepository.java b/extensions/core/commandlog/applib/src/main/java/org/apache/isis/extensions/commandlog/applib/dom/CommandLogEntryRepository.java index fbc603c489..f4a139a48d 100644 --- a/extensions/core/commandlog/applib/src/main/java/org/apache/isis/extensions/commandlog/applib/dom/CommandLogEntryRepository.java +++ b/extensions/core/commandlog/applib/src/main/java/org/apache/isis/extensions/commandlog/applib/dom/CommandLogEntryRepository.java @@ -181,7 +181,17 @@ public abstract class CommandLogEntryRepository<C extends CommandLogEntry> { public List<C> findRecentByTarget(final Bookmark target) { return repositoryService().allMatches( Query.named(commandLogEntryClass, CommandLogEntry.Nq.FIND_RECENT_BY_TARGET) - .withParameter("target", target)); + .withParameter("target", target) + .withLimit(30L) + ); + } + + public List<C> findRecentByTargetOrResult(final Bookmark targetOrResult) { + return repositoryService().allMatches( + Query.named(commandLogEntryClass, CommandLogEntry.Nq.FIND_RECENT_BY_TARGET_OR_RESULT) + .withParameter("targetOrResult", targetOrResult) + .withLimit(30L) + ); } diff --git a/extensions/core/commandlog/persistence-jdo/src/main/java/org/apache/isis/extensions/commandlog/jdo/dom/CommandLogEntry.java b/extensions/core/commandlog/persistence-jdo/src/main/java/org/apache/isis/extensions/commandlog/jdo/dom/CommandLogEntry.java index 85c9432994..176145e2d7 100644 --- a/extensions/core/commandlog/persistence-jdo/src/main/java/org/apache/isis/extensions/commandlog/jdo/dom/CommandLogEntry.java +++ b/extensions/core/commandlog/persistence-jdo/src/main/java/org/apache/isis/extensions/commandlog/jdo/dom/CommandLogEntry.java @@ -67,6 +67,14 @@ import lombok.Setter; + " WHERE target == :target " + " ORDER BY this.timestamp DESC " + " RANGE 0,30"), + @Query( + name = Nq.FIND_RECENT_BY_TARGET_OR_RESULT, + value = "SELECT " + + " FROM " + CommandLogEntry.FQCN + " " + + " WHERE target == :targetOrResult " + + " || result == :targetOrResult " + + " ORDER BY this.timestamp DESC " + + " RANGE 0,30"), @Query( name = Nq.FIND_BY_TARGET_AND_TIMESTAMP_BETWEEN, value = "SELECT " diff --git a/extensions/core/commandlog/persistence-jpa/src/main/java/org/apache/isis/extensions/commandlog/jpa/dom/CommandLogEntry.java b/extensions/core/commandlog/persistence-jpa/src/main/java/org/apache/isis/extensions/commandlog/jpa/dom/CommandLogEntry.java index f97f9ab4eb..a86eedd845 100644 --- a/extensions/core/commandlog/persistence-jpa/src/main/java/org/apache/isis/extensions/commandlog/jpa/dom/CommandLogEntry.java +++ b/extensions/core/commandlog/persistence-jpa/src/main/java/org/apache/isis/extensions/commandlog/jpa/dom/CommandLogEntry.java @@ -97,6 +97,13 @@ import lombok.Setter; + " FROM CommandLogEntry cl " + " WHERE cl.target = :target " + " ORDER BY cl.timestamp DESC"), // programmatic LIMIT 30 + @NamedQuery( + name = Nq.FIND_RECENT_BY_TARGET_OR_RESULT, + query = "SELECT cl " + + " FROM CommandLogEntry cl " + + " WHERE cl.target = :targetOrResult " + + " OR cl.result = :targetOrResult " + + " ORDER BY cl.timestamp DESC"), // programmatic LIMIT 30 @NamedQuery( name = Nq.FIND_BY_TARGET_AND_TIMESTAMP_BETWEEN, query = "SELECT cl " diff --git a/extensions/core/executionlog/applib/src/main/java/org/apache/isis/extensions/executionlog/applib/contributions/HasInteractionId_executionLogEntries.java b/extensions/core/executionlog/applib/src/main/java/org/apache/isis/extensions/executionlog/applib/contributions/HasInteractionId_executionLogEntries.java index 9c3b783c77..15984fd8ff 100644 --- a/extensions/core/executionlog/applib/src/main/java/org/apache/isis/extensions/executionlog/applib/contributions/HasInteractionId_executionLogEntries.java +++ b/extensions/core/executionlog/applib/src/main/java/org/apache/isis/extensions/executionlog/applib/contributions/HasInteractionId_executionLogEntries.java @@ -23,6 +23,7 @@ import java.util.List; import javax.inject.Inject; import org.apache.isis.applib.annotation.Collection; +import org.apache.isis.applib.annotation.MemberSupport; import org.apache.isis.applib.mixins.system.HasInteractionId; import org.apache.isis.extensions.executionlog.applib.IsisModuleExtExecutionLogApplib; import org.apache.isis.extensions.executionlog.applib.dom.ExecutionLogEntry; @@ -44,12 +45,11 @@ public class HasInteractionId_executionLogEntries { public static class CollectionDomainEvent extends IsisModuleExtExecutionLogApplib.CollectionDomainEvent<HasInteractionId_executionLogEntries, ExecutionLogEntry> { } - - public List<? extends ExecutionLogEntry> act() { + @MemberSupport public List<? extends ExecutionLogEntry> coll() { return executionLogEntryRepository.findByInteractionId(hasInteractionId.getInteractionId()); } - public boolean hideAct() { + @MemberSupport public boolean hideColl() { // for the ELE itself, we provide the 'siblingExecutions' mixin. return hasInteractionId instanceof ExecutionLogEntry; } diff --git a/extensions/core/commandlog/applib/src/main/java/org/apache/isis/extensions/commandlog/applib/contributions/HasUsername_recentCommandsByUser.java b/extensions/core/executionlog/applib/src/main/java/org/apache/isis/extensions/executionlog/applib/contributions/HasUsername_recentExecutionsByUser.java similarity index 60% copy from extensions/core/commandlog/applib/src/main/java/org/apache/isis/extensions/commandlog/applib/contributions/HasUsername_recentCommandsByUser.java copy to extensions/core/executionlog/applib/src/main/java/org/apache/isis/extensions/executionlog/applib/contributions/HasUsername_recentExecutionsByUser.java index 7bc8064de9..4a7ad1f661 100644 --- a/extensions/core/commandlog/applib/src/main/java/org/apache/isis/extensions/commandlog/applib/contributions/HasUsername_recentCommandsByUser.java +++ b/extensions/core/executionlog/applib/src/main/java/org/apache/isis/extensions/executionlog/applib/contributions/HasUsername_recentExecutionsByUser.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.isis.extensions.commandlog.applib.contributions; +package org.apache.isis.extensions.executionlog.applib.contributions; import java.util.Collections; import java.util.List; @@ -25,10 +25,11 @@ import javax.inject.Inject; import org.apache.isis.applib.annotation.Collection; import org.apache.isis.applib.annotation.CollectionLayout; +import org.apache.isis.applib.annotation.MemberSupport; import org.apache.isis.applib.mixins.security.HasUsername; -import org.apache.isis.extensions.commandlog.applib.IsisModuleExtCommandLogApplib; -import org.apache.isis.extensions.commandlog.applib.dom.CommandLogEntry; -import org.apache.isis.extensions.commandlog.applib.dom.CommandLogEntryRepository; +import org.apache.isis.extensions.executionlog.applib.IsisModuleExtExecutionLogApplib; +import org.apache.isis.extensions.executionlog.applib.dom.ExecutionLogEntry; +import org.apache.isis.extensions.executionlog.applib.dom.ExecutionLogEntryRepository; import lombok.val; @@ -37,31 +38,32 @@ import lombok.val; * @since 2.0 {@index} */ @Collection( - domainEvent = HasUsername_recentCommandsByUser.CollectionDomainEvent.class + domainEvent = HasUsername_recentExecutionsByUser.CollectionDomainEvent.class ) @CollectionLayout( defaultView = "table", + paged = 5, sequence = "3" ) -public class HasUsername_recentCommandsByUser { +public class HasUsername_recentExecutionsByUser { public static class CollectionDomainEvent - extends IsisModuleExtCommandLogApplib.CollectionDomainEvent<HasUsername_recentCommandsByUser, CommandLogEntry> { } + extends IsisModuleExtExecutionLogApplib.CollectionDomainEvent<HasUsername_recentExecutionsByUser, ExecutionLogEntry> { } private final HasUsername hasUsername; - public HasUsername_recentCommandsByUser(final HasUsername hasUsername) { + public HasUsername_recentExecutionsByUser(final HasUsername hasUsername) { this.hasUsername = hasUsername; } - public List<? extends CommandLogEntry> coll() { + @MemberSupport public List<? extends ExecutionLogEntry> coll() { val username = hasUsername.getUsername(); return username != null - ? commandLogEntryRepository.findRecentByUsername(username) + ? executionLogEntryRepository.findRecentByUsername(username) : Collections.emptyList(); } - public boolean hideColl() { + @MemberSupport public boolean hideColl() { return hasUsername.getUsername() == null; } - @Inject CommandLogEntryRepository<? extends CommandLogEntry> commandLogEntryRepository; + @Inject ExecutionLogEntryRepository<? extends ExecutionLogEntry> executionLogEntryRepository; } diff --git a/extensions/core/executionlog/applib/src/main/java/org/apache/isis/extensions/executionlog/applib/dom/ExecutionLogEntry.layout.fallback.xml b/extensions/core/executionlog/applib/src/main/java/org/apache/isis/extensions/executionlog/applib/dom/ExecutionLogEntry.layout.fallback.xml index 887d2dee14..50c5ff8819 100644 --- a/extensions/core/executionlog/applib/src/main/java/org/apache/isis/extensions/executionlog/applib/dom/ExecutionLogEntry.layout.fallback.xml +++ b/extensions/core/executionlog/applib/src/main/java/org/apache/isis/extensions/executionlog/applib/dom/ExecutionLogEntry.layout.fallback.xml @@ -16,51 +16,58 @@ </bs3:col> </bs3:row> <bs3:row> - <bs3:col span="4"> - <bs3:row> - <bs3:col span="12"> - <cpt:fieldSet name="Identifiers" id="identifiers" unreferencedProperties="true"> - <cpt:action id="clearHints" position="PANEL"/> - <cpt:action id="rebuildMetamodel" position="PANEL_DROPDOWN"/> - <cpt:action id="inspectMetamodel" position="PANEL_DROPDOWN"/> - <cpt:action id="downloadMetamodelXml" position="PANEL_DROPDOWN"/> - <cpt:action id="downloadLayoutXml" position="PANEL_DROPDOWN"/> - <cpt:action id="downloadJdoMetadata" position="PANEL_DROPDOWN"/> - <cpt:action id="recentCommands" position="PANEL_DROPDOWN"/> - <cpt:action id="recentExecutions" position="PANEL_DROPDOWN"/> - <cpt:action id="recentAuditTrailEntries" position="PANEL_DROPDOWN"/> - <cpt:action id="openRestApi" position="PANEL_DROPDOWN"/> - <cpt:property id="interactionId"> - <!-- if executionrepublisher module included --> - <cpt:action id="copyToOutbox"/> - </cpt:property> - <cpt:property id="sequence"/> - <cpt:property id="type"/> - </cpt:fieldSet> - <cpt:fieldSet name="Target" id="target"> - <cpt:property id="target"/> - <cpt:property id="targetLogicalTypeName"/> - <cpt:property id="logicalMemberIdentifier"/> - <cpt:property id="executionType"/> - </cpt:fieldSet> - <cpt:fieldSet name="Who and When"> - <cpt:property id="username"/> - <cpt:property id="timestamp"/> - </cpt:fieldSet> - <cpt:fieldSet name="Timings" id="timings"> - <cpt:property id="startedAt"/> - <cpt:property id="completedAt"/> - <cpt:property id="duration"/> - </cpt:fieldSet> - <cpt:fieldSet name="Other" id="other" unreferencedProperties="true"/> - </bs3:col> - </bs3:row> + <bs3:col span="3"> + <bs3:tabGroup> + <bs3:tab name="Identity"> + <bs3:row> + <bs3:col span="12"> + <cpt:fieldSet name="Identity" id="identity"> + <cpt:property id="interactionId"> + <!-- if executionoutbox module included --> + <cpt:action id="copyToOutbox"/> + </cpt:property> + <cpt:property id="sequence"/> + <cpt:property id="type"/> + </cpt:fieldSet> + </bs3:col> + </bs3:row> + </bs3:tab> + <bs3:tab name="Metadata"> + <bs3:row> + <bs3:col span="12"> + <cpt:fieldSet name="Metadata" id="metadata"/> + </bs3:col> + </bs3:row> + </bs3:tab> + </bs3:tabGroup> + <cpt:fieldSet name="Target" id="target"> + <cpt:property id="target"/> + <cpt:property id="targetLogicalTypeName"> + <cpt:named>Logical Type Name</cpt:named> + </cpt:property> + <cpt:property id="logicalMemberIdentifier"> + <cpt:named>member Identifier</cpt:named> + </cpt:property> + <cpt:property id="executionType"/> + </cpt:fieldSet> + <cpt:fieldSet name="Who and When"> + <cpt:property id="username"/> + <cpt:property id="timestamp"/> + </cpt:fieldSet> </bs3:col> - <bs3:col span="8"> + <bs3:col span="6"> <cpt:fieldSet name="Interaction DTO" id="interactionDto"> <cpt:property id="interactionDto" multiLine="30" labelPosition="TOP"/> </cpt:fieldSet> </bs3:col> + <bs3:col span="3"> + <cpt:fieldSet name="Timings" id="timings"> + <cpt:property id="startedAt"/> + <cpt:property id="completedAt"/> + <cpt:property id="duration"/> + </cpt:fieldSet> + <cpt:fieldSet name="Other" id="other" unreferencedProperties="true"/> + </bs3:col> </bs3:row> <bs3:row> <bs3:col span="12"> diff --git a/extensions/core/executionlog/applib/src/main/java/org/apache/isis/extensions/executionlog/applib/dom/mixins/ExecutionLogEntry_siblingExecutions.java b/extensions/core/executionlog/applib/src/main/java/org/apache/isis/extensions/executionlog/applib/dom/mixins/ExecutionLogEntry_siblingExecutions.java index 70204bf098..6f56d7211b 100644 --- a/extensions/core/executionlog/applib/src/main/java/org/apache/isis/extensions/executionlog/applib/dom/mixins/ExecutionLogEntry_siblingExecutions.java +++ b/extensions/core/executionlog/applib/src/main/java/org/apache/isis/extensions/executionlog/applib/dom/mixins/ExecutionLogEntry_siblingExecutions.java @@ -24,6 +24,7 @@ import javax.inject.Inject; import org.apache.isis.applib.annotation.Collection; +import org.apache.isis.applib.annotation.MemberSupport; import org.apache.isis.extensions.executionlog.applib.IsisModuleExtExecutionLogApplib; import org.apache.isis.extensions.executionlog.applib.dom.ExecutionLogEntry; import org.apache.isis.extensions.executionlog.applib.dom.ExecutionLogEntryRepository; @@ -43,7 +44,7 @@ public class ExecutionLogEntry_siblingExecutions { extends IsisModuleExtExecutionLogApplib.CollectionDomainEvent<ExecutionLogEntry_siblingExecutions, ExecutionLogEntry> { } - public List<ExecutionLogEntry> coll() { + @MemberSupport public List<ExecutionLogEntry> coll() { val entries = executionLogEntryRepository.findByInteractionId(executionLogEntry.getInteractionId()); entries.remove(executionLogEntry); return entries; diff --git a/extensions/security/sessionlog/applib/src/main/java/org/apache/isis/extensions/sessionlog/applib/contributions/HasUsername_recentSessionsForUser.java b/extensions/security/sessionlog/applib/src/main/java/org/apache/isis/extensions/sessionlog/applib/contributions/HasUsername_recentSessionsForUser.java index 93fb4ea29e..1c90b91849 100644 --- a/extensions/security/sessionlog/applib/src/main/java/org/apache/isis/extensions/sessionlog/applib/contributions/HasUsername_recentSessionsForUser.java +++ b/extensions/security/sessionlog/applib/src/main/java/org/apache/isis/extensions/sessionlog/applib/contributions/HasUsername_recentSessionsForUser.java @@ -52,7 +52,7 @@ public class HasUsername_recentSessionsForUser { private final HasUsername hasUsername; - @MemberSupport public List<SessionLogEntry> act() { + @MemberSupport public List<? extends SessionLogEntry> act() { if(hasUsername == null || hasUsername.getUsername() == null) { return Collections.emptyList(); } @@ -62,6 +62,6 @@ public class HasUsername_recentSessionsForUser { return hasUsername == null || hasUsername.getUsername() == null; } - @Inject SessionLogEntryRepository sessionLogEntryRepository; + @Inject SessionLogEntryRepository<? extends SessionLogEntry> sessionLogEntryRepository; } diff --git a/extensions/security/sessionlog/applib/src/main/java/org/apache/isis/extensions/sessionlog/applib/dom/SessionLogEntry.layout.fallback.xml b/extensions/security/sessionlog/applib/src/main/java/org/apache/isis/extensions/sessionlog/applib/dom/SessionLogEntry.layout.fallback.xml index f4e3849ea4..823f013980 100644 --- a/extensions/security/sessionlog/applib/src/main/java/org/apache/isis/extensions/sessionlog/applib/dom/SessionLogEntry.layout.fallback.xml +++ b/extensions/security/sessionlog/applib/src/main/java/org/apache/isis/extensions/sessionlog/applib/dom/SessionLogEntry.layout.fallback.xml @@ -35,12 +35,25 @@ <bs3:tab name="Identifier"> <bs3:row> <bs3:col span="12"> - <cpt:fieldSet name="Identifiers" id="identifiers" unreferencedProperties="true"> + <cpt:fieldSet name="Identity" id="identity"> <cpt:action id="previous"/> <cpt:action id="next"/> + <cpt:property id="httpSessionGuid"/> + </cpt:fieldSet> + <cpt:fieldSet name="" id="who-and-when"> <cpt:property id="username"/> <cpt:property id="loginTimestamp"/> </cpt:fieldSet> + <cpt:fieldSet name="" id="http-id"> + <cpt:property id="sessionGuid"/> + </cpt:fieldSet> + </bs3:col> + </bs3:row> + </bs3:tab> + <bs3:tab name="Other"> + <bs3:row> + <bs3:col span="12"> + <cpt:fieldSet name="Other" id="other" unreferencedProperties="true"/> </bs3:col> </bs3:row> </bs3:tab> @@ -48,12 +61,6 @@ <bs3:row> <bs3:col span="12"> <cpt:fieldSet name="Metadata" id="metadata"> - <cpt:action id="recentAuditTrailEntries" position="PANEL_DROPDOWN"/> - <cpt:action id="clearHints" position="PANEL_DROPDOWN"/> - <cpt:action id="downloadLayoutXml" position="PANEL_DROPDOWN"/> - <cpt:action id="downloadJdoMetadata" position="PANEL_DROPDOWN"/> - <cpt:action id="rebuildMetamodel" position="PANEL_DROPDOWN"/> - <cpt:property id="sessionId"/> </cpt:fieldSet> </bs3:col> </bs3:row> @@ -68,7 +75,7 @@ <cpt:fieldSet name="Timestamps" id="logout"> <cpt:property id="loginTimestamp"/> <cpt:property id="logoutTimestamp"/> - <cpt:property id="causedBy2"/> + <cpt:property id="causedBy"/> </cpt:fieldSet> </bs3:col> </bs3:row> diff --git a/extensions/security/sessionlog/applib/src/main/java/org/apache/isis/extensions/sessionlog/applib/dom/SessionLogEntryRepository.java b/extensions/security/sessionlog/applib/src/main/java/org/apache/isis/extensions/sessionlog/applib/dom/SessionLogEntryRepository.java index a7727e0351..6c2665e298 100644 --- a/extensions/security/sessionlog/applib/src/main/java/org/apache/isis/extensions/sessionlog/applib/dom/SessionLogEntryRepository.java +++ b/extensions/security/sessionlog/applib/src/main/java/org/apache/isis/extensions/sessionlog/applib/dom/SessionLogEntryRepository.java @@ -32,6 +32,7 @@ import org.apache.isis.applib.query.Query; import org.apache.isis.applib.services.factory.FactoryService; import org.apache.isis.applib.services.repository.RepositoryService; import org.apache.isis.applib.services.session.SessionSubscriber; +import org.apache.isis.applib.services.xactn.TransactionService; import org.apache.isis.core.config.environment.IsisSystemEnvironment; import lombok.NonNull; @@ -43,6 +44,7 @@ import lombok.val; public abstract class SessionLogEntryRepository<E extends SessionLogEntry> { @Inject RepositoryService repositoryService; + @Inject TransactionService transactionService; @Inject FactoryService factoryService; @Inject IsisSystemEnvironment isisSystemEnvironment; @@ -59,6 +61,7 @@ public abstract class SessionLogEntryRepository<E extends SessionLogEntry> { activeEntry.setCausedBy(SessionSubscriber.CausedBy.RESTART); activeEntry.setLogoutTimestamp(logoutTimestamp); } + transactionService.flushTransaction(); } public SessionLogEntry create( diff --git a/valuetypes/asciidoc/applib/src/main/java/org/apache/isis/valuetypes/asciidoc/applib/value/Converter.java b/valuetypes/asciidoc/applib/src/main/java/org/apache/isis/valuetypes/asciidoc/applib/value/Converter.java index 366be92c7f..ff7cc44a38 100644 --- a/valuetypes/asciidoc/applib/src/main/java/org/apache/isis/valuetypes/asciidoc/applib/value/Converter.java +++ b/valuetypes/asciidoc/applib/src/main/java/org/apache/isis/valuetypes/asciidoc/applib/value/Converter.java @@ -32,32 +32,6 @@ import lombok.Getter; final class Converter { - /** - * For syntax highlighting to work, the client/browser needs to load specific - * java-script and css. - * <p> - * 1) In your web-app's {@code scripts/application.js} include the bundled - * {@code src/main/resources/prism1.14.js}. - * <pre> - * function includeJs(jsFilePath) { - * var js = document.createElement("script"); - * js.type = "text/javascript"; - * js.src = jsFilePath; - * document.body.appendChild(js); - * } - * - * includeJs("/scripts/prism1.14.js"); - * </pre> - * <p> - * 2) In your web-app's {@code css/application.css} include the bundled - * {@code src/main/resources/prism.css}. - * <pre> - * {@code @import "prism.css"}. - * </pre> - * - * @param adoc - formatted input to be converted to HTML - * @param options - if {@code null} uses built-in default options - */ public static String adocToHtml(final @Nullable String adoc, final @Nullable Options options) { return _Strings.isEmpty(adoc) ? "" diff --git a/viewers/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/common/bootstrap/css/bootstrap-overrides-all-v2.css b/viewers/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/common/bootstrap/css/bootstrap-overrides-all-v2.css index 8c1d534993..c8b3083c4f 100644 --- a/viewers/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/common/bootstrap/css/bootstrap-overrides-all-v2.css +++ b/viewers/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/common/bootstrap/css/bootstrap-overrides-all-v2.css @@ -761,6 +761,7 @@ div.label-right .scalarValueWrapper .feedback-links-below-wrapper { .form-horizontal.actionParametersForm .form-group, .form-horizontal.propertyEditForm .form-group { margin-left: -5px; + margin-top: 5px; } .form-horizontal.inputForm .form-group {
