소스 검색

new settings section

andre 5 달 전
부모
커밋
f3deab676d
1개의 변경된 파일14개의 추가작업 그리고 14개의 파일을 삭제
  1. 14 14
      app/UI/Client/Setting/Pages/Settings.php

+ 14 - 14
app/UI/Client/Setting/Pages/Settings.php

@@ -30,9 +30,10 @@ class Settings extends DataTable implements ClientArea
      * labels for statuses
      */
     const STATUS_LABEL = [
-        'active'        => 'success',
-        'inactive'      => 'warning',
-        'default'       => 'default'
+        'set'       =>  'success',
+        'unset'     =>  'warning',
+        'wrong'     =>  'danger',
+        'default'   =>  'default'
     ];
 
     protected $id    = 'Setting';
@@ -187,25 +188,24 @@ class Settings extends DataTable implements ClientArea
         $data = [];
 
         foreach($domains as $domain){
-            in_array($domain,$clientDomains) ? $selfdomain = 'active' : $selfdomain = 'inactive';
-            $selfDns = 'inactive';
+            in_array($domain,$clientDomains) ? $selfdomain = 'set' : $selfdomain = 'unset';
             $dnsRecords = $dns->getRecords($domain);
-            $dnsRecords['selfdns'] ? $selfDns = 'active' : $selfDns = 'inactive';
-            in_array($params['serverhostname'],$dnsRecords['mx']) ? $mx = 'active' : $mx = 'inactive';
-            $spf = 'inactive';
+            $dnsRecords['selfdns'] ? $selfDns = 'set' : $selfDns = 'unset';
+            in_array($params['serverhostname'],$dnsRecords['mx']) ? $mx = 'set' : $mx = 'unset';
+            $spf = 'unset';
             if(!empty($dnsRecords['spf']) && !(count($dnsRecords['spf']) > 1)) {
                 if($dnsRecords['spf'][0] === $this->spfConfig){
-                    $spf = 'active';
+                    $spf = 'set';
                 }
             }
-            $dmarc = 'inactive';
+            $dmarc = 'unset';
             if(!empty($dnsRecords['dmarc']) && !(count($dnsRecords['dmarc']) > 1)) {
                 if($dnsRecords['dmarc'][0] === $this->dmarcConfig){
-                    $spf = 'active';
+                    $dmarc = 'set';
                 }
             }
-            $dkim = 'inactive';
-            in_array($this->domainKey, $dnsRecords['dkim']) ? $dkim = 'active' : $dkim = 'inactive';
+            $dkim = 'unset';
+            in_array($this->domainKey, $dnsRecords['dkim']) ? $dkim = 'set' : $dkim = 'unset';
             $tmp = [
                 'domain' => $domain,
                 'mxactive' => $mx,
@@ -220,7 +220,7 @@ class Settings extends DataTable implements ClientArea
         $dataProv = new ArrayDataProvider();
         $dataProv->setDefaultSorting('setting', 'ASC')->setData($data);
         $this->setDataProvider($dataProv);
-        $this->setDisableByColumnValue('selfdns', 'inactive');
+        $this->setDisableByColumnValue('selfdns', 'warning');
 
     }