You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by ra...@apache.org on 2015/08/23 21:15:22 UTC
[08/11] stratos git commit: Cleaning up pom files,
removing unused features from p2 profile,
removing unused components in Stratos
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/error.png
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.logging.view.ui/src/main/resources/web/log-view/images/error.png b/components/org.apache.stratos.logging.view.ui/src/main/resources/web/log-view/images/error.png
deleted file mode 100644
index 59558a5..0000000
Binary files a/components/org.apache.stratos.logging.view.ui/src/main/resources/web/log-view/images/error.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/expand.gif
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.logging.view.ui/src/main/resources/web/log-view/images/expand.gif b/components/org.apache.stratos.logging.view.ui/src/main/resources/web/log-view/images/expand.gif
deleted file mode 100644
index 116e120..0000000
Binary files a/components/org.apache.stratos.logging.view.ui/src/main/resources/web/log-view/images/expand.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/fatal.png
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.logging.view.ui/src/main/resources/web/log-view/images/fatal.png b/components/org.apache.stratos.logging.view.ui/src/main/resources/web/log-view/images/fatal.png
deleted file mode 100644
index 9a09966..0000000
Binary files a/components/org.apache.stratos.logging.view.ui/src/main/resources/web/log-view/images/fatal.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/information.gif
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.logging.view.ui/src/main/resources/web/log-view/images/information.gif b/components/org.apache.stratos.logging.view.ui/src/main/resources/web/log-view/images/information.gif
deleted file mode 100644
index a9c63b1..0000000
Binary files a/components/org.apache.stratos.logging.view.ui/src/main/resources/web/log-view/images/information.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/magnifier.gif
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.logging.view.ui/src/main/resources/web/log-view/images/magnifier.gif b/components/org.apache.stratos.logging.view.ui/src/main/resources/web/log-view/images/magnifier.gif
deleted file mode 100644
index 86f81ed..0000000
Binary files a/components/org.apache.stratos.logging.view.ui/src/main/resources/web/log-view/images/magnifier.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/minus.gif
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.logging.view.ui/src/main/resources/web/log-view/images/minus.gif b/components/org.apache.stratos.logging.view.ui/src/main/resources/web/log-view/images/minus.gif
deleted file mode 100755
index 8ff04bc..0000000
Binary files a/components/org.apache.stratos.logging.view.ui/src/main/resources/web/log-view/images/minus.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/plus.gif
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.logging.view.ui/src/main/resources/web/log-view/images/plus.gif b/components/org.apache.stratos.logging.view.ui/src/main/resources/web/log-view/images/plus.gif
deleted file mode 100755
index 1a0e2c9..0000000
Binary files a/components/org.apache.stratos.logging.view.ui/src/main/resources/web/log-view/images/plus.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/script_gear.gif
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.logging.view.ui/src/main/resources/web/log-view/images/script_gear.gif b/components/org.apache.stratos.logging.view.ui/src/main/resources/web/log-view/images/script_gear.gif
deleted file mode 100644
index dc4174a..0000000
Binary files a/components/org.apache.stratos.logging.view.ui/src/main/resources/web/log-view/images/script_gear.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/search.gif
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.logging.view.ui/src/main/resources/web/log-view/images/search.gif b/components/org.apache.stratos.logging.view.ui/src/main/resources/web/log-view/images/search.gif
deleted file mode 100644
index 86f81ed..0000000
Binary files a/components/org.apache.stratos.logging.view.ui/src/main/resources/web/log-view/images/search.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/trace.png
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.logging.view.ui/src/main/resources/web/log-view/images/trace.png b/components/org.apache.stratos.logging.view.ui/src/main/resources/web/log-view/images/trace.png
deleted file mode 100644
index 64e7412..0000000
Binary files a/components/org.apache.stratos.logging.view.ui/src/main/resources/web/log-view/images/trace.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/view.gif
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.logging.view.ui/src/main/resources/web/log-view/images/view.gif b/components/org.apache.stratos.logging.view.ui/src/main/resources/web/log-view/images/view.gif
deleted file mode 100755
index 9a1c6e2..0000000
Binary files a/components/org.apache.stratos.logging.view.ui/src/main/resources/web/log-view/images/view.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/warn.png
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.logging.view.ui/src/main/resources/web/log-view/images/warn.png b/components/org.apache.stratos.logging.view.ui/src/main/resources/web/log-view/images/warn.png
deleted file mode 100644
index be22d38..0000000
Binary files a/components/org.apache.stratos.logging.view.ui/src/main/resources/web/log-view/images/warn.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/index.jsp
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.logging.view.ui/src/main/resources/web/log-view/index.jsp b/components/org.apache.stratos.logging.view.ui/src/main/resources/web/log-view/index.jsp
deleted file mode 100644
index 23545fc..0000000
--- a/components/org.apache.stratos.logging.view.ui/src/main/resources/web/log-view/index.jsp
+++ /dev/null
@@ -1,671 +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.LogInfo" %>
-<%-- <%@ 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.logging.view.stub.types.carbon.PaginatedLogInfo" %>
-<%@ page import="org.wso2.carbon.logging.view.stub.types.carbon.PaginatedLogEvent" %>
-
-<%@ 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.util.regex.Matcher" %>
-<%@ page import="java.util.regex.Pattern" %>
-<%@ page import="java.text.SimpleDateFormat" %>
-<%@ page import="java.util.Calendar" %>
-<%@ page import="java.util.Date" %>
-<%@ page import="java.util.TimeZone" %>
-<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>
- <script type="text/JavaScript">
- function refresh(time) {
- setTimeout("location.reload(true);", time);
- }
- </script>
-</head>
-<body onload="JavaScript:refresh(120000);">
-<%!
- private boolean isArchiveFile(String fileName) {
- String archivePattern = "[a-zA-Z]*\\.log";
- CharSequence inputStr = fileName;
- Pattern pattern = Pattern.compile(archivePattern);
- Matcher matcher = pattern.matcher(inputStr);
- return matcher.find();
- }
-%>
-<%
- 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;
- boolean showLogFiles;
- String pageNumberStr = request.getParameter("pageNumber");
- String pageIndexNumberStr = request.getParameter("pageIndexNumber");
- String showMaxStr = request.getParameter("showMax");
- int pageNumber = 0;
- int pageIndexNumber = 0;
- int numberOfIndexPages = 0;
- int numberOfPages = 0;
- int noOfRows = 0;
- boolean showMax = false;
- boolean isSuperTenant = CarbonUIUtil.isSuperTenant(request);
- boolean isManager = false;
- String tenantDomain = request.getParameter("tenantDomain");
- String serviceName = request.getParameter("serviceName");
- String serviceNames[];
- LogInfo[] logInfo = null;
- PaginatedLogInfo paginatedLogInfo = null;
- PaginatedLogEvent paginatedLogEvents = null;
- String parameter = "";
- String indexParameter = "";
- boolean isValidTenant = true;
- String collapseAdv = request.getParameter("collapse");
- boolean isCollapse = Boolean.parseBoolean(collapseAdv);
- showMax = Boolean.parseBoolean(showMaxStr);
- try {
- pageNumber = Integer.parseInt(pageNumberStr);
- } catch (NumberFormatException ignored) {
- // page number format exception
- }
- try {
- pageIndexNumber = Integer.parseInt(pageIndexNumberStr);
- } catch (NumberFormatException ignored) {
- // page number format exception
- }
- try {
- type = CharacterEncoder.getSafeText(request.getParameter("type"));
- type = (type == null) ? "" : type;
- if (tenantDomain == null) {
- tenantDomain = "";
- }
- if (serviceName == null) {
- serviceName = "";
- }
- //tenantDomain = (tenantDomain == null) ? "" : tenantDomain;
- keyword = CharacterEncoder.getSafeText(request.getParameter("keyword"));
- keyword = (keyword == null) ? "" : keyword;
- action = CharacterEncoder.getSafeText(request.getParameter("action"));
- logViewerClient = new LogViewerClient(cookie, backendServerURL, configContext);
- isValidTenant = logViewerClient.isValidTenant(tenantDomain);
- if (isValidTenant) {
- paginatedLogEvents = logViewerClient.getPaginatedLogEvents(pageNumber, type,
- keyword, tenantDomain, serviceName);
- paginatedLogInfo = logViewerClient.getLocalLogFiles(pageIndexNumber, tenantDomain, serviceName);
- }
-
- if (paginatedLogEvents != null) {
- noOfRows = paginatedLogEvents.getNumberOfPages() * 15;
- events = paginatedLogEvents.getLogInfo();
- numberOfPages = paginatedLogEvents.getNumberOfPages();
- }
- if (paginatedLogInfo != null) {
- logInfo = paginatedLogInfo.getLogInfo();
- numberOfIndexPages = paginatedLogInfo.getNumberOfPages();
- }
- isManager = logViewerClient.isManager();
- if (isManager) {
- serviceNames = logViewerClient.getServiceNames();
- } else {
- serviceNames = logViewerClient.getServiceNames();
- }
- showLogFiles = (logInfo != null);
- if (isManager) {
- if (isSuperTenant) {
- parameter = "type=" + type + "&keyword=" + keyword + "&serviceName=" + serviceName +
- "&tenantDomain=" + tenantDomain + "&collapse=" + isCollapse;
- indexParameter = "type=" + type + "&keyword=" + keyword + "&showMax=" + true + "&serviceName=" + serviceName +
- "&tenantDomain=" + tenantDomain + "&collapse=" + isCollapse;
- } else {
- parameter = "type=" + type + "&keyword=" + keyword + "&serviceName=" + serviceName +
- "&collapse=" + isCollapse;
- indexParameter = "type=" + type + "&keyword=" + keyword + "&showMax=" + true + "&serviceName=" + serviceName +
- "&collapse=" + isCollapse;
- }
- } else {
- parameter = "type=" + type + "&keyword=" + keyword;
- indexParameter = "type=" + type + "&keyword=" + keyword + "&showMax=" + true;
- }
-
- } 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 (isManager) {
- %>
-
- <table border="0" class="styledLeft">
- <tbody>
- <tr>
-
- <%
- if (isCollapse) {
- %>
- <td class="middle-header" colspan="4"><a
- class="icon-link"
- style="background-image: url(images/minus.gif);"
- href="javascript:showQueryPropertiesSearch()"
- id="propertySymbolMaxSearch"></a> <fmt:message
- key="adv.search"/></td>
- </tr>
- <tr id="propertyTableSearch" style="">
-
- <%
- } else {
- %>
- <td class="middle-header" colspan="4"><a
- class="icon-link"
- style="background-image: url(images/plus.gif);"
- href="javascript:showQueryPropertiesSearch()"
- id="propertySymbolMaxSearch"></a> <fmt:message
- key="adv.search"/></td>
- </tr>
- <tr id="propertyTableSearch" style="display: none">
- <%
- }
- %>
-
-
- <td>
- <table class="normal">
- <td style="padding-right: 2px !important;">
- <nobr>
- <fmt:message key="service.name"/>
- </nobr>
- </td>
- <td style="padding-right: 0px !important;"><select
- name="serviceName" id="serviceName">
- <%
- for (String name : serviceNames) {
- %>
- <%
- if (name.equals(serviceName)) {
- %>
- <option selected="selected" value="<%=name%>">
- <%=name%>
- </option>
- <%
- } else {
- %>
- <option value="<%=name%>">
- <%=name%>
- </option>
- <%
- }
- %>
- <%
- }
- %>
-
- </select></td>
- <%
- if (isSuperTenant) {
- %>
- <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><input type="hidden" id="tenantDomain"
- name="tenantDomain" value="<%=tenantDomain%>"/>
- </td>
- <%
- }
- %>
-
-
- </table>
-
- </td>
- </tr>
-
- </tbody>
- </table>
- <%
- } else {
- %>
-
- <input type="hidden" id="serviceName" name="serviceName"
- value="<%=serviceName%>"/>
-
- <%
- }
-
- if (noOfRows > 40000) {
- %>
- <br/>
- <font color="red">Maximum log limit exceeded!!!. <br/>
-
- We only list 40 000 logs through the log viewer(your latest logs will be omitted in the log display),
- Please download the daily archived logs, for the full log report.
- </font> <br/>
- <%
- }
- %>
- <br/>
- <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="search.logs"/>
- </nobr>
- </td>
- <%
- if (isManager && isSuperTenant) {
- %>
- <td style="padding-right: 2px !important;"><input onkeypress="submitenter(event)"
- value="<%=keyword%>" id="logkeyword"
- size="20" type="text"></td>
- <td style="padding-right: 2px !important;">
- <a
- class="icon-link"
- style="background-image: url(images/search.gif);"
- href="javascript:searchLogs()">
- </a>
- </td>
- <td><input type="hidden" id="keyWord"
- name="keyword" value="<%=keyword%>"/>
-
- </td>
- <%
- } else if (isManager && !isSuperTenant) {
-
- %>
- <td style="padding-right: 2px !important;"><input
- onkeypress="submitenterNormalManager(event)"
- value="<%=keyword%>" id="logkeyword"
- size="20" type="text"></td>
- <td style="padding-right: 2px !important;">
- <a
- class="icon-link"
- style="background-image: url(images/search.gif);"
- href="javascript:searchNormalManager()"></a>
- </td>
- <td><input type="hidden" id="keyWord"
- name="keyword" value="<%=keyword%>"/>
-
- </td>
- <%
- } else if (!isManager) {
- %>
- <td style="padding-right: 2px !important;"><input onkeypress="submitenterNormal(event)"
- value="<%=keyword%>" id="logkeyword"
- size="20" type="text"></td>
- <td style="padding-right: 2px !important;">
- <a
- class="icon-link"
- style="background-image: url(images/search.gif);"
- href="javascript:searchNormal()"
- ></a>
- </td>
- <td><input type="hidden" id="keyWord"
- name="keyword" value="<%=keyword%>"/>
-
- </td>
- <td style="width: 37%;"></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">
- <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 (!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) {
- %>
- <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()%>]
- [<%=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="index.jsp" pageNumberParameterName="pageNumber"
- prevKey="prev" nextKey="next"
- parameters="<%= parameter%>"/>
- </tr>
-
-
- <%
- if (showLogFiles) {
- %>
- <tr>
- <%
- if (showMax) {
- %>
- <td class="middle-header" colspan="2"><a
- class="icon-link"
- style="background-image: url(images/minus.gif);"
- href="javascript:showQueryProperties()"
- id="propertySymbolMax"></a> <fmt:message
- key="archived.logs"/></td>
- <%
- } else {
-
- %>
- <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="archived.logs"/></td>
- <%
- }
- %>
- </tr>
- <tr id="propertyTable" style="<%=(showMax) ? "" : "display:none"%>">
-
-
- <td>
-
-
- <table border="1" class="styledLeft">
-
- <tbody>
-
- <tr>
- <td class="formRow">
- <table class="styledLeft">
- <thead>
- <tr>
- <th><b><fmt:message key="file.name"/> </b></th>
- <th><b><fmt:message key="date"/> </b></th>
- <th><b><fmt:message key="file.size"/> </b></th>
- <th><b><fmt:message key="action"/> </b></th>
- </tr>
- </thead>
- <%
- int index = -1;
- for (LogInfo logMessage : logInfo) {
- ++index;
- if (index % 2 != 0) {
- %>
- <tr>
- <%
- } else {
- %>
-
- <tr bgcolor="#eeeffb">
- <%
- }
- if (logMessage.getLogName().trim().equalsIgnoreCase("NO_LOG_FILES")) {
- %>
-
- <td colspan="4"><fmt:message key="no.logs"/></td>
- <%
- } else {
- String logFile = logMessage.getLogName();
- String logDate = logMessage.getLogDate();
- String logSize = logMessage.getFileSize();
- %>
-
- <td><%=logFile%>
- </td>
- <td><%=logDate%>
- </td>
- <td><%=logSize%>
- </td>
- <td>
- <%
- if (isArchiveFile(logFile)) {
- %>
- <a class="icon-link"
- style="background-image: url(images/download.gif);"
- onclick="startDownload()"
- href="downloadgz-ajaxprocessor.jsp?logFile=<%=logFile%>&tenantDomain=<%=tenantDomain%>&serviceName=<%=serviceName%>"><fmt:message
- key="download"/> </a>
- <%
- } else {
- %>
- <a class="icon-link"
- style="background-image: url(images/download.gif);"
- onclick="startDownload()"
- href="download-ajaxprocessor.jsp?logFile=<%=logFile%>&tenantDomain=<%=tenantDomain%>&serviceName=<%=serviceName%>"><fmt:message
- key="download"/> </a>
- <%
- }
- %>
- </td>
-
- <%
- }
- %>
-
- </tr>
-
- <%
- }
- %>
- </table>
- <carbon:paginator pageNumber="<%=pageIndexNumber%>"
- numberOfPages="<%=numberOfIndexPages%>"
- page="index.jsp" pageNumberParameterName="pageIndexNumber"
- prevKey="prev" nextKey="next"
- parameters="<%=indexParameter%>"/>
- </td>
- </tr>
-
- </tbody>
- </table>
- </td>
- </tr>
-
- <%
- }
- %>
- </tbody>
- </table>
- </div>
- </div>
-</fmt:bundle>
-</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/index_old.jsp
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.logging.view.ui/src/main/resources/web/log-view/index_old.jsp b/components/org.apache.stratos.logging.view.ui/src/main/resources/web/log-view/index_old.jsp
deleted file mode 100755
index 48aeb71..0000000
--- a/components/org.apache.stratos.logging.view.ui/src/main/resources/web/log-view/index_old.jsp
+++ /dev/null
@@ -1,204 +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.ui.LogViewerStub.LogMessage" %>
-<%@ page import="org.wso2.carbon.utils.ServerConstants" %>
-<%@ page import="org.wso2.carbon.ui.CarbonUIUtil" %>
-<%@ 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 type;
- String keyword;
- String action;
- LogMessage[] logMessages;
- try {
- logViewerClient = new LogViewerClient(cookie, backendServerURL, configContext);
-
- type = request.getParameter("type");
- keyword = request.getParameter("keyword");
- action = request.getParameter("action");
- if (action != null && action.equals("clear-logs")) {
- logViewerClient.cleaLogs();
- }
- logMessages = logViewerClient.getLogs(type, keyword);
-
- } 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">
-
- <table border="0" class="styledLeft">
- <tbody>
- <tr>
- <td>
- <table class="normal">
- <tr>
- <td><fmt:message key="view"/></td>
- <td><select class="log-select" id="logLevelID"
- onchange="javascript:viewSingleLogLevel(); return false;">
- <%
- String[] logLevels = logViewerClient.getLogLevels();
- if (keyword != null) {
- 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="width: 100%;"></td>
- <td>
- <nobr><fmt:message key="search.logs"/></nobr>
- </td>
- <td style="padding-right: 2px !important;">
- <input onkeypress="submitenter(event)" value="" class="log-select"
- size="40" id="logkeyword" type="text"></td>
- <td style="padding-left: 0px !important;"><input type="button"
- value="Search"
- onclick="javascript:searchLog(); return false;"
- class="button">
- </td>
- </tr>
- </table>
- </td>
- </tr>
- </tbody>
- </table>
-
-
- <br/>
- <table border="1" class="styledLeft">
- <tbody>
- <tr>
- <td class="formRow">
- <table class="styledLeft">
-
-
- <%
- int index = -1;
- for (LogMessage logMessage : logMessages) {
- ++index;
- if (index % 2 != 0) {
-
- %>
- <tr>
- <%
-
- } else {
-
- %>
- <tr bgcolor="#eeeffb">
- <%
- }
-
- String logLevel = logMessage.getType();
- if (logLevel == null || logLevel.equals("")) {
- %>
- <td border-bottom="gray" width="2%"></td>
- <%
- } else {
- %>
- <td border-bottom="gray" width="2%">
- <img style="margin-right: 10px;"
- src="<%=logViewerClient.getImageName(logMessage.getType())%>">
- </td>
- <%
- }
- %>
- <td>
- <%
- if (logMessage.getLogMessage().equalsIgnoreCase("NO_LOGS")) {
- %>
- <fmt:message key="no.logs"/>
- <%
- } else {
- %>
- <%=logMessage.getLogMessage()%>
- <% } %>
- </td>
- </tr>
-
- <%
- }
- %>
- </table>
- </td>
- </tr>
-
- <tr>
- <td class="buttonRow">
- <input onclick="javascript:clearLogEntries('<fmt:message
- key="clear.all.log.message"/>?');return false;"
- value="<fmt:message key="clear.all"/>" class="button"
- name="clearLogs" type="button">
- </td>
- </tr>
-
- </tbody>
- </table>
- </div>
- </div>
-</fmt:bundle>
http://git-wip-us.apache.org/repos/asf/stratos/blob/028c3539/components/org.apache.stratos.logging.view.ui/src/main/resources/web/log-view/js/logviewer.js
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.logging.view.ui/src/main/resources/web/log-view/js/logviewer.js b/components/org.apache.stratos.logging.view.ui/src/main/resources/web/log-view/js/logviewer.js
deleted file mode 100644
index 2565405..0000000
--- a/components/org.apache.stratos.logging.view.ui/src/main/resources/web/log-view/js/logviewer.js
+++ /dev/null
@@ -1,912 +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.
- */
-
-/*
- log.js contains scripts need to handle log information.
- */
-function viewSingleLogLevels() {
- var loglevel = document.getElementById("logLevelID");
- var loglevel_index = null;
- var loglevel_value = null;
- if (loglevel != null) {
- loglevel_index = loglevel.selectedIndex;
- if (loglevel_index != null) {
- loglevel_value = loglevel.options[loglevel_index].value;
- }
- }
- if (loglevel_value != null && loglevel_value != "") {
- location.href = "index.jsp?type=" + loglevel_value;
- } else {
- return;
- }
-}
-
-function viewApplicationLogs() {
- var loglevel = document.getElementById("logLevelID");
- var appName = document.getElementById("appName");
- var loglevel_index = null;
- var loglevel_value = null;
- var appName_index = null;
- var appName_value = null;
- if (loglevel != null) {
- loglevel_index = loglevel.selectedIndex;
- if (loglevel_index != null) {
- loglevel_value = loglevel.options[loglevel_index].value;
- }
- }
-
- if (appName != null) {
- appName_index = appName.selectedIndex;
- if (appName_index != null) {
- appName_value = appName.options[appName_index].value;
- }
- }
- if (loglevel_value == "Custom") {
- loglevel_value = "ALL";
- }
- if (loglevel_value != null && loglevel_value != "") {
- location.href = "application_log_viewer.jsp?type=" + loglevel_value + "&appName=" + appName_value;
- } else if (appName_value != null && appName_value != "") {
- location.href = "application_log_viewer.jsp?type=" + loglevel_value + "&appName=" + appName_value;
- } else {
- return;
- }
-}
-
-function viewSingleLogLevel() {
- var loglevel = document.getElementById("logLevelID");
- var tenantDomain = document.getElementById("tenantDomain").value;
- var serviceName = document.getElementById("serviceName").value;
- var logFile = document.getElementById("logFile").value;
- var loglevel_index = null;
- var loglevel_value = null;
- if (loglevel != null) {
- loglevel_index = loglevel.selectedIndex;
- if (loglevel_index != null) {
- loglevel_value = loglevel.options[loglevel_index].value;
- }
- }
- if (loglevel_value != null && loglevel_value != "") {
- location.href = "syslog_index.jsp?type=" + loglevel_value + "&logFile=" + logFile + "&tenantDomain=" + tenantDomain + "&serviceName=" + serviceName;
- } else {
- return;
- }
-
-}
-
-function getTenantSpecificIndex() {
- var loglevel = document.getElementById("logLevelID");
- var loglevel_index = null;
- var loglevel_value = null;
- var tenantDomain = document.getElementById("tenantDomain").value;
- var serviceName = document.getElementById("serviceName");
- var servicelevel_idex = null;
- var service_value = null;
- if (loglevel != null) {
- loglevel_index = loglevel.selectedIndex;
- if (loglevel_index != null) {
- loglevel_value = loglevel.options[loglevel_index].value;
- }
- if (loglevel_value == "Custom") {
- loglevel_value = "ALL";
- }
- }
- if (serviceName != null) {
- servicelevel_idex = serviceName.selectedIndex;
- if (servicelevel_idex != null) {
- service_value = serviceName.options[servicelevel_idex].value;
- }
- }
- var keyword = document.getElementById("logkeyword");
- if (keyword != null && keyword != undefined && keyword.value != null && keyword.value != undefined) {
- if (keyword.value == "") {
- if (serviceName != null) {
- location.href = "index.jsp?type=" + loglevel_value + "&tenantDomain=" + tenantDomain;
- } else {
- location.href = "index.jsp?type=" + loglevel_value + "&tenantDomain=" + tenantDomain + "&serviceName=" + serviceName;
- }
- } else {
- if (serviceName != null) {
- location.href = "index.jsp?type=" + loglevel_value + "&tenantDomain=" +
- tenantDomain + "&serviceName=" + serviceName + "&keyword=" + keyword.value;
- } else {
- location.href = "index.jsp?type=" + loglevel_value + "&tenantDomain=" +
- tenantDomain + "&keyword=" + keyword.value;
- }
- }
- } else {
- return;
- }
-
-}
-
-function getTenantApplicationSpecificIndex() {
- var loglevel = document.getElementById("logLevelID");
- var appName = document.getElementById("appName");
- var loglevel_index = null;
- var loglevel_value = null;
- var appName_index = null;
- var appName_value = null;
- var servicelevel_idex = null;
- var service_value = null;
- var tenantDomain = document.getElementById("tenantDomain");
- var serviceName = document.getElementById("serviceName");
- if (loglevel != null) {
- loglevel_index = loglevel.selectedIndex;
- if (loglevel_index != null) {
- loglevel_value = loglevel.options[loglevel_index].value;
- }
- }
-
- if (appName != null) {
- appName_index = appName.selectedIndex;
- if (appName_index != null) {
- appName_value = appName.options[appName_index].value;
- }
- }
-
- if (serviceName != null) {
- servicelevel_idex = serviceName.selectedIndex;
- if (servicelevel_idex != null) {
- service_value = serviceName.options[servicelevel_idex].value;
- }
- }
-
- if (loglevel_value == "Custom") {
- loglevel_value = "ALL";
- }
- var keyword = document.getElementById("logkeyword");
- if (keyword != null && keyword != undefined) {
- if (keyword.value == "") {
- if (serviceName != null) {
- location.href = "application_log_viewer.jsp?type=" + loglevel_value + "&serviceName=" + service_value
- + "&appName=" + appName_value + "&tenantDomain=" + tenantDomain.value;
- } else {
- location.href = "application_log_viewer.jsp?type=" + loglevel_value + "&appName=" + appName_value +
- "&tenantDomain=" + tenantDomain.value;
- }
- } else {
- if (serviceName != null) {
- location.href = "application_log_viewer.jsp?type=" + loglevel_value + "&keyword=" + keyword.value +
- "&serviceName=" + service_value + "&appName=" + appName_value;
- } else {
- location.href = "application_log_viewer.jsp?type=" + loglevel_value + "&keyword=" + keyword.value +
- "&appName=" + appName_value;
- }
- }
- } else {
- return;
- }
-
-
-}
-
-function getTenantProductSpecificIndex() {
- var loglevel = document.getElementById("logLevelID");
- var appName = document.getElementById("appName");
- var loglevel_index = null;
- var loglevel_value = null;
- var appName_index = null;
- var appName_value = null;
- var servicelevel_idex = null;
- var service_value = null;
- var tenantDomain = document.getElementById("tenantDomain");
- var serviceName = document.getElementById("serviceName");
- if (loglevel != null) {
- loglevel_index = loglevel.selectedIndex;
- if (loglevel_index != null) {
- loglevel_value = loglevel.options[loglevel_index].value;
- }
- }
-
- if (serviceName != null) {
- servicelevel_idex = serviceName.selectedIndex;
- if (servicelevel_idex != null) {
- service_value = serviceName.options[servicelevel_idex].value;
- }
- }
-
- if (appName != null) {
- appName_index = appName.selectedIndex;
- if (appName_index != null) {
- appName_value = appName.options[appName_index].value;
- }
- }
- if (loglevel_value == "Custom") {
- loglevel_value = "ALL";
- }
- var keyword = document.getElementById("logkeyword");
- if (keyword != null && keyword != undefined) {
- if (keyword.value == "") {
- if (tenantDomain != null && tenantDomain != undefined) {
- location.href = "application_log_viewer.jsp?type=" + loglevel_value + "&appName=" + appName_value +
- "&tenantDomain=" + tenantDomain.value + "&serviceName=" + service_value;
- } else {
- location.href = "application_log_viewer.jsp?type=" + loglevel_value + "&appName=" + appName_value +
- "&serviceName=" + service_value;
- }
- } else {
- if (tenantDomain != null && tenantDomain != undefined) {
- location.href = "application_log_viewer.jsp?type=" + loglevel_value + "&appName=" + appName_value +
- "&tenantDomain=" + tenantDomain.value + "&serviceName=" + service_value + "&keyword=" + keyword.value;
- } else {
- location.href = "application_log_viewer.jsp?type=" + loglevel_value + "&appName=" + appName_value +
- "&serviceName=" + service_value + "&keyword=" + keyword.value;
- }
- }
- } else {
- return;
- }
-}
-
-function getProductTenantSpecificIndex() {
- var loglevel = document.getElementById("logLevelID");
- var loglevel_index = null;
- var loglevel_value = null;
- var tenantDomain = document.getElementById("tenantDomain");
-
- var serviceName = document.getElementById("serviceName");
- if (loglevel != null) {
- loglevel_index = loglevel.selectedIndex;
- if (loglevel_index != null) {
- loglevel_value = loglevel.options[loglevel_index].value;
- }
- if (loglevel_value == "Custom") {
- loglevel_value = "ALL";
- }
- }
- var keyword = document.getElementById("logkeyword");
- if (keyword != null && keyword != undefined) {
- if (keyword.value == "") {
- if (tenantDomain != null && tenantDomain != undefined) {
- location.href = "index.jsp?type=" + loglevel_value + "&tenantDomain=" + tenantDomain.value + "&serviceName=" + serviceName.value;
- } else {
- location.href = "index.jsp?type=" + loglevel_value + "&serviceName=" + serviceName.value;
- }
-
- } else {
- if (tenantDomain != null && tenantDomain != undefined) {
- location.href = "index.jsp?type=" + loglevel_value + "&serviceName=" + serviceName.value +
- "&tenantDomain=" + tenantDomain.value + "&keyword=" + keyword.value;
- } else {
- location.href = "index.jsp?type=" + loglevel_value + "&serviceName=" + serviceName.value +
- "&keyword=" + keyword.value;
- }
- }
- } else {
- return;
- }
-}
-
-function submitenter(e) {
- var keycode;
- if (window.event) {
- keycode = window.event.keyCode;
- } else if (e) {
- keycode = e.which;
- }
- if (keycode == 13) {
- searchLogs();
- return true;
- } else {
- return true;
- }
-}
-
-function submitenterNormal(e) {
- var keycode;
- if (window.event) {
- keycode = window.event.keyCode;
- } else if (e) {
- keycode = e.which;
- }
- if (keycode == 13) {
- searchNormal();
- return true;
- } else {
- return true;
- }
-}
-
-function submitenterNormalManager(e) {
- var keycode;
- if (window.event) {
- keycode = window.event.keyCode;
- } else if (e) {
- keycode = e.which;
- }
- if (keycode == 13) {
- searchNormalManager();
- return true;
- } else {
- return true;
- }
-}
-function submitenterTenant(e) {
- var keycode;
- if (window.event) {
- keycode = window.event.keyCode;
- } else if (e) {
- keycode = e.which;
- }
- if (keycode == 13) {
- getTenantSpecificIndex();
- return true;
- } else {
- return true;
- }
-}
-
-function submitenterbottomUp(e) {
- var keycode;
- if (window.event) {
- keycode = window.event.keyCode;
- }
- else if (e) {
- keycode = e.which;
- }
- if (keycode == 13) {
- searchLogBottomLogs();
- return true;
- }
- else {
- return true;
- }
-}
-
-function isNumeric(str) {
- var validChars = "0123456789";
- var isNumber = true;
- var char;
- for (i = 0; i < str.length && isNumber == true; i++) {
- char = str.charAt(i);
- if (validChars.indexOf(char) == -1) {
- isNumber = false;
- }
- }
- return isNumber;
-}
-
-
-function searchLogBottomLogs() {
- var logFile = document.getElementById("logFile").value;
- var log_index = document.getElementById("logIndex").value;
- var loglevel = document.getElementById("logLevelID");
- var serviceName = document.getElementById("serviceName").value;
- var loglevel_index = null;
- var loglevel_value = null;
- var tenantDomain = document.getElementById("tenantDomain").value;
- if (log_index == '') {
- CARBON.showWarningDialog('Head index cannot be empty');
- return false;
- }
- if (!isNumeric(log_index)) {
- CARBON.showWarningDialog('Enter non negative numeric values for log head');
- return false;
- }
- if (log_index < 1) {
- CARBON.showWarningDialog('Log index should be between 1 and 10000000');
- return false;
- }
- if (log_index > 10000000) {
- CARBON.showWarningDialog('Log index should be between 1 and 10000000');
- return false;
- }
- if (loglevel != null) {
- loglevel_index = loglevel.selectedIndex;
- if (loglevel_index != null) {
- loglevel_value = loglevel.options[loglevel_index].value;
- if (loglevel_value == "Custom") {
- loglevel_value = "ALL";
- }
- }
- }
- var keyword = document.getElementById("keyword");
- if (keyword != null && keyword != undefined && keyword.value != null
- && keyword.value != undefined) {
- if (keyword.value == "") {
- location.href = "view.jsp?type=ALL&logIndex=" + log_index + "&logFile=" + logFile + "&tenantDomain=" + tenantDomain + "&serviceName=" + serviceName;
- } else {
- location.href = "view.jsp?type=" + loglevel_value + "&keyword="
- + keyword.value + "&logIndex=" + log_index + "&logFile=" + logFile + "&tenantDomain=" + tenantDomain + "&serviceName=" + serviceName;
- }
- } else {
- return;
- }
-}
-function searchLogs() {
- var loglevel = document.getElementById("logLevelID");
- var tenantDomain = document.getElementById("tenantDomain");
- var serviceName = document.getElementById("serviceName");
- var loglevel_index = null;
- var loglevel_value = null;
- var servicelevel_idex = null;
- var service_value = null;
- var collapseVal = document.getElementById("propertyTableSearch");
- var collapse = "false";
-
- if (loglevel != null) {
- loglevel_index = loglevel.selectedIndex;
- if (loglevel_index != null) {
- loglevel_value = loglevel.options[loglevel_index].value;
- }
- if (loglevel_value == "Custom") {
- loglevel_value = "ALL";
- }
- }
- if (collapseVal.style.display == "") {
- collapse = "true";
- }
-
- if (serviceName != null) {
- servicelevel_idex = serviceName.selectedIndex;
- if (servicelevel_idex != null) {
- service_value = serviceName.options[servicelevel_idex].value;
- }
- }
- var propertyTab = document.getElementById('propertyTable');
- var propertySymbolMax = document.getElementById('propertySymbolMax');
-
- var keyword = document.getElementById("logkeyword");
- if (keyword != null && keyword != undefined) {
- if (keyword.value == "") {
- if (tenantDomain != null && tenantDomain != undefined) {
- if (serviceName != null) {
- location.href = "index.jsp?type=" + loglevel_value + "&tenantDomain=" + tenantDomain.value +
- "&serviceName=" + service_value + "&collapse=" + collapse;
- } else {
- location.href = "index.jsp?type=" + loglevel_value + "&tenantDomain=" + tenantDomain.value +
- "&collapse=" + collapse;
- }
- } else {
- if (serviceName != null) {
- location.href = "index.jsp?type=" + loglevel_value + "&serviceName=" + service_value + "&collapse=" + collapse;
- } else {
- location.href = "index.jsp?type=" + loglevel_value + "&collapse=" + collapse;
- }
- }
- } else {
- if (tenantDomain != null && tenantDomain != undefined) {
- if (serviceName != null) {
- location.href = "index.jsp?type=" + loglevel_value + "&tenantDomain=" + tenantDomain.value +
- "&serviceName=" + service_value + "&keyword=" + keyword.value + "&collapse=" + collapse;
- } else {
- location.href = "index.jsp?type=" + loglevel_value + "&tenantDomain=" + tenantDomain.value +
- "&keyword=" + keyword.value + "&collapse=" + collapse;
- }
-
- } else {
- if (serviceName != null) {
- location.href = "index.jsp?type=" + loglevel_value + "&serviceName=" + service_value +
- "&keyword=" + keyword.value + "&collapse=" + collapse;
- } else {
- location.href = "index.jsp?type=" + loglevel_value +
- "&keyword=" + keyword.value + "&collapse=" + collapse;
- }
-
- }
- }
- } else {
- return;
- }
-}
-
-function searchNormal() {
- var loglevel = document.getElementById("logLevelID");
- var loglevel_index = null;
- var loglevel_value = null;
- if (loglevel != null) {
- loglevel_index = loglevel.selectedIndex;
- if (loglevel_index != null) {
- loglevel_value = loglevel.options[loglevel_index].value;
- }
- if (loglevel_value == "Custom") {
- loglevel_value = "ALL";
- }
- }
- var keyword = document.getElementById("logkeyword");
- if (keyword != null && keyword != undefined && keyword.value != null && keyword.value != undefined) {
- if (keyword.value == "") {
- location.href = "index.jsp?type=" + loglevel_value;
- } else {
- location.href = "index.jsp?type=" + loglevel_value + "&keyword=" + keyword.value;
- }
- } else {
- return;
- }
-}
-
-function searchNormalManager() {
- var loglevel = document.getElementById("logLevelID");
- var serviceName = document.getElementById("serviceName");
- var servicelevel_idex = null;
- var service_value = null;
- var loglevel_index = null;
- var loglevel_value = null;
- var collapseVal = document.getElementById("propertyTableSearch");
- var collapse = "false";
- if (loglevel != null) {
- loglevel_index = loglevel.selectedIndex;
- if (loglevel_index != null) {
- loglevel_value = loglevel.options[loglevel_index].value;
- }
- if (loglevel_value == "Custom") {
- loglevel_value = "ALL";
- }
- }
- if (collapseVal.style.display == "") {
- collapse = "true";
- }
-
- if (serviceName != null) {
- servicelevel_idex = serviceName.selectedIndex;
- if (servicelevel_idex != null) {
- service_value = serviceName.options[servicelevel_idex].value;
- }
- }
- var keyword = document.getElementById("logkeyword");
- if (keyword != null && keyword != undefined && keyword.value != null && keyword.value != undefined) {
- if (keyword.value == "") {
- location.href = "index.jsp?type=" + loglevel_value + "&serviceName=" + service_value + "&collapse=" + collapse;
- } else {
- location.href = "index.jsp?type=" + loglevel_value + "&keyword=" + keyword.value +
- "&serviceName=" + service_value + "&collapse=" + collapse;
- }
- } else {
- return;
- }
-}
-
-
-function showQueryProperties() {
- var propertyTab = document.getElementById('propertyTable');
- var propertySymbolMax = document.getElementById('propertySymbolMax');
- if (propertyTab.style.display == 'none') {
- propertyTab.style.display = '';
- propertySymbolMax.setAttribute('style', 'background-image:url(images/minus.gif);');
- } else {
- propertyTab.style.display = 'none';
- propertySymbolMax.setAttribute('style', 'background-image:url(images/plus.gif);');
- }
-}
-
-function showQueryPropertiesSearch() {
- var propertyTab = document.getElementById('propertyTableSearch');
- var propertySymbolMax = document.getElementById('propertySymbolMaxSearch');
- if (propertyTab.style.display == 'none') {
- propertyTab.style.display = '';
- propertySymbolMax.setAttribute('style', 'background-image:url(images/minus.gif);');
- } else {
- propertyTab.style.display = 'none';
- propertySymbolMax.setAttribute('style', 'background-image:url(images/plus.gif);');
- }
-}
-function appSubmitenter(e) {
- var keycode;
- if (window.event) {
- keycode = window.event.keyCode;
- } else if (e) {
- keycode = e.which;
- }
- if (keycode == 13) {
- searchAppLogs();
- return true;
- } else {
- return true;
- }
-}
-
-function appSubmitenterTenant(e) {
- var keycode;
- if (window.event) {
- keycode = window.event.keyCode;
- } else if (e) {
- keycode = e.which;
- }
- if (keycode == 13) {
- getTenantApplicationSpecificIndex();
- return true;
- } else {
- return true;
- }
-}
-function searchAppLogs() {
- var loglevel = document.getElementById("logLevelID");
- var appName = document.getElementById("appName");
- var loglevel_index = null;
- var loglevel_value = null;
- var appName_index = null;
- var appName_value = null;
- if (loglevel != null) {
- loglevel_index = loglevel.selectedIndex;
- if (loglevel_index != null) {
- loglevel_value = loglevel.options[loglevel_index].value;
- }
- }
- if (loglevel_value == "Custom") {
- loglevel_value = "ALL";
- }
- if (appName != null) {
- appName_index = appName.selectedIndex;
- if (appName_index != null) {
- appName_value = appName.options[appName_index].value;
- }
- }
- var keyword = document.getElementById("logkeyword");
- if (keyword != null && keyword != undefined) {
- if (keyword.value == "") {
- location.href = "application_log_viewer.jsp?type=" + loglevel_value + "&appName=" + appName_value;
- } else {
- location.href = "application_log_viewer.jsp?type=" + loglevel_value + "&keyword=" + keyword.value + "&appName=" + appName_value;
- }
- } else {
- return;
- }
-}
-
-function searchAppLogsAdv() {
- var loglevel = document.getElementById("logLevelID");
- var appName = document.getElementById("appName");
-
- var tenantDomain = document.getElementById("tenantDomain");
- var serviceName = document.getElementById("serviceName");
-
- var servicelevel_idex = null;
- var service_value = null;
- var loglevel_index = null;
- var loglevel_value = null;
- var appName_index = null;
- var appName_value = null;
- if (loglevel != null) {
- loglevel_index = loglevel.selectedIndex;
- if (loglevel_index != null) {
- loglevel_value = loglevel.options[loglevel_index].value;
- }
- }
- if (loglevel_value == "Custom") {
- loglevel_value = "ALL";
- }
- if (appName != null) {
- appName_index = appName.selectedIndex;
- if (appName_index != null) {
- appName_value = appName.options[appName_index].value;
- }
- }
-
- if (serviceName != null) {
- servicelevel_idex = serviceName.selectedIndex;
- if (servicelevel_idex != null) {
- service_value = serviceName.options[servicelevel_idex].value;
- }
- }
- var keyword = document.getElementById("logkeyword");
- if (keyword != null && keyword != undefined) {
- if (keyword.value == "") {
- if (tenantDomain != null && tenantDomain != undefined) {
- if (serviceName != null) {
- location.href = "application_log_viewer.jsp?type=" + loglevel_value + "&tenantDomain=" +
- tenantDomain.value + "&serviceName=" + service_value + "&appName=" + appName_value;
- } else {
- location.href = "application_log_viewer.jsp?type=" + loglevel_value + "&tenantDomain=" +
- tenantDomain.value + "&appName=" + appName_value;
- }
- } else {
- if (serviceName != null) {
- location.href = "application_log_viewer.jsp?type=" + loglevel_value + "&serviceName=" + service_value +
- "&appName=" + appName_value;
- } else {
- location.href = "application_log_viewer.jsp?type=" + loglevel_value + "&appName=" + appName_value;
- }
- }
- } else {
- if (tenantDomain != null && tenantDomain != undefined) {
- if (serviceName != null) {
- location.href = "application_log_viewer.jsp?type=" + loglevel_value + "&tenantDomain=" +
- tenantDomain.value +
- "&serviceName=" + service_value + "&keyword=" + keyword.value + "&appName=" + appName_value;
- } else {
- location.href = "application_log_viewer.jsp?type=" + loglevel_value + "&tenantDomain=" + tenantDomain.value +
- "&keyword=" + keyword.value + "&appName=" + appName_value;
- }
-
- } else {
- if (serviceName != null) {
- location.href = "application_log_viewer.jsp?type=" + loglevel_value + "&serviceName=" + service_value +
- "&keyword=" + keyword.value + "&appName=" + appName_value;
- } else {
- location.href = "application_log_viewer.jsp?type=" + loglevel_value +
- "&keyword=" + keyword.value + "&appName=" + appName_value;
- }
-
- }
- }
- } else {
- return;
- }
-}
-
-function searchLog111() {
- var loglevel = document.getElementById("logLevelID");
- var logFile = document.getElementById("logFile").value;
- var serviceName = document.getElementById("serviceName").value;
- var loglevel_index = null;
- var loglevel_value = null;
- var tenantDomain = document.getElementById("tenantDomain").value;
- if (loglevel != null) {
- loglevel_index = loglevel.selectedIndex;
- if (loglevel_index != null) {
- loglevel_value = loglevel.options[loglevel_index].value;
- }
- }
- var keyword = document.getElementById("keyword");
- if (keyword != null && keyword != undefined && keyword.value != null && keyword.value != undefined) {
- if (keyword.value == "") {
- location.href = "syslog_index.jsp?type=ALL" + "&logFile=" + logFile + "&tenantDomain=" + tenantDomain;
- } else {
- location.href = "syslog_index.jsp?type=" + loglevel_value + "&keyword=" + keyword.value + "&logFile=" + logFile + "&tenantDomain=" + tenantDomain + "&serviceName=" + serviceName;
- }
- } else {
- return;
- }
-}
-
-function clearLogEntries(message) {
- CARBON.showConfirmationDialog(message, function () {
- location.href = "syslog_index.jsp?action=clear-logs";
- });
-}
-
-function viewSingleSysLogLevel() {
- var loglevel = document.getElementById("logLevelID");
- var serviceName = document.getElementById("serviceName").value;
- var logFile = document.getElementById("logFile").value;
- var tenantDomain = document.getElementById("tenantDomain").value;
- var loglevel_index = null;
- var loglevel_value = null;
- if (loglevel != null) {
- loglevel_index = loglevel.selectedIndex;
- if (loglevel_index != null) {
- loglevel_value = loglevel.options[loglevel_index].value;
- }
- }
- if (loglevel_value != null && loglevel_value != "") {
- location.href = "view.jsp?type=" + loglevel_value + "&logFile=" + logFile + "&tenantDomain=" + tenantDomain + "&serviceName=" + serviceName;
- } else {
- return;
- }
-}
-
-function clearProperties() {
- document.getElementById("logIndex").value = "";
- document.getElementById("type").value = "ALL";
- document.getElementById("keyword").value = "";
-}
-
-function searchTenantLog() {
- var loglevel = document.getElementById("logLevelID");
- var serviceName = document.getElementById("serviceName").value;
- var logFile = document.getElementById("logFile").value;
- var tenantDomain = document.getElementById("tenantDomain").value;
- var loglevel_index = null;
- var loglevel_value = null;
- if (loglevel != null) {
- loglevel_index = loglevel.selectedIndex;
- if (loglevel_index != null) {
- loglevel_value = loglevel.options[loglevel_index].value;
- if (loglevel_value == "Custom") {
- loglevel_value = "ALL";
- }
- }
- }
- var keyword = document.getElementById("keyword");
- if (keyword != null && keyword != undefined && keyword.value != null
- && keyword.value != undefined) {
- if (keyword.value == "") {
- location.href = "view.jsp?type=ALL" + "&logFile=" + logFile + "&tenantDomain=" + tenantDomain + "&serviceName=" + serviceName;
- } else {
- location.href = "view.jsp?type=" + loglevel_value
- + "&keyword=" + keyword.value + "&logFile=" + logFile + "&tenantDomain=" + tenantDomain + "&serviceName=" + serviceName;
- }
- } else {
- return;
- }
-}
-
-function getFilteredLogs() {
-
- var loglevel = document.getElementById("logLevelID");
- var log_index = document.getElementById("logIndex").value;
- var appName = document.getElementById("appName");
- var start = document.getElementById("start").value;
- var end = document.getElementById("end").value;
- if (document.getElementById("NowradioDate").checked) {
- start = '';
- end = '';
- }
- var serviceName = null;
- var tenantDomain = null;
- // regular expression to match required date format
- var reTdate = '\\d{4}-\\d{1,2}-\\d{1,2}\\s\\d{1,2}:\\d{1,2}';
- var re = new RegExp(reTdate);
-
- if (start != '' && !start.match(re)) {
- CARBON.showWarningDialog('Invalid start date Format');
- return false;
- }
- if (end != '' && !end.match(re)) {
- CARBON.showWarningDialog('Invalid end date Format');
- return false;
- }
-// // regular expression to match required time format
-// var reTime = /^\d{1,2}:\d{2}([ap]m)?$/;
-// if(time != '' && !time.match(reTime)) {
-// CARBON.showWarningDialog('Invalid Time Format');
-// return false;
-// }
-
- if (document.getElementById("serviceName") != null) {
- serviceName = document.getElementById("serviceName").value
- }
- if (document.getElementById("tenantDomain") != null) {
- tenantDomain = document.getElementById("tenantDomain").value
- }
- var loglevel_index = null;
- var loglevel_value = null;
-
- if (loglevel != null) {
- loglevel_index = loglevel.selectedIndex;
- if (loglevel_index != null) {
- loglevel_value = loglevel.options[loglevel_index].value;
- if (loglevel_value == "Custom") {
- loglevel_value = "ALL";
- }
- }
- }
- var keyword = document.getElementById("keyword").value;
- var logger = document.getElementById("logger").value;
- if (appName != null) {
- appName = document.getElementById("appName").value;
- location.href = "application_log_viewer.jsp?priority=" + loglevel_value
- + "&keyword=" + keyword + "&logIndex=" + log_index
- + "&tenantDomain=" + tenantDomain + "&serviceName=" + serviceName
- + "&logger=" + logger + "&start=" + start + "&appName=" + appName
- + "&end=" + end;
- } else {
- location.href = "cassandra_log_viewer.jsp?priority=" + loglevel_value
- + "&keyword=" + keyword + "&logIndex=" + log_index
- + "&tenantDomain=" + tenantDomain + "&serviceName=" + serviceName
- + "&logger=" + logger + "&start=" + start
- + "&end=" + end;
- }
-
-}
-
-
-function showTrace(obj) {
- var traceTab = document.getElementById('traceTable' + obj);
- var traceSymbolMax = document.getElementById('traceSymbolMax' + obj);
- if (traceTab.style.display == 'none') {
- traceTab.style.display = '';
- traceSymbolMax.setAttribute('style', 'background-image:url(images/minus.gif);');
- } else {
- traceTab.style.display = 'none';
- traceSymbolMax.setAttribute('style', 'background-image:url(images/plus.gif);');
- }
-}
-