summaryrefslogtreecommitdiffstats
path: root/openecomp-ui/src/sdc-app/onboarding
diff options
context:
space:
mode:
Diffstat (limited to 'openecomp-ui/src/sdc-app/onboarding')
-rw-r--r--openecomp-ui/src/sdc-app/onboarding/softwareProduct/details/SoftwareProductDetails.js5
-rw-r--r--openecomp-ui/src/sdc-app/onboarding/versionsPage/VersionsPage.js10
-rw-r--r--openecomp-ui/src/sdc-app/onboarding/versionsPage/components/VersionList.jsx14
3 files changed, 14 insertions, 15 deletions
diff --git a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/details/SoftwareProductDetails.js b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/details/SoftwareProductDetails.js
index 8a3279a02c..eb1927fabe 100644
--- a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/details/SoftwareProductDetails.js
+++ b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/details/SoftwareProductDetails.js
@@ -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,
diff --git a/openecomp-ui/src/sdc-app/onboarding/versionsPage/VersionsPage.js b/openecomp-ui/src/sdc-app/onboarding/versionsPage/VersionsPage.js
index 457d096219..a3c1a8af6c 100644
--- a/openecomp-ui/src/sdc-app/onboarding/versionsPage/VersionsPage.js
+++ b/openecomp-ui/src/sdc-app/onboarding/versionsPage/VersionsPage.js
@@ -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
);
diff --git a/openecomp-ui/src/sdc-app/onboarding/versionsPage/components/VersionList.jsx b/openecomp-ui/src/sdc-app/onboarding/versionsPage/components/VersionList.jsx
index d74805eccc..f9d6d57801 100644
--- a/openecomp-ui/src/sdc-app/onboarding/versionsPage/components/VersionList.jsx
+++ b/openecomp-ui/src/sdc-app/onboarding/versionsPage/components/VersionList.jsx
@@ -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'