viewDashboard.html 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200
  1. <!DOCTYPE html>
  2. <html xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" layout:decorate="~{monitoring/layout}">
  3. <head>
  4. <title th:text="#{cas.dashboard.pagetitle}"></title>
  5. </head>
  6. <body id="cas">
  7. <div layout:fragment="content">
  8. <div class="viewDashboard">
  9. <div class="app-launcher clearfix">
  10. <h1 th:inline="text"><i class="fa fa-dashboard"></i>[[#{cas.dashboard.section.dashboard.title}]]</h1>
  11. <div class="alert alert-warning" th:if="${!dashboardEndpointsEnabled}">
  12. <p>No dashboard functionality/endpoint is configured and accessible.
  13. Unless you teach CAS otherwise, <strong>all endpoints are disabled by default.</strong>
  14. Revisit the CAS configuration/documentation and explicitly enable access for desired endpoints and knobs.
  15. </p>
  16. </div>
  17. <ul>
  18. <li th:if="${healthCheckEndpointEnabled}">
  19. <a th:href="@{/status}" class="casTooltip">Status
  20. <span class="tooltiptext" th:text="#{cas.dashboard.tooltip.status}"></span>
  21. </a>
  22. </li>
  23. <li th:if="${actuatorEndpointsEnabled and autoConfigurationEndpointEnabled}">
  24. <a th:href="@{/status/autoconfig}" class="casTooltip">
  25. Auto Configuration
  26. <span class="tooltiptext" th:text="#{cas.dashboard.tooltip.autoconfiguration}"></span>
  27. </a>
  28. </li>
  29. <li th:if="${actuatorEndpointsEnabled and beansEndpointEnabled}">
  30. <a th:href="@{/status/beans}" class="casTooltip">Beans
  31. <span class="tooltiptext" th:text="#{cas.dashboard.tooltip.beans}"></span>
  32. </a>
  33. </li>
  34. <li th:if="${actuatorEndpointsEnabled and mappingsEndpointEnabled}" class="casTooltip">
  35. <a th:href="@{/status/mappings}">Endpoint Mappings
  36. <span class="tooltiptext" th:text="#{cas.dashboard.tooltip.mappings}"></span>
  37. </a>
  38. </li>
  39. <li th:if="${actuatorEndpointsEnabled and configPropsEndpointEnabled}" class="casTooltip">
  40. <a th:href="@{/status/configprops}">Configuration Properties
  41. <span class="tooltiptext" th:text="#{cas.dashboard.tooltip.configprops}"></span>
  42. </a>
  43. </li>
  44. <li th:if="${actuatorEndpointsEnabled and dumpEndpointEnabled}">
  45. <a th:href="@{/status/dump}" class="casTooltip">Thread Dump
  46. <span class="tooltiptext" th:text="#{cas.dashboard.tooltip.dump}"></span>
  47. </a>
  48. </li>
  49. <li th:if="${actuatorEndpointsEnabled and environmentEndpointEnabled}">
  50. <a th:href="@{/status/env}" class="casTooltip">Environment
  51. <span class="tooltiptext" th:text="#{cas.dashboard.tooltip.env}"></span>
  52. </a>
  53. </li>
  54. <li th:if="${actuatorEndpointsEnabled and healthEndpointEnabled}">
  55. <a th:href="@{/status/health}" class="casTooltip">Health
  56. <span class="tooltiptext" th:text="#{cas.dashboard.tooltip.health}"></span>
  57. </a>
  58. </li>
  59. <li th:if="${actuatorEndpointsEnabled and infoEndpointEnabled}">
  60. <a th:href="@{/status/info}" class="casTooltip">Info
  61. <span class="tooltiptext" th:text="#{cas.dashboard.tooltip.info}"></span>
  62. </a>
  63. </li>
  64. <li th:if="${metricsEndpointEnabled}">
  65. <a th:href="@{/status/metrics}" class="casTooltip">Metrics
  66. <span class="tooltiptext" th:text="#{cas.dashboard.tooltip.metrics}"></span>
  67. </a>
  68. </li>
  69. <li th:if="${actuatorEndpointsEnabled and traceEndpointEnabled}">
  70. <a th:href="@{/status/trace}" class="casTooltip">Trace Requests
  71. <span class="tooltiptext" th:text="#{cas.dashboard.tooltip.trace}"></span>
  72. </a>
  73. </li>
  74. <li th:if="${statisticsEndpointEnabled}">
  75. <a th:href="@{/status/stats}" class="casTooltip">Statistics Panel
  76. <span class="tooltiptext" th:text="#{cas.dashboard.tooltip.stats}"></span>
  77. </a>
  78. </li>
  79. <li th:if="${environmentEndpointEnabled and configurationStateEnabled}">
  80. <a th:href="@{/status/config}" class="casTooltip">Configuration Panel
  81. <span class="tooltiptext" th:text="#{cas.dashboard.tooltip.configpanel}"></span>
  82. </a>
  83. </li>
  84. <li th:if="${configurationMetadataEndpointEnabled}">
  85. <a th:href="@{/status/configmetadata}" class="casTooltip">Configuration Metadata
  86. <span class="tooltiptext" th:text="#{cas.dashboard.tooltip.configmetadata}"></span>
  87. </a>
  88. </li>
  89. <li th:if="${singleSignOnReportEnabled}">
  90. <a th:href="@{/status/ssosessions}" class="casTooltip">SSO Sessions
  91. <span class="tooltiptext" th:text="#{cas.dashboard.tooltip.ssosessions}"></span>
  92. </a>
  93. </li>
  94. <li th:if="${singleSignOnStatusEndpointEnabled}">
  95. <a th:href="@{/status/sso}" class="casTooltip">SSO Status
  96. <span class="tooltiptext" th:text="#{cas.dashboard.tooltip.ssostatus}"></span>
  97. </a>
  98. </li>
  99. <li th:if="${servicesEndpointEnabled}">
  100. <a th:href="@{/status/services}" class="casTooltip">Registered Services
  101. <span class="tooltiptext" th:text="#{cas.dashboard.tooltip.services}"></span>
  102. </a>
  103. </li>
  104. <li th:if="${springWebflowEndpointEnabled}">
  105. <a th:href="@{/status/swf}" class="casTooltip">Webflow Report
  106. <span class="tooltiptext" th:text="#{cas.dashboard.tooltip.swf}"></span>
  107. </a>
  108. </li>
  109. <li th:if="${auditLogEndpointEnabled}">
  110. <a th:href="@{/status/logging}" class="casTooltip">Logging
  111. <span class="tooltiptext" th:text="#{cas.dashboard.tooltip.logging}"></span>
  112. </a>
  113. </li>
  114. <li th:if="${attributeResolutionEndpointEnabled}">
  115. <a th:href="@{/status/attrresolution}" class="casTooltip">Attribute Resolution & Release
  116. <span class="tooltiptext" th:text="#{cas.dashboard.tooltip.attrresolution}"></span>
  117. </a>
  118. </li>
  119. <li th:if="${discoveryProfileEndpointEnabled}">
  120. <a th:href="@{/status/discovery}" class="casTooltip">Discovery Profile
  121. <span class="tooltiptext" th:text="#{cas.dashboard.tooltip.discovery}"></span>
  122. </a>
  123. </li>
  124. <li th:if="${trustedDevicesEnabled}">
  125. <a th:href="@{/status/trustedDevs}" class="casTooltip">Trusted Devices
  126. <span class="tooltiptext" th:text="#{cas.dashboard.tooltip.trusteddevs}"></span>
  127. </a>
  128. </li>
  129. <li th:if="${authenticationEventsRepositoryEnabled}">
  130. <a th:href="@{/status/authnEvents}" class="casTooltip">AuthN Events
  131. <span class="tooltiptext" th:text="#{cas.dashboard.tooltip.authnevents}"></span>
  132. </a>
  133. </li>
  134. </ul>
  135. </div>
  136. <div class="server-functions" th:if="${restartEndpointEnabled or shutdownEndpointEnabled}">
  137. <h2 th:inline="text"><i class="fa fa-server"></i>[[#{cas.dashboard.section.server.functions.title}]]</h2>
  138. <ul>
  139. <li th:if="${restartEndpointEnabled}">
  140. <form method="post" th:action="@{/status/restart}">
  141. <button class="btn btn-restart"
  142. type="button"
  143. data-toggle="modal"
  144. data-target="#myModal"
  145. th:inline="text"
  146. th:attr="data-title=#{cas.dashboard.action.button.reboot.modal.title},data-message=#{cas.dashboard.action.button.reboot.modal.message}"
  147. >
  148. <i class="fa fa-undo"></i>[[#{cas.dashboard.action.button.reboot}]]
  149. </button>
  150. </form>
  151. </li>
  152. <li th:if="${shutdownEndpointEnabled}">
  153. <form method="post" th:action="@{/status/shutdown}">
  154. <button type="button" class="btn btn-shutdown"
  155. data-toggle="modal"
  156. data-target="#myModal"
  157. th:inline="text"
  158. th:attr="data-title=#{cas.dashboard.action.button.shutdown.modal.title},data-message=#{cas.dashboard.action.button.shutdown.modal.message}"
  159. >
  160. <i class="fa fa-power-off"></i>
  161. [[#{cas.dashboard.action.button.shutdown}]]
  162. </button>
  163. </form>
  164. </li>
  165. </ul>
  166. </div>
  167. <div layout:include="monitoring/fragments/modal :: modal(modalId='myModal', modalHeader='Message', modalButtons='true')" th:remove="tag">
  168. <p layout:fragment="modal-content" />
  169. </div>
  170. <script type="text/javascript">
  171. $('#myModal').on('show.bs.modal', function (event) {
  172. var button = $(event.relatedTarget);
  173. var modal = $(this);
  174. modal.find('.modal-title').text(button.data('title'));
  175. modal.find('.modal-body').text(button.data('message'));
  176. var form = $(event.relatedTarget).closest('form');
  177. modal.find('.modal-footer button.btn-primary').data('form', form);
  178. })
  179. $('#myModal').find('.modal-footer button.btn-primary').on('click', function () {
  180. $(this).data('form').submit();
  181. });
  182. </script>
  183. </div>
  184. </div>
  185. </body>
  186. </html>