Änderungen von Dokument Servermeldungen (SaaS)

Zuletzt geändert von MACH ProForms GmbH am 22.07.2024

Von Version 11.1
bearbeitet von MACH ProForms GmbH
am 16.07.2024
Änderungskommentar: Es gibt keinen Kommentar für diese Version
Auf Version 9.1
bearbeitet von MACH ProForms GmbH
am 16.07.2024
Änderungskommentar: Es gibt keinen Kommentar für diese Version

Zusammenfassung

Details

Seiteneigenschaften
Inhalt
... ... @@ -8,28 +8,28 @@
8 8  )))
9 9  
10 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>
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>
22 22  <!-- Servers Status -->
23 23  <div>
24 24   <h2>&Uuml;berblick Status</h2>
25 25  
26 - <h3>Prim&auml;rsysteme</h3>
27 - <ul class="productive-systems-list ikiss-unordered-list"></ul>
27 + <h3>Prim&auml;rsysteme</h3>
28 + <ul class="productive-systems-list ikiss-unordered-list"></ul>
28 28  
29 - <h3>Sekund&auml;rsysteme</h3>
30 - <ul class="customer-systems-list ikiss-unordered-list"></ul>
30 + <h3>Sekund&auml;rsysteme</h3>
31 + <ul class="customer-systems-list ikiss-unordered-list"></ul>
31 31  </div>
32 -
33 33  <!-- System Update -->
34 34  <div>
35 35   <h2>System-Updates</h2>
... ... @@ -43,7 +43,6 @@
43 43   </ul>
44 44   </div>
45 45  </div>
46 -
47 47  <!-- System Maintenance -->
48 48  <div>
49 49   <h2>System-Wartung</h2>
... ... @@ -52,9 +52,9 @@
52 52   </p>
53 53   <h3>Nächster Wartungstermin</h3>
54 54   <div>
55 - <ul>
56 - <li><strong><span id="plannedMaintenance"></span></strong></li>
57 - </ul>
54 + <ul>
55 + <li><strong><span id="plannedMaintenance"></span></strong></li>
56 + </ul>
58 58   </div>
59 59  </div>
60 60  
... ... @@ -61,22 +61,13 @@
61 61  <script type="text/javascript">
62 62   function fetchData() {
63 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 - })
63 + .then(response => response.json())
70 70   .then(data => {
71 - console.log('Data fetched successfully:', data); // Log the fetched data
72 -
73 73   const productiveSystemsList = document.querySelector('.productive-systems-list');
74 74   const customerSystemsList = document.querySelector('.customer-systems-list');
75 -
76 76   data.hostStatus.forEach(host => {
77 77   const listItem = document.createElement('li');
78 78   listItem.innerHTML = `<span class="host-name">${host.host}:</span> <span class="status-${getStatusColor(host.status)}"><strong>${getStatusText(host.status)}</strong></span>`;
79 -
80 80   if (host.host === "pdf.form-solutions.net" || host.host === "onlinedienste.form-solutions.de") {
81 81   productiveSystemsList.appendChild(listItem);
82 82   } else {
... ... @@ -83,25 +83,23 @@
83 83   customerSystemsList.appendChild(listItem);
84 84   }
85 85   });
86 -
87 87   const plannedUpdate = document.getElementById('plannedUpdate');
88 88   plannedUpdate.textContent = data.plannedUpdate;
89 -
90 90   const plannedMaintenance = document.getElementById('plannedMaintenance');
91 91   plannedMaintenance.textContent = data.plannedMaintenance;
92 92   })
93 93   .catch(error => {
94 - console.error('Error fetching data:', error); // Improved error logging
82 + console.error('Error fetching data:', error);
95 95   });
96 96   }
97 97  
98 - // Function to get the appropriate status text
86 + // Function to get the appropriate status color class
99 99   function getStatusText(status) {
100 100   switch (status) {
101 101   case 'Up':
102 102   return 'Verfügbar';
103 103   case 'Down':
104 - return 'Beeinträchtigung';
92 + return 'Beeintr&auml;chtigung';
105 105   case 'Under Maintenance':
106 106   return 'Wartung';
107 107   default: