<%@ taglib uri="webwork" prefix="webwork" %>
<%@ taglib uri="webwork" prefix="ui" %>
<webwork:bean id="math" name="'com.atlassian.core.bean.MathBean'"/>

<html>
<head>
	<title><webwork:text name="'admin.systeminfo.system.info'"/></title>
</head>

<body>

<p>
<table align="center" bgcolor="#bbbbbb" border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td>
<table border="0" cellpadding="3" cellspacing="1" width="100%">

	<tr bgcolor="#f0f0f0">
		<td class="colHeaderLink" colspan="2">
			<h3 class="formtitle"><webwork:text name="'admin.systeminfo.system.info'"/></h3>
		</td>
	</tr>

    <webwork:iterator value="props(true)" status="'status'">
    <tr bgcolor="<webwork:if test="@status/odd == true">#ffffff</webwork:if><webwork:else>#fffff0</webwork:else>">
		<td valign="top" width="40%">&nbsp; <b><webwork:property value="key" /></b></td>
		<td valign="top" width="60%"><webwork:property value="value" /></td>
	</tr>
    </webwork:iterator>
</table>
</td></tr></table>
</p>

<p>
<table align="center" bgcolor="#bbbbbb" border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td>
<table border="0" cellpadding="3" cellspacing="1" width="100%">

	<tr bgcolor="#f0f0f0">
		<td class="colHeaderLink" colspan="2">
			<h3 class="formtitle"><webwork:text name="'admin.systeminfo.java.vm.memory.statistics'"/></h3>
		</td>
	</tr>

    <webwork:iterator value="jvmStats" status="'status'">
    <tr bgcolor="<webwork:if test="@status/odd == true">#ffffff</webwork:if><webwork:else>#fffff0</webwork:else>">
		<td valign="top" width="40%">&nbsp; <b><webwork:property value="key" /></b></td>
		<td valign="top" width="60%"><webwork:property value="value" /> MB</td>
	</tr>
    </webwork:iterator>
    <tr bgcolor="#fffff0">
		<td valign="top" width="40%">&nbsp; <b><webwork:text name="'admin.systeminfo.memory.graph'"/></b></td>
		<td valign="top" width="60%">
            <%-- Table for graph --%>
            <table align="left" border="0" cellpadding="0" cellspacing="0" width="60%">
            <tr>
                <td valign="top" width="50%">
                    <table  border="0" cellpadding="0" cellspacing="0" width="100%">
                        <webwork:property value="@math/percentage(usedMemory, totalMemory)">
                            <td bgcolor="#CC3333" width="<webwork:property value="."/>%">
                                <a title="<webwork:text name="'admin.systeminfo.used.memory'"/>" >
                                    <img src="<%= request.getContextPath() %>/images/border/spacer.gif"
                                         alt=""
                                         height="15"
                                         width="100%"
                                         border="0" title="<webwork:text name="'admin.systeminfo.used.memory.percent'">
                                             <webwork:param name="'value0'"><webwork:property value="."/></webwork:param>
                                         </webwork:text>">
                                </a>
                            </td>
                        </webwork:property>

                        <webwork:property value="@math/percentage(freeMemory, totalMemory)">
                            <td bgcolor="#00CC00" width="<webwork:property value="."/>%">
                                <a title="<webwork:text name="'admin.systeminfo.free.memory'"/>" >
                                    <img src="<%= request.getContextPath() %>/images/border/spacer.gif"
                                         alt=""
                                         height="15"
                                         width="100%"
                                         border="0" title="<webwork:text name="'admin.systeminfo.free.memory.percent'">
                                             <webwork:param name="'value0'"><webwork:property value="."/></webwork:param>
                                         </webwork:text>">
                                 </a>
                            </td>
                    </table>
                  </td>
                <td valign="top" width="10%" align="left" nowrap>
                  <b>&nbsp;&nbsp;<webwork:text name="'admin.systeminfo.memory.percent.free'">
                      <webwork:param name="'value0'"><webwork:property value="."/> </webwork:param>
                  </webwork:text> </b>
                  &nbsp;&nbsp;<span class="small">(<a href="ViewSystemInfo!garbageCollection.jspa"><webwork:text name="'admin.systeminfo.force.garbage.collection'"/></a>)</span>
                </td>
                </webwork:property>
            </tr>
            </table>
        </td>
	</tr>
</table>
</td></tr></table>
</p>

<p>
<table align="center" bgcolor="#bbbbbb" border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td>
<table border="0" cellpadding="3" cellspacing="1" width="100%">

	<tr bgcolor="#f0f0f0">
		<td class="colHeaderLink" colspan="2">
			<h3 class="formtitle"><webwork:text name="'admin.systeminfo.jira.info'"/></h3>
		</td>
	</tr>

    <webwork:iterator value="buildStats" status="'status'">
    <tr bgcolor="<webwork:if test="@status/odd == true">#ffffff</webwork:if><webwork:else>#fffff0</webwork:else>">
		<td valign="top" width="40%">&nbsp; <b><webwork:property value="key" /></b></td>
		<td valign="top" width="60%"><webwork:property value="value" /></td>
	</tr>
    </webwork:iterator>
</table>
</td></tr></table>
</p>
<p>
<table align="center" bgcolor="#bbbbbb" border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td>
<table border="0" cellpadding="3" cellspacing="1" width="100%">

	<tr bgcolor="#f0f0f0">
		<td class="colHeaderLink" colspan="2">
			<h3 class="formtitle"><webwork:text name="'admin.systeminfo.database.statistics'"/></h3>
		</td>
	</tr>

    <webwork:iterator value="usageStats" status="'status'">
    <tr bgcolor="<webwork:if test="@status/odd == true">#ffffff</webwork:if><webwork:else>#fffff0</webwork:else>">
		<td valign="top" width="40%">&nbsp; <b><webwork:property value="key" /></b></td>
		<td valign="top" width="60%"><webwork:property value="value" /></td>
	</tr>
    </webwork:iterator>
</table>
</td></tr></table>
</p>
<p>
<table align="center" bgcolor="#bbbbbb" border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td>
<table border="0" cellpadding="3" cellspacing="1" width="100%">

	<tr bgcolor="#f0f0f0">
		<td class="colHeaderLink" colspan="2">
			<h3 class="formtitle"><webwork:text name="'admin.systeminfo.file.paths'"/></h3>
		</td>
	</tr>

    <tr bgcolor="#ffffff">
		<td valign="top" width="40%">&nbsp; <b><webwork:text name="'admin.systeminfo.location.of.entity.engine'"/></b></td>
		<td valign="top" width="60%"><webwork:property value="entityEngineXmlPath" /></td>
	</tr>
    <tr bgcolor="#fffff0">
		<td valign="top" width="40%">&nbsp; <b><webwork:text name="'admin.systeminfo.location.of.atlassian.jira.log'"/></b></td>
		<td valign="top" width="60%"><webwork:property value="logPath" /></td>
	</tr>
    <tr bgcolor="#ffffff">
		<td valign="top" width="40%">&nbsp; <b><webwork:text name="'admin.systeminfo.location.of.indexes'"/></b></td>
		<td valign="top" width="60%"><webwork:property value="indexLocation" /></td>
	</tr>

</table>
</td></tr></table>
</p>

<%-- LISTENERS --%>
<table align="center" bgcolor="#bbbbbb" border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td>
<table border="0" cellpadding="3" cellspacing="1" width="100%">
    <tr bgcolor="#f0f0f0">
        <td class="colHeaderLink" colspan="2">
            <h3 class="formtitle"><webwork:text name="'admin.systeminfo.listeners'"/></h3>
        </td>
    </tr>
    <webwork:iterator value="listeners" status="'status'">
    <tr bgcolor="<webwork:if test="@status/odd == true">#ffffff</webwork:if><webwork:else>#fffff0</webwork:else>">
        <td width="40%" valign="top">
            <span style="font-weight:bold;"><webwork:property value="string('name')" /></span><br />
            <span style="font-size:smaller;"><webwork:property value="string('clazz')" /></span>
        </td>
        <td width="60%" valign="top">
            <webwork:property value="propertySet(.)/keys('',5)">
			<table cellpadding="2" cellspacing="0" border="0">
				<webwork:if test=". != null">
					<webwork:iterator value=".">
						<tr>
							<td><span style="font-weight:bold;"><webwork:property value="." />:</span></td>
							<td><webwork:property value="propertySet(../..)/string(.)"/></td>
						</tr>
					</webwork:iterator>
				</webwork:if>
			</table>
			</webwork:property>
        </td>
    </tr>
    </webwork:iterator>
</table>
</td></tr></table>
<br />

<%-- SERVICES --%>
<table align="center" bgcolor="#bbbbbb" border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td>
<table border="0" cellpadding="3" cellspacing="1" width="100%">
    <tr bgcolor="#f0f0f0">
        <td class="colHeaderLink" colspan="2">
            <h3 class="formtitle"><webwork:text name="'admin.systeminfo.services'"/></h3>
        </td>
    </tr>
    <webwork:iterator value="services" status="'status'">
    <tr bgcolor="<webwork:if test="@status/odd == true">#ffffff</webwork:if><webwork:else>#fffff0</webwork:else>">
        <td width="40%" valign="top">
            <span style="font-weight:bold;"><webwork:property value="./name" /></span><br />
            <span style="font-size:smaller;"><webwork:property value="./serviceClass" /></span>
        </td>
        <td width="60%" valign="top">
			<table cellpadding="2" cellspacing="0" border="0">
                <tr>
                    <td><span style="font-weight:bold;"><webwork:text name="'admin.systeminfo.service.delay'"/>:</span></td>
                    <td><webwork:property value="millisecondsToMinutes(./delay)"/>&nbsp;<webwork:text name="'core.dateutils.minutes'"/></td>
                </tr>
                <webwork:iterator value="servicePropertyMap(.)/entrySet">
                <tr>
                    <td><span style="font-weight:bold;"><webwork:property value="./key" />:</span></td>
                    <td><webwork:property value="/text(./value)" /></td>
                </tr>
                </webwork:iterator>
			</table>
        </td>
    </tr>
    </webwork:iterator>
</table>
</td></tr></table>
<br />

<%-- PLUGINS --%>
<table align="center" bgcolor="#bbbbbb" border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td>
<table border="0" cellpadding="3" cellspacing="1" width="100%">
    <tr bgcolor="#f0f0f0">
        <td class="colHeaderLink" colspan="2">
            <h3 class="formtitle"><webwork:text name="'admin.systeminfo.plugins'"/></h3>
        </td>
    </tr>
    <webwork:iterator value="plugins" status="'status'">
    <tr bgcolor="<webwork:if test="@status/odd == true">#ffffff</webwork:if><webwork:else>#fffff0</webwork:else>">
        <td width="40%" valign="top">
            <span style="font-weight:bold;"><webwork:property value="./name" /></span> - <webwork:property value="./pluginInformation/version" /><br />
            <span style="font-size:smaller"><webwork:text name="'admin.systeminfo.plugin.by'"/>&nbsp;<webwork:property value="./pluginInformation/vendorName" /></span>
        </td>
        <td width="60%" valign="top">
            <table cellpadding="2" cellspacing="0" border="0">
                <tr>
                    <td colspan="2">
                        <webwork:if test="pluginEnabled(.) == true">
                            <webwork:text name="'admin.systeminfo.plugin.enabled'"/>
                        </webwork:if>
                        <webwork:else>
                            <webwork:text name="'admin.systeminfo.plugin.disabled'"/>
                        </webwork:else>
                    </td>
                </tr>
                <webwork:iterator value="./pluginInformation/parameters/entrySet">
                <tr>
                    <td><span style="font-weight:bold;"><webwork:property value="./key" />:</span></td>
                    <td><webwork:property value="/text(./value)" /></td>
                </tr>
                </webwork:iterator>
            </table>
        </td>
    </tr>
    </webwork:iterator>
</table>
</td></tr></table>
<br />

</body>
</html>