Wiki-Quellcode von Servermeldungen (SaaS)

Version 11.1 von MACH ProForms GmbH am 16.07.2024

Verstecke letzte Bearbeiter
fweise 2.1 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
MACH ProForms GmbH 5.1 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
fweise 1.1 10 {{html}}
MACH ProForms GmbH 11.1 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 </style>
fweise 2.1 22 <!-- Servers Status -->
23 <div>
24 <h2>&Uuml;berblick Status</h2>
25
MACH ProForms GmbH 10.1 26 <h3>Prim&auml;rsysteme</h3>
27 <ul class="productive-systems-list ikiss-unordered-list"></ul>
fweise 2.1 28
MACH ProForms GmbH 10.1 29 <h3>Sekund&auml;rsysteme</h3>
30 <ul class="customer-systems-list ikiss-unordered-list"></ul>
fweise 2.1 31 </div>
MACH ProForms GmbH 10.1 32
fweise 2.1 33 <!-- System Update -->
34 <div>
35 <h2>System-Updates</h2>
36 <p>
MACH ProForms GmbH 4.1 37 Updates der MACH formsolutions Plattform werden grunds&auml;tzlich Montags zwischen 02:00 Uhr und 03:00 Uhr eingespielt.
fweise 2.1 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>
MACH ProForms GmbH 10.1 46
fweise 2.1 47 <!-- System Maintenance -->
48 <div>
49 <h2>System-Wartung</h2>
50 <p>
51 Wartungen an unserem System finden regelm&auml;ßig am letzten Donnerstag eines Monats zwischen 22:00 Uhr und 24:00 Uhr statt.
52 </p>
53 <h3>Nächster Wartungstermin</h3>
54 <div>
MACH ProForms GmbH 10.1 55 <ul>
56 <li><strong><span id="plannedMaintenance"></span></strong></li>
57 </ul>
fweise 2.1 58 </div>
59 </div>
60
fweise 1.1 61 <script type="text/javascript">
fweise 2.1 62 function fetchData() {
MACH ProForms GmbH 7.1 63 fetch('https://mpf-serversstatus.azurewebsites.net/api/http_serversstatus_trigger')
MACH ProForms GmbH 11.1 64 .then(response => {
65 if (!response.ok) {
66 throw new Error('Network response was not ok ' + response.statusText);
67 }
68 return response.json();
69 })
fweise 2.1 70 .then(data => {
MACH ProForms GmbH 11.1 71 console.log('Data fetched successfully:', data); // Log the fetched data
72
fweise 2.1 73 const productiveSystemsList = document.querySelector('.productive-systems-list');
74 const customerSystemsList = document.querySelector('.customer-systems-list');
MACH ProForms GmbH 10.1 75
fweise 2.1 76 data.hostStatus.forEach(host => {
77 const listItem = document.createElement('li');
78 listItem.innerHTML = `<span class="host-name">${host.host}:</span> <span class="status-${getStatusColor(host.status)}"><strong>${getStatusText(host.status)}</strong></span>`;
MACH ProForms GmbH 10.1 79
fweise 2.1 80 if (host.host === "pdf.form-solutions.net" || host.host === "onlinedienste.form-solutions.de") {
81 productiveSystemsList.appendChild(listItem);
82 } else {
83 customerSystemsList.appendChild(listItem);
84 }
85 });
MACH ProForms GmbH 10.1 86
fweise 2.1 87 const plannedUpdate = document.getElementById('plannedUpdate');
88 plannedUpdate.textContent = data.plannedUpdate;
MACH ProForms GmbH 10.1 89
fweise 2.1 90 const plannedMaintenance = document.getElementById('plannedMaintenance');
91 plannedMaintenance.textContent = data.plannedMaintenance;
92 })
93 .catch(error => {
MACH ProForms GmbH 11.1 94 console.error('Error fetching data:', error); // Improved error logging
fweise 2.1 95 });
96 }
97
MACH ProForms GmbH 10.1 98 // Function to get the appropriate status text
fweise 2.1 99 function getStatusText(status) {
100 switch (status) {
101 case 'Up':
102 return 'Verfügbar';
103 case 'Down':
MACH ProForms GmbH 10.1 104 return 'Beeinträchtigung';
fweise 2.1 105 case 'Under Maintenance':
106 return 'Wartung';
107 default:
108 return '';
109 }
110 }
111
112 // Function to get the appropriate status color class
113 function getStatusColor(status) {
114 switch (status) {
115 case 'Up':
116 return 'up';
117 case 'Down':
118 return 'down';
119 case 'Under Maintenance':
120 return 'maintenance';
121 default:
122 return '';
123 }
124 }
125
126 window.addEventListener('load', fetchData);
fweise 1.1 127 </script>
128 {{/html}}
fweise 2.1 129
fweise 3.1 130 = Kontakt =
fweise 2.1 131
fweise 3.1 132 Bei Fragen oder Hilfestellungen zu unseren Diensten können Sie uns über den [[MACH ProForms Support>>doc:Main.10_Hilfe.WebHome]] erreichen.