소스 검색

insert konfiguration message

andre 4 년 전
부모
커밋
ff2472d379
3개의 변경된 파일7개의 추가작업 그리고 15개의 파일을 삭제
  1. 5 13
      app/UI/Vms/Pages/VmsDataTable.php
  2. 1 1
      langs/english.php
  3. 1 1
      langs/german.php

+ 5 - 13
app/UI/Vms/Pages/VmsDataTable.php

@@ -124,19 +124,11 @@ class VmsDataTable extends DataTable implements ClientArea, AdminArea
             }
             return '<span class="lu-label lu-label--danger lu-label--status">' . sl('lang')->abtr($status) . '</span>';
         }catch (\Exception $ex){
-//            if (str_starts_with('Configuration file', $ex->getMessage())) {
-
-    logModuleCall(
-        'proxmoxCloud',
-        __FUNCTION__,
-        $ex->getMessage(),
-        'Debug',
-        $ex->getCode()
-    );
-    
-                return '<span class="lu-label lu-label--danger lu-label--status">' . sl('lang')->abtr('unknown') . '</span>';
-//            }
-//            return '<span class="lu-label lu-label--danger lu-label--status">' . $ex->getMessage() . '</span>';
+            if (substr( $ex->getMessage(), 0, 18 ) === 'Configuration file') {
+                return '<span class="lu-label lu-label--danger lu-label--status">' . sl('lang')->abtr('config') . '</span>';
+            } else {
+                return '<span class="lu-label lu-label--danger lu-label--status">' . $ex->getMessage() . '</span>';
+            }
         }
 
 

+ 1 - 1
langs/english.php

@@ -1051,7 +1051,7 @@ $_LANG['serverCA']['home']['mainContainer']['dataTable']['deleteButton']['button
 $_LANG['stopped'] = 'Stopped';
 $_LANG['Build'] = 'Build';
 $_LANG['running'] = 'Running';
-$_LANG['unknown'] = 'Configuration in progress';
+$_LANG['config'] = 'Configuration in progress';
 $_LANG['The Virtual Machine has been shut down successfully'] = 'The Virtual Machine has been shut down successfully';
 $_LANG['The Virtual Machine has been stopped successfully'] = 'The Virtual Machine has been stopped successfully';
 $_LANG['The Virtual Machine has been rebooted successfully'] = 'The Virtual Machine has been rebooted successfully';

+ 1 - 1
langs/german.php

@@ -1054,7 +1054,7 @@ $_LANG['serverCA']['vms']['mainContainer']['dataTable']['deleteButton']['button'
 $_LANG['stopped'] = 'gestoppt';
 $_LANG['Build'] = 'in Erstellung';
 $_LANG['running'] = 'läuft';
-$_LANG['unknown'] = 'Vm wird konfiguriert';
+$_LANG['config'] = 'Vm wird konfiguriert';
 $_LANG['The Virtual Machine has been shut down successfully'] = 'Die VM wurde heruntergefahren';
 $_LANG['The Virtual Machine has been stopped successfully'] = 'Die VM wurde gestoppt';
 $_LANG['The Virtual Machine has been rebooted successfully'] = 'Die VM wurde neu gestartet';