Skip to content

Commit

Permalink
Merge pull request #1 from davideabbatiello/7.1_DXP
Browse files Browse the repository at this point in the history
7.1 dxp
  • Loading branch information
baxtheman authored Jan 31, 2020
2 parents 969cf70 + 5820f07 commit 233a6ec
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 23 deletions.
2 changes: 1 addition & 1 deletion bnd.bnd
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Bundle-Name: liferay-log-viewer
Bundle-SymbolicName: au.com.permeance.utility.logviewer
Bundle-Version: 7.1.2.1
Bundle-Version: 7.1.2.2
-sources: true
18 changes: 9 additions & 9 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
dependencies {
compileOnly group: "com.liferay", name: "com.liferay.application.list.api", version: "1.0.0"
compileOnly group: "com.liferay", name: "com.liferay.petra.string", version: "2.1.4"
compileOnly group: "com.liferay.portal", name: "com.liferay.portal.kernel", version: "3.0.0"
compileOnly group: "com.liferay.portal", name: "com.liferay.util.bridges", version: "2.0.0"
compileOnly group: "com.liferay.portal", name: "com.liferay.util.taglib", version: "2.0.0"
compileOnly group: "commons-io", name: "commons-io", version: "2.6"
compileOnly group: "javax.portlet", name: "portlet-api", version: "3.0.0"
compileOnly group: "javax.servlet", name: "javax.servlet-api", version: "3.0.1"
compileOnly group: "org.osgi", name: "org.osgi.service.component.annotations", version: "1.3.0"
compileOnly group: "com.liferay", name: "com.liferay.application.list.api"
compileOnly group: "com.liferay", name: "com.liferay.petra.string"
compileOnly group: "com.liferay.portal", name: "com.liferay.portal.kernel"
compileOnly group: "com.liferay.portal", name: "com.liferay.util.bridges"
compileOnly group: "com.liferay.portal", name: "com.liferay.util.taglib"
compileOnly group: "commons-io", name: "commons-io"
compileOnly group: "javax.portlet", name: "portlet-api"
compileOnly group: "javax.servlet", name: "javax.servlet-api"
compileOnly group: "org.osgi", name: "org.osgi.service.component.annotations"
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,6 @@

package au.com.permeance.utility.logviewer.portlets;

import com.liferay.portal.kernel.json.JSONFactoryUtil;
import com.liferay.portal.kernel.json.JSONObject;
import com.liferay.portal.kernel.log.Log;
import com.liferay.portal.kernel.log.LogFactoryUtil;
import com.liferay.portal.kernel.portlet.bridges.mvc.MVCPortlet;
import com.liferay.portal.kernel.servlet.HttpHeaders;
import com.liferay.portal.kernel.util.GetterUtil;
import com.liferay.portal.kernel.util.HtmlUtil;
import com.liferay.portal.kernel.util.PortletCategoryKeys;
import com.liferay.portal.kernel.util.StringPool;

import java.io.IOException;
import java.io.PrintWriter;
import java.io.StringWriter;
Expand All @@ -39,6 +28,16 @@

import org.osgi.service.component.annotations.Component;

import com.liferay.petra.string.StringPool;
import com.liferay.portal.kernel.json.JSONFactoryUtil;
import com.liferay.portal.kernel.json.JSONObject;
import com.liferay.portal.kernel.log.Log;
import com.liferay.portal.kernel.log.LogFactoryUtil;
import com.liferay.portal.kernel.portlet.bridges.mvc.MVCPortlet;
import com.liferay.portal.kernel.servlet.HttpHeaders;
import com.liferay.portal.kernel.util.GetterUtil;
import com.liferay.portal.kernel.util.HtmlUtil;

/**
* LogViewerPortlet
*
Expand All @@ -54,6 +53,7 @@
"com.liferay.portlet.css-class-wrapper=portlet-controlpanel",
"com.liferay.portlet.render-weight=100",
"javax.portlet.expiration-cache=0",
"javax.portlet.version=3.0",
"javax.portlet.resource-bundle=content.Language",
"javax.portlet.init-param.view-template=/view.jsp",
"javax.portlet.security-role-ref=administrator",
Expand Down Expand Up @@ -126,7 +126,8 @@ public void serveResource(
resourceResponse.addProperty(
HttpHeaders.CACHE_CONTROL, PortletConstants.NO_CACHE);

final String cmd = resourceRequest.getParameter(PARAM_OP);
final String cmd = resourceRequest.getParameter(
PARAM_OP);

if (OP_ATTACH.equals(cmd)) {
try {
Expand Down Expand Up @@ -158,7 +159,8 @@ public void serveResource(
} else {

final int pointer = GetterUtil.getInteger(
resourceRequest.getParameter(ATTRIB_POINTER), -1);
resourceRequest.getParameter(
ATTRIB_POINTER), -1);

final RollingLogViewer viewer = LogHolder.getViewer();

Expand Down
5 changes: 5 additions & 0 deletions src/main/resources/META-INF/resources/view.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,11 @@ page import="au.com.permeance.utility.logviewer.portlets.PortletPropsValues" %>
}
window.pollingIntervalId = setInterval(poll, <%= String.valueOf(PortletPropsValues.PERMEANCE_LOG_VIEWER_REFRESH_INTERVAL) %>);
Liferay.on('endNavigate', function() {
console.log('detach logger');
detachlogger();
});
</script>
<div class="container">
Expand Down

0 comments on commit 233a6ec

Please sign in to comment.