Kaynağa Gözat

Make DeploymentDetails header icon replica-scenario-appropriate.

Signed-off-by: Nashwan Azhari <nazhari@cloudbasesolutions.com>
Nashwan Azhari 2 yıl önce
ebeveyn
işleme
4a86ee49bd

+ 13 - 3
src/components/smart/DeploymentDetailsPage/DeploymentDetailsPage.tsx

@@ -37,7 +37,8 @@ import providerStore from "@src/stores/ProviderStore";
 import userStore from "@src/stores/UserStore";
 import userStore from "@src/stores/UserStore";
 import configLoader from "@src/utils/Config";
 import configLoader from "@src/utils/Config";
 
 
-import deploymentImage from "./images/deployment.svg";
+import replicaDeploymentImage from "./images/replica-deployment.svg";
+import liveMigrationDeploymentImage from "./images/live-migration-deployment.svg"
 
 
 import type { Field } from "@src/@types/Field";
 import type { Field } from "@src/@types/Field";
 import type { InstanceScript } from "@src/@types/Instance";
 import type { InstanceScript } from "@src/@types/Instance";
@@ -101,7 +102,7 @@ class DeploymentDetailsPage extends React.Component<Props, State> {
     return deploymentStore.deploymentDetails?.last_execution_status;
     return deploymentStore.deploymentDetails?.last_execution_status;
   }
   }
 
 
-  getDeploymentReplicaScenarioItemType() {
+  getDeploymentReplicaScenarioItemType(): string {
     let item_type = "replica";
     let item_type = "replica";
     let scenario = this.deployment?.replica_scenario_type;
     let scenario = this.deployment?.replica_scenario_type;
     if (scenario && scenario === "live_migration") {
     if (scenario && scenario === "live_migration") {
@@ -119,6 +120,15 @@ class DeploymentDetailsPage extends React.Component<Props, State> {
     return should_red;
     return should_red;
   }
   }
 
 
+  getDeploymentScenarioTypeImage(): string {
+    let image = replicaDeploymentImage;
+    let scenario = this.deployment?.replica_scenario_type;
+    if (scenario && scenario === "live_migration") {
+      image = liveMigrationDeploymentImage;
+    }
+    return image;
+  }
+
   async loadDeploymentAndPollData() {
   async loadDeploymentAndPollData() {
     const loadDeployment = async () => {
     const loadDeployment = async () => {
       await endpointStore.getEndpoints({ showLoading: true });
       await endpointStore.getEndpoints({ showLoading: true });
@@ -500,7 +510,7 @@ class DeploymentDetailsPage extends React.Component<Props, State> {
               itemType={this.getDeploymentReplicaScenarioItemType()}
               itemType={this.getDeploymentReplicaScenarioItemType()}
               itemDescription={deploymentStore.deploymentDetails?.description}
               itemDescription={deploymentStore.deploymentDetails?.description}
               backLink="/deployments"
               backLink="/deployments"
-              typeImage={deploymentImage}
+              typeImage={this.getDeploymentScenarioTypeImage()}
               dropdownActions={dropdownActions}
               dropdownActions={dropdownActions}
               alertInfoPill={this.getReplicaTypePillShouldRed()}
               alertInfoPill={this.getReplicaTypePillShouldRed()}
               primaryInfoPill={!this.getReplicaTypePillShouldRed()}
               primaryInfoPill={!this.getReplicaTypePillShouldRed()}

Dosya farkı çok büyük olduğundan ihmal edildi
+ 2 - 2
src/components/smart/DeploymentDetailsPage/images/live-migration-deployment.svg


Dosya farkı çok büyük olduğundan ihmal edildi
+ 10 - 0
src/components/smart/DeploymentDetailsPage/images/replica-deployment.svg


Bu fark içinde çok fazla dosya değişikliği olduğu için bazı dosyalar gösterilmiyor