aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-ui/src/sdc-app/onboarding
diff options
context:
space:
mode:
authorsvishnev <shlomo-stanisla.vishnevetskiy@amdocs.com>2018-03-19 12:15:19 +0200
committerVitaly Emporopulo <Vitaliy.Emporopulo@amdocs.com>2018-03-20 07:51:05 +0000
commit091edfdac90f66d91caff1b93131f99ba74f9aeb (patch)
treea6a24fc4a295b7f804aeb2a2211e58b38bbf922a /openecomp-ui/src/sdc-app/onboarding
parentfefa3e408f77289594e47edc878d1bee61fca90b (diff)
ui support for archive items
Issue-ID: SDC-1088 Change-Id: I836e4896a8ec6bb065f9d2571f514916ccf6759f Signed-off-by: svishnev <shlomo-stanisla.vishnevetskiy@amdocs.com>
Diffstat (limited to 'openecomp-ui/src/sdc-app/onboarding')
-rw-r--r--openecomp-ui/src/sdc-app/onboarding/OnboardingActionHelper.js110
-rw-r--r--openecomp-ui/src/sdc-app/onboarding/OnboardingConstants.js16
-rw-r--r--openecomp-ui/src/sdc-app/onboarding/OnboardingPunchOut.jsx13
-rw-r--r--openecomp-ui/src/sdc-app/onboarding/OnboardingReducers.js10
-rw-r--r--openecomp-ui/src/sdc-app/onboarding/OnboardingReducersMap.js6
-rw-r--r--openecomp-ui/src/sdc-app/onboarding/licenseModel/ArchivedLicenseModelListReducer.js25
-rw-r--r--openecomp-ui/src/sdc-app/onboarding/licenseModel/LicenseModel.js20
-rw-r--r--openecomp-ui/src/sdc-app/onboarding/licenseModel/LicenseModelActionHelper.js39
-rw-r--r--openecomp-ui/src/sdc-app/onboarding/licenseModel/LicenseModelConstants.js17
-rw-r--r--openecomp-ui/src/sdc-app/onboarding/licenseModel/creation/LicenseModelCreation.js27
-rw-r--r--openecomp-ui/src/sdc-app/onboarding/licenseModel/entitlementPools/EntitlementPoolsActionHelper.js10
-rw-r--r--openecomp-ui/src/sdc-app/onboarding/licenseModel/featureGroups/FeatureGroupsActionHelper.js6
-rw-r--r--openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseAgreement/LicenseAgreementActionHelper.js6
-rw-r--r--openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseKeyGroups/LicenseKeyGroupsActionHelper.js10
-rw-r--r--openecomp-ui/src/sdc-app/onboarding/onboard/CatalogList.jsx26
-rw-r--r--openecomp-ui/src/sdc-app/onboarding/onboard/DetailsCatalogView.jsx6
-rw-r--r--openecomp-ui/src/sdc-app/onboarding/onboard/Onboard.js33
-rw-r--r--openecomp-ui/src/sdc-app/onboarding/onboard/OnboardView.jsx7
-rw-r--r--openecomp-ui/src/sdc-app/onboarding/onboard/filter/Filter.jsx34
-rw-r--r--openecomp-ui/src/sdc-app/onboarding/onboard/filter/FilterConstants.js5
-rw-r--r--openecomp-ui/src/sdc-app/onboarding/onboard/onboardingCatalog/OnboardingCatalogConstants.js22
-rw-r--r--openecomp-ui/src/sdc-app/onboarding/onboard/onboardingCatalog/OnboardingCatalogReducer.js18
-rw-r--r--openecomp-ui/src/sdc-app/onboarding/onboard/onboardingCatalog/OnboardingCatalogView.jsx85
-rw-r--r--openecomp-ui/src/sdc-app/onboarding/softwareProduct/ArchivedSoftwareProductReducer.js25
-rw-r--r--openecomp-ui/src/sdc-app/onboarding/softwareProduct/SoftwareProduct.js6
-rw-r--r--openecomp-ui/src/sdc-app/onboarding/softwareProduct/SoftwareProductActionHelper.js22
-rw-r--r--openecomp-ui/src/sdc-app/onboarding/softwareProduct/SoftwareProductConstants.js1
-rw-r--r--openecomp-ui/src/sdc-app/onboarding/softwareProduct/attachments/SoftwareProductAttachmentsView.jsx21
-rw-r--r--openecomp-ui/src/sdc-app/onboarding/softwareProduct/creation/SoftwareProductCreation.js13
-rw-r--r--openecomp-ui/src/sdc-app/onboarding/softwareProduct/details/SoftwareProductDetails.js30
-rw-r--r--openecomp-ui/src/sdc-app/onboarding/softwareProduct/details/SoftwareProductDetailsVendorSelector.jsx78
-rw-r--r--openecomp-ui/src/sdc-app/onboarding/softwareProduct/details/SoftwareProductDetailsView.jsx77
-rw-r--r--openecomp-ui/src/sdc-app/onboarding/userNotifications/UserNotifications.jsx21
-rw-r--r--openecomp-ui/src/sdc-app/onboarding/userNotifications/UserNotificationsConstants.js5
-rw-r--r--openecomp-ui/src/sdc-app/onboarding/versionsPage/VersionsPage.js16
-rw-r--r--openecomp-ui/src/sdc-app/onboarding/versionsPage/VersionsPage.jsx33
-rw-r--r--openecomp-ui/src/sdc-app/onboarding/versionsPage/VersionsPageActionHelper.js18
-rw-r--r--openecomp-ui/src/sdc-app/onboarding/versionsPage/components/VersionList.jsx10
38 files changed, 644 insertions, 283 deletions
diff --git a/openecomp-ui/src/sdc-app/onboarding/OnboardingActionHelper.js b/openecomp-ui/src/sdc-app/onboarding/OnboardingActionHelper.js
index 4c4c709a7b..d75c234caf 100644
--- a/openecomp-ui/src/sdc-app/onboarding/OnboardingActionHelper.js
+++ b/openecomp-ui/src/sdc-app/onboarding/OnboardingActionHelper.js
@@ -66,8 +66,10 @@ const OnboardingActionHelper = {
loadItemsLists(dispatch) {
LicenseModelActionHelper.fetchLicenseModels(dispatch);
LicenseModelActionHelper.fetchFinalizedLicenseModels(dispatch);
+ LicenseModelActionHelper.fetchArchivedLicenseModels(dispatch);
SoftwareProductActionHelper.fetchSoftwareProductList(dispatch);
SoftwareProductActionHelper.fetchFinalizedSoftwareProductList(dispatch);
+ SoftwareProductActionHelper.fetchArchivedSoftwareProductList(dispatch);
},
navigateToOnboardingCatalog(dispatch) {
@@ -95,7 +97,7 @@ const OnboardingActionHelper = {
return Promise.resolve();
},
- navigateToLicenseModelOverview(dispatch, {licenseModelId, version}) {
+ navigateToLicenseModelOverview(dispatch, {licenseModelId, version, status}) {
/**
* TODO change to specific rest
@@ -103,39 +105,39 @@ const OnboardingActionHelper = {
LicenseModelActionHelper.fetchLicenseModelById(dispatch, {licenseModelId, version}).then(() => {
LicenseModelActionHelper.fetchLicenseModelItems(dispatch, {licenseModelId, version}).then(() => {
- setCurrentScreen(dispatch, enums.SCREEN.LICENSE_MODEL_OVERVIEW, {licenseModelId, version});
+ setCurrentScreen(dispatch, enums.SCREEN.LICENSE_MODEL_OVERVIEW, {licenseModelId, version, status});
});
licenseModelOverviewActionHelper.selectVLMListView(dispatch, {buttonTab: null});
});
},
- navigateToLicenseAgreements(dispatch, {licenseModelId, version}) {
+ navigateToLicenseAgreements(dispatch, {licenseModelId, version, status}) {
LicenseAgreementActionHelper.fetchLicenseAgreementList(dispatch, {licenseModelId, version});
LicenseModelActionHelper.fetchLicenseModelById(dispatch, {licenseModelId, version}).then(() => {
- setCurrentScreen(dispatch, enums.SCREEN.LICENSE_AGREEMENTS, {licenseModelId, version});
+ setCurrentScreen(dispatch, enums.SCREEN.LICENSE_AGREEMENTS, {licenseModelId, version, status});
});
},
- navigateToFeatureGroups(dispatch, {licenseModelId, version}) {
+ navigateToFeatureGroups(dispatch, {licenseModelId, version, status}) {
FeatureGroupsActionHelper.fetchFeatureGroupsList(dispatch, {licenseModelId, version});
- setCurrentScreen(dispatch, enums.SCREEN.FEATURE_GROUPS, {licenseModelId, version});
+ setCurrentScreen(dispatch, enums.SCREEN.FEATURE_GROUPS, {licenseModelId, version, status});
},
- navigateToEntitlementPools(dispatch, {licenseModelId, version}) {
+ navigateToEntitlementPools(dispatch, {licenseModelId, version, status}) {
EntitlementPoolsActionHelper.fetchEntitlementPoolsList(dispatch, {licenseModelId, version});
- setCurrentScreen(dispatch, enums.SCREEN.ENTITLEMENT_POOLS, {licenseModelId, version});
+ setCurrentScreen(dispatch, enums.SCREEN.ENTITLEMENT_POOLS, {licenseModelId, version, status});
},
- navigateToLicenseKeyGroups(dispatch, {licenseModelId, version}) {
+ navigateToLicenseKeyGroups(dispatch, {licenseModelId, version, status}) {
LicenseKeyGroupsActionHelper.fetchLicenseKeyGroupsList(dispatch, {licenseModelId, version});
- setCurrentScreen(dispatch, enums.SCREEN.LICENSE_KEY_GROUPS, {licenseModelId, version});
+ setCurrentScreen(dispatch, enums.SCREEN.LICENSE_KEY_GROUPS, {licenseModelId, version, status});
},
- navigateToLicenseModelActivityLog(dispatch, {licenseModelId, version}){
+ navigateToLicenseModelActivityLog(dispatch, {licenseModelId, version, status}){
ActivityLogActionHelper.fetchActivityLog(dispatch, {itemId: licenseModelId, versionId: version.id});
- setCurrentScreen(dispatch, enums.SCREEN.ACTIVITY_LOG, {licenseModelId, version});
+ setCurrentScreen(dispatch, enums.SCREEN.ACTIVITY_LOG, {licenseModelId, version, status});
},
- navigateToSoftwareProductLandingPage(dispatch, {softwareProductId, version}) {
+ navigateToSoftwareProductLandingPage(dispatch, {softwareProductId, version, status}) {
SoftwareProductComponentsActionHelper.clearComponentsStore(dispatch);
SoftwareProductActionHelper.fetchSoftwareProduct(dispatch, {softwareProductId, version}).then(response => {
let {vendorId: licenseModelId, licensingVersion} = response[0];
@@ -144,112 +146,112 @@ const OnboardingActionHelper = {
if(response[0].onboardingOrigin === onboardingOriginTypes.ZIP) {
SoftwareProductActionHelper.loadSoftwareProductHeatCandidate(dispatch, {softwareProductId, version: version});
}
- setCurrentScreen(dispatch, enums.SCREEN.SOFTWARE_PRODUCT_LANDING_PAGE, {softwareProductId, licenseModelId, version});
+ setCurrentScreen(dispatch, enums.SCREEN.SOFTWARE_PRODUCT_LANDING_PAGE, {softwareProductId, licenseModelId, version, status});
});
},
- navigateToSoftwareProductDetails(dispatch, {softwareProductId, version}) {
+ navigateToSoftwareProductDetails(dispatch, {softwareProductId, version, status}) {
SoftwareProductActionHelper.fetchSoftwareProduct(dispatch, {softwareProductId, version}).then(response => {
let {vendorId: licenseModelId, licensingVersion} = response[0];
SoftwareProductActionHelper.loadLicensingVersionsList(dispatch, {licenseModelId});
SoftwareProductActionHelper.loadSoftwareProductDetailsData(dispatch, {licenseModelId, licensingVersion});
- setCurrentScreen(dispatch, enums.SCREEN.SOFTWARE_PRODUCT_DETAILS, {softwareProductId, version});
+ setCurrentScreen(dispatch, enums.SCREEN.SOFTWARE_PRODUCT_DETAILS, {softwareProductId, version, status});
});
},
- navigateToSoftwareProductAttachmentsSetupTab(dispatch, {softwareProductId, version}) {
+ navigateToSoftwareProductAttachmentsSetupTab(dispatch, {softwareProductId, version, status}) {
SoftwareProductActionHelper.loadSoftwareProductHeatCandidate(dispatch, {softwareProductId, version});
SoftwareProductAttachmentsActionHelper.setActiveTab(dispatch, {activeTab: attachmentsTabsMapping.SETUP});
- setCurrentScreen(dispatch, enums.SCREEN.SOFTWARE_PRODUCT_ATTACHMENTS, {softwareProductId, version});
+ setCurrentScreen(dispatch, enums.SCREEN.SOFTWARE_PRODUCT_ATTACHMENTS, {softwareProductId, version, status});
},
- navigateToSoftwareProductAttachmentsValidationTab(dispatch, {softwareProductId, version}) {
+ navigateToSoftwareProductAttachmentsValidationTab(dispatch, {softwareProductId, version, status}) {
SoftwareProductActionHelper.processAndValidateHeatCandidate(dispatch, {softwareProductId, version}).then(() => {
SoftwareProductAttachmentsActionHelper.setActiveTab(dispatch, {activeTab: attachmentsTabsMapping.VALIDATION});
- setCurrentScreen(dispatch, enums.SCREEN.SOFTWARE_PRODUCT_ATTACHMENTS, {softwareProductId, version});
+ setCurrentScreen(dispatch, enums.SCREEN.SOFTWARE_PRODUCT_ATTACHMENTS, {softwareProductId, version, status});
});
},
- navigateToSoftwareProductProcesses(dispatch, {softwareProductId, version}) {
+ navigateToSoftwareProductProcesses(dispatch, {softwareProductId, version, status}) {
if (softwareProductId) {
SoftwareProductProcessesActionHelper.fetchProcessesList(dispatch, {softwareProductId, version});
}
- setCurrentScreen(dispatch, enums.SCREEN.SOFTWARE_PRODUCT_PROCESSES, {softwareProductId, version});
+ setCurrentScreen(dispatch, enums.SCREEN.SOFTWARE_PRODUCT_PROCESSES, {softwareProductId, version, status});
},
- navigateToSoftwareProductNetworks(dispatch, {softwareProductId, version}) {
+ navigateToSoftwareProductNetworks(dispatch, {softwareProductId, version, status}) {
if (softwareProductId) {
SoftwareProductNetworksActionHelper.fetchNetworksList(dispatch, {softwareProductId, version});
}
- setCurrentScreen(dispatch, enums.SCREEN.SOFTWARE_PRODUCT_NETWORKS, {softwareProductId, version});
+ setCurrentScreen(dispatch, enums.SCREEN.SOFTWARE_PRODUCT_NETWORKS, {softwareProductId, version, status});
},
- navigateToSoftwareProductDependencies(dispatch, {softwareProductId, version}) {
+ navigateToSoftwareProductDependencies(dispatch, {softwareProductId, version, status}) {
SoftwareProductComponentsActionHelper.fetchSoftwareProductComponents(dispatch, {softwareProductId, version}).then(result => {
if(result.listCount >= 2) {
SoftwareProductDependenciesActionHelper.fetchDependencies(dispatch, {softwareProductId, version});
- setCurrentScreen(dispatch, enums.SCREEN.SOFTWARE_PRODUCT_DEPENDENCIES, {softwareProductId, version});
+ setCurrentScreen(dispatch, enums.SCREEN.SOFTWARE_PRODUCT_DEPENDENCIES, {softwareProductId, version, status});
}
else {
- this.navigateToSoftwareProductLandingPage(dispatch, {softwareProductId, version});
+ this.navigateToSoftwareProductLandingPage(dispatch, {softwareProductId, version, status});
}
});
},
- navigateToSoftwareProductComponents(dispatch, {softwareProductId, version}) {
+ navigateToSoftwareProductComponents(dispatch, {softwareProductId, version, status}) {
SoftwareProductComponentsActionHelper.fetchSoftwareProductComponents(dispatch, {softwareProductId, version});
- setCurrentScreen(dispatch, enums.SCREEN.SOFTWARE_PRODUCT_COMPONENTS, {softwareProductId, version});
+ setCurrentScreen(dispatch, enums.SCREEN.SOFTWARE_PRODUCT_COMPONENTS, {softwareProductId, version, status});
},
- navigateToSoftwareProductDeployment(dispatch, {softwareProductId, version}) {
+ navigateToSoftwareProductDeployment(dispatch, {softwareProductId, version, status}) {
SoftwareProductDeploymentActionHelper.fetchDeploymentFlavorsList(dispatch, {softwareProductId, version});
ComputeFlavorActionHelper.fetchComputesListForVSP(dispatch, {softwareProductId, version});
- setCurrentScreen(dispatch, enums.SCREEN.SOFTWARE_PRODUCT_DEPLOYMENT, {softwareProductId, version});
+ setCurrentScreen(dispatch, enums.SCREEN.SOFTWARE_PRODUCT_DEPLOYMENT, {softwareProductId, version, status});
},
- navigateToSoftwareProductActivityLog(dispatch, {softwareProductId, version}){
+ navigateToSoftwareProductActivityLog(dispatch, {softwareProductId, version, status}){
ActivityLogActionHelper.fetchActivityLog(dispatch, {itemId: softwareProductId, versionId: version.id});
- setCurrentScreen(dispatch, enums.SCREEN.SOFTWARE_PRODUCT_ACTIVITY_LOG, {softwareProductId, version});
+ setCurrentScreen(dispatch, enums.SCREEN.SOFTWARE_PRODUCT_ACTIVITY_LOG, {softwareProductId, version, status});
},
- navigateToSoftwareProductComponentProcesses(dispatch, {softwareProductId, componentId, version}) {
+ navigateToSoftwareProductComponentProcesses(dispatch, {softwareProductId, componentId, version, status}) {
if (componentId && softwareProductId) {
SoftwareProductComponentProcessesActionHelper.fetchProcessesList(dispatch, {componentId, softwareProductId, version});
}
- setCurrentScreen(dispatch, enums.SCREEN.SOFTWARE_PRODUCT_COMPONENT_PROCESSES, {softwareProductId, componentId, version});
+ setCurrentScreen(dispatch, enums.SCREEN.SOFTWARE_PRODUCT_COMPONENT_PROCESSES, {softwareProductId, componentId, version, status});
},
- navigateToSoftwareProductComponentMonitoring(dispatch, {softwareProductId, version, componentId}){
+ navigateToSoftwareProductComponentMonitoring(dispatch, {softwareProductId, version, componentId, status}){
if (componentId && softwareProductId && version) {
SoftwareProductComponentsMonitoringAction.fetchExistingFiles(dispatch, {componentId, softwareProductId, version});
}
- setCurrentScreen(dispatch, enums.SCREEN.SOFTWARE_PRODUCT_COMPONENT_MONITORING, {softwareProductId, componentId, version});
+ setCurrentScreen(dispatch, enums.SCREEN.SOFTWARE_PRODUCT_COMPONENT_MONITORING, {softwareProductId, componentId, version, status});
},
- navigateToComponentStorage(dispatch, {softwareProductId, componentId, version}) {
+ navigateToComponentStorage(dispatch, {softwareProductId, componentId, version, status}) {
SoftwareProductComponentsActionHelper.fetchSoftwareProductComponent(dispatch, {softwareProductId, vspComponentId: componentId, version});
- setCurrentScreen(dispatch, enums.SCREEN.SOFTWARE_PRODUCT_COMPONENT_STORAGE, {softwareProductId, version, componentId});
+ setCurrentScreen(dispatch, enums.SCREEN.SOFTWARE_PRODUCT_COMPONENT_STORAGE, {softwareProductId, version, componentId, status});
},
- navigateToComponentCompute(dispatch, {softwareProductId, componentId, version}) {
+ navigateToComponentCompute(dispatch, {softwareProductId, componentId, version, status}) {
SoftwareProductComponentsActionHelper.fetchSoftwareProductComponent(dispatch, {softwareProductId, vspComponentId: componentId, version});
if (componentId && softwareProductId) {
ComputeFlavorActionHelper.fetchComputesList(dispatch, {softwareProductId, componentId, version});
}
- setCurrentScreen(dispatch, enums.SCREEN.SOFTWARE_PRODUCT_COMPONENT_COMPUTE, {softwareProductId, version, componentId});
+ setCurrentScreen(dispatch, enums.SCREEN.SOFTWARE_PRODUCT_COMPONENT_COMPUTE, {softwareProductId, version, componentId, status});
},
- navigateToComponentNetwork(dispatch, {softwareProductId, componentId, version}) {
+ navigateToComponentNetwork(dispatch, {softwareProductId, componentId, version, status}) {
SoftwareProductComponentsNetworkActionHelper.fetchNICsList(dispatch, {softwareProductId, componentId, version});
- setCurrentScreen(dispatch, enums.SCREEN.SOFTWARE_PRODUCT_COMPONENT_NETWORK, {softwareProductId, version, componentId});
+ setCurrentScreen(dispatch, enums.SCREEN.SOFTWARE_PRODUCT_COMPONENT_NETWORK, {softwareProductId, version, componentId, status});
},
- navigateToSoftwareProductComponentGeneral(dispatch, {softwareProductId, componentId, version}) {
+ navigateToSoftwareProductComponentGeneral(dispatch, {softwareProductId, componentId, version, status}) {
if (componentId && softwareProductId) {
SoftwareProductComponentsActionHelper.fetchSoftwareProductComponent(dispatch, {softwareProductId, vspComponentId: componentId, version});
}
- setCurrentScreen(dispatch, enums.SCREEN.SOFTWARE_PRODUCT_COMPONENT_GENERAL, {softwareProductId, version, componentId});
+ setCurrentScreen(dispatch, enums.SCREEN.SOFTWARE_PRODUCT_COMPONENT_GENERAL, {softwareProductId, version, componentId, status});
},
- navigateToSoftwareProductComponentGeneralAndUpdateLeftPanel(dispatch, {softwareProductId, componentId, version}) {
- this.navigateToSoftwareProductComponentGeneral(dispatch, {softwareProductId, componentId, version});
+ navigateToSoftwareProductComponentGeneralAndUpdateLeftPanel(dispatch, {softwareProductId, componentId, version, status}) {
+ this.navigateToSoftwareProductComponentGeneral(dispatch, {softwareProductId, componentId, version, status});
dispatch({
type: SoftwareProductActionTypes.TOGGLE_NAVIGATION_ITEM,
mapOfExpandedIds: {
@@ -259,26 +261,30 @@ const OnboardingActionHelper = {
});
},
- navigateToComponentLoadBalancing(dispatch, {softwareProductId, componentId, version}) {
+ navigateToComponentLoadBalancing(dispatch, {softwareProductId, componentId, version, status}) {
SoftwareProductComponentsActionHelper.fetchSoftwareProductComponent(dispatch, {softwareProductId, vspComponentId: componentId, version});
- setCurrentScreen(dispatch, enums.SCREEN.SOFTWARE_PRODUCT_COMPONENT_LOAD_BALANCING, {softwareProductId, version, componentId});
+ setCurrentScreen(dispatch, enums.SCREEN.SOFTWARE_PRODUCT_COMPONENT_LOAD_BALANCING, {softwareProductId, version, componentId, status});
},
- navigateToComponentImages(dispatch, {softwareProductId, componentId, version}) {
+ navigateToComponentImages(dispatch, {softwareProductId, componentId, version, status}) {
SoftwareProductComponentsImageActionHelper.fetchImagesList(dispatch, {
softwareProductId,
componentId,
version
});
- setCurrentScreen(dispatch, enums.SCREEN.SOFTWARE_PRODUCT_COMPONENT_IMAGES, {softwareProductId, version, componentId});
+ setCurrentScreen(dispatch, enums.SCREEN.SOFTWARE_PRODUCT_COMPONENT_IMAGES, {softwareProductId, version, componentId, status});
},
navigateToVersionsPage(dispatch, {itemType, itemId, itemName, additionalProps, users}) {
PermissionsActionHelper.fetchItemUsers(dispatch, {itemId, allUsers: users});
VersionsPageActionHelper.selectNone(dispatch);
VersionsPageActionHelper.fetchVersions(dispatch, {itemType, itemId}).then(() => {
- setCurrentScreen(dispatch, enums.SCREEN.VERSIONS_PAGE, {itemType, itemId, itemName, additionalProps});
+ ItemsHelper.fetchItem(itemId).then(result => {
+ setCurrentScreen(dispatch, enums.SCREEN.VERSIONS_PAGE, {status: result.status, itemType, itemId, itemName, additionalProps});
+ });
+
});
+
},
checkMergeStatus(dispatch, {itemId, versionId, version}) {
diff --git a/openecomp-ui/src/sdc-app/onboarding/OnboardingConstants.js b/openecomp-ui/src/sdc-app/onboarding/OnboardingConstants.js
index 5b33fc2099..699fe9e357 100644
--- a/openecomp-ui/src/sdc-app/onboarding/OnboardingConstants.js
+++ b/openecomp-ui/src/sdc-app/onboarding/OnboardingConstants.js
@@ -1,17 +1,17 @@
-/*!
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+/*
+ * Copyright © 2016-2018 European Support Limited
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing
- * permissions and limitations under the License.
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
import keyMirror from 'nfvo-utils/KeyMirror.js';
diff --git a/openecomp-ui/src/sdc-app/onboarding/OnboardingPunchOut.jsx b/openecomp-ui/src/sdc-app/onboarding/OnboardingPunchOut.jsx
index fbb12022c1..e04f9b7309 100644
--- a/openecomp-ui/src/sdc-app/onboarding/OnboardingPunchOut.jsx
+++ b/openecomp-ui/src/sdc-app/onboarding/OnboardingPunchOut.jsx
@@ -1,5 +1,5 @@
/*
- * Copyright © 2016-2017 European Support Limited
+ * Copyright © 2016-2018 European Support Limited
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -80,7 +80,6 @@ export default class OnboardingPunchOut {
});
}
this.rendered = true;
-
}
}
@@ -96,9 +95,9 @@ export default class OnboardingPunchOut {
let dispatch = action => store.dispatch(action);
let {currentScreen, users: {usersList}, softwareProductList, finalizedSoftwareProductList, licenseModelList, finalizedLicenseModelList,
softwareProduct: {softwareProductEditor: {data: vspData = {}},
- softwareProductComponents = {}, softwareProductQuestionnaire = {}}} = store.getState();
+ softwareProductComponents = {}, softwareProductQuestionnaire = {}}, archivedLicenseModelList} = store.getState();
const wholeSoftwareProductList = [...softwareProductList, ...finalizedSoftwareProductList];
- const wholeLicenseModelList = [...licenseModelList, ...finalizedLicenseModelList];
+ const wholeLicenseModelList = [...licenseModelList, ...finalizedLicenseModelList, ...archivedLicenseModelList];
let {props: {version, isReadOnlyMode}, screen} = currentScreen;
let {componentEditor: {data: componentData = {}, qdata: componentQData = {}}} = softwareProductComponents;
@@ -200,9 +199,9 @@ export default class OnboardingPunchOut {
let {currentScreen, licenseModelList, finalizedLicenseModelList, softwareProductList, finalizedSoftwareProductList, versionsPage:
{versionsList: {itemType, itemId}},
softwareProduct: {softwareProductEditor: {data: currentSoftwareProduct = {onboardingMethod: ''}},
- softwareProductComponents: {componentsList}}} = store.getState();
- const wholeSoftwareProductList = lodashUnionBy(softwareProductList, finalizedSoftwareProductList, 'id');
- const wholeLicenseModelList = lodashUnionBy(licenseModelList, finalizedLicenseModelList, 'id');
+ softwareProductComponents: {componentsList}}, archivedLicenseModelList, archivedSoftwareProductList} = store.getState();
+ const wholeSoftwareProductList = lodashUnionBy(softwareProductList, [...finalizedSoftwareProductList, ...archivedSoftwareProductList], 'id');
+ const wholeLicenseModelList = lodashUnionBy(licenseModelList, [...finalizedLicenseModelList, ...archivedLicenseModelList], 'id');
let breadcrumbsData = {itemType, itemId, currentScreen, wholeLicenseModelList, wholeSoftwareProductList, currentSoftwareProduct, componentsList};
if (currentScreen.forceBreadCrumbsUpdate || !isEqual(breadcrumbsData, this.prevBreadcrumbsData) || this.breadcrumbsPrefixSelected) {
diff --git a/openecomp-ui/src/sdc-app/onboarding/OnboardingReducers.js b/openecomp-ui/src/sdc-app/onboarding/OnboardingReducers.js
index 2eb455f9dd..16c0e61491 100644
--- a/openecomp-ui/src/sdc-app/onboarding/OnboardingReducers.js
+++ b/openecomp-ui/src/sdc-app/onboarding/OnboardingReducers.js
@@ -23,7 +23,7 @@ import {SyncStates} from 'sdc-app/common/merge/MergeEditorConstants.js';
import {catalogItemStatuses} from './onboard/onboardingCatalog/OnboardingCatalogConstants.js';
import Configuration from 'sdc-app/config/Configuration.js';
-const checkReadOnly = ({isCollaborator = true, inMerge = false, isCertified = false}) => !isCollaborator || inMerge || isCertified;
+const checkReadOnly = ({isCollaborator = true, inMerge = false, isCertified = false, isArchived = false}) => !isCollaborator || inMerge || isCertified || isArchived;
const currentScreen = (state = {
forceBreadCrumbsUpdate: false,
@@ -37,6 +37,7 @@ const currentScreen = (state = {
case actionTypes.SET_CURRENT_SCREEN: {
let itemPermission = {...state.itemPermission};
let {currentScreen} = action;
+ itemPermission.isArchived = currentScreen.props.status === catalogItemStatuses.ARCHIVED;
if (currentScreen.props.version) {
let {status} = currentScreen.props.version;
@@ -70,7 +71,7 @@ const currentScreen = (state = {
props: {
...state.props,
version: action.version,
- isReadOnlyMode: checkReadOnly(state.itemPermission)
+ isReadOnlyMode: checkReadOnly({...state.itemPermission,itemStatus: state.props.status})
}
};
@@ -114,12 +115,13 @@ const currentScreen = (state = {
}
case actionTypes.UPDATE_ITEM_STATUS: {
- const {itemState: {synchronizationState, dirty}, itemStatus, updatedVersion} = action;
+ const {itemState: {synchronizationState, dirty}, itemStatus, updatedVersion, archivedStatus} = action;
const inMerge = synchronizationState === SyncStates.MERGE;
const isOutOfSync = synchronizationState === SyncStates.OUT_OF_SYNC;
const isUpToDate = synchronizationState === SyncStates.UP_TO_DATE;
const isCertified = itemStatus === catalogItemStatuses.CERTIFIED;
- const itemPermission = {...state.itemPermission, inMerge, isDirty: dirty, isOutOfSync, isUpToDate, isCertified};
+ const isArchived = archivedStatus === catalogItemStatuses.ARCHIVED;
+ const itemPermission = {...state.itemPermission, inMerge, isDirty: dirty, isOutOfSync, isUpToDate, isCertified, isArchived};
const isReadOnlyMode = checkReadOnly(itemPermission);
const props = {...state.props, isReadOnlyMode, version: {...state.props.version, ...updatedVersion}};
diff --git a/openecomp-ui/src/sdc-app/onboarding/OnboardingReducersMap.js b/openecomp-ui/src/sdc-app/onboarding/OnboardingReducersMap.js
index 12304fcbce..5b678b1d43 100644
--- a/openecomp-ui/src/sdc-app/onboarding/OnboardingReducersMap.js
+++ b/openecomp-ui/src/sdc-app/onboarding/OnboardingReducersMap.js
@@ -1,5 +1,5 @@
/*!
- * Copyright © 2016-2017 European Support Limited
+ * Copyright © 2016-2018 European Support Limited
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,10 +16,12 @@
import currentScreenReducer from './OnboardingReducers.js';
import licenseModelListReducer from './licenseModel/LicenseModelListReducer.js';
import finalizedLicenseModelListReducer from './licenseModel/FinalizedLicenseModelListReducer.js';
+import archivedLicenseModelListReducer from './licenseModel/ArchivedLicenseModelListReducer.js';
import licenseModelReducer from './licenseModel/LicenseModelReducer.js';
import softwareProductReducer from './softwareProduct/SoftwareProductReducer.js';
import softwareProductListReducer from './softwareProduct/SoftwareProductListReducer.js';
import finalizedSoftwareProductReducer from './softwareProduct/FinalizedSoftwareProductReducer.js';
+import archivedSoftwareProductListReducer from './softwareProduct/ArchivedSoftwareProductReducer.js';
import onboardReducer from './onboard/OnboardReducer.js';
import versionsPageReducer from './versionsPage/VersionsPageReducer.js';
import usersReducer from './users/UsersReducers.js';
@@ -31,6 +33,8 @@ export default {
currentScreen: currentScreenReducer,
licenseModel: licenseModelReducer,
licenseModelList: licenseModelListReducer,
+ archivedLicenseModelList: archivedLicenseModelListReducer,
+ archivedSoftwareProductList: archivedSoftwareProductListReducer,
finalizedLicenseModelList: finalizedLicenseModelListReducer,
finalizedSoftwareProductList: finalizedSoftwareProductReducer,
mergeEditor: mergeEditorReducer,
diff --git a/openecomp-ui/src/sdc-app/onboarding/licenseModel/ArchivedLicenseModelListReducer.js b/openecomp-ui/src/sdc-app/onboarding/licenseModel/ArchivedLicenseModelListReducer.js
new file mode 100644
index 0000000000..8e4750e666
--- /dev/null
+++ b/openecomp-ui/src/sdc-app/onboarding/licenseModel/ArchivedLicenseModelListReducer.js
@@ -0,0 +1,25 @@
+/*
+ * Copyright © 2016-2018 European Support Limited
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+import {actionTypes} from './LicenseModelConstants.js';
+
+export default (state = [], action) => {
+ switch (action.type) {
+ case actionTypes.ARCHIVED_LICENSE_MODELS_LIST_LOADED:
+ return [...action.response.results];
+ default:
+ return state;
+ }
+};
diff --git a/openecomp-ui/src/sdc-app/onboarding/licenseModel/LicenseModel.js b/openecomp-ui/src/sdc-app/onboarding/licenseModel/LicenseModel.js
index 73027c7e36..c390ecc9b0 100644
--- a/openecomp-ui/src/sdc-app/onboarding/licenseModel/LicenseModel.js
+++ b/openecomp-ui/src/sdc-app/onboarding/licenseModel/LicenseModel.js
@@ -1,17 +1,17 @@
-/*!
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+/*
+ * Copyright © 2016-2018 European Support Limited
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing
- * permissions and limitations under the License.
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
import {connect} from 'react-redux';
@@ -28,7 +28,6 @@ import {actionTypes as modalActionTypes} from 'nfvo-components/modal/GlobalModal
import {modalContentMapper} from 'sdc-app/common/modal/ModalContentMapper.js';
import {CommitModalType} from 'nfvo-components/panel/versionController/components/CommitCommentModal.jsx';
-
const buildNavigationBarProps = (licenseModel, screen) => {
const {id, vendorName, version} = licenseModel;
const meta = {version};
@@ -83,6 +82,7 @@ const buildVersionControllerProps = ({
userInfo,
usersList,
permissions,
+ isArchived,
itemPermission,
isReadOnlyMode
}) => {
@@ -94,6 +94,7 @@ const buildVersionControllerProps = ({
permissions,
userInfo,
usersList,
+ isArchived,
itemName: licenseModelEditor.data.vendorName,
itemPermission,
isReadOnlyMode
@@ -116,6 +117,7 @@ const mapStateToProps = ({
userInfo,
permissions,
usersList,
+ isArchived: itemPermission.isArchived,
itemPermission,
isReadOnlyMode
}),
diff --git a/openecomp-ui/src/sdc-app/onboarding/licenseModel/LicenseModelActionHelper.js b/openecomp-ui/src/sdc-app/onboarding/licenseModel/LicenseModelActionHelper.js
index ff264b3003..d1d3a77d92 100644
--- a/openecomp-ui/src/sdc-app/onboarding/licenseModel/LicenseModelActionHelper.js
+++ b/openecomp-ui/src/sdc-app/onboarding/licenseModel/LicenseModelActionHelper.js
@@ -1,17 +1,17 @@
-/*!
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+/*
+ * Copyright © 2016-2018 European Support Limited
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing
- * permissions and limitations under the License.
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
import RestAPIUtil from 'nfvo-utils/RestAPIUtil.js';
import Configuration from 'sdc-app/config/Configuration.js';
@@ -23,7 +23,7 @@ import LicenseAgreementActionHelper from './licenseAgreement/LicenseAgreementAct
import FeatureGroupsActionHelper from './featureGroups/FeatureGroupsActionHelper.js';
import EntitlementPoolsActionHelper from './entitlementPools/EntitlementPoolsActionHelper.js';
import LicenseKeyGroupsActionHelper from './licenseKeyGroups/LicenseKeyGroupsActionHelper.js';
-import ItemsHelper from '../../common/helpers/ItemsHelper.js';
+import {default as ItemsHelper} from 'sdc-app/common/helpers/ItemsHelper.js';
import MergeEditorActionHelper from 'sdc-app/common/merge/MergeEditorActionHelper.js';
import {modalContentMapper} from 'sdc-app/common/modal/ModalContentMapper.js';
import {CommitModalType} from 'nfvo-components/panel/versionController/components/CommitCommentModal.jsx';
@@ -38,13 +38,15 @@ function baseUrl() {
}
function fetchLicenseModels() {
- return RestAPIUtil.fetch(`${baseUrl()}?versionFilter=Draft`);
+ return RestAPIUtil.fetch(`${baseUrl()}?versionFilter=${catalogItemStatuses.DRAFT}`);
}
function fetchFinalizedLicenseModels() {
- return RestAPIUtil.fetch(`${baseUrl()}?versionFilter=Certified`);
+ return RestAPIUtil.fetch(`${baseUrl()}?versionFilter=${catalogItemStatuses.CERTIFIED}`);
+}
+function fetchArchivedLicenseModels() {
+ return RestAPIUtil.fetch(`${baseUrl()}?Status=${catalogItemStatuses.ARCHIVED}`);
}
-
function fetchLicenseModelById(licenseModelId, version) {
const {id: versionId} = version;
return RestAPIUtil.fetch(`${baseUrl()}${licenseModelId}/versions/${versionId}`);
@@ -83,6 +85,14 @@ const LicenseModelActionHelper = {
},
+ fetchArchivedLicenseModels(dispatch) {
+ return fetchArchivedLicenseModels().then(response => dispatch({
+ type: actionTypes.ARCHIVED_LICENSE_MODELS_LIST_LOADED,
+ response
+ }));
+
+ },
+
fetchLicenseModelById(dispatch, {licenseModelId, version}) {
return fetchLicenseModelById(licenseModelId, version).then(response => {
@@ -145,14 +155,15 @@ const LicenseModelActionHelper = {
performVCAction(dispatch, {licenseModelId, action, version, comment}) {
return MergeEditorActionHelper.analyzeSyncResult(dispatch, {itemId: licenseModelId, version}).then(({inMerge, isDirty, updatedVersion}) => {
- if (updatedVersion.status === catalogItemStatuses.CERTIFIED &&
+ if ( (updatedVersion.status === catalogItemStatuses.CERTIFIED || updatedVersion.archivedStatus === catalogItemStatuses.ARCHIVED) &&
(action === VersionControllerActionsEnum.COMMIT || action === VersionControllerActionsEnum.SYNC)) {
versionPageActionHelper.fetchVersions(dispatch, {itemType: itemTypes.LICENSE_MODEL, itemId: licenseModelId});
+ const msg = updatedVersion.archivedStatus === catalogItemStatuses.ARCHIVED ? i18n('Item was Archived') : i18n('Item version already Certified');
dispatch({
type: modalActionTypes.GLOBAL_MODAL_WARNING,
data: {
title: i18n('Commit error'),
- msg: i18n('Item version already Certified'),
+ msg,
cancelButtonText: i18n('Cancel')
}
});
diff --git a/openecomp-ui/src/sdc-app/onboarding/licenseModel/LicenseModelConstants.js b/openecomp-ui/src/sdc-app/onboarding/licenseModel/LicenseModelConstants.js
index 283cb23168..08009ee305 100644
--- a/openecomp-ui/src/sdc-app/onboarding/licenseModel/LicenseModelConstants.js
+++ b/openecomp-ui/src/sdc-app/onboarding/licenseModel/LicenseModelConstants.js
@@ -1,17 +1,17 @@
-/*!
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+/*
+ * Copyright © 2016-2018 European Support Limited
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing
- * permissions and limitations under the License.
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
import keyMirror from 'nfvo-utils/KeyMirror.js';
import i18n from 'nfvo-utils/i18n/i18n.js';
@@ -20,6 +20,7 @@ export const actionTypes = keyMirror({
LICENSE_MODEL_LOADED: null,
LICENSE_MODELS_LIST_LOADED: null,
FINALIZED_LICENSE_MODELS_LIST_LOADED: null,
+ ARCHIVED_LICENSE_MODELS_LIST_LOADED: null,
EDIT_LICENSE_MODEL: null
});
diff --git a/openecomp-ui/src/sdc-app/onboarding/licenseModel/creation/LicenseModelCreation.js b/openecomp-ui/src/sdc-app/onboarding/licenseModel/creation/LicenseModelCreation.js
index 71f41710db..bcd6e7fe5b 100644
--- a/openecomp-ui/src/sdc-app/onboarding/licenseModel/creation/LicenseModelCreation.js
+++ b/openecomp-ui/src/sdc-app/onboarding/licenseModel/creation/LicenseModelCreation.js
@@ -1,17 +1,17 @@
-/*!
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+/*
+ * Copyright © 2016-2018 European Support Limited
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing
- * permissions and limitations under the License.
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
import {connect} from 'react-redux';
import LicenseModelCreationActionHelper from './LicenseModelCreationActionHelper.js';
@@ -24,14 +24,15 @@ import ScreensHelper from 'sdc-app/common/helpers/ScreensHelper.js';
import {enums, screenTypes} from 'sdc-app/onboarding/OnboardingConstants.js';
import PermissionsActionHelper from 'sdc-app/onboarding/permissions/PermissionsActionHelper.js';
-export const mapStateToProps = ({users: {usersList}, licenseModelList, licenseModel: {licenseModelCreation}}) => {
+export const mapStateToProps = ({users: {usersList}, licenseModelList, finalizedLicenseModelList, archivedLicenseModelList, licenseModel: {licenseModelCreation}}) => {
let {genericFieldInfo} = licenseModelCreation;
let isFormValid = ValidationHelper.checkFormValid(genericFieldInfo);
-
let VLMNames = {};
- for (let i = 0; i < licenseModelList.length; i++) {
- VLMNames[licenseModelList[i].name.toLowerCase()] = licenseModelList[i].id;
- }
+
+ const allVlmList = [...licenseModelList, ...finalizedLicenseModelList,...archivedLicenseModelList];
+ allVlmList.map((item) => {
+ VLMNames[item.name.toLowerCase()] = item.id;
+ });
return {...licenseModelCreation, isFormValid: isFormValid, VLMNames, usersList};
};
diff --git a/openecomp-ui/src/sdc-app/onboarding/licenseModel/entitlementPools/EntitlementPoolsActionHelper.js b/openecomp-ui/src/sdc-app/onboarding/licenseModel/entitlementPools/EntitlementPoolsActionHelper.js
index 09a6e8228c..84bdac804c 100644
--- a/openecomp-ui/src/sdc-app/onboarding/licenseModel/entitlementPools/EntitlementPoolsActionHelper.js
+++ b/openecomp-ui/src/sdc-app/onboarding/licenseModel/entitlementPools/EntitlementPoolsActionHelper.js
@@ -124,7 +124,7 @@ export default {
type: entitlementPoolsActionTypes.DELETE_ENTITLEMENT_POOL,
entitlementPoolId
});
- ItemsHelper.checkItemStatus(dispatch, {itemId: licenseModelId, versionId: version.id});
+ return ItemsHelper.checkItemStatus(dispatch, {itemId: licenseModelId, versionId: version.id});
});
},
@@ -148,7 +148,7 @@ export default {
type: entitlementPoolsActionTypes.EDIT_ENTITLEMENT_POOL,
entitlementPool
});
- ItemsHelper.checkItemStatus(dispatch, {itemId: licenseModelId, versionId: version.id});
+ return ItemsHelper.checkItemStatus(dispatch, {itemId: licenseModelId, versionId: version.id});
});
}
else {
@@ -161,7 +161,7 @@ export default {
id: response.value
}
});
- ItemsHelper.checkItemStatus(dispatch, {itemId: licenseModelId, versionId: version.id});
+ return ItemsHelper.checkItemStatus(dispatch, {itemId: licenseModelId, versionId: version.id});
});
}
},
@@ -198,14 +198,14 @@ export default {
type: limitEditorActions.CLOSE
});
this.fetchLimits(dispatch, {licenseModelId, version, entitlementPool});
- ItemsHelper.checkItemStatus(dispatch, {itemId: licenseModelId, versionId: version.id});
+ return ItemsHelper.checkItemStatus(dispatch, {itemId: licenseModelId, versionId: version.id});
});
},
deleteLimit(dispatch, {licenseModelId, version, entitlementPool, limit}) {
return deleteLimit(licenseModelId,entitlementPool.id, version, limit.id).then(() => {
this.fetchLimits(dispatch, {licenseModelId, version, entitlementPool});
- ItemsHelper.checkItemStatus(dispatch, {itemId: licenseModelId, versionId: version.id});
+ return ItemsHelper.checkItemStatus(dispatch, {itemId: licenseModelId, versionId: version.id});
});
}
};
diff --git a/openecomp-ui/src/sdc-app/onboarding/licenseModel/featureGroups/FeatureGroupsActionHelper.js b/openecomp-ui/src/sdc-app/onboarding/licenseModel/featureGroups/FeatureGroupsActionHelper.js
index aadf8e0301..9e7fe8e0dd 100644
--- a/openecomp-ui/src/sdc-app/onboarding/licenseModel/featureGroups/FeatureGroupsActionHelper.js
+++ b/openecomp-ui/src/sdc-app/onboarding/licenseModel/featureGroups/FeatureGroupsActionHelper.js
@@ -86,7 +86,7 @@ export default {
type: featureGroupsActionConstants.DELETE_FEATURE_GROUPS,
featureGroupId
});
- ItemsHelper.checkItemStatus(dispatch, {itemId: licenseModelId, versionId: version.id});
+ return ItemsHelper.checkItemStatus(dispatch, {itemId: licenseModelId, versionId: version.id});
});
},
@@ -99,7 +99,7 @@ export default {
});
EntitlementPoolsActionHelper.fetchEntitlementPoolsList(dispatch, {licenseModelId, version});
LicenseKeyGroupsActionHelper.fetchLicenseKeyGroupsList(dispatch, {licenseModelId, version});
- ItemsHelper.checkItemStatus(dispatch, {itemId: licenseModelId, versionId: version.id});
+ return ItemsHelper.checkItemStatus(dispatch, {itemId: licenseModelId, versionId: version.id});
});
}
else {
@@ -114,7 +114,7 @@ export default {
});
EntitlementPoolsActionHelper.fetchEntitlementPoolsList(dispatch, {licenseModelId, version});
LicenseKeyGroupsActionHelper.fetchLicenseKeyGroupsList(dispatch, {licenseModelId, version});
- ItemsHelper.checkItemStatus(dispatch, {itemId: licenseModelId, versionId: version.id});
+ return ItemsHelper.checkItemStatus(dispatch, {itemId: licenseModelId, versionId: version.id});
});
}
},
diff --git a/openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseAgreement/LicenseAgreementActionHelper.js b/openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseAgreement/LicenseAgreementActionHelper.js
index b4f03a68cd..b1b4ee8fdd 100644
--- a/openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseAgreement/LicenseAgreementActionHelper.js
+++ b/openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseAgreement/LicenseAgreementActionHelper.js
@@ -92,14 +92,14 @@ export default {
if (previousLicenseAgreement) {
return putLicenseAgreement(licenseModelId, previousLicenseAgreement, licenseAgreement, version).then(() => {
this.fetchLicenseAgreementList(dispatch, {licenseModelId, version});
- ItemsHelper.checkItemStatus(dispatch, {itemId: licenseModelId, versionId: version.id});
+ return ItemsHelper.checkItemStatus(dispatch, {itemId: licenseModelId, versionId: version.id});
});
}
else {
return postLicenseAgreement(licenseModelId, licenseAgreement, version).then(() => {
this.fetchLicenseAgreementList(dispatch, {licenseModelId, version});
FeatureGroupsActionHelper.fetchFeatureGroupsList(dispatch, {licenseModelId, version});
- ItemsHelper.checkItemStatus(dispatch, {itemId: licenseModelId, versionId: version.id});
+ return ItemsHelper.checkItemStatus(dispatch, {itemId: licenseModelId, versionId: version.id});
});
}
},
@@ -110,7 +110,7 @@ export default {
type: licenseAgreementActionTypes.DELETE_LICENSE_AGREEMENT,
licenseAgreementId
});
- ItemsHelper.checkItemStatus(dispatch, {itemId: licenseModelId, versionId: version.id});
+ return ItemsHelper.checkItemStatus(dispatch, {itemId: licenseModelId, versionId: version.id});
});
},
diff --git a/openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseKeyGroups/LicenseKeyGroupsActionHelper.js b/openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseKeyGroups/LicenseKeyGroupsActionHelper.js
index 4d86815276..674c329515 100644
--- a/openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseKeyGroups/LicenseKeyGroupsActionHelper.js
+++ b/openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseKeyGroups/LicenseKeyGroupsActionHelper.js
@@ -128,7 +128,7 @@ export default {
type: licenseKeyGroupsConstants.EDIT_LICENSE_KEY_GROUP,
licenseKeyGroup
});
- ItemsHelper.checkItemStatus(dispatch, {itemId: licenseModelId, versionId: version.id});
+ return ItemsHelper.checkItemStatus(dispatch, {itemId: licenseModelId, versionId: version.id});
});
}
else {
@@ -141,7 +141,7 @@ export default {
id: response.value
}
});
- ItemsHelper.checkItemStatus(dispatch, {itemId: licenseModelId, versionId: version.id});
+ return ItemsHelper.checkItemStatus(dispatch, {itemId: licenseModelId, versionId: version.id});
});
}
@@ -154,7 +154,7 @@ export default {
type: licenseKeyGroupsConstants.DELETE_LICENSE_KEY_GROUP,
licenseKeyGroupId
});
- ItemsHelper.checkItemStatus(dispatch, {itemId: licenseModelId, versionId: version.id});
+ return ItemsHelper.checkItemStatus(dispatch, {itemId: licenseModelId, versionId: version.id});
});
},
@@ -190,14 +190,14 @@ export default {
type: limitEditorActions.CLOSE
});
this.fetchLimits(dispatch, {licenseModelId, version, licenseKeyGroup});
- ItemsHelper.checkItemStatus(dispatch, {itemId: licenseModelId, versionId: version.id});
+ return ItemsHelper.checkItemStatus(dispatch, {itemId: licenseModelId, versionId: version.id});
});
},
deleteLimit(dispatch, {licenseModelId, version, licenseKeyGroup, limit}) {
return deleteLimit(licenseModelId,licenseKeyGroup.id, version, limit.id).then(() => {
this.fetchLimits(dispatch, {licenseModelId, version, licenseKeyGroup});
- ItemsHelper.checkItemStatus(dispatch, {itemId: licenseModelId, versionId: version.id});
+ return ItemsHelper.checkItemStatus(dispatch, {itemId: licenseModelId, versionId: version.id});
});
}
diff --git a/openecomp-ui/src/sdc-app/onboarding/onboard/CatalogList.jsx b/openecomp-ui/src/sdc-app/onboarding/onboard/CatalogList.jsx
index 03efa19533..10d855c862 100644
--- a/openecomp-ui/src/sdc-app/onboarding/onboard/CatalogList.jsx
+++ b/openecomp-ui/src/sdc-app/onboarding/onboard/CatalogList.jsx
@@ -1,17 +1,17 @@
-/*!
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+/*
+ * Copyright © 2016-2018 European Support Limited
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing
- * permissions and limitations under the License.
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
import React from 'react';
import i18n from 'nfvo-utils/i18n/i18n.js';
@@ -29,10 +29,12 @@ const CatalogList = ({children, onAddVLM, onAddVSP, vendorPageOptions}) => (
<div className='catalog-list'>
{vendorPageOptions && <SoftwareProductListHeader onBack={vendorPageOptions.onBack} selectedVendor={vendorPageOptions.selectedVendor}/>}
<div className='catalog-items'>
- <div className='create-catalog-item-wrapper'>
- {onAddVLM && <CreateItemTile onClick={onAddVLM} dataTestId={'catalog-add-new-vlm'} className='vlm-type' title={i18n('CREATE NEW VLM')}/>}
- {onAddVSP && <CreateItemTile onClick={() => onAddVSP()} dataTestId={'catalog-add-new-vsp'} className='vsp-type' title={i18n('CREATE NEW VSP')}/>}
- </div>
+ { (onAddVLM || onAddVSP) &&
+ <div className='create-catalog-item-wrapper'>
+ {onAddVLM && <CreateItemTile onClick={onAddVLM} dataTestId={'catalog-add-new-vlm'} className='vlm-type' title={i18n('CREATE NEW VLM')}/>}
+ {onAddVSP && <CreateItemTile onClick={() => onAddVSP()} dataTestId={'catalog-add-new-vsp'} className='vsp-type' title={i18n('CREATE NEW VSP')}/>}
+ </div>
+ }
{children}
</div>
</div>
diff --git a/openecomp-ui/src/sdc-app/onboarding/onboard/DetailsCatalogView.jsx b/openecomp-ui/src/sdc-app/onboarding/onboard/DetailsCatalogView.jsx
index 887517238b..ea6cf5e9bc 100644
--- a/openecomp-ui/src/sdc-app/onboarding/onboard/DetailsCatalogView.jsx
+++ b/openecomp-ui/src/sdc-app/onboarding/onboard/DetailsCatalogView.jsx
@@ -1,5 +1,5 @@
/*!
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright © 2016-2018 European Support Limited
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -27,8 +27,8 @@ class DetailsCatalogView extends React.Component{
VSPList: PropTypes.array,
onSelectVLM: PropTypes.func.isRequired,
onSelectVSP: PropTypes.func.isRequired,
- onAddVLM: PropTypes.func.isRequired,
- onAddVSP: PropTypes.func.isRequired,
+ onAddVLM: PropTypes.func,
+ onAddVSP: PropTypes.func,
filter: PropTypes.string.isRequired
};
diff --git a/openecomp-ui/src/sdc-app/onboarding/onboard/Onboard.js b/openecomp-ui/src/sdc-app/onboarding/onboard/Onboard.js
index a308e1ec5e..9535147a46 100644
--- a/openecomp-ui/src/sdc-app/onboarding/onboard/Onboard.js
+++ b/openecomp-ui/src/sdc-app/onboarding/onboard/Onboard.js
@@ -1,17 +1,17 @@
-/*!
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+/*
+ * Copyright © 2016-2018 European Support Limited
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing
- * permissions and limitations under the License.
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
import {connect} from 'react-redux';
@@ -21,16 +21,20 @@ import OnboardActionHelper from './OnboardActionHelper.js';
import LicenseModelCreationActionHelper from '../licenseModel/creation/LicenseModelCreationActionHelper.js';
import SoftwareProductCreationActionHelper from '../softwareProduct/creation/SoftwareProductCreationActionHelper.js';
import sortByStringProperty from 'nfvo-utils/sortByStringProperty.js';
-
+import {tabsMapping} from './onboardingCatalog/OnboardingCatalogConstants.js';
+import {itemsType} from './filter/FilterConstants.js';
export const mapStateToProps = ({
onboard: {
onboardingCatalog,
activeTab,
- searchValue
+ searchValue,
+ filter
},
licenseModelList,
users,
+ archivedLicenseModelList,
+ archivedSoftwareProductList,
finalizedLicenseModelList,
softwareProductList,
finalizedSoftwareProductList
@@ -69,12 +73,20 @@ export const mapStateToProps = ({
).concat(finalizedLicenseModelList);
let {activeTab: catalogActiveTab, vendorCatalog: {vspOverlay, selectedVendor}} = onboardingCatalog;
+ if (filter.byVendorView) {
+ catalogActiveTab = tabsMapping.BY_VENDOR;
+ }
+ else if (filter.itemsType && filter.itemsType === itemsType.ARCHIVED) {
+ catalogActiveTab = tabsMapping.ARCHIVE;
+ }
return {
finalizedLicenseModelList,
finalizedSoftwareProductList,
licenseModelList,
softwareProductList,
+ archivedLicenseModelList,
+ archivedSoftwareProductList,
fullLicenseModelList,
activeTab,
catalogActiveTab,
@@ -105,7 +117,6 @@ const mapActionsToProps = (dispatch) => {
onVendorSelect: (vendor) => OnboardingCatalogActionHelper.onVendorSelect(dispatch, {vendor}),
onMigrate: ({softwareProduct}) => OnboardingCatalogActionHelper.onMigrate(dispatch, softwareProduct)
};
-
};
export default connect(mapStateToProps, mapActionsToProps)(OnboardView);
diff --git a/openecomp-ui/src/sdc-app/onboarding/onboard/OnboardView.jsx b/openecomp-ui/src/sdc-app/onboarding/onboard/OnboardView.jsx
index f64c1e55fa..c045a3739a 100644
--- a/openecomp-ui/src/sdc-app/onboarding/onboard/OnboardView.jsx
+++ b/openecomp-ui/src/sdc-app/onboarding/onboard/OnboardView.jsx
@@ -60,6 +60,8 @@ class OnboardView extends React.Component {
softwareProductList: PropTypes.array,
finalizedLicenseModelList: PropTypes.array,
finalizedSoftwareProductList: PropTypes.array,
+ archivedSoftwareProductList: PropTypes.array,
+ archivedLicenseModelList: PropTypes.array,
modalToShow: PropTypes.oneOf(objectValues(catalogItemTypes)),
onSelectLicenseModel: PropTypes.func.isRequired,
onSelectSoftwareProduct: PropTypes.func.isRequired,
@@ -80,8 +82,9 @@ class OnboardView extends React.Component {
case tabsMapping.WORKSPACE:
return <WorkspaceView {...this.props} />;
case tabsMapping.CATALOG:
- default:
return <OnboardingCatalogView {...this.props} />;
+ default:
+ return <WorkspaceView {...this.props} />;
}
}
@@ -93,7 +96,7 @@ class OnboardView extends React.Component {
<div className='catalog-parts'>
<OnboardHeader activeTab={activeTab} onTabClick={onTabClick} searchValue={searchValue} onSearch={value => onSearch(value)}/>
{this.renderViewByTab(activeTab)}
- </div>
+ </div>
</div>
);
}
diff --git a/openecomp-ui/src/sdc-app/onboarding/onboard/filter/Filter.jsx b/openecomp-ui/src/sdc-app/onboarding/onboard/filter/Filter.jsx
index bf1927d2c5..d8d04f242b 100644
--- a/openecomp-ui/src/sdc-app/onboarding/onboard/filter/Filter.jsx
+++ b/openecomp-ui/src/sdc-app/onboarding/onboard/filter/Filter.jsx
@@ -22,10 +22,14 @@ import Input from 'nfvo-components/input/validation/Input.jsx';
import Accordion from 'nfvo-components/accordion/Accordion.jsx';
import {actionTypes} from './FilterConstants.js';
import featureToggle from 'sdc-app/features/featureToggle.js';
+import {featureToggleNames} from 'sdc-app/features/FeaturesConstants.js';
+import {tabsMapping as onboardTabsMapping} from '../OnboardConstants.js';
+import {itemsType as itemsTypeConstants} from './FilterConstants.js';
-const mapStateToProps = ({onboard: {filter}}) => {
+const mapStateToProps = ({onboard: {filter, activeTab}}) => {
return {
- data: filter
+ data: filter,
+ activeTab
};
};
@@ -40,9 +44,27 @@ const mapActionsToProps = (dispatch) => {
};
const Filter = ({onDataChanged, data: {entityTypeVsp, entityTypeVlm, roleOwner, roleContributor, roleViewer,
- procedureNetwork, procedureManual, recentlyUpdated}}) => (
- <div className='catalog-filter'>
- <Input label={i18n('Recently Updated')} type='checkbox' checked={recentlyUpdated}
+ procedureNetwork, procedureManual, recentlyUpdated, byVendorView, itemsType}, activeTab}) => (
+ <div className='catalog-filter'>
+ {activeTab === onboardTabsMapping.CATALOG && <Input
+ type='select'
+ className='catalog-filter-items-type'
+ data-test-id='catalog-filter-items-type'
+ disabled={byVendorView}
+ value={itemsType}
+ onChange={e => onDataChanged({itemsType: e.target.value})}>
+ <option key={itemsTypeConstants.ACTIVE} value={itemsTypeConstants.ACTIVE}>Active Items</option>
+ <option key={itemsTypeConstants.ARCHIVED} value={itemsTypeConstants.ARCHIVED}>Archived Items</option>
+ </Input>}
+ {activeTab === onboardTabsMapping.CATALOG && <Input
+ label={i18n('By Vendor View')}
+ type='checkbox'
+ disabled={itemsType === itemsTypeConstants.ARCHIVED}
+ checked={byVendorView}
+ onChange={byVendorView => onDataChanged({byVendorView})}
+ data-test-id='filter-by-vendor-view' value='' />
+ }
+ <Input label={i18n('Recently Updated')} type='checkbox' checked={recentlyUpdated}
onChange={recentlyUpdated => onDataChanged({recentlyUpdated})} data-test-id='filter-recently-updated' value='' />
<Accordion title={i18n('ENTITY TYPE')}>
@@ -71,4 +93,4 @@ Filter.PropTypes = {
data: PropTypes.object
};
-export default featureToggle('ONBOARDING_FILTER')(connect(mapStateToProps, mapActionsToProps)(Filter));
+export default featureToggle(featureToggleNames.FILTER)(connect(mapStateToProps, mapActionsToProps)(Filter));
diff --git a/openecomp-ui/src/sdc-app/onboarding/onboard/filter/FilterConstants.js b/openecomp-ui/src/sdc-app/onboarding/onboard/filter/FilterConstants.js
index 36a415cd4f..d944cb02fb 100644
--- a/openecomp-ui/src/sdc-app/onboarding/onboard/filter/FilterConstants.js
+++ b/openecomp-ui/src/sdc-app/onboarding/onboard/filter/FilterConstants.js
@@ -19,3 +19,8 @@ import keyMirror from 'nfvo-utils/KeyMirror.js';
export const actionTypes = keyMirror({
FILTER_DATA_CHANGED: null
});
+
+export const itemsType = {
+ ACTIVE: '1',
+ ARCHIVED: '2'
+}; \ No newline at end of file
diff --git a/openecomp-ui/src/sdc-app/onboarding/onboard/onboardingCatalog/OnboardingCatalogConstants.js b/openecomp-ui/src/sdc-app/onboarding/onboard/onboardingCatalog/OnboardingCatalogConstants.js
index a1bf1b1fc8..239ae4545f 100644
--- a/openecomp-ui/src/sdc-app/onboarding/onboard/onboardingCatalog/OnboardingCatalogConstants.js
+++ b/openecomp-ui/src/sdc-app/onboarding/onboard/onboardingCatalog/OnboardingCatalogConstants.js
@@ -1,17 +1,17 @@
-/*!
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+/*
+ * Copyright © 2016-2018 European Support Limited
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing
- * permissions and limitations under the License.
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
import keyMirror from 'nfvo-utils/KeyMirror.js';
@@ -28,7 +28,8 @@ export const catalogItemTypeClasses = {
export const catalogItemStatuses = {
DRAFT: 'Draft',
- CERTIFIED: 'Certified'
+ CERTIFIED: 'Certified',
+ ARCHIVED: 'ARCHIVED'
};
export const modalMapper = {
@@ -38,7 +39,8 @@ export const modalMapper = {
export const tabsMapping = {
'BY_VENDOR': 1,
- 'ALL': 2
+ 'ACTIVE': 2,
+ 'ARCHIVE': 3
};
export const migrationStatusMapper = {
diff --git a/openecomp-ui/src/sdc-app/onboarding/onboard/onboardingCatalog/OnboardingCatalogReducer.js b/openecomp-ui/src/sdc-app/onboarding/onboard/onboardingCatalog/OnboardingCatalogReducer.js
index d7d9d0bd6c..3f8a833074 100644
--- a/openecomp-ui/src/sdc-app/onboarding/onboard/onboardingCatalog/OnboardingCatalogReducer.js
+++ b/openecomp-ui/src/sdc-app/onboarding/onboard/onboardingCatalog/OnboardingCatalogReducer.js
@@ -1,17 +1,17 @@
-/*!
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+/*
+ * Copyright © 2016-2018 European Support Limited
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing
- * permissions and limitations under the License.
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
import {actionTypes, tabsMapping} from './OnboardingCatalogConstants.js';
import {combineReducers} from 'redux';
@@ -19,7 +19,7 @@ import vendorCatalogReducer from './VendorCatalogReducer.js';
const onboardingCatalogReducer = combineReducers({
vendorCatalog: vendorCatalogReducer,
- activeTab: (state = tabsMapping.ALL, action) => action.type === actionTypes.CHANGE_ACTIVE_CATALOG_TAB ? action.activeTab : state
+ activeTab: (state = tabsMapping.ACTIVE, action) => action.type === actionTypes.CHANGE_ACTIVE_CATALOG_TAB ? action.activeTab : state
});
export default (state, action) => {
diff --git a/openecomp-ui/src/sdc-app/onboarding/onboard/onboardingCatalog/OnboardingCatalogView.jsx b/openecomp-ui/src/sdc-app/onboarding/onboard/onboardingCatalog/OnboardingCatalogView.jsx
index 60a5aaeef0..8ae8549688 100644
--- a/openecomp-ui/src/sdc-app/onboarding/onboard/onboardingCatalog/OnboardingCatalogView.jsx
+++ b/openecomp-ui/src/sdc-app/onboarding/onboard/onboardingCatalog/OnboardingCatalogView.jsx
@@ -1,17 +1,17 @@
-/*!
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+/*
+ * Copyright © 2016-2018 European Support Limited
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing
- * permissions and limitations under the License.
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
import React from 'react';
import i18n from 'nfvo-utils/i18n/i18n.js';
@@ -20,22 +20,32 @@ import DetailsCatalogView from 'sdc-app/onboarding/onboard/DetailsCatalogView.js
import VendorCatalogView from './VendorCatalogView.jsx';
import { tabsMapping} from './OnboardingCatalogConstants.js';
import {tabsMapping as WCTabsMapping} from 'sdc-app/onboarding/onboard/OnboardConstants.js';
+import featureToggle from 'sdc-app/features/featureToggle.js';
+import {featureToggleNames} from 'sdc-app/features/FeaturesConstants.js';
+
+const Separator = () => (
+ <div className='tab-separator'/>
+);
-const CatalogHeaderTabs = ({onTabPress, activeTab}) => (
+const Tab = ({onTabPress, title, dataTestId, activeTab, tabMapping}) => (
+ <div
+ className={classnames('catalog-header-tab', {'active': activeTab === tabMapping })}
+ onClick={() => onTabPress(tabMapping)}
+ data-test-id={dataTestId}>
+ {title}
+ </div>
+);
+
+const ArchiveTab = featureToggle(featureToggleNames.ARCHIVE_ITEM)(Tab);
+const ArchiveTabSeparator = featureToggle(featureToggleNames.ARCHIVE_ITEM)(Separator);
+
+const CatalogHeaderTabs = (props) => (
<div className='catalog-header-tabs'>
- <div
- className={classnames('catalog-header-tab', {'active': activeTab === tabsMapping.ALL })}
- onClick={() => onTabPress(tabsMapping.ALL)}
- data-test-id='catalog-all-tab'>
- {i18n('ALL')}
- </div>
- <div className='tab-separator'/>
- <div
- className={classnames('catalog-header-tab', {'active': activeTab === tabsMapping.BY_VENDOR })}
- onClick={() => onTabPress(tabsMapping.BY_VENDOR)}
- data-test-id='catalog-by-vendor-tab'>
- {i18n('BY VENDOR')}
- </div>
+ <Tab {...props} title={i18n('ACTIVE')} dataTestId='catalog-all-tab' tabMapping={tabsMapping.ACTIVE}/>
+ <Separator/>
+ <Tab {...props} title={i18n('BY VENDOR')} dataTestId='catalog-header-tab' tabMapping={tabsMapping.BY_VENDOR}/>
+ <ArchiveTabSeparator/>
+ <ArchiveTab {...props} title={i18n('ARCHIVE')} dataTestId='catalog-archive-tab' tabMapping={tabsMapping.ARCHIVE}/>
</div>
);
@@ -45,13 +55,38 @@ const CatalogHeader = ({activeTab, onTabPress}) => (
</div>
);
+const FilterCatalogHeader = () => (
+ <div className='catalog-header'>
+ <div className='catalog-header-tabs'>
+ <div className='catalog-header-tab active'>
+ {i18n('ONBOARD CATALOG')}
+ </div>
+ </div>
+ </div>
+);
+
+
+const FeaturedCatalogHeader = featureToggle(featureToggleNames.FILTER)({AComp: FilterCatalogHeader, BComp: CatalogHeader});
+
class OnboardingCatalogView extends React.Component {
renderViewByTab(activeTab){
const {finalizedLicenseModelList: licenseModelList, fullLicenseModelList, users, vspOverlay, finalizedSoftwareProductList: softwareProductList, onSelectLicenseModel, onSelectSoftwareProduct,
- onAddLicenseModelClick, onAddSoftwareProductClick, onVspOverlayChange, onVendorSelect, selectedVendor, searchValue, onMigrate} = this.props;
+ onAddLicenseModelClick, onAddSoftwareProductClick, onVspOverlayChange, onVendorSelect, selectedVendor, searchValue, onMigrate,
+ archivedSoftwareProductList, archivedLicenseModelList} = this.props;
switch (activeTab){
- case tabsMapping.ALL:
+ case tabsMapping.ARCHIVE:
+ return (
+ <DetailsCatalogView
+ VLMList={archivedLicenseModelList}
+ VSPList={archivedSoftwareProductList}
+ users={users}
+ onSelectVLM={(item, users) => onSelectLicenseModel(item, users, WCTabsMapping.CATALOG)}
+ onSelectVSP={(item, users) => onSelectSoftwareProduct(item, users, WCTabsMapping.CATALOG)}
+ filter={searchValue}
+ onMigrate={onMigrate}/>
+ );
+ case tabsMapping.ACTIVE:
return (
<DetailsCatalogView
VLMList={licenseModelList}
@@ -88,7 +123,7 @@ class OnboardingCatalogView extends React.Component {
const {selectedVendor, catalogActiveTab: activeTab, onCatalogTabClick, onSearch, searchValue} = this.props;
return (
<div className='catalog-wrapper'>
- {!selectedVendor && <CatalogHeader
+ {!selectedVendor && <FeaturedCatalogHeader
onSearch={event => onSearch(event.target.value)}
activeTab={activeTab}
onTabPress={tab => onCatalogTabClick(tab)}
diff --git a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/ArchivedSoftwareProductReducer.js b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/ArchivedSoftwareProductReducer.js
new file mode 100644
index 0000000000..b484f5e0a0
--- /dev/null
+++ b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/ArchivedSoftwareProductReducer.js
@@ -0,0 +1,25 @@
+/*!
+ * Copyright © 2016-2018 European Support Limited
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+import {actionTypes} from './SoftwareProductConstants.js';
+
+export default (state = [], action) => {
+ switch (action.type) {
+ case actionTypes.ARCHIVED_SOFTWARE_PRODUCT_LIST_LOADED:
+ return [...action.response.results];
+ default:
+ return state;
+ }
+};
diff --git a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/SoftwareProduct.js b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/SoftwareProduct.js
index 683dd4f682..e3ea7e1907 100644
--- a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/SoftwareProduct.js
+++ b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/SoftwareProduct.js
@@ -20,7 +20,6 @@ import ScreensHelper from 'sdc-app/common/helpers/ScreensHelper.js';
import TabulatedEditor from 'src/nfvo-components/editor/TabulatedEditor.jsx';
import {enums, screenTypes} from 'sdc-app/onboarding/OnboardingConstants.js';
-
import {onboardingMethod as onboardingMethodTypes, onboardingOriginTypes} from './SoftwareProductConstants.js';
import SoftwareProductActionHelper from './SoftwareProductActionHelper.js';
import SoftwareProductComponentsActionHelper from './components/SoftwareProductComponentsActionHelper.js';
@@ -163,7 +162,7 @@ const buildNavigationBarProps = ({softwareProduct, meta, screen, componentId, co
};
};
-const buildVersionControllerProps = ({softwareProduct, versions, currentVersion, permissions, userInfo, usersList, itemPermission, isReadOnlyMode}) => {
+const buildVersionControllerProps = ({softwareProduct, versions, currentVersion, permissions, userInfo, isArchived, usersList, itemPermission, isReadOnlyMode}) => {
const {softwareProductEditor = {data: {}}} = softwareProduct;
const {isValidityData = true, data: {name, onboardingMethod, candidateOnboardingOrigin}} = softwareProductEditor;
@@ -175,6 +174,7 @@ const buildVersionControllerProps = ({softwareProduct, versions, currentVersion,
itemName: name,
itemPermission,
isReadOnlyMode,
+ isArchived,
userInfo,
usersList,
isManual: onboardingMethod === onboardingMethodType.MANUAL,
@@ -220,6 +220,7 @@ const mapStateToProps = (
currentVersion,
userInfo,
usersList,
+ isArchived: itemPermission.isArchived,
permissions,
itemPermission: {...itemPermission, isDirty: true},
isReadOnlyMode
@@ -355,7 +356,6 @@ const mapActionsToProps = (dispatch, {currentScreen: {screen, props: {softwarePr
if((action === versionControllerActions.SYNC && !inMerge) ||
((action === versionControllerActions.COMMIT || action === versionControllerActions.SYNC) && updatedVersion.status === catalogItemStatuses.CERTIFIED)) {
ScreensHelper.loadLandingScreen(dispatch, {previousScreenName: screen, props: {softwareProductId, version: updatedVersion}});
-
} else {
ScreensHelper.loadScreen(dispatch, {screen, screenType: screenTypes.SOFTWARE_PRODUCT,
props: {softwareProductId, version: updatedVersion, componentId: currentComponentId}});
diff --git a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/SoftwareProductActionHelper.js b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/SoftwareProductActionHelper.js
index 9ed6005397..42786bf752 100644
--- a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/SoftwareProductActionHelper.js
+++ b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/SoftwareProductActionHelper.js
@@ -32,7 +32,7 @@ import {actionTypes as componentActionTypes} from './components/SoftwareProductC
import ValidationHelper from 'sdc-app/common/helpers/ValidationHelper.js';
import {actionTypes as modalActionTypes} from 'nfvo-components/modal/GlobalModalConstants.js';
import {modalContentMapper} from 'sdc-app/common/modal/ModalContentMapper.js';
-import ItemsHelper from 'sdc-app/common/helpers/ItemsHelper.js';
+import {default as ItemsHelper} from 'sdc-app/common/helpers/ItemsHelper.js';
import ScreensHelper from 'sdc-app/common/helpers/ScreensHelper.js';
import {enums, screenTypes} from 'sdc-app/onboarding/OnboardingConstants.js';
import MergeEditorActionHelper from 'sdc-app/common/merge/MergeEditorActionHelper.js';
@@ -90,11 +90,15 @@ function putSoftwareProductAction(id, action, version) {
}
function fetchSoftwareProductList() {
- return RestAPIUtil.fetch(`${baseUrl()}?versionFilter=Draft`);
+ return RestAPIUtil.fetch(`${baseUrl()}?versionFilter=${catalogItemStatuses.DRAFT}`);
+}
+
+function fetchArchivedSoftwareProductList() {
+ return RestAPIUtil.fetch(`${baseUrl()}?Status=${catalogItemStatuses.ARCHIVED}`);
}
function fetchFinalizedSoftwareProductList() {
- return RestAPIUtil.fetch(`${baseUrl()}?versionFilter=Certified`);
+ return RestAPIUtil.fetch(`${baseUrl()}?versionFilter=${catalogItemStatuses.CERTIFIED}`);
}
function fetchSoftwareProduct(vspId, version) {
@@ -202,6 +206,13 @@ const SoftwareProductActionHelper = {
}));
},
+ fetchArchivedSoftwareProductList(dispatch) {
+ return fetchArchivedSoftwareProductList().then(response => dispatch({
+ type: actionTypes.ARCHIVED_SOFTWARE_PRODUCT_LIST_LOADED,
+ response
+ }));
+ },
+
loadSoftwareProductAssociatedData(dispatch) {
fetchSoftwareProductCategories(dispatch);
LicenseModelActionHelper.fetchFinalizedLicenseModels(dispatch);
@@ -473,14 +484,15 @@ const SoftwareProductActionHelper = {
performVCAction(dispatch, {softwareProductId, action, version, comment}) {
return MergeEditorActionHelper.analyzeSyncResult(dispatch, {itemId: softwareProductId, version}).then(({inMerge, isDirty, updatedVersion}) => {
- if (updatedVersion.status === catalogItemStatuses.CERTIFIED &&
+ if ((updatedVersion.status === catalogItemStatuses.CERTIFIED || updatedVersion.archivedStatus === catalogItemStatuses.ARCHIVED) &&
(action === VersionControllerActionsEnum.COMMIT || action === VersionControllerActionsEnum.SYNC)) {
versionPageActionHelper.fetchVersions(dispatch, {itemType: itemTypes.SOFTWARE_PRODUCT, itemId: softwareProductId});
+ const msg = updatedVersion.archivedStatus === catalogItemStatuses.ARCHIVED ? i18n('Item was Archived') : i18n('Item version already Certified');
dispatch({
type: modalActionTypes.GLOBAL_MODAL_WARNING,
data: {
title: i18n('Commit error'),
- msg: i18n('Item version already Certified'),
+ msg,
cancelButtonText: i18n('Cancel')
}
});
diff --git a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/SoftwareProductConstants.js b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/SoftwareProductConstants.js
index c82483740f..d33eb822cf 100644
--- a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/SoftwareProductConstants.js
+++ b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/SoftwareProductConstants.js
@@ -18,6 +18,7 @@ import keyMirror from 'nfvo-utils/KeyMirror.js';
export const actionTypes = keyMirror({
SOFTWARE_PRODUCT_LOADED: null,
SOFTWARE_PRODUCT_LIST_LOADED: null,
+ ARCHIVED_SOFTWARE_PRODUCT_LIST_LOADED: null,
FINALIZED_SOFTWARE_PRODUCT_LIST_LOADED: null,
SOFTWARE_PRODUCT_LIST_EDIT: null,
SOFTWARE_PRODUCT_CATEGORIES_LOADED: null,
diff --git a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/attachments/SoftwareProductAttachmentsView.jsx b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/attachments/SoftwareProductAttachmentsView.jsx
index 4ced98f314..2a849f376e 100644
--- a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/attachments/SoftwareProductAttachmentsView.jsx
+++ b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/attachments/SoftwareProductAttachmentsView.jsx
@@ -31,8 +31,8 @@ class HeatScreenView extends Component {
setActiveTab: PropTypes.func
};
- componentDidMount() {
- if (!this.props.goToOverview && this.props.candidateInProcess) {
+ componentDidMount() {
+ if (!this.props.goToOverview && this.props.candidateInProcess) {
this.props.setActiveTab({activeTab: tabsMapping.VALIDATION});
}
}
@@ -49,9 +49,9 @@ class HeatScreenView extends Component {
data-test-id='proceed-to-validation-btn'
disabled={!isValidationAvailable}
className='proceed-to-validation-btn'
- onClick={()=>this.validate()}>{i18n('PROCEED TO VALIDATION')}</Button>
- }
- {candidateInProcess && <SVGIcon
+ onClick={()=>this.validate()}>{i18n('PROCEED TO VALIDATION')}</Button>
+ }
+ {candidateInProcess && <SVGIcon
onClick={onUploadAbort}
name='close'
className='icon-component abort-btn'
@@ -59,26 +59,24 @@ class HeatScreenView extends Component {
labelPosition='right'
color='secondary'
data-test-id='abort-btn'/>
- }
-
+ }
{(activeTab === tabsMapping.VALIDATION && softwareProductId) &&
<Button btnType='outline'
data-test-id='go-to-overview'
disabled={this.props.goToOverview !== true}
className='go-to-overview-btn'
onClick={this.props.goToOverview ? () => onGoToOverview({version}) : undefined}>{i18n('GO TO OVERVIEW')}</Button>}
- <div className='separator'></div>
+ <div className='separator'></div>
<SVGIcon
disabled={heatDataExist ? false : true}
name='download'
- className='icon-component'
+ className='icon-component'
color='dark-gray'
onClick={heatDataExist ? () => onDownload({heatCandidate: heatSetup, isReadOnlyMode: isReadOnlyMode || !candidateInProcess, version}) : undefined}
data-test-id='download-heat'/>
-
<SVGIcon
name='upload'
- className='icon-component'
+ className='icon-component'
color='dark-gray'
disabled={isReadOnlyMode || candidateInProcess}
onClick={isReadOnlyMode ? undefined : evt => this.refs.hiddenImportFileInput.click(evt)}
@@ -144,7 +142,6 @@ class HeatScreenView extends Component {
);
}
save() {
-
return this.props.onboardingOrigin === onboardingOriginTypes.ZIP ?
this.props.onSave(this.props.heatSetup, this.props.version) :
Promise.resolve();
diff --git a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/creation/SoftwareProductCreation.js b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/creation/SoftwareProductCreation.js
index 0136048bf7..569b33f999 100644
--- a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/creation/SoftwareProductCreation.js
+++ b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/creation/SoftwareProductCreation.js
@@ -1,5 +1,5 @@
/*!
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright © 2016-2018 European Support Limited
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -25,14 +25,17 @@ import ScreensHelper from 'sdc-app/common/helpers/ScreensHelper.js';
import {enums, screenTypes} from 'sdc-app/onboarding/OnboardingConstants.js';
import PermissionsActionHelper from 'sdc-app/onboarding/permissions/PermissionsActionHelper.js';
-export const mapStateToProps = ({finalizedLicenseModelList, users: {usersList}, softwareProductList, softwareProduct: {softwareProductCreation, softwareProductCategories} }) => {
+export const mapStateToProps = ({finalizedLicenseModelList, users: {usersList}, archivedSoftwareProductList,
+ softwareProductList, finalizedSoftwareProductList, softwareProduct: {softwareProductCreation, softwareProductCategories} }) => {
let {genericFieldInfo} = softwareProductCreation;
let isFormValid = ValidationHelper.checkFormValid(genericFieldInfo);
let VSPNames = {};
- for (let i = 0; i < softwareProductList.length; i++) {
- VSPNames[softwareProductList[i].name.toLowerCase()] = softwareProductList[i].id;
- }
+ const allVspList = [...softwareProductList, ...finalizedSoftwareProductList, ...archivedSoftwareProductList];
+ allVspList.map(item => {
+ VSPNames[item.name.toLowerCase()] = item.id;
+ });
+
return {
data: softwareProductCreation.data,
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 b7ddf134bb..0973537d43 100644
--- a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/details/SoftwareProductDetails.js
+++ b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/details/SoftwareProductDetails.js
@@ -1,5 +1,5 @@
/*!
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright © 2016-2018 European Support Limited
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,15 +14,18 @@
* permissions and limitations under the License.
*/
import {connect} from 'react-redux';
-
+import i18n from 'nfvo-utils/i18n/i18n.js';
import SoftwareProductActionHelper from 'sdc-app/onboarding/softwareProduct/SoftwareProductActionHelper.js';
import SoftwareProductDetailsView from './SoftwareProductDetailsView.jsx';
import ValidationHelper from 'sdc-app/common/helpers/ValidationHelper.js';
import {PRODUCT_QUESTIONNAIRE} from 'sdc-app/onboarding/softwareProduct/SoftwareProductConstants.js';
-
+import {actionTypes as modalActionTypes, modalSizes} from 'nfvo-components/modal/GlobalModalConstants.js';
+import {modalContentMapper} from 'sdc-app/common/modal/ModalContentMapper.js';
+import {forms} from 'sdc-app/onboarding/softwareProduct/SoftwareProductConstants.js';
export const mapStateToProps = ({
finalizedLicenseModelList,
+ archivedLicenseModelList,
softwareProduct,
licenseModel: {licenseAgreement, featureGroup}
}) => {
@@ -44,7 +47,7 @@ export const mapStateToProps = ({
let {qdata, qgenericFieldInfo : qGenericFieldInfo, dataMap} = softwareProductQuestionnaire;
let isFormValid = ValidationHelper.checkFormValid(genericFieldInfo);
-
+ const isVendorArchived = archivedLicenseModelList.find(item => item.id === currentSoftwareProduct.vendorId);
return {
currentSoftwareProduct,
softwareProductCategories,
@@ -56,7 +59,8 @@ export const mapStateToProps = ({
isFormValid,
genericFieldInfo,
qGenericFieldInfo,
- dataMap
+ dataMap,
+ isVendorArchived: !!isVendorArchived
};
};
@@ -67,7 +71,21 @@ export const mapActionsToProps = (dispatch, {version}) => {
onVendorParamChanged: (deltaData, formName) => SoftwareProductActionHelper.softwareProductEditorVendorChanged(dispatch, {deltaData, formName}),
onQDataChanged: (deltaData) => ValidationHelper.qDataChanged(dispatch, {deltaData, qName: PRODUCT_QUESTIONNAIRE}),
onValidityChanged: isValidityData => SoftwareProductActionHelper.setIsValidityData(dispatch, {isValidityData}),
- onSubmit: (softwareProduct, qdata) => SoftwareProductActionHelper.updateSoftwareProduct(dispatch, {softwareProduct, qdata, version})
+ onSubmit: (softwareProduct, qdata) => SoftwareProductActionHelper.updateSoftwareProduct(dispatch, {softwareProduct, qdata, version}),
+ onArchivedVendorRemove: ({onVendorParamChanged, finalizedLicenseModelList, vendorName}) => dispatch({
+ type: modalActionTypes.GLOBAL_MODAL_SHOW,
+ data:{
+ title: i18n('Change Archived VLM'),
+ modalComponentName: modalContentMapper.VENDOR_SELECTOR,
+ modalComponentProps: {
+ size: modalSizes.MEDIUM,
+ finalizedLicenseModelList,
+ vendorName,
+ onClose: () => dispatch({type: modalActionTypes.GLOBAL_MODAL_CLOSE}),
+ onConfirm: (vendorId) => onVendorParamChanged({vendorId}, forms.VENDOR_SOFTWARE_PRODUCT_DETAILS)
+ }
+ }
+ })
};
};
diff --git a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/details/SoftwareProductDetailsVendorSelector.jsx b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/details/SoftwareProductDetailsVendorSelector.jsx
new file mode 100644
index 0000000000..c2a3e0bd02
--- /dev/null
+++ b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/details/SoftwareProductDetailsVendorSelector.jsx
@@ -0,0 +1,78 @@
+/*!
+ * Copyright © 2016-2018 European Support Limited
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+import React from 'react';
+import PropTypes from 'prop-types';
+import i18n from 'nfvo-utils/i18n/i18n.js';
+import Form from 'nfvo-components/input/validation/Form.jsx';
+import Input from 'nfvo-components/input/validation/Input.jsx';
+import sortByStringProperty from 'nfvo-utils/sortByStringProperty.js';
+
+class VendorSelector extends React.Component {
+ static propTypes = {
+ finalizedLicenseModelList: PropTypes.array,
+ vendorName: PropTypes.string,
+ onClose: PropTypes.func.isRequired,
+ onConfirm: PropTypes.func.isRequired
+ }
+ constructor(props){
+ super(props);
+ const selectedValue = props.finalizedLicenseModelList.length ? props.finalizedLicenseModelList[0].id : '';
+ this.state = {
+ selectedValue
+ };
+ }
+ submit() {
+ const vendor = this.props.finalizedLicenseModelList.find(item => item.id === this.state.selectedValue);
+ this.props.onConfirm(vendor.id);
+ this.props.onClose();
+ }
+ render() {
+ const {finalizedLicenseModelList, vendorName, onClose} = this.props;
+ const {selectedValue} = this.state;
+ return (
+ <div className='vsp-details-vendor-select'>
+ <Form
+ onSubmit={() => this.submit()}
+ onReset={() => onClose()}
+ isValid = {!!selectedValue}
+ submitButtonText={i18n('Save')}
+ hasButtons={true}>
+ <div className='vendor-selector-modal-title'>{`${i18n('The VLM')} '${vendorName}' ${i18n('assigned to this VSP is archived')}.`}</div>
+ <div className='vendor-selector-modal-additional-text'>{i18n('If you select a different VLM you will not be able to reselect the archived VLM.')}</div>
+ <Input
+ data-test-id='vsp-vendor-name-select'
+ label={i18n('Vendor')}
+ type='select'
+ onChange={e => {this.setState({
+ selectedValue: e.target.options[e.target.selectedIndex].value
+ });}}
+ value={selectedValue}>
+ <option key='emtyVendor' value=''>{i18n('please select...')}</option>
+ {sortByStringProperty(
+ finalizedLicenseModelList,
+ 'name'
+ ).map(lm => <option key={lm.id} value={lm.id}>{lm.name}</option>)
+ }
+ </Input>
+ </Form>
+ </div>
+ );
+ }
+}
+
+export default VendorSelector;
+
diff --git a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/details/SoftwareProductDetailsView.jsx b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/details/SoftwareProductDetailsView.jsx
index f6199ec83e..24aa319c24 100644
--- a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/details/SoftwareProductDetailsView.jsx
+++ b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/details/SoftwareProductDetailsView.jsx
@@ -1,5 +1,5 @@
/*!
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright © 2016-2018 European Support Limited
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -26,6 +26,22 @@ import GridItem from 'nfvo-components/grid/GridItem.jsx';
import SoftwareProductCategoriesHelper from 'sdc-app/onboarding/softwareProduct/SoftwareProductCategoriesHelper.js';
import {forms} from 'sdc-app/onboarding/softwareProduct/SoftwareProductConstants.js';
+const DeprecatedVlmInfo = ({vendorName, onVendorRemove}) => {
+ return (
+ <div className='depricated-vlm-info'>
+ <Input
+ data-test-id='vsp-vendor-name'
+ isRequired={true}
+ onClick={() => onVendorRemove()}
+ label={i18n('Vendor')}
+ type='select'
+ value={`${vendorName} (Archived)`}>
+ <option key={vendorName} value={`${vendorName} (Archived)`}>{`${vendorName} (Archived)`}</option>
+ </Input>
+ </div>
+ );
+};
+
class GeneralSection extends React.Component {
static propTypes = {
vendorId: PropTypes.string,
@@ -36,7 +52,9 @@ class GeneralSection extends React.Component {
finalizedLicenseModelList: PropTypes.array,
onDataChanged: PropTypes.func.isRequired,
onVendorParamChanged: PropTypes.func.isRequired,
- onSelectSubCategory: PropTypes.func.isRequired
+ onSelectSubCategory: PropTypes.func.isRequired,
+ isVendorArchived: PropTypes.bool,
+ onArchivedVendorRemove: PropTypes.func
};
onVendorParamChanged(e) {
@@ -51,6 +69,10 @@ class GeneralSection extends React.Component {
const subCategory = e.target.options[selectedIndex].value;
this.props.onSelectSubCategory(subCategory);
}
+ onVendorRemove() {
+ const {finalizedLicenseModelList, vendorName, onVendorParamChanged} = this.props;
+ this.props.onArchivedVendorRemove({finalizedLicenseModelList, onVendorParamChanged, vendorName});
+ }
render (){
let {genericFieldInfo} = this.props;
@@ -67,18 +89,21 @@ class GeneralSection extends React.Component {
errorText={genericFieldInfo.name.errorText}
isValid={genericFieldInfo.name.isValid}
onChange={name => name.length <= 25 && this.props.onDataChanged({name}, forms.VENDOR_SOFTWARE_PRODUCT_DETAILS)}/>
- <Input
- data-test-id='vsp-vendor-name'
- label={i18n('Vendor')}
- type='select'
- value={this.props.vendorId}
- onChange={e => this.onVendorParamChanged(e)}>
- {sortByStringProperty(
- this.props.finalizedLicenseModelList,
- 'name'
- ).map(lm => <option key={lm.id} value={lm.id}>{lm.name}</option>)
- }
- </Input>
+ {this.props.isVendorArchived ?
+ <DeprecatedVlmInfo onVendorRemove={()=>this.onVendorRemove()} vendorName={this.props.vendorName} /> :
+ <Input
+ data-test-id='vsp-vendor-name'
+ label={i18n('Vendor')}
+ type='select'
+ value={this.props.vendorId}
+ onChange={e => this.onVendorParamChanged(e)}>
+ {sortByStringProperty(
+ this.props.finalizedLicenseModelList,
+ 'name'
+ ).map(lm => <option key={lm.id} value={lm.id}>{lm.name}</option>)
+ }
+ </Input>
+ }
<Input
data-test-id='vsp-category-name'
label={i18n('Category')}
@@ -127,7 +152,8 @@ class LicensesSection extends React.Component {
onFeatureGroupsChanged: PropTypes.func.isRequired,
onLicensingDataChanged: PropTypes.func.isRequired,
featureGroupsList: PropTypes.array,
- licenseAgreementList: PropTypes.array
+ licenseAgreementList: PropTypes.array,
+ isVendorArchived: PropTypes.bool
};
onVendorParamChanged(e) {
@@ -151,6 +177,7 @@ class LicensesSection extends React.Component {
onChange={e => this.onVendorParamChanged(e)}
value={this.props.licensingVersion || ''}
label={i18n('Licensing Version')}
+ disabled={this.props.isVendorArchived}
type='select'>
{this.props.licensingVersionsList.map(version =>
<option
@@ -165,6 +192,7 @@ class LicensesSection extends React.Component {
data-test-id='vsp-license-agreement'
label={i18n('License Agreement')}
type='select'
+ disabled={this.props.isVendorArchived}
value={this.props.licensingData.licenseAgreement ? this.props.licensingData.licenseAgreement : '' }
onChange={(e) => this.onLicensingDataChanged(e)}>
<option key='placeholder' value=''>{i18n('Select...')}</option>
@@ -178,6 +206,7 @@ class LicensesSection extends React.Component {
type='select'
isMultiSelect={true}
onInputChange={()=>{}}
+ disabled={this.props.isVendorArchived}
onEnumChange={featureGroups => this.props.onFeatureGroupsChanged({featureGroups})}
multiSelectedEnum={this.props.licensingData.featureGroups}
name='feature-groups'
@@ -295,8 +324,8 @@ class SoftwareProductDetails extends Component {
};
prepareDataForGeneralSection(){
- let {softwareProductCategories, finalizedLicenseModelList, onDataChanged, currentSoftwareProduct, genericFieldInfo} = this.props;
- let {name, description, vendorId, subCategory} = currentSoftwareProduct;
+ let {softwareProductCategories, finalizedLicenseModelList, onDataChanged, currentSoftwareProduct, genericFieldInfo, isVendorArchived, onArchivedVendorRemove} = this.props;
+ let {name, description, vendorId, subCategory, vendorName} = currentSoftwareProduct;
return {
name,
description,
@@ -307,13 +336,16 @@ class SoftwareProductDetails extends Component {
onDataChanged,
onVendorParamChanged: args => this.onVendorParamChanged(args),
onSelectSubCategory: args => this.onSelectSubCategory(args),
- genericFieldInfo
+ genericFieldInfo,
+ vendorName,
+ isVendorArchived,
+ onArchivedVendorRemove
};
}
prepareDataForLicensesSection(){
- let { featureGroupsList, licenseAgreementList, currentSoftwareProduct } = this.props;
+ let { featureGroupsList, licenseAgreementList, currentSoftwareProduct, isVendorArchived} = this.props;
let {vendorId, licensingVersion, licensingData = {}} = currentSoftwareProduct;
return {
onVendorParamChanged: args => this.onVendorParamChanged(args),
@@ -325,6 +357,7 @@ class SoftwareProductDetails extends Component {
onLicensingDataChanged: args => this.onLicensingDataChanged(args),
featureGroupsList,
licenseAgreementList,
+ isVendorArchived
};
}
@@ -356,11 +389,17 @@ class SoftwareProductDetails extends Component {
}
onVendorParamChanged({vendorId, licensingVersion}) {
+
let {finalizedLicenseModelList, onVendorParamChanged} = this.props;
if(!licensingVersion) {
const licensingVersionsList = this.buildLicensingVersionsListItems();
licensingVersion = licensingVersionsList[0].enum;
}
+
+ if (!vendorId) {
+ vendorId = finalizedLicenseModelList[0].id;
+ }
+
let vendorName = finalizedLicenseModelList.find(licenseModelItem => licenseModelItem.id === vendorId).name || '';
let deltaData = {
vendorId,
diff --git a/openecomp-ui/src/sdc-app/onboarding/userNotifications/UserNotifications.jsx b/openecomp-ui/src/sdc-app/onboarding/userNotifications/UserNotifications.jsx
index 635dfa701f..fd5c04db92 100644
--- a/openecomp-ui/src/sdc-app/onboarding/userNotifications/UserNotifications.jsx
+++ b/openecomp-ui/src/sdc-app/onboarding/userNotifications/UserNotifications.jsx
@@ -54,7 +54,10 @@ const Notification = ({notification, users, onActionClicked, getNotificationType
</div>
<div className='notification-action'>
<div className={classnames('action-button', {'hidden': read})} onClick={() => onActionClicked(notification)}>
- {eventType === notificationType.PERMISSION_CHANGED ? i18n('OK') : i18n('Sync')}
+ {eventType === notificationType.PERMISSION_CHANGED
+ || eventType === notificationType.ITEM_DELETED
+ || eventType === notificationType.ITEM_ARCHIVED
+ || eventType === notificationType.ITEM_RESTORED ? i18n('OK') : i18n('Sync')}
</div>
</div>
</div>
@@ -64,11 +67,18 @@ const Notification = ({notification, users, onActionClicked, getNotificationType
function getNotificationTypeDesc(eventType, permission, granted) {
switch (eventType) {
case notificationType.PERMISSION_CHANGED:
- return i18n('Permission {granted}: {permission}', {granted: granted ? 'Granted' : 'Taken', permission: permission});
+ const grantedStr = granted ? i18n('Granted') : i18n('Taken');
+ return `${i18n('Permission')} ${grantedStr}: ${permission}`;
case notificationType.ITEM_CHANGED.COMMIT:
return i18n('Your Copy Is Out Of Sync');
case notificationType.ITEM_CHANGED.SUBMIT:
return i18n('Version Submitted');
+ case notificationType.ITEM_DELETED:
+ return i18n('Item was deleted');
+ case notificationType.ITEM_ARCHIVED:
+ return i18n('Item was archived');
+ case notificationType.ITEM_RESTORED:
+ return i18n('Item was restored from archive');
}
}
@@ -106,8 +116,11 @@ class UserNotifications extends React.Component {
onActionClicked(notification) {
const {onSync, updateNotification, currentScreen, onLoadItemsLists} = this.props;
- const {eventType, eventAttributes: {itemId, itemName, versionId, versionName}} = notification;
- if(eventType !== notificationType.PERMISSION_CHANGED) {
+ const {eventType, eventAttributes: {itemId, itemName, versionId, versionName}} = notification;
+ if(eventType !== notificationType.PERMISSION_CHANGED &&
+ eventType !== notificationType.ITEM_DELETED &&
+ eventType !== notificationType.ITEM_ARCHIVED &&
+ eventType !== notificationType.ITEM_RESTORED) {
onSync({itemId, itemName, versionId, versionName, currentScreen});
}
else {
diff --git a/openecomp-ui/src/sdc-app/onboarding/userNotifications/UserNotificationsConstants.js b/openecomp-ui/src/sdc-app/onboarding/userNotifications/UserNotificationsConstants.js
index f006b5ae1b..a8e92e29fd 100644
--- a/openecomp-ui/src/sdc-app/onboarding/userNotifications/UserNotificationsConstants.js
+++ b/openecomp-ui/src/sdc-app/onboarding/userNotifications/UserNotificationsConstants.js
@@ -15,5 +15,8 @@ export const notificationType = keyMirror({
ITEM_CHANGED: {
COMMIT: 'commit',
SUBMIT: 'submit'
- }
+ },
+ ITEM_DELETED: 'delete',
+ ITEM_ARCHIVED: 'archive',
+ ITEM_RESTORED: 'restore'
}); \ No newline at end of file
diff --git a/openecomp-ui/src/sdc-app/onboarding/versionsPage/VersionsPage.js b/openecomp-ui/src/sdc-app/onboarding/versionsPage/VersionsPage.js
index 7b6f27307d..0fd0eabd86 100644
--- a/openecomp-ui/src/sdc-app/onboarding/versionsPage/VersionsPage.js
+++ b/openecomp-ui/src/sdc-app/onboarding/versionsPage/VersionsPage.js
@@ -1,5 +1,5 @@
/*!
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright © 2016-2018 European Support Limited
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -24,11 +24,11 @@ import VersionsPageView from './VersionsPage.jsx';
export const mapStateToProps = ({
users: {userInfo},
versionsPage: {permissions, versionsList},
- currentScreen: {itemPermission: {isCollaborator}, props: {itemId}},
+ currentScreen: {itemPermission: {isCollaborator, isArchived}, props: {itemId}},
softwareProductList = []
}) => {
- let {versions, selectedVersion} = versionsList;
+ let {versions = [], selectedVersion} = versionsList;
let {owner, contributors, viewers} = permissions;
// sorting the version list
@@ -40,8 +40,7 @@ export const mapStateToProps = ({
return statusCompare;
}
- });
-
+ });
const curentSoftwareProduct = softwareProductList.find(item => item.id === itemId);
return {
versions,
@@ -51,7 +50,8 @@ export const mapStateToProps = ({
currentUser: userInfo,
selectedVersion,
isCollaborator,
- isManual: curentSoftwareProduct && curentSoftwareProduct.onboardingMethod === onboardingMethodType.MANUAL
+ isManual: curentSoftwareProduct && curentSoftwareProduct.onboardingMethod === onboardingMethodType.MANUAL,
+ isArchived
};
};
@@ -80,7 +80,9 @@ export const mapActionsToProps = (dispatch, {itemType, itemId, additionalProps})
onModalNodeClick({version}) {
VersionsPageActionHelper.selectVersionFromModal(dispatch, {version});
- }
+ },
+ onArchive: () => VersionsPageActionHelper.archiveItem(dispatch, itemId),
+ onRestore: () => VersionsPageActionHelper.restoreItemFromArchive(dispatch, itemId)
};
};
diff --git a/openecomp-ui/src/sdc-app/onboarding/versionsPage/VersionsPage.jsx b/openecomp-ui/src/sdc-app/onboarding/versionsPage/VersionsPage.jsx
index 69a34e0a1c..f8417fafbf 100644
--- a/openecomp-ui/src/sdc-app/onboarding/versionsPage/VersionsPage.jsx
+++ b/openecomp-ui/src/sdc-app/onboarding/versionsPage/VersionsPage.jsx
@@ -1,5 +1,5 @@
/*!
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright © 2016-2018 European Support Limited
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -18,7 +18,26 @@ import VersionList from './components/VersionList.jsx';
import PermissionsView from './components/PermissionsView.jsx';
import Tree from 'nfvo-components/tree/Tree.jsx';
import SVGIcon from 'sdc-ui/lib/react/SVGIcon.js';
+import Button from 'sdc-ui/lib/react/Button.js';
import i18n from 'nfvo-utils/i18n/i18n.js';
+import featureToggle from 'sdc-app/features/featureToggle.js';
+
+const DepricateButton = ({depricateAction, title}) => (
+ <div className='depricate-btn-wrapper'>
+ <Button data-test-id='depricate-action-btn' className='depricate-btn' onClick={depricateAction}>{title}</Button>
+ </div>
+);
+
+const FeatureDepricatedButton = featureToggle('ARCHIVE_ITEM')(DepricateButton);
+
+const VersionPageTitle = ({itemName, depricatedTitle, isArchived, onRestore, onArchive}) => {
+ return (
+ <div className='version-page-header'>
+ <div className='versions-page-title'>{`${i18n('Available Versions')} - ${itemName} ${depricatedTitle}`}</div>
+ <FeatureDepricatedButton depricateAction={isArchived ? () => onRestore() : () => onArchive() } title={i18n(isArchived ? 'RESTORE' : 'ARCHIVE')}/>
+ </div>
+ );
+};
class VersionsPage extends React.Component {
state = {
@@ -26,10 +45,16 @@ class VersionsPage extends React.Component {
}
render() {
let { versions, owner, contributors, currentUser, isCollaborator, itemName = '', viewers, onSelectVersion, onNavigateToVersion,
- onTreeFullScreen, onManagePermissions, onCreateVersion, selectedVersion, onModalNodeClick, isManual} = this.props;
+ onTreeFullScreen, onManagePermissions, onCreateVersion, selectedVersion, onModalNodeClick, isManual, isArchived, onArchive, onRestore} = this.props;
+ const depricatedTitle = isArchived ? i18n('(Archived)') : '';
return (
<div className='versions-page-view'>
- <div className='versions-page-title'>{i18n('Available Versions - {itemName}', {itemName: itemName})}</div>
+ <VersionPageTitle
+ itemName={itemName}
+ depricatedTitle={depricatedTitle}
+ onArchive={onArchive}
+ isArchived={isArchived}
+ onRestore={onRestore}/>
<PermissionsView
owner={owner}
contributors={contributors}
@@ -65,7 +90,7 @@ class VersionsPage extends React.Component {
versions={versions}
onSelectVersion={onSelectVersion}
onNavigateToVersion={onNavigateToVersion}
- onCreateVersion={onCreateVersion}
+ onCreateVersion={isArchived ? false : onCreateVersion}
selectedVersion={selectedVersion}
isCollaborator={isCollaborator} />
</div>
diff --git a/openecomp-ui/src/sdc-app/onboarding/versionsPage/VersionsPageActionHelper.js b/openecomp-ui/src/sdc-app/onboarding/versionsPage/VersionsPageActionHelper.js
index edf30fe4ef..d475c03c31 100644
--- a/openecomp-ui/src/sdc-app/onboarding/versionsPage/VersionsPageActionHelper.js
+++ b/openecomp-ui/src/sdc-app/onboarding/versionsPage/VersionsPageActionHelper.js
@@ -1,5 +1,5 @@
/*!
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright © 2016-2018 European Support Limited
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -85,6 +85,22 @@ const VersionsPageActionHelper = {
type: modalActionTypes.GLOBAL_MODAL_CLOSE
});
this.selectVersion(dispatch, {version});
+ },
+
+ archiveItem(dispatch, itemId) {
+ ItemsHelper.archiveItem(itemId).then(() => {
+ ScreensHelper.loadScreen(dispatch, {
+ screen: enums.SCREEN.ONBOARDING_CATALOG
+ });
+ });
+ },
+
+ restoreItemFromArchive(dispatch, itemId) {
+ ItemsHelper.restoreItem(itemId).then(() => {
+ ScreensHelper.loadScreen(dispatch, {
+ screen: enums.SCREEN.ONBOARDING_CATALOG
+ });
+ });
}
};
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 f209d80125..47255eb9dc 100644
--- a/openecomp-ui/src/sdc-app/onboarding/versionsPage/components/VersionList.jsx
+++ b/openecomp-ui/src/sdc-app/onboarding/versionsPage/components/VersionList.jsx
@@ -1,5 +1,5 @@
/*!
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright © 2016-2018 European Support Limited
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -87,20 +87,18 @@ const VersionListItem = ({ data, onSelectVersion, onNavigateToVersion, onCreateV
labelPosition='right' />
</div>
<div className='version-item-field item-create'>
- {!isHeader && isCollaborator && additionalInfo.OptionalCreationMethods.length > 0 &&
+ {!isHeader && isCollaborator && additionalInfo.OptionalCreationMethods.length > 0 && onCreateVersion &&
<SVGIcon
name='plus-circle'
data-test-id='versions-page-create-version'
onClick={e => { e.stopPropagation(); onCreateVersion(); }}
label={i18n('Create New Version')}
labelPosition='right'
- disabled={!isCollaborator} />
+ disabled={!isCollaborator || !onCreateVersion} />
}
</div>
</div>
}
-
-
</div>
);
@@ -118,7 +116,7 @@ const VersionList = ({ versions, onSelectVersion, onNavigateToVersion, onCreateV
data={version}
onSelectVersion={() => onSelectVersion({version})}
onNavigateToVersion={() => onNavigateToVersion({version})}
- onCreateVersion={() => onCreateVersion({version})}
+ onCreateVersion={onCreateVersion ? () => onCreateVersion({version}) : false}
isSelected={selectedVersion === version.id}
isCollaborator={isCollaborator} />
)}