1
13693261870
2022-09-16 58d012f11dd34564d81b4eb3a6099eb689876597
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
<!DOCTYPE html>
<html xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" layout:decorate="monitoring/layout">
 
<head>
    <title th:text="#{cas.dashboard.pagetitle}"></title>
</head>
 
<body id="cas">
    <div layout:fragment="content">
 
        <div class="viewDashboard">
 
            <div class="app-launcher">
                <h2 th:inline="text"><i class="fa fa-dashboard"></i>[[#{cas.dashboard.section.dashboard.title}]]</h2>
                <ul>
                    <li><a th:href="@{/status}">Status</a></li>
                                        
                    <li th:if="${actuatorEndpointsEnabled}">
                        <a th:href="@{/status/autoconfig}" class="casTooltip">
                            Auto Configuration
                            <span class="tooltiptext" th:text="#{cas.dashboard.tooltip.autoconfiguration}"></span>
                        </a>
                    </li>
                    <li th:if="${actuatorEndpointsEnabled}"><a th:href="@{/status/beans}">Beans</a></li>
                    <li th:if="${actuatorEndpointsEnabled}"><a th:href="@{/status/mappings}">Endpoint Mappings</a></li>
                    <li th:if="${actuatorEndpointsEnabled}"><a th:href="@{/status/configprops}">Configuration Properties</a></li>
                    <li th:if="${actuatorEndpointsEnabled}"><a th:href="@{/status/dump}">Thread Dump</a></li>
                    <li th:if="${actuatorEndpointsEnabled}"><a th:href="@{/status/env}">Environment</a></li>
                    <li th:if="${actuatorEndpointsEnabled}"><a th:href="@{/status/health}">Health</a></li>
                    <li th:if="${actuatorEndpointsEnabled}"><a th:href="@{/status/info}">Info</a></li>
                    <li th:if="${actuatorEndpointsEnabled}"><a th:href="@{/status/metrics}">Metrics</a></li>
                    <li><a th:href="@{/status/stats}">Statistics Panel</a></li>
                    <li><a th:href="@{/status/config}">Config Panel</a></li>
                    <li><a th:href="@{/status/ssosessions}">SSO Sessions</a></li>
                    <li><a th:href="@{/status/logging}">Logging</a></li>
                    <li th:if="${trustedDevicesEnabled}"><a th:href="@{/status/trustedDevs}">Trusted Devices</a></li>
                    <li th:if="${authenticationEventsRepositoryEnabled}"><a th:href="@{/status/authnEvents}">AuthN Events</a></li>
                </ul>
            </div>
            <div class="app-launcher server-config">
                <h2 th:inline="text"><i class="fa fa-cogs"></i>[[#{cas.dashboard.section.configuration.title}]]</h2>
                <ul class="configserver">
                    <li th:if="${isDefaultProfile}"><a th:href="@{/configserver/cas/default}">Default Profile</a></li>
                    <li th:if="${isNativeProfile}"><a th:href="@{/configserver/cas/native}">Native Profile</a></li>
                </ul>
            </div>
 
            <div class="server-functions">
                <h2 th:inline="text"><i class="fa fa-server"></i>[[#{cas.dashboard.section.server.functions.title}]]</h2>
                <ul>
                    <li th:if="${restartEndpointEnabled}">
                        <form method="post" th:action="@{/status/restart}">
                            <button class="btn btn-restart"
                                type="button"
                                data-toggle="modal"
                                data-target="#myModal"
                                th:inline="text"
                                th:attr="data-title=#{cas.dashboard.action.button.reboot.modal.title},data-message=#{cas.dashboard.action.button.reboot.modal.message}"
                            >
                                <i class="fa fa-undo"></i>[[#{cas.dashboard.action.button.reboot}]]
                            </button>
                        </form>
                    </li>
                    <li>
                        <form th:method="${refreshMethod}" th:action="${refreshEndpoint}">
                            <button class="btn btn-refresh"
                                type="button"
                                data-toggle="modal"
                                data-target="#myModal"
                                th:inline="text"
                                    th:attr="data-title=#{cas.dashboard.action.button.refresh.modal.title},data-message=#{cas.dashboard.action.button.refresh.modal.message}"
                            >
                                <i class="fa fa-refresh"></i>[[#{cas.dashboard.action.button.refresh}]]
                            </button>
                        </form>
                    </li>
                    <li th:if="${shutdownEndpointEnabled}">
                        <form method="post" th:action="/status/shutdown">
                            <button type="button" class="btn btn-shutdown"
                                data-toggle="modal"
                                data-target="#myModal"
                                th:inline="text"
                                th:attr="data-title=#{cas.dashboard.action.button.shutdown.modal.title},data-message=#{cas.dashboard.action.button.shutdown.modal.message}"
                            >
                                <i class="fa fa-power-off"></i>
                                [[#{cas.dashboard.action.button.shutdown}]]
                            </button>
                        </form>
                    </li>
                </ul>
            </div>
 
            <div layout:include="fragments/modal :: modal(modalId='myModal', modalHeader='Message', modalButtons='true')" th:remove="tag">
                <p layout:fragment="modal-content">Message goes here!</p>
            </div>
 
            <script>
                $('#myModal').on('show.bs.modal', function (event) {
                    var button = $(event.relatedTarget);
                    var modal = $(this);
 
                    modal.find('.modal-title').text( button.data('title') );
                    modal.find('.modal-body').text( button.data('message') );
 
                    var form = $(event.relatedTarget).closest('form');
 
                    modal.find('.modal-footer button.btn-primary').data('form', form);
                })
 
                $('#myModal').find('.modal-footer button.btn-primary').on('click', function(){
                    $(this).data('form').submit();
                });
 
            </script>
        </div>
 
    </div>
</body>
</html>