Bladeren bron

Update WizardStorage style format and path display

The path display logic can be tested with Openstack as a source.
Previously, the path would be erroneously truncated to the first and
second elements of the disk name array. With this change, the path is
correctly displayed as the first and last elements of the disk name
array.
Sergiu Miclea 3 jaren geleden
bovenliggende
commit
ae232b9936
1 gewijzigde bestanden met toevoegingen van 4 en 3 verwijderingen
  1. 4 3
      src/components/modules/WizardModule/WizardStorage/WizardStorage.tsx

+ 4 - 3
src/components/modules/WizardModule/WizardStorage/WizardStorage.tsx

@@ -75,8 +75,9 @@ const StorageItem = styled.div<any>`
 `;
 `;
 const StorageImage = styled.div<any>`
 const StorageImage = styled.div<any>`
   ${ThemeProps.exactSize("48px")}
   ${ThemeProps.exactSize("48px")}
-  background: url('${props =>
-    props.backend ? backendImage : diskImage}') center no-repeat;
+  background: url('
+    ${props => (props.backend ? backendImage : diskImage)}
+  ') center no-repeat;
   margin-right: 16px;
   margin-right: 16px;
 `;
 `;
 const StorageTitle = styled.div<any>`
 const StorageTitle = styled.div<any>`
@@ -289,7 +290,7 @@ class WizardStorage extends React.Component<Props> {
           true,
           true,
         ];
         ];
       }
       }
-      return [`${dashPaths[0]}-...-${dashPaths[1]}`, true];
+      return [`${dashPaths[0]}-...-${dashPaths[dashPaths.length - 1]}`, true];
     };
     };
 
 
     return (
     return (