sort version lists by version name 69/46369/2
authorArielk <Ariel.Kenan@amdocs.com>
Mon, 7 May 2018 10:25:29 +0000 (13:25 +0300)
committerEinav Keidar <einavw@amdocs.com>
Wed, 23 May 2018 09:00:43 +0000 (09:00 +0000)
Change-Id: I85bd0a8e174d55e0ca6e0f62e2001937474b1450
Issue-ID: SDC-1256
Signed-off-by: Arielk <Ariel.Kenan@amdocs.com>
openecomp-ui/resources/scss/modules/_versionsPage.scss
openecomp-ui/src/sdc-app/onboarding/softwareProduct/details/SoftwareProductDetails.js
openecomp-ui/src/sdc-app/onboarding/versionsPage/VersionsPage.js
openecomp-ui/src/sdc-app/onboarding/versionsPage/components/VersionList.jsx

index b5ace35..d99532c 100644 (file)
                        .tree-view {
                                background-color: $white;
                                flex: 1;
+
+                               .node:not(.selectedNode):hover {
+                                       .outer-circle, .inner-circle {
+                                               transform: scale(1.1);
+                                       }
+                               }
                        }
                }
        }
                        &.selected {
                                box-shadow: 0 1px 4px 0 rgba(24, 24, 24, 0.06), inset 5px 0 0 0 $blue;
                                background-color: $row-active-color;
+
                                &:hover {
-                                       background-color: $row-hover-color;
                                        box-shadow: 0 1px 4px 0 rgba(24, 24, 24, 0.06), inset 5px 0 0 0 lighten($blue, 35%);
                                }
                        }
                                &.item-description > .description-text {
                                        margin-right: 10px;
                                        @include ellipsis($max-width: 300px);
+                                       width: initial;
                                }
 
                                &.item-actions {
 
                        /* To keep ellipsis hider's background the same color as row background */
                        &:not(.selected):hover .item-description > .description-text:after {
-                               background: $row-hover-color
+                               background: $row-hover-color;
                        }
 
                        &:hover:active .item-description > .description-text:after {
index 8a3279a..eb1927f 100644 (file)
@@ -47,6 +47,9 @@ export const mapStateToProps = ({
     licenseAgreementList = licensingVersion
         ? licenseAgreement.licenseAgreementList
         : [];
+    const sortedLicensingVersionsList = [...licensingVersionsList].sort(
+        (a, b) => Number(a.name) > Number(b.name)
+    );
     if (licensingVersion && licensingData && licensingData.licenseAgreement) {
         let selectedLicenseAgreement = licenseAgreementList.find(
             la => la.id === licensingData.licenseAgreement
@@ -82,7 +85,7 @@ export const mapStateToProps = ({
         currentSoftwareProduct,
         softwareProductCategories,
         licenseAgreementList,
-        licensingVersionsList,
+        licensingVersionsList: sortedLicensingVersionsList,
         featureGroupsList: filteredFeatureGroupsList,
         finalizedLicenseModelList,
         qdata,
index 457d096..a3c1a8a 100644 (file)
@@ -33,15 +33,7 @@ export const mapStateToProps = ({
     let { versions = [], selectedVersion } = versionsList;
     let { owner, contributors, viewers } = permissions;
 
-    // sorting the version list
-    versions.sort((a, b) => {
-        let statusCompare = b.status.localeCompare(a.status);
-        if (statusCompare === 0) {
-            return b.modificationTime - a.modificationTime;
-        } else {
-            return statusCompare;
-        }
-    });
+    versions.sort((a, b) => Number(a.name) > Number(b.name));
     const curentSoftwareProduct = softwareProductList.find(
         item => item.id === itemId
     );
index d74805e..f9d6d57 100644 (file)
@@ -79,11 +79,15 @@ const VersionListItem = ({
             className={`version-item-row ${
                 isHeader ? 'header-row' : 'clickable'
             } ${isSelected ? 'selected' : ''}`}
-            onClick={e => {
-                e.stopPropagation();
-                onSelectVersion();
-                onNavigateToVersion();
-            }}>
+            onClick={
+                isHeader
+                    ? null
+                    : e => {
+                          e.stopPropagation();
+                          onSelectVersion();
+                          onNavigateToVersion();
+                      }
+            }>
             <div
                 className={`version-item-field ${
                     isHeader ? 'header-field item-version' : 'item-version'