You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by dk...@apache.org on 2021/04/02 13:05:34 UTC

[sling-org-apache-sling-app-cms] branch master updated (bf43583 -> 646945b)

This is an automated email from the ASF dual-hosted git repository.

dklco pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-app-cms.git.


    from bf43583  Minor: Removing unneeded import
     new 93a0d15  Removing Maintenance jobs since they are no longer needed with SLING-10116
     new 3698fac  Minor - fixing UI where upload flashed when file was dragged over top
     new 56405f5  Minor - fixing UI where upload flashed when file was dragged over top
     new f0fc25d  Minor - fixing action bar overflow at specific breakpoints
     new b843b12  Adding thumbnail preview servlet for SLING-10266
     add 524db15  Working on having a specific preview servlet to have authenticated previews of images rather than using the mapped image URLs
     add 2e8258c  Adding missing files
     new e775b94  Adding thumbnail preview servlet for SLING-10266
     new 75bce0a  Minor - missed setting overflow
     new 646945b  Minor - updating dependenies

The 8 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../jobs/FileMetadataExtractorConsumer.java        |  73 +++++++++++
 .../listeners/FileMetadataExtractorListener.java   |  31 ++---
 .../repository/AbstractMaintenanceJob.java         | 124 -------------------
 .../repository/DataStoreCleanupConfig.java         |  31 -----
 .../repository/DataStoreCleanupScheduler.java      |  78 ------------
 .../internal/repository/RevisionCleanupConfig.java |  31 -----
 .../repository/RevisionCleanupScheduler.java       |  77 ------------
 ...oadFileServlet.java => PreviewFileServlet.java} |  37 +++---
 .../repository/AbstractMaintenanceJobTest.java     | 135 ---------------------
 .../internal/repository/CompositeDataMock.java     |  55 ---------
 .../repository/DataStoreCleanupSchedulerTest.java  |  73 -----------
 .../repository/RevisionCleanupSchedulerTest.java   |  73 -----------
 .../internal/servlets/PreviewFileServletTest.java  |  65 ++++++++++
 feature/pom.xml                                    |   6 +-
 feature/src/main/features/base.json                |  16 +--
 feature/src/main/features/boot.json                |   8 +-
 feature/src/main/features/cms/dependencies.json    |  12 +-
 feature/src/main/features/cms/feature.json         |   2 +-
 feature/src/main/features/oak/oak_base.json        |   2 +-
 feature/src/main/features/scripting.json           |  10 +-
 feature/src/main/features/webconsole.json          |   2 +-
 ui/src/main/frontend/js/cms.fields.js              |   4 +-
 ui/src/main/frontend/js/cms.nav.js                 |   4 +-
 ui/src/main/frontend/scss/cms.scss                 |   5 +
 .../components/cms/contentgrid/contentgrid.jsp     |  12 +-
 .../sling-cms/components/cms/tilecard/tilecard.jsp |   4 +-
 .../libs/sling-cms/content/file/preview.json       |   4 +
 27 files changed, 222 insertions(+), 752 deletions(-)
 create mode 100644 core/src/main/java/org/apache/sling/cms/core/internal/jobs/FileMetadataExtractorConsumer.java
 delete mode 100644 core/src/main/java/org/apache/sling/cms/core/internal/repository/AbstractMaintenanceJob.java
 delete mode 100644 core/src/main/java/org/apache/sling/cms/core/internal/repository/DataStoreCleanupConfig.java
 delete mode 100644 core/src/main/java/org/apache/sling/cms/core/internal/repository/DataStoreCleanupScheduler.java
 delete mode 100644 core/src/main/java/org/apache/sling/cms/core/internal/repository/RevisionCleanupConfig.java
 delete mode 100644 core/src/main/java/org/apache/sling/cms/core/internal/repository/RevisionCleanupScheduler.java
 copy core/src/main/java/org/apache/sling/cms/core/internal/servlets/{DownloadFileServlet.java => PreviewFileServlet.java} (60%)
 delete mode 100644 core/src/test/java/org/apache/sling/cms/core/internal/repository/AbstractMaintenanceJobTest.java
 delete mode 100644 core/src/test/java/org/apache/sling/cms/core/internal/repository/CompositeDataMock.java
 delete mode 100644 core/src/test/java/org/apache/sling/cms/core/internal/repository/DataStoreCleanupSchedulerTest.java
 delete mode 100644 core/src/test/java/org/apache/sling/cms/core/internal/repository/RevisionCleanupSchedulerTest.java
 create mode 100644 core/src/test/java/org/apache/sling/cms/core/internal/servlets/PreviewFileServletTest.java
 create mode 100644 ui/src/main/resources/jcr_root/libs/sling-cms/content/file/preview.json

[sling-org-apache-sling-app-cms] 08/08: Minor - updating dependenies

Posted by dk...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

dklco pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-app-cms.git

commit 646945bb6e190350cfc3c7066a03f96a738969f2
Author: Dan Klco <kl...@adobe.com>
AuthorDate: Fri Apr 2 09:05:00 2021 -0400

    Minor - updating dependenies
---
 feature/pom.xml                                 |  6 +++---
 feature/src/main/features/base.json             | 16 ++++++++--------
 feature/src/main/features/boot.json             |  8 ++++----
 feature/src/main/features/cms/dependencies.json | 12 ++++++------
 feature/src/main/features/cms/feature.json      |  2 +-
 feature/src/main/features/oak/oak_base.json     |  2 +-
 feature/src/main/features/scripting.json        | 10 +++++-----
 feature/src/main/features/webconsole.json       |  2 +-
 8 files changed, 29 insertions(+), 29 deletions(-)

diff --git a/feature/pom.xml b/feature/pom.xml
index 7d64bb6..4294c21 100644
--- a/feature/pom.xml
+++ b/feature/pom.xml
@@ -157,7 +157,7 @@
                             <goal>attach-featurearchives</goal>
                         </goals>
                         <configuration>
-                            <replacePropertyVariables>org-apache-sling-api-version,org-apache-sling-scripting-jsp-taglib-version,cms-version,composum-version,groovy-version,jackrabbit-version,jackson-version,oak-version,slf4j-version,cocoon-serializers-charsets-version,org.apache.felix.webconsole-version,commons-lang3-version,jstl-version,org-apache-sling-models-api-version,org.apache.sling.scripting.jsp.taglib,geronimo-atinject_1-0_spec-version,commons-io-version,tika-version,pdfbox-ver [...]
+                            <replacePropertyVariables>org-apache-sling-api-version,org-apache-sling-scripting-jsp-taglib-version,cms-version,composum-version,groovy-version,guava-version,jackrabbit-version,jackson-version,oak-version,slf4j-version,cocoon-serializers-charsets-version,org.apache.felix.webconsole-version,commons-lang3-version,jstl-version,org-apache-sling-models-api-version,org.apache.sling.scripting.jsp.taglib,geronimo-atinject_1-0_spec-version,commons-io-version,tika-vers [...]
                         </configuration>
                     </execution>
                 </executions>
@@ -311,13 +311,13 @@
         <dependency>
             <groupId>org.apache.httpcomponents</groupId>
             <artifactId>httpclient</artifactId>
-            <version>4.5.10</version>
+            <version>${httpclient-version}</version>
             <scope>test</scope>
         </dependency>
         <dependency>
             <groupId>org.apache.felix</groupId>
             <artifactId>org.apache.felix.utils</artifactId>
-            <version>1.11.6</version>
+            <version>1.11.8</version>
             <scope>test</scope>
         </dependency>
         <dependency>
diff --git a/feature/src/main/features/base.json b/feature/src/main/features/base.json
index 6eecf65..bef39cc 100644
--- a/feature/src/main/features/base.json
+++ b/feature/src/main/features/base.json
@@ -78,7 +78,7 @@
             "start-order":"20"
         },
         {
-            "id":"org.apache.sling:org.apache.sling.i18n:2.5.14",
+            "id":"org.apache.sling:org.apache.sling.i18n:2.5.16",
             "start-order":"20"
         },
         {
@@ -102,7 +102,7 @@
             "start-order":"20"
         },
         {
-            "id":"org.apache.sling:org.apache.sling.serviceusermapper:1.4.6",
+            "id":"org.apache.sling:org.apache.sling.serviceusermapper:1.5.2",
             "start-order":"15"
         },
         {
@@ -114,15 +114,15 @@
             "start-order":"20"
         },
         {
-            "id":"org.apache.sling:org.apache.sling.servlets.resolver:2.7.10",
+            "id":"org.apache.sling:org.apache.sling.servlets.resolver:2.7.12",
             "start-order":"20"
         },
         {
-            "id":"org.apache.sling:org.apache.sling.xss:2.2.8",
+            "id":"org.apache.sling:org.apache.sling.xss:2.2.12",
             "start-order":"20"
         },
         {
-            "id":"org.apache.felix:org.apache.felix.metatype:1.2.2",
+            "id":"org.apache.felix:org.apache.felix.metatype:1.2.4",
             "start-order":"4"
         },
         {
@@ -150,7 +150,7 @@
             "start-order":"5"
         },
         {
-            "id":"org.apache.felix:org.apache.felix.http.jetty:4.1.4",
+            "id":"org.apache.felix:org.apache.felix.http.jetty:4.1.6",
             "start-order":"5"
         },
         {
@@ -218,11 +218,11 @@
             "start-order":"20"
         },
         {
-            "id":"org.apache.sling:org.apache.sling.repoinit.parser:1.6.2",
+            "id":"org.apache.sling:org.apache.sling.repoinit.parser:1.6.6",
             "start-order":"20"
         },
         {
-            "id":"org.apache.sling:org.apache.sling.jcr.repoinit:1.1.26",
+            "id":"org.apache.sling:org.apache.sling.jcr.repoinit:1.1.34",
             "start-order":"20"
         }
     ],
diff --git a/feature/src/main/features/boot.json b/feature/src/main/features/boot.json
index 7118384..85fb56a 100644
--- a/feature/src/main/features/boot.json
+++ b/feature/src/main/features/boot.json
@@ -1,7 +1,7 @@
 {
     "bundles": [
         {
-            "id": "org.apache.felix:org.apache.felix.cm.json:1.0.2",
+            "id": "org.apache.felix:org.apache.felix.cm.json:1.0.6",
             "start-order": "1"
         },
         {
@@ -13,7 +13,7 @@
             "start-order": "1"
         },
         {
-            "id": "org.apache.felix:org.apache.felix.configadmin:1.9.18",
+            "id": "org.apache.felix:org.apache.felix.configadmin:1.9.20",
             "start-order": "1"
         },
         {
@@ -21,7 +21,7 @@
             "start-order": "1"
         },
         {
-            "id": "org.apache.felix:org.apache.felix.eventadmin:1.5.0",
+            "id": "org.apache.felix:org.apache.felix.eventadmin:1.6.2",
             "start-order": "1"
         },
         {
@@ -129,7 +129,7 @@
             "start-order": "1"
         },
         {
-            "id": "org.apache.felix:org.apache.felix.scr:2.1.24",
+            "id": "org.apache.felix:org.apache.felix.scr:2.1.26",
             "start-order": "1"
         }
     ]
diff --git a/feature/src/main/features/cms/dependencies.json b/feature/src/main/features/cms/dependencies.json
index 8577edd..3d2fc35 100644
--- a/feature/src/main/features/cms/dependencies.json
+++ b/feature/src/main/features/cms/dependencies.json
@@ -53,7 +53,7 @@
             "start-order": "20"
         },
         {
-            "id": "org.apache.sling:org.apache.sling.resourcemerger:1.3.10",
+            "id": "org.apache.sling:org.apache.sling.resourcemerger:1.4.0",
             "start-order": "15"
         },
         {
@@ -97,23 +97,23 @@
             "start-order": "15"
         },
         {
-            "id": "org.ow2.asm:asm:9.0",
+            "id": "org.ow2.asm:asm:9.1",
             "start-order": "15"
         },
         {
-            "id": "org.ow2.asm:asm-analysis:9.0",
+            "id": "org.ow2.asm:asm-analysis:9.1",
             "start-order": "15"
         },
         {
-            "id": "org.ow2.asm:asm-commons:9.0",
+            "id": "org.ow2.asm:asm-commons:9.1",
             "start-order": "15"
         },
         {
-            "id": "org.ow2.asm:asm-tree:9.0",
+            "id": "org.ow2.asm:asm-tree:9.1",
             "start-order": "15"
         },
         {
-            "id": "org.ow2.asm:asm-util:9.0",
+            "id": "org.ow2.asm:asm-util:9.1",
             "start-order": "15"
         },
         {
diff --git a/feature/src/main/features/cms/feature.json b/feature/src/main/features/cms/feature.json
index 3a2eae8..c8a8818 100644
--- a/feature/src/main/features/cms/feature.json
+++ b/feature/src/main/features/cms/feature.json
@@ -1,7 +1,7 @@
 {
     "bundles": [
         {
-            "id": "org.apache.sling:org.apache.sling.feature:1.2.18",
+            "id": "org.apache.sling:org.apache.sling.feature:1.2.20",
             "start-order": "20"
         },
         {
diff --git a/feature/src/main/features/oak/oak_base.json b/feature/src/main/features/oak/oak_base.json
index 90ccc73..b74aeb1 100644
--- a/feature/src/main/features/oak/oak_base.json
+++ b/feature/src/main/features/oak/oak_base.json
@@ -6,7 +6,7 @@
             "start-order":"10"
         },
         {
-            "id":"com.google.guava:guava:15.0",
+            "id":"com.google.guava:guava:${guava-version}",
             "start-order":"15"
         },
         {
diff --git a/feature/src/main/features/scripting.json b/feature/src/main/features/scripting.json
index 2cf71ea..d0381f4 100644
--- a/feature/src/main/features/scripting.json
+++ b/feature/src/main/features/scripting.json
@@ -2,7 +2,7 @@
 {
     "bundles":[
         {
-            "id":"org.antlr:antlr4-runtime:4.9",
+            "id":"org.antlr:antlr4-runtime:4.9.2",
             "start-order":"20"
         },
         {
@@ -58,7 +58,7 @@
             "start-order":"20"
         },
         {
-            "id":"org.apache.sling:org.apache.sling.scripting.sightly:1.4.4-1.4.0",
+            "id":"org.apache.sling:org.apache.sling.scripting.sightly:1.4.6-1.4.0",
             "start-order":"20"
         },
         {
@@ -66,7 +66,7 @@
             "start-order":"20"
         },
         {
-            "id": "org.freemarker:freemarker:2.3.30",
+            "id": "org.freemarker:freemarker:2.3.31",
             "start-order": "20"
         },
         {
@@ -74,7 +74,7 @@
             "start-order":"20"
         },
         {
-            "id":"org.apache.servicemix.bundles:org.apache.servicemix.bundles.thymeleaf:3.0.11.RELEASE_1",
+            "id":"org.apache.servicemix.bundles:org.apache.servicemix.bundles.thymeleaf:3.0.12.RELEASE_1",
             "start-order":"20"
         },
         {
@@ -86,7 +86,7 @@
             "start-order":"20"
         },
         {
-            "id":"org.apache.servicemix.bundles:org.apache.servicemix.bundles.ognl:3.2.1_1",
+            "id":"org.apache.servicemix.bundles:org.apache.servicemix.bundles.ognl:3.2.18_1",
             "start-order":"20"
         },
         {
diff --git a/feature/src/main/features/webconsole.json b/feature/src/main/features/webconsole.json
index be17373..af4a9b8 100644
--- a/feature/src/main/features/webconsole.json
+++ b/feature/src/main/features/webconsole.json
@@ -41,7 +41,7 @@
             "start-order":"15"
         },
         {
-            "id":"org.apache.sling:org.apache.sling.jcr.webconsole:1.0.2",
+            "id":"org.apache.sling:org.apache.sling.jcr.webconsole:1.1.0",
             "start-order":"15"
         },
         {

[sling-org-apache-sling-app-cms] 05/08: Adding thumbnail preview servlet for SLING-10266

Posted by dk...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

dklco pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-app-cms.git

commit b843b12c2fac72dd4376c7f590cd39282f389d0c
Author: Dan Klco <kl...@adobe.com>
AuthorDate: Mon Mar 29 23:10:02 2021 -0400

    Adding thumbnail preview servlet for SLING-10266
---
 .../core/internal/servlets/PreviewFileServlet.java | 59 ++++++++++++++++++++
 .../internal/servlets/PreviewFileServletTest.java  | 65 ++++++++++++++++++++++
 .../sling-cms/components/cms/tilecard/tilecard.jsp |  2 +-
 3 files changed, 125 insertions(+), 1 deletion(-)

diff --git a/core/src/main/java/org/apache/sling/cms/core/internal/servlets/PreviewFileServlet.java b/core/src/main/java/org/apache/sling/cms/core/internal/servlets/PreviewFileServlet.java
new file mode 100644
index 0000000..c9e2f6d
--- /dev/null
+++ b/core/src/main/java/org/apache/sling/cms/core/internal/servlets/PreviewFileServlet.java
@@ -0,0 +1,59 @@
+/*
+ * 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 org.apache.sling.cms.core.internal.servlets;
+
+import java.io.IOException;
+
+import javax.servlet.Servlet;
+import javax.servlet.ServletException;
+
+import org.apache.sling.api.SlingHttpServletRequest;
+import org.apache.sling.api.SlingHttpServletResponse;
+import org.apache.sling.api.request.RequestDispatcherOptions;
+import org.apache.sling.api.servlets.SlingSafeMethodsServlet;
+import org.apache.sling.cms.core.insights.impl.FakeRequest;
+import org.apache.sling.engine.SlingRequestProcessor;
+import org.osgi.service.component.annotations.Activate;
+import org.osgi.service.component.annotations.Component;
+import org.osgi.service.component.annotations.Reference;
+
+@Component(service = Servlet.class, property = { "sling.servlet.resourceTypes=sling-cms/file/preview",
+        "sling.servlet.methods=GET" })
+public class PreviewFileServlet extends SlingSafeMethodsServlet {
+
+    private static final long serialVersionUID = 6234007100684499058L;
+
+    private SlingRequestProcessor requestProcessor;
+
+    @Activate
+    public PreviewFileServlet(@Reference SlingRequestProcessor requestProcessor) {
+        this.requestProcessor = requestProcessor;
+    }
+
+    @Override
+    protected void doGet(SlingHttpServletRequest request, SlingHttpServletResponse response)
+            throws ServletException, IOException {
+        String suffix = request.getRequestPathInfo().getSuffix();
+
+        RequestDispatcherOptions options = new RequestDispatcherOptions();
+        options.setReplaceSuffix("");
+        options.setReplaceSelectors("");
+
+        requestProcessor.processRequest(new FakeRequest("GET", suffix), response, request.getResourceResolver());
+    }
+
+}
diff --git a/core/src/test/java/org/apache/sling/cms/core/internal/servlets/PreviewFileServletTest.java b/core/src/test/java/org/apache/sling/cms/core/internal/servlets/PreviewFileServletTest.java
new file mode 100644
index 0000000..9551e56
--- /dev/null
+++ b/core/src/test/java/org/apache/sling/cms/core/internal/servlets/PreviewFileServletTest.java
@@ -0,0 +1,65 @@
+/*
+ * 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 org.apache.sling.cms.core.internal.servlets;
+
+import java.io.IOException;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+
+import org.apache.sling.api.SlingHttpServletRequest;
+import org.apache.sling.api.SlingHttpServletResponse;
+import org.apache.sling.api.resource.ResourceResolver;
+import org.apache.sling.cms.core.insights.impl.FakeRequest;
+import org.apache.sling.engine.SlingRequestProcessor;
+import org.apache.sling.engine.impl.request.SlingRequestPathInfo;
+import org.junit.Test;
+import org.mockito.ArgumentMatcher;
+import org.mockito.Mockito;
+
+public class PreviewFileServletTest {
+
+    @Test
+    public void testServlet() throws ServletException, IOException {
+
+        String expectedPath = "/test";
+        SlingRequestProcessor processor = Mockito.mock(SlingRequestProcessor.class);
+        PreviewFileServlet pfs = new PreviewFileServlet(processor);
+
+        ResourceResolver resolver = Mockito.mock(ResourceResolver.class);
+        SlingHttpServletRequest slingRequest = Mockito.mock(SlingHttpServletRequest.class);
+        Mockito.when(slingRequest.getResourceResolver()).thenReturn(resolver);
+        SlingRequestPathInfo pathInfo = Mockito.mock(SlingRequestPathInfo.class);
+        Mockito.when(pathInfo.getSuffix()).thenReturn(expectedPath);
+        Mockito.when(slingRequest.getRequestPathInfo()).thenReturn(pathInfo);
+
+        SlingHttpServletResponse slingResponse = Mockito.mock(SlingHttpServletResponse.class);
+
+        pfs.doGet(slingRequest, slingResponse);
+
+        Mockito.verify(processor).processRequest(Mockito.argThat(new ArgumentMatcher<HttpServletRequest>() {
+
+            @Override
+            public boolean matches(HttpServletRequest arg) {
+
+                return arg instanceof FakeRequest && expectedPath.equals(arg.getRequestURI());
+            }
+
+        }), Mockito.eq(slingResponse), Mockito.eq(resolver));
+
+    }
+}
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/tilecard/tilecard.jsp b/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/tilecard/tilecard.jsp
index 10d95d5..5ba0016 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/tilecard/tilecard.jsp
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/tilecard/tilecard.jsp
@@ -26,7 +26,7 @@
                 </figure>
             </div>
             <footer class="card-footer">
-                <a class="card-footer-item" href="${sling:encode(properties.link,'HTML_ATTR')}" title="${sling:encode(properties.title,'HTML')}">
+                <a class="card-footer-item item-link" href="${sling:encode(properties.link,'HTML_ATTR')}" title="${sling:encode(properties.title,'HTML')}">
                     ${sling:encode(properties.title,'HTML')}
                 </a>
             </footer>

[sling-org-apache-sling-app-cms] 02/08: Minor - fixing UI where upload flashed when file was dragged over top

Posted by dk...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

dklco pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-app-cms.git

commit 3698facf0446a8bcf09cf6fd55ac74fc2f1930b6
Author: Dan Klco <kl...@adobe.com>
AuthorDate: Mon Mar 29 23:02:12 2021 -0400

    Minor - fixing UI where upload flashed when file was dragged over top
---
 ui/src/main/frontend/js/cms.nav.js | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/ui/src/main/frontend/js/cms.nav.js b/ui/src/main/frontend/js/cms.nav.js
index eb5a946..598487e 100644
--- a/ui/src/main/frontend/js/cms.nav.js
+++ b/ui/src/main/frontend/js/cms.nav.js
@@ -98,7 +98,9 @@ rava.bind('.contentnav .contentnav__item', {
         tr.classList.remove('is-selected');
       });
       this.classList.add('is-selected');
-      document.querySelector('.actions-target').innerHTML = this.querySelector('.cell-actions').innerHTML;
+      if (document.querySelector('.actions-target') && this.querySelector('.cell-actions')){
+        document.querySelector('.actions-target').innerHTML = this.querySelector('.cell-actions').innerHTML;
+      }
     },
     dblclick() {
       if (this.querySelector('.item-link')) {

[sling-org-apache-sling-app-cms] 03/08: Minor - fixing UI where upload flashed when file was dragged over top

Posted by dk...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

dklco pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-app-cms.git

commit 56405f58ff67649a02a7477c2c5113e3c4b0b639
Author: Dan Klco <kl...@adobe.com>
AuthorDate: Mon Mar 29 23:02:38 2021 -0400

    Minor - fixing UI where upload flashed when file was dragged over top
---
 ui/src/main/frontend/js/cms.fields.js | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/ui/src/main/frontend/js/cms.fields.js b/ui/src/main/frontend/js/cms.fields.js
index a76e429..5ff4321 100644
--- a/ui/src/main/frontend/js/cms.fields.js
+++ b/ui/src/main/frontend/js/cms.fields.js
@@ -90,7 +90,9 @@ rava.bind('.file', {
       }, false);
       field.addEventListener('dragleave', (event) => {
         event.preventDefault();
-        field.classList.remove('is-primary');
+        if(!field.contains(event.fromElement)){
+          field.classList.remove('is-primary');
+        }
       }, false);
       field.addEventListener('drop', (event) => {
         event.preventDefault();

[sling-org-apache-sling-app-cms] 06/08: Adding thumbnail preview servlet for SLING-10266

Posted by dk...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

dklco pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-app-cms.git

commit e775b94bac75031af2d2045b748b9a91a80a9cbf
Merge: b843b12 2e8258c
Author: Dan Klco <kl...@adobe.com>
AuthorDate: Mon Mar 29 23:24:14 2021 -0400

    Adding thumbnail preview servlet for SLING-10266

 .../jobs/FileMetadataExtractorConsumer.java        | 73 ++++++++++++++++++++++
 .../listeners/FileMetadataExtractorListener.java   | 31 +++------
 .../core/internal/servlets/PreviewFileServlet.java |  1 -
 .../components/cms/contentgrid/contentgrid.jsp     | 12 ++--
 .../sling-cms/components/cms/tilecard/tilecard.jsp |  2 +-
 .../libs/sling-cms/content/file/preview.json       |  4 ++
 6 files changed, 94 insertions(+), 29 deletions(-)

diff --cc core/src/main/java/org/apache/sling/cms/core/internal/servlets/PreviewFileServlet.java
index c9e2f6d,516744d..d2793d3
--- a/core/src/main/java/org/apache/sling/cms/core/internal/servlets/PreviewFileServlet.java
+++ b/core/src/main/java/org/apache/sling/cms/core/internal/servlets/PreviewFileServlet.java
@@@ -17,7 -17,10 +17,6 @@@
  package org.apache.sling.cms.core.internal.servlets;
  
  import java.io.IOException;
 -import java.util.regex.Matcher;
 -import java.util.regex.Pattern;
--
 -import javax.servlet.RequestDispatcher;
  import javax.servlet.Servlet;
  import javax.servlet.ServletException;
  

[sling-org-apache-sling-app-cms] 07/08: Minor - missed setting overflow

Posted by dk...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

dklco pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-app-cms.git

commit 75bce0a2cbee6ac5085532acc2fb7e7539eb2dc7
Author: Dan Klco <kl...@adobe.com>
AuthorDate: Fri Apr 2 09:03:29 2021 -0400

    Minor - missed setting overflow
---
 ui/src/main/frontend/scss/cms.scss | 1 +
 1 file changed, 1 insertion(+)

diff --git a/ui/src/main/frontend/scss/cms.scss b/ui/src/main/frontend/scss/cms.scss
index f3fbc5c..4be84bd 100644
--- a/ui/src/main/frontend/scss/cms.scss
+++ b/ui/src/main/frontend/scss/cms.scss
@@ -197,6 +197,7 @@ small.card-footer-item {
 
 .Main-Content .level-left {
   overflow-x: auto;
+  overflow-y: hidden;
 }
 
 .main-section {

[sling-org-apache-sling-app-cms] 01/08: Removing Maintenance jobs since they are no longer needed with SLING-10116

Posted by dk...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

dklco pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-app-cms.git

commit 93a0d15ef663fc078140a9d15f6aa9683a9eeb64
Author: Dan Klco <kl...@adobe.com>
AuthorDate: Mon Mar 29 23:01:38 2021 -0400

    Removing Maintenance jobs since they are no longer needed with SLING-10116
---
 .../repository/AbstractMaintenanceJob.java         | 124 -------------------
 .../repository/DataStoreCleanupConfig.java         |  31 -----
 .../repository/DataStoreCleanupScheduler.java      |  78 ------------
 .../internal/repository/RevisionCleanupConfig.java |  31 -----
 .../repository/RevisionCleanupScheduler.java       |  77 ------------
 .../repository/AbstractMaintenanceJobTest.java     | 135 ---------------------
 .../internal/repository/CompositeDataMock.java     |  55 ---------
 .../repository/DataStoreCleanupSchedulerTest.java  |  73 -----------
 .../repository/RevisionCleanupSchedulerTest.java   |  73 -----------
 9 files changed, 677 deletions(-)

diff --git a/core/src/main/java/org/apache/sling/cms/core/internal/repository/AbstractMaintenanceJob.java b/core/src/main/java/org/apache/sling/cms/core/internal/repository/AbstractMaintenanceJob.java
deleted file mode 100644
index af0fef1..0000000
--- a/core/src/main/java/org/apache/sling/cms/core/internal/repository/AbstractMaintenanceJob.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * 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 org.apache.sling.cms.core.internal.repository;
-
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.Optional;
-
-import javax.management.openmbean.CompositeData;
-
-import org.apache.jackrabbit.oak.api.jmx.RepositoryManagementMBean.StatusCode;
-import org.apache.sling.event.jobs.Job;
-import org.apache.sling.event.jobs.JobManager;
-import org.apache.sling.event.jobs.consumer.JobExecutionContext;
-import org.apache.sling.event.jobs.consumer.JobExecutionContext.ResultBuilder;
-import org.apache.sling.event.jobs.consumer.JobExecutionResult;
-import org.apache.sling.event.jobs.consumer.JobExecutor;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Service for running the Jackrabbit OAK Segment Store cleanup on a schedule.
- */
-public abstract class AbstractMaintenanceJob implements Runnable, JobExecutor {
-
-    private static final Logger log = LoggerFactory.getLogger(AbstractMaintenanceJob.class);
-
-    protected JobManager jobManager;
-
-    protected final JobExecutionResult createResult(JobExecutionContext context, Optional<CompositeData> data,
-            Integer startId) {
-        String message = data.map(d -> ((String) d.get("message"))).orElse(null);
-        StatusCode code = data.map(d -> ((Integer) d.get("code"))).map(c -> Arrays.stream(StatusCode.values())
-                .filter(sc -> sc.ordinal() == c).findFirst().orElse(StatusCode.NONE)).orElse(StatusCode.NONE);
-        log.trace("Loaded status code: {}", code);
-        Integer id = data.map(d -> ((Integer) d.get("id"))).orElse(null);
-        boolean success = false;
-        StringBuilder sb = new StringBuilder(getPrefix());
-        if (!data.isPresent() || code == null) {
-            log.trace("No result...");
-            sb.append("No result.");
-        } else if (startId != null && (id == null || id.intValue() != startId.intValue())) {
-            log.trace("ID does not match original ID, assuming successful...");
-            sb.append(StatusCode.SUCCEEDED.name);
-            success = true;
-        } else if (code == StatusCode.INITIATED || code == StatusCode.SUCCEEDED) {
-            log.trace("Successful result: {}...", code.name);
-            sb.append(code.name);
-            success = true;
-        } else if (code == StatusCode.UNAVAILABLE || code == StatusCode.NONE || code == StatusCode.FAILED) {
-            log.trace("Failed result: {}...", code.name);
-            sb.append(code.name);
-        } else {
-            return null;
-        }
-        if (message != null) {
-            sb.append(" ");
-            sb.append(message);
-        }
-        ResultBuilder rb = context.result().message(sb.toString());
-        return success ? rb.succeeded() : rb.failed();
-    }
-
-    public abstract String getJobTopic();
-
-    public abstract String getPrefix();
-
-    public abstract Optional<CompositeData> getStatus();
-
-    public JobExecutionResult process(Job job, JobExecutionContext context) {
-        log.info("Starting {}", getPrefix());
-        Optional<CompositeData> data = startMaintenance();
-        Integer id = data.map(d -> ((Integer) d.get("id"))).orElse(null);
-        JobExecutionResult result = null;
-        while (result == null) {
-            data = getStatus();
-            result = createResult(context, data, id);
-            if (result == null) {
-                if (context.isStopped()) {
-                    log.info(
-                            "Canceling {}. The task was either stopped by the user or the Maintenance Window reached its end",
-                            getPrefix());
-                    stopMaintenance();
-                    return context.result().message(String.format("%sStopped by user.", getPrefix())).failed();
-                }
-                try {
-                    Thread.sleep(1000L);
-                } catch (InterruptedException e) {
-                    Thread.currentThread().interrupt();
-                }
-            } else {
-                log.debug("Retrieved result: {}", result);
-            }
-        }
-        return result;
-    }
-
-    @Override
-    public void run() {
-        log.trace("Kicking off job: {}", getJobTopic());
-        jobManager.addJob(getJobTopic(), Collections.emptyMap());
-    }
-
-    public abstract void setJobManager(JobManager jobManager);
-
-    public abstract Optional<CompositeData> startMaintenance();
-
-    public abstract Optional<CompositeData> stopMaintenance();
-
-}
diff --git a/core/src/main/java/org/apache/sling/cms/core/internal/repository/DataStoreCleanupConfig.java b/core/src/main/java/org/apache/sling/cms/core/internal/repository/DataStoreCleanupConfig.java
deleted file mode 100644
index 7ca6ca8..0000000
--- a/core/src/main/java/org/apache/sling/cms/core/internal/repository/DataStoreCleanupConfig.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * 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 org.apache.sling.cms.core.internal.repository;
-
-import org.osgi.service.metatype.annotations.ObjectClassDefinition;
-import org.osgi.service.metatype.annotations.AttributeDefinition;
-
-/**
- * Configuration for the DataStore Cleanup Service
- */
-@ObjectClassDefinition(name = "%datastore.cleanup.name", description = "%datastore.cleanup.description", localization = "OSGI-INF/l10n/bundle")
-public @interface DataStoreCleanupConfig {
-
-    @AttributeDefinition(name = "%scheduler.expression.name", description = "%scheduler.expression.description")
-    String scheduler_expression();
-
-}
\ No newline at end of file
diff --git a/core/src/main/java/org/apache/sling/cms/core/internal/repository/DataStoreCleanupScheduler.java b/core/src/main/java/org/apache/sling/cms/core/internal/repository/DataStoreCleanupScheduler.java
deleted file mode 100644
index 7211f02..0000000
--- a/core/src/main/java/org/apache/sling/cms/core/internal/repository/DataStoreCleanupScheduler.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * 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 org.apache.sling.cms.core.internal.repository;
-
-import java.util.Optional;
-
-import javax.management.openmbean.CompositeData;
-
-import org.apache.jackrabbit.oak.api.jmx.RepositoryManagementMBean;
-import org.apache.sling.event.jobs.JobManager;
-import org.apache.sling.event.jobs.consumer.JobExecutor;
-import org.osgi.service.component.annotations.Component;
-import org.osgi.service.component.annotations.ConfigurationPolicy;
-import org.osgi.service.component.annotations.Reference;
-import org.osgi.service.metatype.annotations.Designate;
-
-/**
- * Service for running the Jackrabbit OAK Segment Store cleanup on a schedule.
- */
-@Component(service = { JobExecutor.class, Runnable.class }, property = { JobExecutor.PROPERTY_TOPICS
-        + "=org/apache/sling/cms/repository/DataStoreCleanup" }, configurationPolicy = ConfigurationPolicy.REQUIRE, immediate = true)
-@Designate(ocd = DataStoreCleanupConfig.class)
-public class DataStoreCleanupScheduler extends AbstractMaintenanceJob {
-
-    private RepositoryManagementMBean repositoryManager;
-
-    @Override
-    public String getJobTopic() {
-        return "org/apache/sling/cms/repository/DataStoreCleanup";
-    }
-
-    @Override
-    public String getPrefix() {
-        return "DataStore Cleanup";
-    }
-
-    @Override
-    public Optional<CompositeData> getStatus() {
-        return Optional.ofNullable(repositoryManager.getDataStoreGCStatus());
-    }
-
-    @Reference
-    @Override
-    public void setJobManager(final JobManager jobManager) {
-        super.jobManager = jobManager;
-    }
-
-    @Reference
-    public void setRepositoryManager(final RepositoryManagementMBean repositoryManager) {
-        this.repositoryManager = repositoryManager;
-    }
-
-    @Override
-    public Optional<CompositeData> startMaintenance() {
-        return Optional.ofNullable(repositoryManager.startDataStoreGC(false));
-    }
-
-    @Override
-    public Optional<CompositeData> stopMaintenance() {
-        // Can't really stop this one
-        return Optional.ofNullable(repositoryManager.getDataStoreGCStatus());
-    }
-
-}
diff --git a/core/src/main/java/org/apache/sling/cms/core/internal/repository/RevisionCleanupConfig.java b/core/src/main/java/org/apache/sling/cms/core/internal/repository/RevisionCleanupConfig.java
deleted file mode 100644
index 14c0c1f..0000000
--- a/core/src/main/java/org/apache/sling/cms/core/internal/repository/RevisionCleanupConfig.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * 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 org.apache.sling.cms.core.internal.repository;
-
-import org.osgi.service.metatype.annotations.ObjectClassDefinition;
-import org.osgi.service.metatype.annotations.AttributeDefinition;
-
-/**
- * Configuration for the Reference Mapping Transformer
- */
-@ObjectClassDefinition(name = "%revision.cleanup.name", description = "%revision.cleanup.description", localization = "OSGI-INF/l10n/bundle")
-public @interface RevisionCleanupConfig {
-
-    @AttributeDefinition(name = "%scheduler.expression.name", description = "%scheduler.expression.description")
-    String scheduler_expression();
-
-}
\ No newline at end of file
diff --git a/core/src/main/java/org/apache/sling/cms/core/internal/repository/RevisionCleanupScheduler.java b/core/src/main/java/org/apache/sling/cms/core/internal/repository/RevisionCleanupScheduler.java
deleted file mode 100644
index 3d5afcd..0000000
--- a/core/src/main/java/org/apache/sling/cms/core/internal/repository/RevisionCleanupScheduler.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * 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 org.apache.sling.cms.core.internal.repository;
-
-import java.util.Optional;
-
-import javax.management.openmbean.CompositeData;
-
-import org.apache.jackrabbit.oak.api.jmx.RepositoryManagementMBean;
-import org.apache.sling.event.jobs.JobManager;
-import org.apache.sling.event.jobs.consumer.JobExecutor;
-import org.osgi.service.component.annotations.Component;
-import org.osgi.service.component.annotations.ConfigurationPolicy;
-import org.osgi.service.component.annotations.Reference;
-import org.osgi.service.metatype.annotations.Designate;
-
-/**
- * Service for running the Jackrabbit OAK Segment Store cleanup on a schedule.
- */
-@Component(service = { JobExecutor.class, Runnable.class }, property = { JobExecutor.PROPERTY_TOPICS
-        + "=org/apache/sling/cms/repository/RevisionCleanup" }, configurationPolicy = ConfigurationPolicy.REQUIRE, immediate = true)
-@Designate(ocd = RevisionCleanupConfig.class)
-public class RevisionCleanupScheduler extends AbstractMaintenanceJob {
-
-    private RepositoryManagementMBean repositoryManager;
-
-    @Override
-    public String getJobTopic() {
-        return "org/apache/sling/cms/repository/RevisionCleanup";
-    }
-
-    @Override
-    public String getPrefix() {
-        return "Revision Cleanup";
-    }
-
-    @Override
-    public Optional<CompositeData> getStatus() {
-        return Optional.ofNullable(repositoryManager.getRevisionGCStatus());
-    }
-
-    @Reference
-    @Override
-    public void setJobManager(final JobManager jobManager) {
-        super.jobManager = jobManager;
-    }
-
-    @Reference
-    public void setRepositoryManager(final RepositoryManagementMBean repositoryManager) {
-        this.repositoryManager = repositoryManager;
-    }
-
-    @Override
-    public Optional<CompositeData> startMaintenance() {
-        return Optional.ofNullable(repositoryManager.startRevisionGC());
-    }
-
-    @Override
-    public Optional<CompositeData> stopMaintenance() {
-        return Optional.ofNullable(repositoryManager.cancelRevisionGC());
-    }
-
-}
diff --git a/core/src/test/java/org/apache/sling/cms/core/internal/repository/AbstractMaintenanceJobTest.java b/core/src/test/java/org/apache/sling/cms/core/internal/repository/AbstractMaintenanceJobTest.java
deleted file mode 100644
index 9b0521a..0000000
--- a/core/src/test/java/org/apache/sling/cms/core/internal/repository/AbstractMaintenanceJobTest.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/*
- * 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 org.apache.sling.cms.core.internal.repository;
-
-import static org.junit.Assert.assertNull;
-
-import java.util.Optional;
-
-import javax.management.openmbean.CompositeData;
-
-import org.apache.jackrabbit.oak.api.jmx.RepositoryManagementMBean.StatusCode;
-import org.apache.sling.event.jobs.JobManager;
-import org.apache.sling.event.jobs.consumer.JobExecutionContext;
-import org.apache.sling.event.jobs.consumer.JobExecutionContext.ResultBuilder;
-import org.apache.sling.event.jobs.consumer.JobExecutionResult;
-import org.junit.Before;
-import org.junit.Test;
-import org.mockito.Mockito;
-
-public class AbstractMaintenanceJobTest {
-
-    private AbstractMaintenanceJob amj;
-    private JobExecutionContext context;
-    private ResultBuilder resultBuilder;
-
-    @Before
-    public void init() {
-        amj = new AbstractMaintenanceJob() {
-            @Override
-            public String getJobTopic() {
-                throw new UnsupportedOperationException();
-            }
-
-            @Override
-            public String getPrefix() {
-                return "Test Job";
-            }
-
-            @Override
-            public Optional<CompositeData> getStatus() {
-                throw new UnsupportedOperationException();
-            }
-
-            @Override
-            public void setJobManager(JobManager jobManager) {
-                throw new UnsupportedOperationException();
-            }
-
-            @Override
-            public Optional<CompositeData> startMaintenance() {
-                throw new UnsupportedOperationException();
-            }
-
-            @Override
-            public Optional<CompositeData> stopMaintenance() {
-                throw new UnsupportedOperationException();
-            }
-        };
-
-        context = Mockito.mock(JobExecutionContext.class);
-        resultBuilder = Mockito.mock(ResultBuilder.class);
-        Mockito.when(resultBuilder.message(Mockito.anyString())).thenReturn(resultBuilder);
-        Mockito.when(context.result()).thenReturn(resultBuilder);
-    }
-
-    @Test
-    public void testRunningResult() {
-        int id = 1;
-        CompositeData data = CompositeDataMock.init().put("code", StatusCode.RUNNING.ordinal())
-                .put("message", "Hello World").put("id", id).build();
-        JobExecutionResult result = amj.createResult(context, Optional.ofNullable(data), id);
-        assertNull(result);
-    }
-
-    @Test
-    public void testNewIdResult() {
-        int id = 1;
-        CompositeData data = CompositeDataMock.init().put("code", StatusCode.RUNNING.ordinal())
-                .put("message", "Hello World").put("id", 2).build();
-        amj.createResult(context, Optional.ofNullable(data), id);
-        Mockito.verify(resultBuilder).succeeded();
-    }
-
-    @Test
-    public void testFailedResult() {
-        int id = 1;
-        CompositeData data = CompositeDataMock.init().put("code", StatusCode.FAILED.ordinal())
-                .put("message", "Hello World").put("id", id).build();
-        amj.createResult(context, Optional.ofNullable(data), id);
-        Mockito.verify(resultBuilder).failed();
-
-    }
-
-    @Test
-    public void testNoneResult() {
-        int id = 1;
-        CompositeData data = CompositeDataMock.init().put("code", StatusCode.NONE.ordinal())
-                .put("message", "Hello World").put("id", id).build();
-        amj.createResult(context, Optional.ofNullable(data), id);
-        Mockito.verify(resultBuilder).failed();
-    }
-
-    @Test
-    public void testInvalidCode() {
-        int id = 1;
-        CompositeData data = CompositeDataMock.init().put("code", 2345677).put("message", "Hello World").put("id", id)
-                .build();
-        amj.createResult(context, Optional.ofNullable(data), id);
-        Mockito.verify(resultBuilder).failed();
-    }
-
-    @Test
-    public void testSucceededResult() {
-        int id = 1;
-        CompositeData data = CompositeDataMock.init().put("code", StatusCode.SUCCEEDED.ordinal())
-                .put("message", "Hello World").put("id", id).build();
-        amj.createResult(context, Optional.ofNullable(data), id);
-        Mockito.verify(resultBuilder).succeeded();
-    }
-
-}
\ No newline at end of file
diff --git a/core/src/test/java/org/apache/sling/cms/core/internal/repository/CompositeDataMock.java b/core/src/test/java/org/apache/sling/cms/core/internal/repository/CompositeDataMock.java
deleted file mode 100644
index 28f628d..0000000
--- a/core/src/test/java/org/apache/sling/cms/core/internal/repository/CompositeDataMock.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * 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 org.apache.sling.cms.core.internal.repository;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.management.openmbean.CompositeData;
-
-import org.mockito.Mockito;
-import org.mockito.invocation.InvocationOnMock;
-import org.mockito.stubbing.Answer;
-
-/**
- * A mock for creating a fluent API version of a CompositeData Object.
- */
-public class CompositeDataMock {
-
-    private Map<String, Object> data = new HashMap<>();
-
-    public static CompositeDataMock init() {
-        return new CompositeDataMock();
-    }
-
-    public CompositeDataMock put(String key, Object value) {
-        this.data.put(key, value);
-        return this;
-    }
-
-    public CompositeData build() {
-        CompositeData dc = Mockito.mock(CompositeData.class);
-        Mockito.when(dc.get(Mockito.anyString())).thenAnswer(new Answer<Object>() {
-            @Override
-            public Object answer(InvocationOnMock invocation) throws Throwable {
-                return data.get(invocation.getArguments()[0]);
-            }
-        });
-        return dc;
-    }
-
-}
\ No newline at end of file
diff --git a/core/src/test/java/org/apache/sling/cms/core/internal/repository/DataStoreCleanupSchedulerTest.java b/core/src/test/java/org/apache/sling/cms/core/internal/repository/DataStoreCleanupSchedulerTest.java
deleted file mode 100644
index d3918a6..0000000
--- a/core/src/test/java/org/apache/sling/cms/core/internal/repository/DataStoreCleanupSchedulerTest.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * 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 org.apache.sling.cms.core.internal.repository;
-
-import javax.management.openmbean.CompositeData;
-
-import org.apache.jackrabbit.oak.api.jmx.RepositoryManagementMBean;
-import org.apache.jackrabbit.oak.api.jmx.RepositoryManagementMBean.StatusCode;
-import org.apache.sling.event.jobs.Job;
-import org.apache.sling.event.jobs.JobManager;
-import org.apache.sling.event.jobs.consumer.JobExecutionContext;
-import org.apache.sling.event.jobs.consumer.JobExecutionResult;
-import org.apache.sling.event.jobs.consumer.JobExecutionContext.ResultBuilder;
-import org.junit.Before;
-import org.junit.Test;
-import org.mockito.Mockito;
-
-public class DataStoreCleanupSchedulerTest {
-
-    private JobExecutionContext context;
-    private ResultBuilder resultBuilder;
-
-    @Before
-    public void init() {
-        context = Mockito.mock(JobExecutionContext.class);
-        resultBuilder = Mockito.mock(ResultBuilder.class);
-        Mockito.when(resultBuilder.message(Mockito.anyString())).thenReturn(resultBuilder);
-        Mockito.when(resultBuilder.succeeded()).thenReturn(Mockito.mock(JobExecutionResult.class));
-        Mockito.when(resultBuilder.failed()).thenReturn(Mockito.mock(JobExecutionResult.class));
-        Mockito.when(context.result()).thenReturn(resultBuilder);
-    }
-
-    @Test
-    public void testRunnable() {
-        final DataStoreCleanupScheduler dscs = new DataStoreCleanupScheduler();
-        final JobManager jobManager = Mockito.mock(JobManager.class);
-        dscs.setJobManager(jobManager);
-
-        Mockito.when(jobManager.addJob(Mockito.eq(dscs.getJobTopic()), Mockito.anyMap())).then((answer) -> {
-            dscs.process(Mockito.mock(Job.class), context);
-            return null;
-        });
-
-        Integer id = 1;
-        final RepositoryManagementMBean repositoryManager = Mockito.mock(RepositoryManagementMBean.class);
-        CompositeData startingCd = CompositeDataMock.init().put("id", id).build();
-        Mockito.when(repositoryManager.startDataStoreGC(false)).thenReturn(startingCd);
-        CompositeData doneCd = CompositeDataMock.init().put("id", id).put("code", StatusCode.SUCCEEDED.ordinal())
-                .build();
-        Mockito.when(repositoryManager.getDataStoreGCStatus()).thenReturn(doneCd);
-        dscs.setRepositoryManager(repositoryManager);
-
-        dscs.run();
-
-        Mockito.verify(repositoryManager).startDataStoreGC(false);
-        Mockito.verify(resultBuilder).succeeded();
-    }
-
-}
\ No newline at end of file
diff --git a/core/src/test/java/org/apache/sling/cms/core/internal/repository/RevisionCleanupSchedulerTest.java b/core/src/test/java/org/apache/sling/cms/core/internal/repository/RevisionCleanupSchedulerTest.java
deleted file mode 100644
index ba8f255..0000000
--- a/core/src/test/java/org/apache/sling/cms/core/internal/repository/RevisionCleanupSchedulerTest.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * 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 org.apache.sling.cms.core.internal.repository;
-
-import javax.management.openmbean.CompositeData;
-
-import org.apache.jackrabbit.oak.api.jmx.RepositoryManagementMBean;
-import org.apache.jackrabbit.oak.api.jmx.RepositoryManagementMBean.StatusCode;
-import org.apache.sling.event.jobs.Job;
-import org.apache.sling.event.jobs.JobManager;
-import org.apache.sling.event.jobs.consumer.JobExecutionContext;
-import org.apache.sling.event.jobs.consumer.JobExecutionContext.ResultBuilder;
-import org.apache.sling.event.jobs.consumer.JobExecutionResult;
-import org.junit.Before;
-import org.junit.Test;
-import org.mockito.Mockito;
-
-public class RevisionCleanupSchedulerTest {
-
-    private JobExecutionContext context;
-    private ResultBuilder resultBuilder;
-
-    @Before
-    public void init() {
-        context = Mockito.mock(JobExecutionContext.class);
-        resultBuilder = Mockito.mock(ResultBuilder.class);
-        Mockito.when(resultBuilder.message(Mockito.anyString())).thenReturn(resultBuilder);
-        Mockito.when(resultBuilder.succeeded()).thenReturn(Mockito.mock(JobExecutionResult.class));
-        Mockito.when(resultBuilder.failed()).thenReturn(Mockito.mock(JobExecutionResult.class));
-        Mockito.when(context.result()).thenReturn(resultBuilder);
-    }
-
-    @Test
-    public void testRunnable() {
-        final RevisionCleanupScheduler dscs = new RevisionCleanupScheduler();
-        final JobManager jobManager = Mockito.mock(JobManager.class);
-        dscs.setJobManager(jobManager);
-
-        Mockito.when(jobManager.addJob(Mockito.eq(dscs.getJobTopic()), Mockito.anyMap())).then((answer) -> {
-            dscs.process(Mockito.mock(Job.class), context);
-            return null;
-        });
-
-        Integer id = 1;
-        final RepositoryManagementMBean repositoryManager = Mockito.mock(RepositoryManagementMBean.class);
-        CompositeData startingCd = CompositeDataMock.init().put("id", id).build();
-        Mockito.when(repositoryManager.startDataStoreGC(false)).thenReturn(startingCd);
-        CompositeData doneCd = CompositeDataMock.init().put("id", id).put("code", StatusCode.SUCCEEDED.ordinal())
-                .build();
-        Mockito.when(repositoryManager.getRevisionGCStatus()).thenReturn(doneCd);
-        dscs.setRepositoryManager(repositoryManager);
-
-        dscs.run();
-
-        Mockito.verify(repositoryManager).startRevisionGC();
-        Mockito.verify(resultBuilder).succeeded();
-    }
-
-}
\ No newline at end of file

[sling-org-apache-sling-app-cms] 04/08: Minor - fixing action bar overflow at specific breakpoints

Posted by dk...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

dklco pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-app-cms.git

commit f0fc25dc1a95095d927a73f5aad074a292bea017
Author: Dan Klco <kl...@adobe.com>
AuthorDate: Mon Mar 29 23:06:54 2021 -0400

    Minor - fixing action bar overflow at specific breakpoints
---
 ui/src/main/frontend/scss/cms.scss | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/ui/src/main/frontend/scss/cms.scss b/ui/src/main/frontend/scss/cms.scss
index e086eca..f3fbc5c 100644
--- a/ui/src/main/frontend/scss/cms.scss
+++ b/ui/src/main/frontend/scss/cms.scss
@@ -195,6 +195,10 @@ small.card-footer-item {
   padding: 12px 0;
 }
 
+.Main-Content .level-left {
+  overflow-x: auto;
+}
+
 .main-section {
   flex-grow: 1;
   @media screen and (min-width: $tablet), print {