Browse Source

new settings section

andre 5 months ago
parent
commit
a9a9c72e82

+ 8 - 0
app/UI/Client/Ressource/Pages/Ressources.php

@@ -181,6 +181,14 @@ class Ressources extends DataTable implements ClientArea
             $data[] = $ressourceArray;
         }
 
+            logModuleCall(
+                'kerioEmail',
+                __FUNCTION__,
+                $data,
+                'Debug Ressources Data',
+                'Debug Ressources Data'
+            );
+
         $dataProv = new ArrayDataProvider();
         $dataProv->setDefaultSorting('ressource', 'ASC')->setData($data);
 

+ 5 - 31
app/UI/Client/Setting/Pages/Settings.php

@@ -28,7 +28,7 @@ class Settings extends DataTable implements ClientArea
      */
     const STATUS_LABEL = [
         'active'        => 'success',
-        'closed'        => 'default',
+        'inactive'      => 'default',
         'default'       => 'default'
     ];
 
@@ -128,18 +128,6 @@ class Settings extends DataTable implements ClientArea
                 $aliasList = $domain['aliasList'];
             }
         }
-
-
-        $fields = array(
-            "id",
-            "name",
-            "description",
-            "type",
-            "isEnabled",
-            "manager");
-        try {
-            $Setting = $api->getResources($fields, $domainID);
-        } catch (KerioApiException $error) {
             logModuleCall(
                 'kerioEmail',
                 __FUNCTION__,
@@ -147,27 +135,13 @@ class Settings extends DataTable implements ClientArea
                 'Debug Error',
                 $error->getMessage()
             );
-            return ['error' => $error->getMessage()];
-        }
+
         $api->logout();
 
         /**
          * format model to array
          */
         $data = [];
-        foreach ($Setting as $setting)
-        {
-            $settingArray = [
-                'id'           => $setting['id'],
-                'setting'      => $setting['name'],
-                'description'  => $setting['description'],
-                'type'         => $setting['type'],
-                'manager'      => $setting['manager']['name'] . '@' . $setting['manager']['domainName'],
-                'status'       => $setting['isEnabled'] ? 'active' : 'default'
-            ];
-
-            $data[] = $settingArray;
-        }
 
         $dataProv = new ArrayDataProvider();
         $dataProv->setDefaultSorting('setting', 'ASC')->setData($data);
@@ -175,9 +149,9 @@ class Settings extends DataTable implements ClientArea
         logModuleCall(
             'kerioEmail',
             __FUNCTION__,
-            $this->getWhmcsParamByKey('server'),
-            'Debug',
-            $data
+            $domains,
+            'Debug Settings',
+            'Debug Settings'
         );
 
         $this->setDataProvider($dataProv);