Wiki-Quellcode von Servermeldungen (SaaS)

Version 7.1 von MACH ProForms GmbH am 16.07.2024

Zeige letzte Bearbeiter
1 = Erreichbarkeit und Wartung der Services =
2
3 Hier finden unsere SaaS-Kunden und Benutzer eine dynamische Anzeige der Uptime der Services und die geplanten Wartungsintervalle.
4
5 (% class="box infomessage" %)
6 (((
7 Der Service befindet sich derzeit im Wartungsmodus. Wir bitte um Ihr Verständnis und wir arbeiten mit Hochdruck an der Fertigstellung.
8 )))
9
10 {{html}}
11 <style>
12 .status-up {
13 color: rgb(3, 133, 3); /* Green text color for "UP" status */
14 }
15 .status-down {
16 color: rgb(187, 9, 9); /* Red text color for "DOWN" status */
17 }
18 .status-maintenance {
19 color: gold; /* Gold text color for "Under Maintenance" status */
20 }
21
22 </style>
23 <!-- Servers Status -->
24 <div>
25 <h2>&Uuml;berblick Status</h2>
26
27 <h3>Prim&auml;rsysteme</h3>
28 <ul class="productive-systems-list ikiss-unordered-list"></ul>
29
30 <h3>Sekund&auml;rsysteme</h3>
31 <ul class="customer-systems-list ikiss-unordered-list"></ul>
32 </div>
33 <!-- System Update -->
34 <div>
35 <h2>System-Updates</h2>
36 <p>
37 Updates der MACH formsolutions Plattform werden grunds&auml;tzlich Montags zwischen 02:00 Uhr und 03:00 Uhr eingespielt.
38 </p>
39 <h3>Nächster Updatetermin</h3>
40 <div>
41 <ul>
42 <li><strong><span id="plannedUpdate"></span></strong></li>
43 </ul>
44 </div>
45 </div>
46 <!-- System Maintenance -->
47 <div>
48 <h2>System-Wartung</h2>
49 <p>
50 Wartungen an unserem System finden regelm&auml;ßig am letzten Donnerstag eines Monats zwischen 22:00 Uhr und 24:00 Uhr statt.
51 </p>
52 <h3>Nächster Wartungstermin</h3>
53 <div>
54 <ul>
55 <li><strong><span id="plannedMaintenance"></span></strong></li>
56 </ul>
57 </div>
58 </div>
59
60 <script type="text/javascript">
61 // Function to fetch data from api-status.php and update the HTML
62 function fetchData() {
63 // fetch('api-status.php') // Local Call
64 fetch('https://mpf-serversstatus.azurewebsites.net/api/http_serversstatus_trigger')
65 .then(response => response.json())
66 .then(data => {
67 const productiveSystemsList = document.querySelector('.productive-systems-list');
68 const customerSystemsList = document.querySelector('.customer-systems-list');
69
70 data.hostStatus.forEach(host => {
71 const listItem = document.createElement('li');
72 listItem.innerHTML = `<span class="host-name">${host.host}:</span> <span class="status-${getStatusColor(host.status)}"><strong>${getStatusText(host.status)}</strong></span>`;
73
74 if (host.host === "pdf.form-solutions.net" || host.host === "onlinedienste.form-solutions.de") {
75 productiveSystemsList.appendChild(listItem);
76 } else {
77 customerSystemsList.appendChild(listItem);
78 }
79 });
80
81 // Update Next Planned Update Date
82 const plannedUpdate = document.getElementById('plannedUpdate');
83 plannedUpdate.textContent = data.plannedUpdate;
84 // Update Next Planned Maintenance Date
85 const plannedMaintenance = document.getElementById('plannedMaintenance');
86 plannedMaintenance.textContent = data.plannedMaintenance;
87 })
88 .catch(error => {
89 console.error('Error fetching data:', error);
90 });
91 }
92
93 // Function to get the appropriate status color class
94 function getStatusText(status) {
95 switch (status) {
96 case 'Up':
97 return 'Verfügbar';
98 case 'Down':
99 return 'Beeintr&auml;chtigung';
100 case 'Under Maintenance':
101 return 'Wartung';
102 default:
103 return '';
104 }
105 }
106
107 // Function to get the appropriate status color class
108 function getStatusColor(status) {
109 switch (status) {
110 case 'Up':
111 return 'up';
112 case 'Down':
113 return 'down';
114 case 'Under Maintenance':
115 return 'maintenance';
116 default:
117 return '';
118 }
119 }
120
121 // Call fetchData when the page loads
122 window.addEventListener('load', fetchData);
123 </script>
124 {{/html}}
125
126 = Kontakt =
127
128 Bei Fragen oder Hilfestellungen zu unseren Diensten können Sie uns über den [[MACH ProForms Support>>doc:Main.10_Hilfe.WebHome]] erreichen.