<?php

/**
 * Overview of admin
 */

if (!admin_init(false)) {
  return;
}
?>

<h1><?= gettext('Resin Administration')?></h1>

<table border='0'>
  <tr>
    <!-- Summary -->
    <td width='50%'>
      <h2><a href="?q=summary"><?= gettext('Summary')?></a></h2>
      <p><?= gettext('A summary of the server\'s state.')?></p>
    </td>
    <!-- Cache -->
    <td>
      <h2><a href="?q=cache"><?= gettext('Cache')?></a></h2>
      <p><?= gettext('Describes the proxy cache state.')?></p>
    </td>
  </tr>
  <tr>
    <!-- Config -->
    <td>
      <h2><a href="?q=config"><?= gettext('Config')?></a></h2>
      <p><?= gettext('Review of the server\'s configuration as parsed by the current Resin instance.')?></p>
    </td>
    <!-- Deploy -->
    <td>
      <h2><a href="?q=deploy"><?= gettext('Deploy')?></a></h2>
      <p><?= gettext('Deploy and update new applications throughout the cluster.')?></p>
    </td>
  </tr>
  <tr>
    <!-- Graphs -->
    <td>
      <h2><a href="?q=graphs"><?= gettext('Graphs')?></a></h2>
      <p><?= gettext('Custom graphing of internal Resin statistics. Requires Resin-Pro and a HTML 5 browser like Firefox 3.5.')?></p>
    </td>
    <!-- Health -->
    <td>
      <h2><a href="?q=health"><?= gettext('Health')?></a></h2>
      <p><?= gettext('Health check overview of the servers.')?></p>
    </td>
  </tr>
  <tr>
    <!-- JMX -->
    <td>
      <h2><a href="?q=jmx"><?= gettext('JMX')?></a></h2>
      <p><?= gettext('Table-based view of all JMX beans registered with the JVM.')?></p>
    </td>
    <!-- Memory -->
    <td>
      <h2><a href="?q=memory"><?= gettext('Memory')?></a></h2>
      <p><?= gettext('Heap dump to debug memory leaks and memory overview. The heap dump requires Resin-Pro.')?></p>
    </td>
  </tr>
  <tr>
    <!-- Watchdog -->
    <td>
      <h2><a href="?q=watchdog"><?= gettext('Watchdog')?></a></h2>
      <p><?= gettext('A report to aid in debugging server restarts.')?>
      </p>
    </td>
    <!-- Profile -->
    <td>
      <h2><a href="?q=profile"><?= gettext('CPU Profile')?></a></h2>
      <p><?= gettext('CPU profiling of the running instance. Because the profiling is lightweight and sample-based, it can be used in a runtime environment.')?></p>
    </td>
  </tr>
  <tr>
    <!-- Thread -->
    <td>
      <h2><a href="?q=thread"><?= gettext('Thread Dump')?></a></h2>
      <p><?= gettext('Provides thread dumps to check the current status of a Resin instance.')?></p>
    </td>
    <!-- Web-App -->
    <td>
      <h2><a href="?q=webapp"><?= gettext('WebApp')?></a></h2>
      <p><?= gettext('Overview of the web-apps running in the Resin instance.')?></p>
    </td>
  </tr>
  <tr>
    <td>
      <h2><a href="rest.php"><?= gettext('REST')?></a></h2>
      <p><?= gettext('REST pages for programmatic access')?></p>
<?php
      foreach (load_pages("rest") as $key
        => $value) {
			  echo"<a href='rest.php?q=" . $key . "'>" . $key
                              . "</a><br/>\n";
			}
      ?>
    </td>
  </tr>
</table>

<?php display_footer("index.php"); ?>
