<%@ page import="ro.emid.Application" %>
<%@ page import="ro.emid.common.constants.AppConstants" %>

<b>Manager aplicatie</b>

<%
    final boolean started = Application.isStarted();
    final boolean stopped = Application.isStopped();
%>

<table border="1">
    <tr>
        <td>Name</td>
        <td>Status</td>
        <td>Op</td>
    </tr>
    <tr>
        <td><%=AppConstants.APP_NAME%></td>
        <td>
            <%=started?"STARTED":stopped?"STOPPED":"-"%>
        </td>
        <td>
            <button onclick="window.location = '<%=AppConstants.APP_NAME%>?action=start'" <%=started?"disabled":""%> >Start</button>
            <button onclick="window.location = '<%=AppConstants.APP_NAME%>?action=stop'" <%=stopped?"disabled":""%>>Stop</button>
        </td>
    </tr>
</table>
