http://git-wip-us.apache.org/repos/asf/stratos/blob/028c3539/components/org.apache.stratos.load.balancer.common/pom.xml ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.load.balancer.common/pom.xml b/components/org.apache.stratos.load.balancer.common/pom.xml index 8320060..4a57e2a 100644 --- a/components/org.apache.stratos.load.balancer.common/pom.xml +++ b/components/org.apache.stratos.load.balancer.common/pom.xml @@ -19,24 +19,22 @@ --> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> - + <modelVersion>4.0.0</modelVersion> <parent> <groupId>org.apache.stratos</groupId> <artifactId>stratos-components-parent</artifactId> <version>4.1.2-SNAPSHOT</version> </parent> - <modelVersion>4.0.0</modelVersion> <artifactId>org.apache.stratos.load.balancer.common</artifactId> <packaging>bundle</packaging> <name>Apache Stratos - Load Balancer - Common</name> - <url>http://apache.org</url> <dependencies> <dependency> <groupId>org.wso2.carbon</groupId> <artifactId>org.wso2.carbon.core</artifactId> - <version>${wso2carbon.version}</version> + <version>${carbon.kernel.version}</version> </dependency> <dependency> <groupId>junit</groupId> @@ -46,7 +44,7 @@ <dependency> <groupId>org.wso2.carbon</groupId> <artifactId>org.wso2.carbon.logging</artifactId> - <version>${wso2carbon.version}</version> + <version>${carbon.kernel.version}</version> </dependency> <dependency> <groupId>org.apache.stratos</groupId> @@ -66,12 +64,12 @@ <dependency> <groupId>org.wso2.carbon</groupId> <artifactId>org.wso2.carbon.databridge.agent.thrift</artifactId> - <version>${wso2carbon.version}</version> + <version>${carbon.kernel.version}</version> </dependency> <dependency> <groupId>org.wso2.carbon</groupId> <artifactId>org.wso2.carbon.databridge.commons</artifactId> - <version>${wso2carbon.version}</version> + <version>${carbon.kernel.version}</version> </dependency> </dependencies> @@ -107,4 +105,4 @@ </plugin> </plugins> </build> -</project> +</project> \ No newline at end of file
http://git-wip-us.apache.org/repos/asf/stratos/blob/028c3539/components/org.apache.stratos.load.balancer.extension.api/pom.xml ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.load.balancer.extension.api/pom.xml b/components/org.apache.stratos.load.balancer.extension.api/pom.xml index d9ba41f..6710019 100644 --- a/components/org.apache.stratos.load.balancer.extension.api/pom.xml +++ b/components/org.apache.stratos.load.balancer.extension.api/pom.xml @@ -17,11 +17,9 @@ ~ specific language governing permissions and limitations ~ under the License. --> - <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> - <parent> <groupId>org.apache.stratos</groupId> <artifactId>stratos-components-parent</artifactId> @@ -32,19 +30,6 @@ <name>Apache Stratos - Load Balancer - Extension API</name> <description>An extension API for integrating third party load balancers with Apache Stratos.</description> - <repositories> - <repository> - <id>wso2-nexus</id> - <name>WSO2 internal Repository</name> - <url>http://maven.wso2.org/nexus/content/groups/wso2-public/</url> - <releases> - <enabled>true</enabled> - <updatePolicy>daily</updatePolicy> - <checksumPolicy>ignore</checksumPolicy> - </releases> - </repository> - </repositories> - <dependencies> <dependency> <groupId>org.apache.stratos</groupId> @@ -57,4 +42,4 @@ <version>${project.version}</version> </dependency> </dependencies> -</project> +</project> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/stratos/blob/028c3539/components/org.apache.stratos.load.balancer/pom.xml ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.load.balancer/pom.xml b/components/org.apache.stratos.load.balancer/pom.xml index f9033a3..070d252 100644 --- a/components/org.apache.stratos.load.balancer/pom.xml +++ b/components/org.apache.stratos.load.balancer/pom.xml @@ -19,34 +19,27 @@ --> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> - + <modelVersion>4.0.0</modelVersion> <parent> <groupId>org.apache.stratos</groupId> <artifactId>stratos-components-parent</artifactId> <version>4.1.2-SNAPSHOT</version> </parent> - <modelVersion>4.0.0</modelVersion> <artifactId>org.apache.stratos.load.balancer</artifactId> <packaging>bundle</packaging> <name>Apache Stratos - Load Balancer</name> - <url>http://apache.org</url> <dependencies> <dependency> <groupId>org.wso2.carbon</groupId> <artifactId>org.wso2.carbon.mediation.initializer</artifactId> - <version>${wso2carbon.version}</version> + <version>${carbon.kernel.version}</version> </dependency> <dependency> <groupId>org.wso2.carbon</groupId> <artifactId>org.wso2.carbon.mediation.dependency.mgt</artifactId> - <version>${wso2carbon.version}</version> - </dependency> - <dependency> - <groupId>org.apache.synapse</groupId> - <artifactId>synapse-core</artifactId> - <version>${synapse.core.version}</version> + <version>${carbon.kernel.version}</version> </dependency> <dependency> <groupId>org.apache.stratos</groupId> @@ -62,7 +55,6 @@ <build> <plugins> - <plugin> <groupId>org.apache.felix</groupId> <artifactId>maven-scr-plugin</artifactId> @@ -70,7 +62,6 @@ <plugin> <groupId>org.apache.felix</groupId> <artifactId>maven-bundle-plugin</artifactId> - <extensions>true</extensions> <configuration> <instructions> @@ -92,4 +83,4 @@ </plugin> </plugins> </build> -</project> +</project> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/stratos/blob/028c3539/components/org.apache.stratos.logging.view.ui/pom.xml ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.logging.view.ui/pom.xml b/components/org.apache.stratos.logging.view.ui/pom.xml deleted file mode 100644 index d510e8a..0000000 --- a/components/org.apache.stratos.logging.view.ui/pom.xml +++ /dev/null @@ -1,81 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- - 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. ---> - - -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> - - <parent> - <groupId>org.apache.stratos</groupId> - <artifactId>stratos-components-parent</artifactId> - <version>4.1.2-SNAPSHOT</version> - </parent> - - <modelVersion>4.0.0</modelVersion> - <artifactId>org.apache.stratos.logging.view.ui</artifactId> - <packaging>bundle</packaging> - <name>Apache Stratos - Logging View UI</name> - <url>http://apache.org</url> - <description>Log Viewer UI Bundle</description> - <build> - <plugins> - <plugin> - <groupId>org.apache.felix</groupId> - <artifactId>maven-bundle-plugin</artifactId> - - <extensions>true</extensions> - <configuration> - <instructions> - <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName> - <Bundle-Name>${project.artifactId}</Bundle-Name> - <Export-Package> - org.apache.stratos.logging.view.ui.* - </Export-Package> - <Import-Package> - org.wso2.carbon.logging.view.stub.*; - version="${carbon.platform.package.import.version.range}", - *;resolution:=optional - </Import-Package> - <!--Embed-Dependency>org.wso2.carbon.logging.view.stub;scope=compile|runtime;inline=true</Embed-Dependency--> - <Carbon-Component>UIBundle</Carbon-Component> - </instructions> - </configuration> - </plugin> - </plugins> - </build> - - <dependencies> - <dependency> - <groupId>org.wso2.carbon</groupId> - <artifactId>org.wso2.carbon.ui</artifactId> - <version>${wso2carbon.version}</version> - </dependency> - <dependency> - <groupId>org.wso2.carbon</groupId> - <artifactId>org.wso2.carbon.logging.view.stub</artifactId> - <version>${wso2carbon.version}</version> - </dependency> - <dependency> - <groupId>org.apache.stratos</groupId> - <artifactId>org.apache.stratos.manager.service.stub</artifactId> - <version>${project.version}</version> - </dependency> - </dependencies> -</project> http://git-wip-us.apache.org/repos/asf/stratos/blob/028c3539/components/org.apache.stratos.logging.view.ui/src/main/java/org/apache/stratos/logging/view/ui/LogViewerClient.java ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.logging.view.ui/src/main/java/org/apache/stratos/logging/view/ui/LogViewerClient.java b/components/org.apache.stratos.logging.view.ui/src/main/java/org/apache/stratos/logging/view/ui/LogViewerClient.java deleted file mode 100644 index b46940d..0000000 --- a/components/org.apache.stratos.logging.view.ui/src/main/java/org/apache/stratos/logging/view/ui/LogViewerClient.java +++ /dev/null @@ -1,272 +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 - * <p/> - * http://www.apache.org/licenses/LICENSE-2.0 - * <p/> - * 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.stratos.logging.view.ui; - -import org.apache.axis2.AxisFault; -import org.apache.axis2.Constants; -import org.apache.axis2.client.Options; -import org.apache.axis2.client.ServiceClient; -import org.apache.axis2.context.ConfigurationContext; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.wso2.carbon.logging.view.stub.LogViewerLogViewerException; -import org.wso2.carbon.logging.view.stub.LogViewerStub; -import org.wso2.carbon.logging.view.stub.types.carbon.LogEvent; -import org.wso2.carbon.logging.view.stub.types.carbon.PaginatedLogEvent; -import org.wso2.carbon.logging.view.stub.types.carbon.PaginatedLogInfo; - -import javax.activation.DataHandler; -import javax.servlet.ServletOutputStream; -import javax.servlet.http.HttpServletResponse; -import java.io.InputStream; -import java.rmi.RemoteException; - -public class LogViewerClient { - private static final Log log = LogFactory.getLog(LogViewerClient.class); - public LogViewerStub stub; - - public LogViewerClient(String cookie, String backendServerURL, ConfigurationContext configCtx) - throws AxisFault { - String serviceURL = backendServerURL + "LogViewer"; - - stub = new LogViewerStub(configCtx, serviceURL); - ServiceClient client = stub._getServiceClient(); - Options option = client.getOptions(); - option.setManageSession(true); - option.setProperty(org.apache.axis2.transport.http.HTTPConstants.COOKIE_STRING, cookie); - option.setProperty(Constants.Configuration.ENABLE_MTOM, Constants.VALUE_TRUE); - } - - - public void cleaLogs() throws Exception { - stub.clearLogs(); - } - - public void downloadArchivedLogFiles(String logFile, HttpServletResponse response, String domain, String serverKey) - throws Exception { - try { - logFile = logFile.replace(".gz", ""); - ServletOutputStream outputStream = response.getOutputStream(); - response.setContentType("application/txt"); - response.setHeader("Content-Disposition", - "attachment;filename=" + logFile.replaceAll("\\s", "_")); - DataHandler data = stub.downloadArchivedLogFiles(logFile, domain, serverKey); - InputStream fileToDownload = data.getInputStream(); - int c; - while ((c = fileToDownload.read()) != -1) { - outputStream.write(c); - } - outputStream.flush(); - outputStream.flush(); - } catch (Exception e) { - String msg = "Error occurred while getting logger data. Backend service may be unavailable"; - log.error(msg, e); - throw e; - } - } - - public int getLineNumbers(String logFile) - throws Exception { - try { - return stub.getLineNumbers(logFile); - } catch (RemoteException e) { - String msg = "Error occurred while getting logger data. Backend service may be unavailable"; - log.error(msg, e); - throw e; - } - } - - public PaginatedLogInfo getPaginatedLogInfo(int pageNumber, String tenantDomain, - String serviceName) throws Exception { - try { - return stub.getPaginatedLogInfo(pageNumber, tenantDomain, serviceName); - } catch (RemoteException e) { - String msg = "Error occurred while getting logger data. Backend service may be unavailable"; - log.error(msg, e); - throw e; - } - } - - public LogEvent[] getLogs(String type, String keyword, String domain, String serverkey) throws Exception { - if (type == null || type.equals("")) { - type = "ALL"; - } - try { - return stub.getLogs(type, keyword, domain, serverkey); - } catch (RemoteException e) { - String msg = "Error occurred while getting logger data. Backend service may be unavailable"; - log.error(msg, e); - throw e; - } - } - - public LogEvent[] getApplicationLogs(String type, String keyword, String applicationName, String domain, String serverKey) - throws Exception { - if (type == null || type.equals("")) { - type = "ALL"; - } - if (applicationName == null || applicationName.equals("")) { - applicationName = "FIRST"; - } - try { - return stub.getApplicationLogs(type, keyword, applicationName, domain, serverKey); - } catch (RemoteException e) { - String msg = "Error occurred while getting logger data. Backend service may be unavailable"; - log.error(msg, e); - throw e; - } - } - - public String[] getLogLinesFromFile(String logFile, int maxLogs, int start, int end) throws Exception { - try { - return stub.getLogLinesFromFile(logFile, maxLogs, start, end); - } catch (RemoteException e) { - String msg = "Error occurred while getting logger data. Backend service may be unavailable"; - log.error(msg, e); - throw e; - } - } - - /*public String[] getSubscribedCartridgeList() throws Exception { - try { - return appMgtStub.getSubscribedCartridgeAliases(); - } catch (RemoteException e) { - String msg = "Error occurred while getting logger data. Backend service may be unavailable"; - log.error(msg, e); - throw e; - } - }*/ - - public String[] getApplicationNames(String domain, String serverKey) throws LogViewerLogViewerException, RemoteException { - try { - return stub.getApplicationNames(domain, serverKey); - } catch (RemoteException e) { - String msg = "Error occurred while getting logger data. Backend service may be unavailable"; - log.error(msg, e); - throw e; - } - } - - public int getNoOfLogEvents() throws Exception { - try { - return 20;// stub.getNoOfLogEvents(); - } catch (Exception e) { - String msg = "Error occurred while getting logger data. Backend service may be unavailable"; - log.error(msg, e); - throw e; - } - } - - public String[] getServiceNames() throws RemoteException, LogViewerLogViewerException { - try { - return stub.getServiceNames(); - } catch (RemoteException e) { - String msg = "Error occurred while getting logger data. Backend service may be unavailable"; - log.error(msg, e); - throw e; - } - } - - public boolean isFileAppenderConfiguredForST() throws RemoteException { - try { - return stub.isFileAppenderConfiguredForST(); - } catch (RemoteException e) { - String msg = "Error occurred while getting logger data. Backend service may be unavailable"; - log.error(msg, e); - throw e; - } - } - - public PaginatedLogEvent getPaginatedLogEvents(int pageNumber, String type, String keyword, String domain, String serverKey) - throws Exception { - try { - return stub.getPaginatedLogEvents(pageNumber, type, keyword, domain, serverKey); - } catch (RemoteException e) { - String msg = "Error occurred while getting logger data. Backend service may be unavailable"; - log.error(msg, e); - throw e; - } - } - - public PaginatedLogEvent getPaginatedApplicationLogEvents(int pageNumber, String type, - String keyword, String appName, String domain, String serverKey) throws Exception { - try { - return stub.getPaginatedApplicationLogEvents(pageNumber, type, keyword, appName, domain, serverKey); - } catch (RemoteException e) { - String msg = "Error occurred while getting logger data. Backend service may be unavailable"; - log.error(msg, e); - throw e; - } - } - - public PaginatedLogInfo getLocalLogFiles(int pageNo, String domain, String serverKey) throws Exception { - - try { - return stub.getLocalLogFiles(pageNo, domain, serverKey); - } catch (Exception e) { - String msg = "Error occurred while getting logger data. Backend service may be unavailable"; - log.error(msg, e); - throw e; - } - - } - - public boolean isLogEventReciverConfigured() throws RemoteException { - try { - return stub.isLogEventReciverConfigured(); - } catch (RemoteException e) { - String msg = "Error occurred while getting logger data. Backend service may be unavailable"; - log.error(msg, e); - throw e; - } - } - - public String getImageName(String type) { - if (type.equals("INFO")) { - return "images/information.gif"; - } else if (type.equals("ERROR")) { - return "images/error.png"; - } else if (type.equals("WARN")) { - return "images/warn.png"; - } else if (type.equals("DEBUG")) { - return "images/debug.png"; - } else if (type.equals("TRACE")) { - return "images/trace.png"; - } else if (type.equals("FATAL")) { - return "images/fatal.png"; - } - return ""; - } - - public String[] getLogLevels() { - return new String[]{"ALL", "FATAL", "ERROR", "WARN", "INFO", "DEBUG", "TRACE"}; - } - - public boolean isManager() throws RemoteException { - return stub.isManager(); - } - - public boolean isValidTenant(String domain) throws RemoteException { - return stub.isValidTenant(domain); - - } - -} - http://git-wip-us.apache.org/repos/asf/stratos/blob/028c3539/components/org.apache.stratos.logging.view.ui/src/main/resources/META-INF/component.xml ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.logging.view.ui/src/main/resources/META-INF/component.xml b/components/org.apache.stratos.logging.view.ui/src/main/resources/META-INF/component.xml deleted file mode 100644 index 5ce1b15..0000000 --- a/components/org.apache.stratos.logging.view.ui/src/main/resources/META-INF/component.xml +++ /dev/null @@ -1,49 +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. ---> -<component xmlns="http://products.wso2.org/carbon"> - <!-- sample menu configuration --> - <menus> - <menu> - <id>logs_menu</id> - <i18n-key>logsmenutext</i18n-key> - <i18n-bundle>org.apache.stratos.logging.view.ui.i18n.Resources</i18n-bundle> - <parent-menu>monitor_menu</parent-menu> - <link>../log-view/index.jsp</link> - <region>region4</region> - <order>10</order> - <style-class>monitor</style-class> - <icon>../log-view/images/script_gear.gif</icon> - <require-permission>/permission/admin/monitor/logging</require-permission> - <!--require-super-tenant>true</require-super-tenant--> - </menu> - <menu> - <id>app_log_menu</id> - <i18n-key>applogsmenutext</i18n-key> - <i18n-bundle>org.apache.stratos.logging.view.ui.i18n.Resources</i18n-bundle> - <parent-menu>monitor_menu</parent-menu> - <link>../log-view/application_log_viewer.jsp</link> - <region>region4</region> - <order>3</order> - <style-class>monitor</style-class> - <icon>../log-view/images/script_gear.gif</icon> - <require-permission>/permission/admin/monitor/logging</require-permission> - - </menu> - </menus> -</component> http://git-wip-us.apache.org/repos/asf/stratos/blob/028c3539/components/org.apache.stratos.logging.view.ui/src/main/resources/org/apache/stratos/logging/view/ui/i18n/Resources.properties ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.logging.view.ui/src/main/resources/org/apache/stratos/logging/view/ui/i18n/Resources.properties b/components/org.apache.stratos.logging.view.ui/src/main/resources/org/apache/stratos/logging/view/ui/i18n/Resources.properties deleted file mode 100644 index 7d3bf24..0000000 --- a/components/org.apache.stratos.logging.view.ui/src/main/resources/org/apache/stratos/logging/view/ui/i18n/Resources.properties +++ /dev/null @@ -1,66 +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. -# -# - -archived.logs=Show archived logs -adv.search=Show advanced search -max.exceed.message=Maximum Number of Log Retrieval for the Day Exceeded... Your latest logs will be omitted. -logsmenutext=System Logs -applogsmenutext=Application Logs -viewlogsmenutext=View Logs text -system.logs=System Logs -app.logs=Application Logs -system.logs.view = System Log View -view=View -download=Download -search.logs=Search Logs -file.size = File Size -clear.all=Clear All Logs -clear.all.log.message=Do you want to clear all the logs -no.logs=--- No log entries found. --- -invalid.tenant= --- Invalid tenant domain --- -file.name = File Name -date = Date -action = Action -log.tail = Log Tail -service.name = Subscribed Cartridge Aliases -log.head = Log Head -log.message = Log Message -log.type = Type -local.log.location.information = Logs are taken from the local file system. -remote.log.location.information = Logs are taken from the remote log hosted server. -log.head.help = Enter the number of log lines to be displayed from the top-down. -tenant.domain = Tenant Domain -return.rows = Return Rows -show.at.or.before = Show at or Between -advanced.properties = Advanced Properties -priority = Priority -keyword = Keyword -logger = Logger -application.name=Application Name -filter.system.logs=Filter System Logs -date.format=mm/dd/yyyy hh:mm -date.example=(eg 2012-05-18 06:21:39) -view.stack.trace=More -view.logs.within.the.past.thirty.mins=Logs taken within past thirty minutes. -view.logs.between=Logs taken between. -log.level=Level -current.time=Current Time Zone: - http://git-wip-us.apache.org/repos/asf/stratos/blob/028c3539/components/org.apache.stratos.logging.view.ui/src/main/resources/web/log-view/application_log_viewer.jsp ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.logging.view.ui/src/main/resources/web/log-view/application_log_viewer.jsp b/components/org.apache.stratos.logging.view.ui/src/main/resources/web/log-view/application_log_viewer.jsp deleted file mode 100644 index 592c8d7..0000000 --- a/components/org.apache.stratos.logging.view.ui/src/main/resources/web/log-view/application_log_viewer.jsp +++ /dev/null @@ -1,376 +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. ---> -<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> -<%@ taglib uri="http://wso2.org/projects/carbon/taglibs/carbontags.jar" - prefix="carbon" %> -<%@ page import="org.apache.stratos.logging.view.ui.LogViewerClient" %> -<%@ page import="org.apache.axis2.context.ConfigurationContext" %> -<%@ page import="org.wso2.carbon.CarbonConstants" %> -<%-- <%@ page --%> -<!-- import="org.wso2.carbon.logging.view.stub.types.carbon.LogEvent"%> --> -<%@ page import="org.wso2.carbon.utils.ServerConstants" %> -<%@ page import="org.wso2.carbon.ui.CarbonUIUtil" %> -<%@ page import="org.wso2.carbon.logging.view.stub.types.carbon.PaginatedLogEvent" %> -<%@ page import="org.wso2.carbon.ui.CarbonUIMessage" %> -<%@ page import="org.wso2.carbon.ui.CarbonUIUtil" %> -<%@ page import="org.wso2.carbon.ui.util.CharacterEncoder" %> -<%@ page import="org.wso2.carbon.logging.view.stub.types.carbon.LogEvent" %> -<%@ page import="java.text.SimpleDateFormat" %> -<script type="text/javascript" src="js/logviewer.js"></script> -<script type="text/javascript" src="../admin/dialog/js/dialog.js"></script> - - -<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> -<html> -<head> - <script type="text/JavaScript"> - function refresh(time) { - setTimeout("location.reload(true);", time); - } - </script> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> - <title>View Application Logs</title> -</head> -<body onload="JavaScript:refresh(120000);"> - -<% - String backendServerURL = CarbonUIUtil - .getServerURL(config.getServletContext(), session); - ConfigurationContext configContext = (ConfigurationContext) config.getServletContext() - .getAttribute(CarbonConstants.CONFIGURATION_CONTEXT); - String cookie = (String) session.getAttribute(ServerConstants.ADMIN_SERVICE_COOKIE); - LogViewerClient logViewerClient; - LogEvent[] events = null; - String type; - String keyword; - String action; - String pageNumberStr = request.getParameter("pageNumber"); - int pageNumber = 0; - int numberOfPages = 0; - PaginatedLogEvent paginatedLogEvents = null; - String parameter = ""; - boolean isSuperTenant = CarbonUIUtil.isSuperTenant(request); - boolean isManager = false; - String tenantDomain = request.getParameter("tenantDomain"); - String serviceName = request.getParameter("serviceName"); - String showMaxStr = request.getParameter("showMax"); - String serviceNames[]; - boolean isValidTenant = true; - boolean showMax = false; - showMax = Boolean.parseBoolean(showMaxStr); - try { - pageNumber = Integer.parseInt(pageNumberStr); - } catch (NumberFormatException ignored) { - // page number format exception - } - String appName; - String applicationNames[] = null; - try { - type = CharacterEncoder.getSafeText(request.getParameter("type")); - type = (type == null) ? "" : type; - keyword = CharacterEncoder.getSafeText(request.getParameter("keyword")); - keyword = (keyword == null) ? "" : keyword; - action = CharacterEncoder.getSafeText(request.getParameter("action")); - appName = request.getParameter("appName"); - logViewerClient = new LogViewerClient(cookie, backendServerURL, configContext); - isValidTenant = logViewerClient.isValidTenant(tenantDomain); - if (tenantDomain == null) { - tenantDomain = ""; - } - if (serviceName == null) { - serviceName = ""; - } - if (isValidTenant) { - applicationNames = logViewerClient.getApplicationNames(tenantDomain, serviceName); - if (appName == null && applicationNames != null && applicationNames.length > 0) { - appName = applicationNames[0]; - } - if (applicationNames == null) { - applicationNames = new String[]{"No applications"}; - appName = applicationNames[0]; - } else if (applicationNames != null && applicationNames.length == 0) { - applicationNames = new String[]{"No applications"}; - appName = applicationNames[0]; - } - paginatedLogEvents = logViewerClient.getPaginatedApplicationLogEvents(pageNumber, type, keyword, appName, tenantDomain, serviceName); - } - if (applicationNames == null) { - applicationNames = new String[]{"No applications"}; - appName = applicationNames[0]; - } - isManager = logViewerClient.isManager(); - serviceNames = logViewerClient.getServiceNames(); - if (paginatedLogEvents != null) { - events = paginatedLogEvents.getLogInfo(); - numberOfPages = paginatedLogEvents.getNumberOfPages(); - } - - parameter = "type=" + type + "&keyword=" + keyword + "&appName=" + appName; - } catch (Exception e) { - CarbonUIMessage.sendCarbonUIMessage(e.getMessage(), CarbonUIMessage.ERROR, request, - e); -%> -<script type="text/javascript"> - location.href = "../admin/error.jsp"; -</script> -<% - return; - } -%> -<fmt:bundle basename="org.apache.stratos.logging.view.ui.i18n.Resources"> - - <carbon:breadcrumb label="app.logs" - resourceBundle="org.wso2.carbon.logging.ui.i18n.Resources" - topPage="true" request="<%=request%>"/> - <div id="middle"> - <h2> - <fmt:message key="app.logs"/> - </h2> - - <div id="workArea"> - - - <table border="0" class="styledLeft"> - <tbody> - <tr> - <td> - <table class="normal"> - <tr> - <td style="padding-right: 2px !important;"> - <nobr><fmt:message key="log.level"/></nobr> - </td> - <td><select class="log-select" id="logLevelID" return false;"> - <% - String[] logLevels = logViewerClient.getLogLevels(); - if (keyword != null && !keyword.equals("")) { - type = "Custom"; - %> - - <option value="<%=type%>" selected="true"><%=type%> - </option> - - <% - } - for (String logLevel : logLevels) { - if (logLevel.equals(type)) { - %> - - <option value="<%=logLevel%>" selected="true"><%=logLevel%> - </option> - - <% - } else { - %> - - <option value="<%=logLevel%>"><%=logLevel%> - </option> - - <% - } - } - %> - </select></td> - <td style="padding-right: 2px !important;"> - <nobr><fmt:message key="application.name"/></nobr> - </td> - <td><select - name="appName" id="appName" return false;"> - <% - for (String name : applicationNames) { - %> - <% - if (name.equals(appName)) { - %> - <option selected="selected" value="<%=name%>"> - <%=name%> - </option> - <% - } else { - %> - <option value="<%=name%>"> - <%=name%> - </option> - <% - } - %> - <% - } - %> - - </select></td> - <td style="padding-right: 2px !important;"> - <nobr> - <fmt:message key="search.logs"/> - </nobr> - </td> - <td style="padding-right: 2px !important;"> - <input onkeypress="appSubmitenter(event)" value="<%=keyword%>" - class="log-select" size="20" id="logkeyword" type="text"></td> - <td style="padding-right: 2px !important;"> - <a - class="icon-link" - style="background-image: url(images/search.gif);" - href="javascript:searchAppLogs()" - ></a> - </td> - <!--td style="padding-right: 2px !important;"><input type="button" - value="Search" - onclick="javascript:searchAppLogs(); return false;" - class="button"--> - </td> - <td><input type="hidden" id="logkeyword" - name="KeyWord" value="<%=keyword%>"/> - </td> - <td style="width: 17%;"></td> - <td style="padding-right: 2px !important;"> - <nobr> - <fmt:message key="current.time"/> - </nobr> - </td> - <% - SimpleDateFormat dateFormat = new SimpleDateFormat("Z"); - String date = dateFormat.format(System.currentTimeMillis()); - %> - <td> - <%= "GMT " + date%> - </td> - </tr> - </table> - </td> - </tr> - </tbody> - </table> - - - <br/> - <table border="1" class="styledLeft"> - - <tbody> - - <tr> - <td class="formRow"> - - <table class="styledLeft"> - - <% - if (!isValidTenant) { %> - <fmt:message key="invalid.tenant"/> - - <% - } else { - - - if (events == null || events.length == 0 || events[0] == null) { - %> - <fmt:message key="no.logs"/> - <% - } else { - int index = 0; - for (LogEvent logMessage : events) { - index++; - if (index % 2 != 0) { - %> - <thead> - <tr> - <th><b><fmt:message key="log.type"/> - </b> - </th> - <th><b><fmt:message key="date"/> - </b> - </th> - <th colspan="2"><b><fmt:message key="log.message"/> - </b> - </th> - </tr> - </thead> - <tr> - <% - } else { - %> - - <tr bgcolor="#eeeffb"> - <% - } - %> - <td border-bottom="gray" width="2%"><img - style="margin-right: 10px;" - src="<%=logViewerClient.getImageName(logMessage.getPriority().trim())%>"> - </td> - <td> - <nobr><%=logMessage.getLogTime()%> - </nobr> - </td> - <td><%=CharacterEncoder.getSafeText(logMessage.getMessage())%> - </td> - <% - String imgId = "traceSymbolMax" + index; - %> - <td><a - class="icon-link" - style="background-image: url(images/plus.gif);" - href="javascript:showTrace(<%=index%>)" - id="<%=imgId%>"></a> <fmt:message - key="view.stack.trace"/></td> - </tr> - - <% - String id = "traceTable" + index; - if (index % 2 != 0) { - %> - <tr id="<%=id%>" style="display: none"> - <% - } else { - %> - - <tr id="<%=id%>" style="display: none" bgcolor="#eeeffb"> - <% - } - %> - - <td colspan="4" width="100%">TID[<%=logMessage.getTenantId()%>] - AppID[<%=logMessage.getAppName()%>] [<%=logMessage.getServerName()%>] - [<%=logMessage.getLogTime()%>] <%=logMessage.getPriority().trim()%> - {<%=logMessage.getLogger()%>} - - <%=CharacterEncoder.getSafeText(logMessage.getMessage())%> - <%=logMessage.getStacktrace()%><br/> - </td> - </tr> - <% - } - } - } - %> - - </table> - <carbon:paginator pageNumber="<%=pageNumber%>" numberOfPages="<%=numberOfPages%>" - page="application_log_viewer.jsp" pageNumberParameterName="pageNumber" - prevKey="prev" nextKey="next" - parameters="<%= parameter%>"/> - </tr> - - </tbody> - </table> - </tr> - </tbody> - </table> - </div> - </div> -</fmt:bundle> -</body> -</html> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/stratos/blob/028c3539/components/org.apache.stratos.logging.view.ui/src/main/resources/web/log-view/cassandra_log_viewer.jsp ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.logging.view.ui/src/main/resources/web/log-view/cassandra_log_viewer.jsp b/components/org.apache.stratos.logging.view.ui/src/main/resources/web/log-view/cassandra_log_viewer.jsp deleted file mode 100644 index 5f44c0d..0000000 --- a/components/org.apache.stratos.logging.view.ui/src/main/resources/web/log-view/cassandra_log_viewer.jsp +++ /dev/null @@ -1,482 +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. ---> -<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> -<%@ taglib uri="http://wso2.org/projects/carbon/taglibs/carbontags.jar" - prefix="carbon" %> -<%@ page import="org.apache.stratos.logging.view.ui.LogViewerClient" %> -<%@ page import="org.apache.axis2.context.ConfigurationContext" %> -<%@ page import="org.wso2.carbon.CarbonConstants" %> -<%-- <%@ page --%> -<!-- import="org.wso2.carbon.logging.view.stub.types.carbon.LogEvent"%> --> -<%@ page import="org.wso2.carbon.utils.ServerConstants" %> -<%@ page import="org.wso2.carbon.ui.CarbonUIUtil" %> - -<%@ page import="org.wso2.carbon.ui.CarbonUIMessage" %> -<%@ page import="org.wso2.carbon.ui.CarbonUIUtil" %> -<%@ page import="org.wso2.carbon.logging.view.stub.types.carbon.LogEvent" %> -<script type="text/javascript" src="js/logviewer.js"></script> -<script type="text/javascript" src="../admin/dialog/js/dialog.js"></script> - - -<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> -<html> -<head> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> - <title>View System Logs</title> -</head> -<body> -<% - String backendServerURL = CarbonUIUtil - .getServerURL(config.getServletContext(), session); - ConfigurationContext configContext = (ConfigurationContext) config.getServletContext() - .getAttribute(CarbonConstants.CONFIGURATION_CONTEXT); - String cookie = (String) session.getAttribute(ServerConstants.ADMIN_SERVICE_COOKIE); - LogViewerClient logViewerClient; - LogEvent[] events; - String tenantDomain = ""; - String serviceName = "WSO2 Stratos Manager"; - boolean isLogsFromSyslog; - boolean isSTSyslog = false; - String serviceNames[]; - boolean isManager = false; - boolean showManager = false; - String logIndex = request.getParameter("logIndex"); - String start = request.getParameter("start"); - - String end = request.getParameter("end"); - boolean showTenantDomain = false; - boolean isStratosService = false; - tenantDomain = request.getParameter("tenantDomain"); - serviceName = request.getParameter("serviceName"); - Boolean isDateGiven = false; - String priority = request.getParameter("priority"); - String logger = request.getParameter("logger"); - String keyWord = request.getParameter("keyword"); -// LogEvent logs[]; - if (start != null && !start.equals("null") && !start.equals("")) { - isDateGiven = true; - } - int returnRows; - logIndex = (logIndex == null) ? "20" : logIndex; - tenantDomain = (tenantDomain == null) ? "" : tenantDomain; - start = (start == null) ? "" : start; - end = (end == null) ? "" : end; - priority = (priority == null) ? "ALL" : priority; - keyWord = (keyWord == null) ? "" : keyWord; - logger = (logger == null) ? "" : logger; - try { - returnRows = (logIndex == null) ? 20 : Integer.parseInt(logIndex); - logViewerClient = new LogViewerClient(cookie, backendServerURL, configContext); - isLogsFromSyslog = logViewerClient.isDataFromSysLog(tenantDomain); - isSTSyslog = logViewerClient.isSTSyslogConfig(tenantDomain); - isManager = logViewerClient.isManager(); - serviceNames = logViewerClient.getServiceNames(); - ; - serviceName = (serviceName == null) ? "WSO2 Stratos Manager" : serviceName; - tenantDomain = (tenantDomain == null) ? "" : tenantDomain; - isStratosService = logViewerClient.isStratosService(); - showTenantDomain = (isSTSyslog && isLogsFromSyslog && isStratosService); - showManager = (isManager && isLogsFromSyslog); - events = logViewerClient.getSystemLogs(start, end, - logger, priority, "", serviceName, "", Integer.parseInt(logIndex)); - System.out.println("events " + events); - System.out.println("Return Rows " + logIndex); - System.out.println("isDateGiven " + isDateGiven); - System.out.println("start " + start + " : " + start); - System.out.println("end " + end + " : " + end); - System.out.println("Priority " + priority); - System.out.println("Logger " + logger); - System.out.println("Keyword " + keyWord); - - System.out.println(); - System.out.println(); - - // logs = logViewerClient.getAllLogs(); - } catch (Exception e) { - CarbonUIMessage.sendCarbonUIMessage(e.getMessage(), CarbonUIMessage.ERROR, request, - e); -%> -<script type="text/javascript"> - location.href = "../admin/error.jsp"; -</script> -<% - return; - } -%> -<fmt:bundle basename="org.apache.stratos.logging.view.ui.i18n.Resources"> - - <carbon:breadcrumb label="system.logs" - resourceBundle="org.wso2.carbon.logging.ui.i18n.Resources" - topPage="true" request="<%=request%>"/> - <div id="middle"> - <h2> - <fmt:message key="system.logs"/> - </h2> - - <div id="workArea"> - - <% - if (showTenantDomain || showManager) { - %> <br/> <br/> - <table border="0" class="styledLeft"> - <tbody> - <tr> - <td> - - <table class="normal"> - <tr> - <% - if (showTenantDomain) { - %> - - <td style="padding-right: 2px !important;"> - <nobr> - <fmt:message key="tenant.domain"/> - </nobr> - </td> - <td style="padding-right: 2px !important;"><input - value="<%=tenantDomain%>" id="tenantDomain" - name="tenantDomain" size="20" type="text"></td> - - <td style="padding-left: 0px !important;"><input - type="button" value="Get Tenant Logs" - onclick="javascript:getTenantSpecificIndex(); return false;" - class="button"></td> - <% - } else { - %> - <td><input type="hidden" id="tenantDomain" - name="tenantDomain" value="<%=tenantDomain%>"/> - </td> - <% - } - if (showManager) { - %> - <td style="width: 100%;"></td> - <td style="width: 100%;"></td> - <td style="width: 100%;"></td> - <td style="padding-left: 0px !important;"> - <nobr> - <fmt:message key="service.name"/> - </nobr> - </td> - <td style="width: 100%;"></td> - <td style="padding-left: 0px !important;"><select - name="serviceName" id="serviceName" - onchange="getProductTenantSpecificIndex()"> - <% - for (String name : serviceNames) { - %> - <% - if (name.equals(serviceName)) { - %> - <option selected="selected" value="<%=name%>"> - <%=name%> - </option> - <% - } else { - %> - <option value="<%=name%>"> - <%=name%> - </option> - <% - } - %> - <% - } - %> - - </select></td> - <% - } else { - %> - <input type="hidden" id="serviceName" name="serviceName" - value="<%=serviceName%>"/> - <% - } - %> - </tr> - - - </table> - </td> - </tr> - </tbody> - </table> - <br/> <br/> - <% - } - %> - - <table border="0" class="styledLeft"> - - <tbody> - <tr> - <td class="middle-header" colspan="2"><fmt:message key="filter.system.logs"/> - </td> - </tr> - <tr> - <td> - <table class="normal-nopadding" width="100%"> - <tr> - <td> - <table width="50%"> - <tr> - <td><fmt:message key="return.rows"/> - </td> - <td><select class="log-select" id="logIndex" - size="3"> - - <% - for (int i = 1; i < 201; i++) { - if (returnRows == i) { - %> - <option value="<%=i%>" selected="true"><%=i%> - </option> - <% - } else { - %> - <option value="<%=i%>"><%=i%> - </option> - <% - } - } - %> - </select> - </br></td> - </tr> - <tr> - - <td> - <nobr> - <fmt:message key="show.at.or.before"/> - </nobr> - </td> - <td style="padding-right: 2px !important;"> - <% - if (!isDateGiven) { - %> <input type="radio" id="NowradioDate" name="radioDate" value="Now" - checked>Now<br> - <nobr><input type="radio" name="radioDate" id="NotNowradioDate" - value="<%=start+"_"+end%>"><input type="text" - id="start" name="start" - value="<%=start%>" - size="8"/> - <input - type="text" id=end name="end" value="<%=end%>" - size="8"/><fmt:message key="date.format"/> <br> <fmt:message - key="date.example"/></nobr> - <br> <% - } else { - - %> <input type="radio" id="NowradioDate" name="radioDate" value="Now"> - Now<br> - <nobr><input type="radio" name="radioDate" id="NotNowradioDate" - value="<%=start+"_"+end%>" checked><input type="text" - id="start" - name="start" - value="<%=start%>" - size="8"/> - - <input - type="text" id="end" name="end" value="<%=end%>" - size="8"/><fmt:message key="date.format"/> <br> <fmt:message - key="date.example"/></nobr> - <br><% - - } - %> - </td> - - - </tr> - - </table> - </td> - </tr> - <tr> - <td class="middle-header" colspan="2"><a - class="icon-link" - style="background-image: url(images/plus.gif);" - href="javascript:showQueryProperties()" - id="propertySymbolMax"></a> <fmt:message - key="advanced.properties"/></td> - </tr> - <tr id="propertyTable" style="display: none"> - <td> - <table width="50%"> - <tr> - <td><fmt:message key="logger"/></td> - <td><input type="text" size="30" id="logger" - name="logger" value="<%=logger%>"/></td> - </tr> - <tr> - <td><fmt:message key="priority"/></td> - <td><select class="log-select" id="logLevelID" - onchange="javascript:viewSingleSysLogLevel(); return false;"> - - <% - String[] logLevels = logViewerClient.getLogLevels(); - for (String logLevel : logLevels) { - if (logLevel.equals(priority)) { - %> - <option value="<%=logLevel%>" selected="true"><%=logLevel%> - </option> - <% - } else { - %> - <option value="<%=logLevel%>"><%=logLevel%> - </option> - <% - } - } - %> - </select></td> - </tr> - <tr> - <td><fmt:message key="keyword"/></td> - <td><input type="text" id="keyword" name="keyword" - value="<%=keyWord%>"/></td> - </tr> - - </table> - </td> - </tr> - <tr> - <td style="padding-left: 0px !important;"><input - type="button" value="Search" - onclick="javascript:getFilteredLogs(); return false;" - class="button"> - </td> - </tr> - </table> - </td> - <br/> - <%-- <carbon:paginator pageNumber="<%=pageNumber%>" numberOfPages="<%=numberOfPages%>" --%> - <%-- page="view.jsp" pageNumberParameterName="pageNumber" parameters="<%=parameter%>"/> --%> - <% - if (!isDateGiven) { - %> - <font color="blue"><fmt:message - key="view.logs.within.the.past.thirty.mins"/> - </font> - <% - } else { - %> - <font color="blue"><fmt:message - key="view.logs.between"/><%=start%> and <%=end%> - </font> - <% - } - %><br/> - <table border="1" class="styledLeft"> - - <tbody> - - <tr> - <td class="formRow"> - - <table class="styledLeft"> - <thead> - <tr> - <th><b><fmt:message key="log.type"/> - </b> - </th> - <th><b><fmt:message key="date"/> - </b> - </th> - <th colspan="2"><b><fmt:message key="log.message"/> - </b> - </th> - </tr> - </thead> - <% - if (events == null || events.length == 0 || events[0] == null) {%> - <fmt:message key="no.logs"/> - <% - } else { - int index = 0; - for (LogEvent logMessage : events) { - index++; - if (index % 2 != 0) { - %> - <tr> - <% - } else { - %> - - <tr bgcolor="#eeeffb"> - <% - }%> - <td border-bottom="gray" width="2%"><img - style="margin-right: 10px;" - src="<%=logViewerClient.getImageName(logMessage.getPriority().trim())%>"> - </td> - <td> - <nobr><%=logMessage.getLogTime()%> - </nobr> - </td> - <td><%=logMessage.getMessage()%> - </td> - <%String imgId = "traceSymbolMax" + index; %> - <td><a - class="icon-link" - style="background-image: url(images/plus.gif);" - href="javascript:showTrace(<%=index%>)" - id="<%=imgId%>"></a> <fmt:message - key="view.stack.trace"/></td> - </tr> - - <% - String id = "traceTable" + index; - if (index % 2 != 0) { - %> - <tr id="<%=id%>" style="display: none"> - <% - } else { - %> - - <tr id="<%=id%>" style="display: none" bgcolor="#eeeffb"> - <% - }%> - - <td colspan="4" width="100%">[<%=logMessage.getServerName()%>] - [<%=logMessage.getLogTime()%>] <%=logMessage.getPriority().trim()%> - {<%=logMessage.getLogger()%>} - <%=logMessage.getMessage()%> - <%=logMessage.getStacktrace()%><br/> - </td> - </tr> - <% - } - } - %> - - </table> - </tr> - <%-- <tr><carbon:paginator pageNumber="<%=pageNumber%>" numberOfPages="<%=numberOfPages%>" --%> - <%-- page="view.jsp" pageNumberParameterName="pageNumber" parameters="<%=parameter%>"/> <tr> --%> - - </tbody> - </table> - </tr> - </tbody> - </table> - </div> - </div> -</fmt:bundle> -</body> -</html> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/stratos/blob/028c3539/components/org.apache.stratos.logging.view.ui/src/main/resources/web/log-view/docs/images/application.jpg ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.logging.view.ui/src/main/resources/web/log-view/docs/images/application.jpg b/components/org.apache.stratos.logging.view.ui/src/main/resources/web/log-view/docs/images/application.jpg deleted file mode 100755 index 735ec24..0000000 Binary files a/components/org.apache.stratos.logging.view.ui/src/main/resources/web/log-view/docs/images/application.jpg and /dev/null differ http://git-wip-us.apache.org/repos/asf/stratos/blob/028c3539/components/org.apache.stratos.logging.view.ui/src/main/resources/web/log-view/docs/images/log.jpg ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.logging.view.ui/src/main/resources/web/log-view/docs/images/log.jpg b/components/org.apache.stratos.logging.view.ui/src/main/resources/web/log-view/docs/images/log.jpg deleted file mode 100644 index 9470e10..0000000 Binary files a/components/org.apache.stratos.logging.view.ui/src/main/resources/web/log-view/docs/images/log.jpg and /dev/null differ http://git-wip-us.apache.org/repos/asf/stratos/blob/028c3539/components/org.apache.stratos.logging.view.ui/src/main/resources/web/log-view/docs/images/logIndex.jpg ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.logging.view.ui/src/main/resources/web/log-view/docs/images/logIndex.jpg b/components/org.apache.stratos.logging.view.ui/src/main/resources/web/log-view/docs/images/logIndex.jpg deleted file mode 100755 index 4741e7d..0000000 Binary files a/components/org.apache.stratos.logging.view.ui/src/main/resources/web/log-view/docs/images/logIndex.jpg and /dev/null differ http://git-wip-us.apache.org/repos/asf/stratos/blob/028c3539/components/org.apache.stratos.logging.view.ui/src/main/resources/web/log-view/docs/images/logview.jpg ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.logging.view.ui/src/main/resources/web/log-view/docs/images/logview.jpg b/components/org.apache.stratos.logging.view.ui/src/main/resources/web/log-view/docs/images/logview.jpg deleted file mode 100755 index bc9dc75..0000000 Binary files a/components/org.apache.stratos.logging.view.ui/src/main/resources/web/log-view/docs/images/logview.jpg and /dev/null differ http://git-wip-us.apache.org/repos/asf/stratos/blob/028c3539/components/org.apache.stratos.logging.view.ui/src/main/resources/web/log-view/docs/userguide.html ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.logging.view.ui/src/main/resources/web/log-view/docs/userguide.html b/components/org.apache.stratos.logging.view.ui/src/main/resources/web/log-view/docs/userguide.html deleted file mode 100644 index 41a9a3c..0000000 --- a/components/org.apache.stratos.logging.view.ui/src/main/resources/web/log-view/docs/userguide.html +++ /dev/null @@ -1,90 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> -<!-- - 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. ---> -<html> -<head> - <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type"/> - <title>Monitor Logs - User Guide</title> - <link href="../../admin/css/documentation.css" rel="stylesheet" type="text/css" media="all"/> -</head> - -<body> -<h1>Monitor Logs</h1> - -<p>Logs can be displayed as System logs or application logs.System Logs shows the log events of the system logs - depending on the product. Application logs filter logs by the application, it can be services or web applications. - There are two ways to configure system logs, 1) through Memory Appender where logs will be taken from the memory, 2) - BAMLogEventAppender where logs will be published to bam and log events will be taken from BAM storages. Only the - latest daily logs messages will be displayed in the UI where the logs events can be filtered accordingly. Log events - are archived daily per tenant per product per date and can be downloaded for further analysis. -</p> - -<p>The log messages, displayed in this page are obtained from a memory appender. Hence, the severity(log level) of the - displayed log messages are equal or higher than the threshold of the memory appender. For more information on - appenders, loggers and their log levels, please visit <a href="http://logging.apache.org/log4j/">here</a>. </p> - -<h3><strong>Log files on disk</strong></h3> - -<p>The location of the log files on disk is specified in the log4j.configuration file.</p> - -<h2>View Logs</h2> - -<p>This log events are displayed from bottom-up manner. You can also search for a - particular log by a keyword using the <span style="font-weight: bold;">Search Logs</span> - feature. <span style="color: red;"></span></p> -<ol> - <li>In the navigator, under Monitor, click <span - style="font-weight: bold;">Logs</span>. The <span - style="font-style: italic; font-weight: bold;">System Logs/Application Logs</span> page - appears.� - </li> - - <li>In the <span style="font-weight: bold;">View</span> list, select the - category of logs you want to view. The available categories are, - </li> -</ol> - -<div style="margin-left: 40px;"> - INFO �- Information messages - WARN �- Warning messages - ERROR �- Error messages - DEBUG �- Debug messages - TRACE �- Trace messages - FATAL -�Fatal error messages -</div> -<ol> -</ol> - -<p><img alt="" src="images/logview.jpg"/></p> - -<p style="text-align:left;">Figure 1: Monitor Logs</p> - -<p><img alt="" src="images/logIndex.jpg"/></p> - -<p style="text-align:left;">Figure 2: Archived Logs</p> - -<p>To filter out application specific logs, go to Monitor -> Application Logs. This will display application specific - logs.</p> - - -<p><img alt="" src="images/application.jpg"/></p> - -<p style="text-align:left;">Figure 3: Application Logs</p> -</body> -</html> http://git-wip-us.apache.org/repos/asf/stratos/blob/028c3539/components/org.apache.stratos.logging.view.ui/src/main/resources/web/log-view/download-ajaxprocessor.jsp ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.logging.view.ui/src/main/resources/web/log-view/download-ajaxprocessor.jsp b/components/org.apache.stratos.logging.view.ui/src/main/resources/web/log-view/download-ajaxprocessor.jsp deleted file mode 100755 index 1faff1c..0000000 --- a/components/org.apache.stratos.logging.view.ui/src/main/resources/web/log-view/download-ajaxprocessor.jsp +++ /dev/null @@ -1,88 +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. ---> - -<%@page import="java.io.OutputStreamWriter" %> -<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> -<%@ taglib uri="http://wso2.org/projects/carbon/taglibs/carbontags.jar" prefix="carbon" %> -<%@ page import="org.apache.stratos.logging.view.ui.LogViewerClient" %> -<%@ page import="org.apache.axis2.context.ConfigurationContext" %> -<%@ page import="org.wso2.carbon.CarbonConstants" %> -<%@ page import="org.wso2.carbon.utils.ServerConstants" %> -<%@ page import="org.wso2.carbon.ui.CarbonUIUtil" %> -<%@ page import="org.wso2.carbon.utils.CarbonUtils" %> -<%@ page import="org.wso2.carbon.ui.CarbonUIMessage" %> - -<script type="text/javascript" src="js/logviewer.js"></script> -<script type="text/javascript" src="../admin/dialog/js/dialog.js"></script> -<% - String backendServerURL = CarbonUIUtil - .getServerURL(config.getServletContext(), session); - ConfigurationContext configContext = (ConfigurationContext) config.getServletContext() - .getAttribute(CarbonConstants.CONFIGURATION_CONTEXT); - String cookie = (String) session.getAttribute(ServerConstants.ADMIN_SERVICE_COOKIE); - LogViewerClient logViewerClient; - String message = ""; - String tenantDomain = ""; - String serviceName = "WSO2 Stratos Manager"; - String downloadFile = request.getParameter("logFile"); - try { - out.clear(); - out = pageContext.pushBody(); - out.clearBuffer(); - ServletOutputStream outputStream = response.getOutputStream(); - response.setContentType("application/txt"); - response.setHeader("Content-Disposition", "attachment;filename=" + downloadFile.replaceAll("\\s", "_")); - logViewerClient = new LogViewerClient(cookie, backendServerURL, configContext); - OutputStreamWriter outputStreamWriter = new OutputStreamWriter(outputStream); - tenantDomain = request.getParameter("tenantDomain"); - serviceName = request.getParameter("serviceName"); - tenantDomain = (tenantDomain == null) ? "" : tenantDomain; - serviceName = (serviceName == null) ? "WSO2 Stratos Manager" : serviceName; - int fileSize = logViewerClient.getLineNumbers(downloadFile) + 1; - System.out.println("fileSize " + fileSize); - int pages = (int) Math.ceil((double) fileSize / 2000); - - for (int i = 0; i < pages; i++) { - int start = (i * 2000) + 1; - int end = start + 2000; - String logIndex = Integer.toString(fileSize); - String logs[] = logViewerClient.getLogLinesFromFile(downloadFile, fileSize, - start, end); - for (String logMessage : logs) { - outputStreamWriter.write(logMessage + "\n"); - } - - } - outputStreamWriter.flush(); - outputStream.flush(); - out.flush(); - outputStreamWriter.close(); - outputStream.close(); - out.close(); - } catch (Exception e) { - CarbonUIMessage.sendCarbonUIMessage(e.getMessage(), CarbonUIMessage.ERROR, request, - e); -%> -<script type="text/javascript"> - location.href = "../admin/error.jsp"; -</script> -<% - return; - } -%> http://git-wip-us.apache.org/repos/asf/stratos/blob/028c3539/components/org.apache.stratos.logging.view.ui/src/main/resources/web/log-view/downloadgz-ajaxprocessor.jsp ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.logging.view.ui/src/main/resources/web/log-view/downloadgz-ajaxprocessor.jsp b/components/org.apache.stratos.logging.view.ui/src/main/resources/web/log-view/downloadgz-ajaxprocessor.jsp deleted file mode 100755 index 26bfee8..0000000 --- a/components/org.apache.stratos.logging.view.ui/src/main/resources/web/log-view/downloadgz-ajaxprocessor.jsp +++ /dev/null @@ -1,69 +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. ---> - -<%@page import="java.io.OutputStreamWriter" %> -<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> -<%@ taglib uri="http://wso2.org/projects/carbon/taglibs/carbontags.jar" prefix="carbon" %> -<%@ page import="org.apache.stratos.logging.view.ui.LogViewerClient" %> -<%@ page import="org.apache.axis2.context.ConfigurationContext" %> -<%@ page import="org.wso2.carbon.CarbonConstants" %> -<%@ page import="org.wso2.carbon.utils.ServerConstants" %> -<%@ page import="org.wso2.carbon.ui.CarbonUIUtil" %> -<%@ page import="org.wso2.carbon.utils.CarbonUtils" %> -<%@ page import="org.wso2.carbon.ui.CarbonUIMessage" %> - -<script type="text/javascript" src="js/logviewer.js"></script> -<script type="text/javascript" src="../admin/dialog/js/dialog.js"></script> -<% - String backendServerURL = CarbonUIUtil - .getServerURL(config.getServletContext(), session); - ConfigurationContext configContext = (ConfigurationContext) config.getServletContext() - .getAttribute(CarbonConstants.CONFIGURATION_CONTEXT); - String cookie = (String) session.getAttribute(ServerConstants.ADMIN_SERVICE_COOKIE); - LogViewerClient logViewerClient; - String message = ""; - String tenantDomain = ""; - String serviceName = "WSO2 Stratos Manager"; - String downloadFile = request.getParameter("logFile"); - String fileName = downloadFile; - //String fileName = downloadFile.replace(".gz",""); - try { - out.clear(); - out = pageContext.pushBody(); - out.clearBuffer(); - tenantDomain = request.getParameter("tenantDomain"); - serviceName = request.getParameter("serviceName"); - tenantDomain = (tenantDomain == null) ? "" : tenantDomain; - serviceName = (serviceName == null) ? "WSO2 Stratos Manager" : serviceName; - logViewerClient = new LogViewerClient(cookie, backendServerURL, configContext); - logViewerClient.downloadArchivedLogFiles(fileName, response, tenantDomain, serviceName); - - //out.flush(); - // out.close(); - } catch (Exception e) { - CarbonUIMessage.sendCarbonUIMessage(e.getMessage(), CarbonUIMessage.ERROR, request, - e); -%> -<script type="text/javascript"> - location.href = "../admin/error.jsp"; -</script> -<% - return; - } -%> http://git-wip-us.apache.org/repos/asf/stratos/blob/028c3539/components/org.apache.stratos.logging.view.ui/src/main/resources/web/log-view/images/cancel.gif ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.logging.view.ui/src/main/resources/web/log-view/images/cancel.gif b/components/org.apache.stratos.logging.view.ui/src/main/resources/web/log-view/images/cancel.gif deleted file mode 100644 index f74130e..0000000 Binary files a/components/org.apache.stratos.logging.view.ui/src/main/resources/web/log-view/images/cancel.gif and /dev/null differ http://git-wip-us.apache.org/repos/asf/stratos/blob/028c3539/components/org.apache.stratos.logging.view.ui/src/main/resources/web/log-view/images/collapse.gif ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.logging.view.ui/src/main/resources/web/log-view/images/collapse.gif b/components/org.apache.stratos.logging.view.ui/src/main/resources/web/log-view/images/collapse.gif deleted file mode 100644 index 83d7fd2..0000000 Binary files a/components/org.apache.stratos.logging.view.ui/src/main/resources/web/log-view/images/collapse.gif and /dev/null differ http://git-wip-us.apache.org/repos/asf/stratos/blob/028c3539/components/org.apache.stratos.logging.view.ui/src/main/resources/web/log-view/images/debug.png ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.logging.view.ui/src/main/resources/web/log-view/images/debug.png b/components/org.apache.stratos.logging.view.ui/src/main/resources/web/log-view/images/debug.png deleted file mode 100644 index 273fd49..0000000 Binary files a/components/org.apache.stratos.logging.view.ui/src/main/resources/web/log-view/images/debug.png and /dev/null differ http://git-wip-us.apache.org/repos/asf/stratos/blob/028c3539/components/org.apache.stratos.logging.view.ui/src/main/resources/web/log-view/images/download.gif ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.logging.view.ui/src/main/resources/web/log-view/images/download.gif b/components/org.apache.stratos.logging.view.ui/src/main/resources/web/log-view/images/download.gif deleted file mode 100755 index d88c9b4..0000000 Binary files a/components/org.apache.stratos.logging.view.ui/src/main/resources/web/log-view/images/download.gif and /dev/null differ
