Alon Bar-Lev has uploaded a new change for review. Change subject: services: reports: serve reports ui xml as servlet ......................................................................
services: reports: serve reports ui xml as servlet instead of using direct static content which does not support logic, use a servlet that can acquire information from whatever source. in this patch the source is local config, to allow easy integration with reports without reports package overwrite the engine data directory. Change-Id: I78f7822354ac6850a49698b0262209489a5ab5b3 Signed-off-by: Alon Bar-Lev <[email protected]> --- M backend/manager/modules/services/src/main/webapp/WEB-INF/web.xml M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/ReportInit.java M packaging/services/ovirt-engine/ovirt-engine.conf.in 3 files changed, 28 insertions(+), 1 deletion(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/96/23196/1 diff --git a/backend/manager/modules/services/src/main/webapp/WEB-INF/web.xml b/backend/manager/modules/services/src/main/webapp/WEB-INF/web.xml index 2cb0860..348ac7a 100644 --- a/backend/manager/modules/services/src/main/webapp/WEB-INF/web.xml +++ b/backend/manager/modules/services/src/main/webapp/WEB-INF/web.xml @@ -65,6 +65,23 @@ </servlet-mapping> <servlet> + <servlet-name>reports-ui</servlet-name> + <servlet-class>org.ovirt.engine.core.utils.servlet.FileServlet</servlet-class> + <init-param> + <param-name>file</param-name> + <param-value>%{ENGINE_REPORTS_UI}</param-value> + </init-param> + <init-param> + <param-name>cache</param-name> + <param-value>false</param-value> + </init-param> + </servlet> + <servlet-mapping> + <servlet-name>reports-ui</servlet-name> + <url-pattern>/reports-ui</url-pattern> + </servlet-mapping> + + <servlet> <servlet-name>health</servlet-name> <servlet-class>org.ovirt.engine.core.services.HealthStatus</servlet-class> </servlet> diff --git a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/ReportInit.java b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/ReportInit.java index 5867a67..d9f97f2 100644 --- a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/ReportInit.java +++ b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/ReportInit.java @@ -5,6 +5,7 @@ import org.ovirt.engine.ui.frontend.AsyncQuery; import org.ovirt.engine.ui.frontend.INewAsyncCallback; +import org.ovirt.engine.ui.frontend.utils.BaseContextPathData; import org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider; import org.ovirt.engine.ui.uicompat.Event; import org.ovirt.engine.ui.uicompat.ReportParser; @@ -84,7 +85,10 @@ private void parseReportsXML() { RequestBuilder requestBuilder = - new RequestBuilder(RequestBuilder.GET, "Reports.xml"); //$NON-NLS-1$ + new RequestBuilder(RequestBuilder.GET, + "/" //$NON-NLS-1$ + + BaseContextPathData.getInstance().getRelativePath() + + "services/reports-ui"); //$NON-NLS-1$ try { requestBuilder.sendRequest(null, new RequestCallback() { @Override diff --git a/packaging/services/ovirt-engine/ovirt-engine.conf.in b/packaging/services/ovirt-engine/ovirt-engine.conf.in index 0e52b2c..c087d22 100644 --- a/packaging/services/ovirt-engine/ovirt-engine.conf.in +++ b/packaging/services/ovirt-engine/ovirt-engine.conf.in @@ -205,3 +205,9 @@ ENGINE_PKI_ENGINE_STORE=${ENGINE_PKI}/keys/engine.p12 ENGINE_PKI_ENGINE_STORE_PASSWORD= ENGINE_PKI_ENGINE_STORE_ALIAS=1 + +# +# Reports +# by default serv 404. +# +ENGINE_REPORTS_UI=${ENGINE_USR}/missing.file -- To view, visit http://gerrit.ovirt.org/23196 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I78f7822354ac6850a49698b0262209489a5ab5b3 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Alon Bar-Lev <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
