浏览代码

Disable Delete Button (#2985)

sdess09 3 年之前
父节点
当前提交
2783d4d7ba
共有 1 个文件被更改,包括 6 次插入4 次删除
  1. 6 4
      dashboard/src/main/home/cluster-dashboard/dashboard/ClusterSettings.tsx

+ 6 - 4
dashboard/src/main/home/cluster-dashboard/dashboard/ClusterSettings.tsx

@@ -147,7 +147,7 @@ const ClusterSettings: React.FC<Props> = (props) => {
         {" "}
         {" "}
         here
         here
       </a>
       </a>
-      .
+      . Contact support@porter.run if you need guidance.
     </Helper>
     </Helper>
   );
   );
 
 
@@ -157,7 +157,8 @@ const ClusterSettings: React.FC<Props> = (props) => {
         Remove this cluster from Porter. Since this cluster was not provisioned
         Remove this cluster from Porter. Since this cluster was not provisioned
         by Porter, deleting the cluster will only detach this cluster from your
         by Porter, deleting the cluster will only detach this cluster from your
         project. To delete the cluster itself, you must do so manually. This
         project. To delete the cluster itself, you must do so manually. This
-        operation cannot be undone.
+        operation cannot be undone. Contact support@porter.run if you need
+        guidance.
       </Helper>
       </Helper>
     );
     );
   }
   }
@@ -361,8 +362,9 @@ const ClusterSettings: React.FC<Props> = (props) => {
         {helperText}
         {helperText}
         <Button
         <Button
           disabled={
           disabled={
-            currentCluster.status == "UPDATING_UNAVAILABLE" ||
-            currentCluster.status == "UPDATING"
+            currentProject.capi_provisioner_enabled
+              ? currentCluster.status != "READY"
+              : currentCluster.status == "UPDATING"
           }
           }
           color="#b91133"
           color="#b91133"
           onClick={() => setCurrentModal("UpdateClusterModal")}
           onClick={() => setCurrentModal("UpdateClusterModal")}