[BUGFIX] Reports module broken due to wrong status strings 82/44582/6
authorMathias Schreiber <mathias.schreiber@wmdb.de>
Fri, 6 Nov 2015 17:41:48 +0000 (18:41 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Fri, 6 Nov 2015 18:39:49 +0000 (19:39 +0100)
We revert the status changes in the install tool because
* changing them breaks way more than we can see now
* changing them was a stupid idea in the first place

The status itself should not be "inspired" by a name given by
a view-related component (Bootstrap in our case).

Change-Id: If15d59ce167848e10718433a16f1369fa017e0d3
Resolves: #71374
Related: #62067
Release: master
Reviewed-on: https://review.typo3.org/44582
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Patrick Schriner <patrick.schriner@diemedialen.de>
Tested-by: Patrick Schriner <patrick.schriner@diemedialen.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/install/Classes/Controller/Action/Ajax/EnvironmentStatus.php
typo3/sysext/install/Classes/Status/ErrorStatus.php
typo3/sysext/install/Classes/Status/InfoStatus.php
typo3/sysext/install/Classes/Status/OkStatus.php
typo3/sysext/install/Classes/Status/StatusUtility.php
typo3/sysext/install/Resources/Private/Partials/Action/Common/StatusMessage.html

index 9e3e972..8c995f5 100644 (file)
@@ -31,11 +31,11 @@ class EnvironmentStatus extends AbstractAjaxAction
 
         // Count of failed environment checks to be displayed in the left navigation menu
         $environmentStatus = $this->objectManager->get(\TYPO3\CMS\Install\SystemEnvironment\Check::class)->getStatus();
-        $environmentErrors = $statusUtility->filterBySeverity($environmentStatus, 'danger');
+        $environmentErrors = $statusUtility->filterBySeverity($environmentStatus, 'error');
 
         // Count of failed database checks to be displayed in the left navigation menu
         $databaseStatus = $this->objectManager->get(\TYPO3\CMS\Install\SystemEnvironment\DatabaseCheck::class)->getStatus();
-        $databaseErrors = $statusUtility->filterBySeverity($databaseStatus, 'danger');
+        $databaseErrors = $statusUtility->filterBySeverity($databaseStatus, 'error');
 
         return count($environmentErrors) + count($databaseErrors);
     }
index 4684d90..149c4ba 100644 (file)
@@ -22,5 +22,5 @@ class ErrorStatus extends AbstractStatus implements StatusInterface
     /**
      * @var string The severity
      */
-    protected $severity = 'danger';
+    protected $severity = 'error';
 }
index 07397ae..b39e325 100644 (file)
@@ -22,5 +22,5 @@ class InfoStatus extends AbstractStatus implements StatusInterface
     /**
      * @var string The severity
      */
-    protected $severity = 'info';
+    protected $severity = 'information';
 }
index 044cfbe..6159edf 100644 (file)
@@ -22,5 +22,5 @@ class OkStatus extends AbstractStatus implements StatusInterface
     /**
      * @var string The severity
      */
-    protected $severity = 'success';
+    protected $severity = 'ok';
 }
index cb11bb3..9126b89 100644 (file)
@@ -31,10 +31,10 @@ class StatusUtility
     {
         $orderedStatus = array(
             'alert' => $this->filterBySeverity($statusObjects, 'alert'),
-            'danger' => $this->filterBySeverity($statusObjects, 'danger'),
+            'error' => $this->filterBySeverity($statusObjects, 'error'),
             'warning' => $this->filterBySeverity($statusObjects, 'warning'),
-            'success' => $this->filterBySeverity($statusObjects, 'success'),
-            'info' => $this->filterBySeverity($statusObjects, 'info'),
+            'ok' => $this->filterBySeverity($statusObjects, 'ok'),
+            'information' => $this->filterBySeverity($statusObjects, 'information'),
             'notice' => $this->filterBySeverity($statusObjects, 'notice'),
         );
         return $orderedStatus;
index 9fcea9a..488875e 100644 (file)
@@ -1,4 +1,23 @@
-<div class="t3js-message typo3-message alert alert-{message.severity}" role="alert">
+<f:switch expression="{message.severity}">
+       <f:case value="error">
+               <div class="t3js-message typo3-message alert alert-danger" role="alert">
+       </f:case>
+       <f:case value="warning">
+               <div class="t3js-message typo3-message alert alert-warning" role="alert">
+       </f:case>
+       <f:case value="ok">
+               <div class="t3js-message typo3-message alert alert-success" role="alert">
+       </f:case>
+       <f:case value="information">
+               <div class="t3js-message typo3-message alert alert-info" role="alert">
+       </f:case>
+       <f:case value="loading">
+               <div class="t3js-message typo3-message alert alert-loading" role="alert">
+       </f:case>
+       <f:case default="TRUE">
+               <div class="t3js-message typo3-message alert alert-notice" role="alert">
+       </f:case>
+</f:switch>
        <h4>{message.title}</h4>
        <f:if condition="{message.message}">
                <p class="messageText"><f:format.nl2br>{message.message}</f:format.nl2br></p>