Wiki-Quellcode von Servermeldungen (SaaS)
Version 11.1 von MACH ProForms GmbH am 16.07.2024
Zeige letzte Bearbeiter
author | version | line-number | content |
---|---|---|---|
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 | </style> | ||
22 | <!-- Servers Status --> | ||
23 | <div> | ||
24 | <h2>Überblick Status</h2> | ||
25 | |||
26 | <h3>Primärsysteme</h3> | ||
27 | <ul class="productive-systems-list ikiss-unordered-list"></ul> | ||
28 | |||
29 | <h3>Sekundärsysteme</h3> | ||
30 | <ul class="customer-systems-list ikiss-unordered-list"></ul> | ||
31 | </div> | ||
32 | |||
33 | <!-- System Update --> | ||
34 | <div> | ||
35 | <h2>System-Updates</h2> | ||
36 | <p> | ||
37 | Updates der MACH formsolutions Plattform werden grundsä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 | |||
47 | <!-- System Maintenance --> | ||
48 | <div> | ||
49 | <h2>System-Wartung</h2> | ||
50 | <p> | ||
51 | Wartungen an unserem System finden regelmäß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> | ||
55 | <ul> | ||
56 | <li><strong><span id="plannedMaintenance"></span></strong></li> | ||
57 | </ul> | ||
58 | </div> | ||
59 | </div> | ||
60 | |||
61 | <script type="text/javascript"> | ||
62 | function fetchData() { | ||
63 | fetch('https://mpf-serversstatus.azurewebsites.net/api/http_serversstatus_trigger') | ||
64 | .then(response => { | ||
65 | if (!response.ok) { | ||
66 | throw new Error('Network response was not ok ' + response.statusText); | ||
67 | } | ||
68 | return response.json(); | ||
69 | }) | ||
70 | .then(data => { | ||
71 | console.log('Data fetched successfully:', data); // Log the fetched data | ||
72 | |||
73 | const productiveSystemsList = document.querySelector('.productive-systems-list'); | ||
74 | const customerSystemsList = document.querySelector('.customer-systems-list'); | ||
75 | |||
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>`; | ||
79 | |||
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 | }); | ||
86 | |||
87 | const plannedUpdate = document.getElementById('plannedUpdate'); | ||
88 | plannedUpdate.textContent = data.plannedUpdate; | ||
89 | |||
90 | const plannedMaintenance = document.getElementById('plannedMaintenance'); | ||
91 | plannedMaintenance.textContent = data.plannedMaintenance; | ||
92 | }) | ||
93 | .catch(error => { | ||
94 | console.error('Error fetching data:', error); // Improved error logging | ||
95 | }); | ||
96 | } | ||
97 | |||
98 | // Function to get the appropriate status text | ||
99 | function getStatusText(status) { | ||
100 | switch (status) { | ||
101 | case 'Up': | ||
102 | return 'Verfügbar'; | ||
103 | case 'Down': | ||
104 | return 'Beeinträchtigung'; | ||
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); | ||
127 | </script> | ||
128 | {{/html}} | ||
129 | |||
130 | = Kontakt = | ||
131 | |||
132 | Bei Fragen oder Hilfestellungen zu unseren Diensten können Sie uns über den [[MACH ProForms Support>>doc:Main.10_Hilfe.WebHome]] erreichen. |