summaryrefslogtreecommitdiffstats
path: root/openecomp-ui
diff options
context:
space:
mode:
authorsvishnev <shlomo-stanisla.vishnevetskiy@amdocs.com>2018-05-24 13:20:51 +0300
committerEinav Keidar <einavw@amdocs.com>2018-05-24 12:01:09 +0000
commit7c727c1a2bc672f20e87260ad3dc9c33ca31bbd4 (patch)
tree5d14fd827b96058e8478a023fa567dbefe02531f /openecomp-ui
parentbc65a048ed742cfa3457b8159a5c5c316341d594 (diff)
Healing process flow integration
Issue-ID: SDC-1360 Change-Id: I4d786b53b4357901d10e041c31145b7b1b065725 Signed-off-by: svishnev <shlomo-stanisla.vishnevetskiy@amdocs.com>
Diffstat (limited to 'openecomp-ui')
-rw-r--r--openecomp-ui/package.json38
-rw-r--r--openecomp-ui/resources/scss/onboarding.scss9
-rw-r--r--openecomp-ui/src/nfvo-components/notification/Notifications.js68
-rw-r--r--openecomp-ui/src/nfvo-components/notification/NotificationsConstants.js66
-rw-r--r--openecomp-ui/src/nfvo-components/notification/NotificationsMiddleware.js33
-rw-r--r--openecomp-ui/src/nfvo-components/notification/NotificationsReducer.js28
-rw-r--r--openecomp-ui/src/nfvo-utils/i18n/en.json3
-rw-r--r--openecomp-ui/src/sdc-app/AppStore.js5
-rw-r--r--openecomp-ui/src/sdc-app/Application.jsx4
-rw-r--r--openecomp-ui/src/sdc-app/Reducers.js7
-rw-r--r--openecomp-ui/src/sdc-app/onboarding/OnboardingActionHelper.js91
-rw-r--r--openecomp-ui/src/sdc-app/onboarding/softwareProduct/SoftwareProduct.js11
-rw-r--r--openecomp-ui/src/sdc-app/onboarding/softwareProduct/attachments/SoftwareProductAttachments.js6
-rw-r--r--openecomp-ui/src/sdc-app/onboarding/softwareProduct/landingPage/SoftwareProductLandingPage.js4
-rw-r--r--openecomp-ui/src/sdc-app/onboarding/softwareProduct/landingPage/SoftwareProductLandingPageView.jsx8
-rw-r--r--openecomp-ui/yarn.lock24
16 files changed, 346 insertions, 59 deletions
diff --git a/openecomp-ui/package.json b/openecomp-ui/package.json
index 824a814c60..28b6b521e7 100644
--- a/openecomp-ui/package.json
+++ b/openecomp-ui/package.json
@@ -11,17 +11,13 @@
"static-keys-bundle": "gulp static-keys-bundle",
"check-keys-against-bundles": "gulp static-keys-bundle-with-report",
"test": "jest",
- "test-failedTestReport":
- "jest --json | node test-utils/failedTestReport.js",
+ "test-failedTestReport": "jest --json | node test-utils/failedTestReport.js",
"test-dev": "jest --watch",
- "test-coverage":
- "jest --coverage && start ./coverage/lcov-report/index.html",
+ "test-coverage": "jest --coverage && start ./coverage/lcov-report/index.html",
"test-build": "jest --coverage",
- "storybook":
- "start-storybook -p 9090 -c .storybook -s .storybook/fonts",
+ "storybook": "start-storybook -p 9090 -c .storybook -s .storybook/fonts",
"storyshots": "jest storyshots.test.js",
- "build-storybook":
- "build-storybook -c .storybook -o .storybook-dist && gulp copy-storybook-fonts",
+ "build-storybook": "build-storybook -c .storybook -o .storybook-dist && gulp copy-storybook-fonts",
"lint-fix": "eslint --fix --ext .js --ext .jsx src"
},
"dependencies": {
@@ -52,8 +48,9 @@
"react-select": "1.2.1",
"react-show-more": "^1.1.1",
"react-sortable": "^1.2.0",
+ "react-transition-group": "^2.3.1",
"redux": "^3.7.2",
- "sdc-ui": "1.6.32",
+ "sdc-ui": "1.6.43",
"uuid-js": "^0.7.5",
"validator": "^4.3.0"
},
@@ -125,12 +122,10 @@
},
"jest": {
"moduleNameMapper": {
- "\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$":
- "<rootDir>/test-utils/fileMock.js",
+ "\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/test-utils/fileMock.js",
"\\.(css|scss)$": "<rootDir>/test-utils/styleMock.js",
"^nfvo-utils/RestAPIUtil.js$": "<rootDir>/test-utils/MockRest.js",
- "^sdc-ui/lib/react/SVGIcon.js$":
- "<rootDir>/test-utils/MockSVGIcon.js",
+ "^sdc-ui/lib/react/SVGIcon.js$": "<rootDir>/test-utils/MockSVGIcon.js",
"^react-show-more$": "<rootDir>/test-utils/ShowMore.js",
"^nfvo-utils(.*)$": "<rootDir>/src/nfvo-utils$1",
"^nfvo-components(.*)$": "<rootDir>/src/nfvo-components$1",
@@ -142,14 +137,23 @@
"globals": {
"DEBUG": false
},
- "setupFiles": ["<rootDir>/test-utils/test-env-setup.js"],
+ "setupFiles": [
+ "<rootDir>/test-utils/test-env-setup.js"
+ ],
"setupTestFrameworkScriptFile": "<rootDir>/test-utils/test-setup.js",
"testPathIgnorePatterns": [
"<rootDir>/node_modules/",
"<rootDir>/test/nfvo-components/storyshots.test.js"
],
- "collectCoverageFrom": ["src/**/*.{js,jsx}"],
- "coveragePathIgnorePatterns": ["/node_modules/", "(.)*.stories.js"],
- "coverageReporters": ["lcov"]
+ "collectCoverageFrom": [
+ "src/**/*.{js,jsx}"
+ ],
+ "coveragePathIgnorePatterns": [
+ "/node_modules/",
+ "(.)*.stories.js"
+ ],
+ "coverageReporters": [
+ "lcov"
+ ]
}
}
diff --git a/openecomp-ui/resources/scss/onboarding.scss b/openecomp-ui/resources/scss/onboarding.scss
index 7748b07019..d44674fb42 100644
--- a/openecomp-ui/resources/scss/onboarding.scss
+++ b/openecomp-ui/resources/scss/onboarding.scss
@@ -210,3 +210,12 @@ div[data-reactroot].tooltip {
}
}
}
+
+/* Out of namespace context for notifications */
+.onboarding-notifications-container {
+ position: absolute;
+ &.position-top-right {
+ right: 30px;
+ top: 50px;
+ }
+}
diff --git a/openecomp-ui/src/nfvo-components/notification/Notifications.js b/openecomp-ui/src/nfvo-components/notification/Notifications.js
new file mode 100644
index 0000000000..046412a68d
--- /dev/null
+++ b/openecomp-ui/src/nfvo-components/notification/Notifications.js
@@ -0,0 +1,68 @@
+/*
+ * 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 { Portal, Notification } from 'sdc-ui/lib/react/';
+import { connect } from 'react-redux';
+import { removeNotification } from './NotificationsConstants.js';
+import { CSSTransition, TransitionGroup } from 'react-transition-group';
+
+export const mapStateToProps = ({ popupNotifications = [] }) => {
+ return {
+ notifications: popupNotifications
+ };
+};
+
+const mapActionToProps = dispatch => {
+ return {
+ onClick: item => {
+ dispatch(removeNotification(item));
+ }
+ };
+};
+
+class Notifications extends React.Component {
+ render() {
+ const { notifications, onClick } = this.props;
+
+ return (
+ <Portal>
+ <div className="onboarding-notifications-container position-top-right">
+ <TransitionGroup>
+ {notifications.map(item => (
+ <CSSTransition
+ in={true}
+ timeout={500}
+ unmountOnExit
+ classNames="react-transition"
+ key={`notification-transition-${item.id}`}>
+ <Notification
+ key={item.id}
+ type={item.type}
+ title={item.title}
+ message={item.message}
+ onClick={() => onClick(item)}
+ />
+ </CSSTransition>
+ ))}
+ </TransitionGroup>
+ </div>
+ </Portal>
+ );
+ }
+}
+
+export default connect(mapStateToProps, mapActionToProps, null)(Notifications);
diff --git a/openecomp-ui/src/nfvo-components/notification/NotificationsConstants.js b/openecomp-ui/src/nfvo-components/notification/NotificationsConstants.js
new file mode 100644
index 0000000000..329c557cb0
--- /dev/null
+++ b/openecomp-ui/src/nfvo-components/notification/NotificationsConstants.js
@@ -0,0 +1,66 @@
+/*
+ * 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 UUID from 'uuid-js';
+
+export const actionTypes = {
+ ADD_NOTIFICATION: 'ADD_NOTIFICATION',
+ REMOVE_NOTIFICATION: 'REMOVE_NOTIFICATION'
+};
+
+export const notificationActions = {
+ showNotification: item => ({
+ type: actionTypes.ADD_NOTIFICATION,
+ payload: {
+ ...item,
+ id: UUID.create().toString()
+ }
+ }),
+
+ showSuccess: ({ title, message, timeout }) =>
+ notificationActions.showNotification({
+ title,
+ message,
+ timeout,
+ type: 'success'
+ }),
+ showInfo: ({ title, message, timeout }) =>
+ notificationActions.showNotification({
+ title,
+ message,
+ timeout,
+ type: 'info'
+ }),
+ showWarning: ({ title, message, timeout }) =>
+ notificationActions.showNotification({
+ title,
+ message,
+ timeout,
+ type: 'warning'
+ }),
+ showError: ({ title, message, timeout }) =>
+ notificationActions.showNotification({
+ title,
+ message,
+ timeout,
+ type: 'error'
+ }),
+ removeNotification: item => ({
+ type: actionTypes.REMOVE_NOTIFICATION,
+ payload: item
+ })
+};
+
+export const notificationTimeout = 4000;
diff --git a/openecomp-ui/src/nfvo-components/notification/NotificationsMiddleware.js b/openecomp-ui/src/nfvo-components/notification/NotificationsMiddleware.js
new file mode 100644
index 0000000000..f32f20bc50
--- /dev/null
+++ b/openecomp-ui/src/nfvo-components/notification/NotificationsMiddleware.js
@@ -0,0 +1,33 @@
+/*
+ * 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,
+ notificationActions,
+ notificationTimeout
+} from './NotificationsConstants.js';
+
+const notifications = store => next => action => {
+ if (action.type === actionTypes.ADD_NOTIFICATION) {
+ const { timeout, ...data } = action.payload;
+ const interval = timeout || notificationTimeout;
+ setTimeout(() => {
+ store.dispatch(notificationActions.removeNotification(data));
+ }, interval);
+ }
+ return next(action);
+};
+
+export default notifications;
diff --git a/openecomp-ui/src/nfvo-components/notification/NotificationsReducer.js b/openecomp-ui/src/nfvo-components/notification/NotificationsReducer.js
new file mode 100644
index 0000000000..9b97381c22
--- /dev/null
+++ b/openecomp-ui/src/nfvo-components/notification/NotificationsReducer.js
@@ -0,0 +1,28 @@
+/*
+ * 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 './NotificationsConstants';
+
+export default (state = [], action) => {
+ switch (action.type) {
+ case actionTypes.ADD_NOTIFICATION:
+ return [...state, action.payload];
+
+ case actionTypes.REMOVE_NOTIFICATION:
+ return state.filter(item => item.id !== action.payload.id);
+ default:
+ return state;
+ }
+};
diff --git a/openecomp-ui/src/nfvo-utils/i18n/en.json b/openecomp-ui/src/nfvo-utils/i18n/en.json
index 10ddb4202e..d02904d90a 100644
--- a/openecomp-ui/src/nfvo-utils/i18n/en.json
+++ b/openecomp-ui/src/nfvo-utils/i18n/en.json
@@ -364,7 +364,8 @@
"Contributor": "Contributor",
"Active Items": "Active Items",
"Archived Items": "Archived Items",
-
+ "This is the current version of the VSP, as a result of healing": "This is the current version of the VSP, as a result of healing",
+
"VendorSoftwareProduct": "VSP",
"VendorSoftwareProduct/category": "Category",
"VendorSoftwareProduct/description": "Description",
diff --git a/openecomp-ui/src/sdc-app/AppStore.js b/openecomp-ui/src/sdc-app/AppStore.js
index 5cab6ae561..db47650723 100644
--- a/openecomp-ui/src/sdc-app/AppStore.js
+++ b/openecomp-ui/src/sdc-app/AppStore.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.
@@ -17,6 +17,7 @@
import { createStore, applyMiddleware, compose } from 'redux';
import Reducers from './Reducers.js';
import filterUpdater from 'sdc-app/onboarding/onboard/filter/FilterMiddleware.js';
+import notifications from 'nfvo-components/notification/NotificationsMiddleware.js';
const thunk = store => next => action =>
typeof action === 'function'
@@ -29,7 +30,7 @@ export const storeCreator = initialState =>
createStore(
Reducers,
initialState,
- composeEnhancers(applyMiddleware(thunk, filterUpdater))
+ composeEnhancers(applyMiddleware(thunk, filterUpdater, notifications))
);
const store = storeCreator();
diff --git a/openecomp-ui/src/sdc-app/Application.jsx b/openecomp-ui/src/sdc-app/Application.jsx
index abebb6d89a..f96bd73c21 100644
--- a/openecomp-ui/src/sdc-app/Application.jsx
+++ b/openecomp-ui/src/sdc-app/Application.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.
@@ -17,6 +17,7 @@ import React from 'react';
import PropTypes from 'prop-types';
import { Provider } from 'react-redux';
import GlobalModal from 'nfvo-components/modal/GlobalModal.js';
+import Notifications from 'nfvo-components/notification/Notifications.js';
import Loader from 'nfvo-components/loader/Loader.jsx';
import WebSocketUtil from 'nfvo-utils/WebSocketUtil.js';
import UserNotificationsActionHelper from 'sdc-app/onboarding/userNotifications/UserNotificationsActionHelper.js';
@@ -44,6 +45,7 @@ class Application extends React.Component {
<Provider store={store}>
<div>
<GlobalModal />
+ <Notifications />
{this.props.children}
<Loader />
</div>
diff --git a/openecomp-ui/src/sdc-app/Reducers.js b/openecomp-ui/src/sdc-app/Reducers.js
index 9f424235cb..684c20c878 100644
--- a/openecomp-ui/src/sdc-app/Reducers.js
+++ b/openecomp-ui/src/sdc-app/Reducers.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.
@@ -20,7 +20,7 @@ import flowsReducersMap from './flows/FlowsReducersMap.js';
import loaderReducer from 'nfvo-components/loader/LoaderReducer.js';
import globalModalReducer from 'nfvo-components/modal/GlobalModalReducer.js';
import notificationsReducer from 'sdc-app/onboarding/userNotifications/NotificationsReducer.js';
-
+import { default as popupNotifications } from 'nfvo-components/notification/NotificationsReducer.js';
export default combineReducers({
// on-boarding reducers
...onBoardingReducersMap,
@@ -29,5 +29,6 @@ export default combineReducers({
...flowsReducersMap,
modal: globalModalReducer,
loader: loaderReducer,
- notifications: notificationsReducer
+ notifications: notificationsReducer,
+ popupNotifications
});
diff --git a/openecomp-ui/src/sdc-app/onboarding/OnboardingActionHelper.js b/openecomp-ui/src/sdc-app/onboarding/OnboardingActionHelper.js
index b8ce714bce..b9ffdc3076 100644
--- a/openecomp-ui/src/sdc-app/onboarding/OnboardingActionHelper.js
+++ b/openecomp-ui/src/sdc-app/onboarding/OnboardingActionHelper.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.
@@ -47,6 +47,8 @@ import { tabsMapping as attachmentsTabsMapping } from 'sdc-app/onboarding/softwa
import SoftwareProductAttachmentsActionHelper from 'sdc-app/onboarding/softwareProduct/attachments/SoftwareProductAttachmentsActionHelper.js';
import { actionTypes as filterActionTypes } from './onboard/filter/FilterConstants.js';
import FeaturesActionHelper from 'sdc-app/features/FeaturesActionHelper.js';
+import { notificationActions } from 'nfvo-components/notification/NotificationsConstants.js';
+import i18n from 'nfvo-utils/i18n/i18n.js';
function setCurrentScreen(dispatch, screen, props = {}) {
dispatch({
@@ -208,37 +210,82 @@ const OnboardingActionHelper = {
status
});
},
+ async getUpdatedSoftwareProduct(dispatch, { softwareProductId, version }) {
+ const response = await SoftwareProductActionHelper.fetchSoftwareProduct(
+ dispatch,
+ {
+ softwareProductId,
+ version
+ }
+ );
+ let newResponse = false;
+ let newVersion = false;
+ // checking if there was healing and a new version should be open
+ if (response[0].version !== version.id) {
+ newResponse = await SoftwareProductActionHelper.fetchSoftwareProduct(
+ dispatch,
+ {
+ softwareProductId,
+ version: { ...version, id: response[0].version }
+ }
+ );
+ newVersion = await ItemsHelper.fetchVersion({
+ itemId: softwareProductId,
+ versionId: response[0].version
+ });
- navigateToSoftwareProductLandingPage(
+ dispatch(
+ notificationActions.showInfo({
+ message: i18n(
+ 'This is the current version of the VSP, as a result of healing'
+ )
+ })
+ );
+ }
+ return Promise.resolve(
+ newResponse
+ ? { softwareProduct: newResponse[0], newVersion }
+ : { softwareProduct: response[0], newVersion: version }
+ );
+ },
+ async navigateToSoftwareProductLandingPage(
dispatch,
{ softwareProductId, version, status }
) {
SoftwareProductComponentsActionHelper.clearComponentsStore(dispatch);
+ /**
+ * TODO remove when Filter toggle will be removed
+ */
LicenseModelActionHelper.fetchFinalizedLicenseModels(dispatch);
- SoftwareProductActionHelper.fetchSoftwareProduct(dispatch, {
+
+ const {
+ softwareProduct,
+ newVersion
+ } = await this.getUpdatedSoftwareProduct(dispatch, {
softwareProductId,
version
- }).then(response => {
- let { vendorId: licenseModelId, licensingVersion } = response[0];
- SoftwareProductActionHelper.loadSoftwareProductDetailsData(
- dispatch,
- { licenseModelId, licensingVersion }
- );
- SoftwareProductComponentsActionHelper.fetchSoftwareProductComponents(
- dispatch,
- { softwareProductId, version: version }
- );
- if (response[0].onboardingOrigin === onboardingOriginTypes.ZIP) {
- SoftwareProductActionHelper.loadSoftwareProductHeatCandidate(
- dispatch,
- { softwareProductId, version: version }
- );
- }
- setCurrentScreen(
+ });
+
+ let { vendorId: licenseModelId, licensingVersion } = softwareProduct;
+ SoftwareProductActionHelper.loadSoftwareProductDetailsData(dispatch, {
+ licenseModelId,
+ licensingVersion
+ });
+ SoftwareProductComponentsActionHelper.fetchSoftwareProductComponents(
+ dispatch,
+ { softwareProductId, version: newVersion }
+ );
+ if (softwareProduct.onboardingOrigin === onboardingOriginTypes.ZIP) {
+ SoftwareProductActionHelper.loadSoftwareProductHeatCandidate(
dispatch,
- enums.SCREEN.SOFTWARE_PRODUCT_LANDING_PAGE,
- { softwareProductId, licenseModelId, version, status }
+ { softwareProductId, version: newVersion }
);
+ }
+ setCurrentScreen(dispatch, enums.SCREEN.SOFTWARE_PRODUCT_LANDING_PAGE, {
+ softwareProductId,
+ licenseModelId,
+ version: newVersion,
+ status
});
},
diff --git a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/SoftwareProduct.js b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/SoftwareProduct.js
index db3cc04f76..d3d7b96a5d 100644
--- a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/SoftwareProduct.js
+++ b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/SoftwareProduct.js
@@ -127,7 +127,8 @@ const buildNavigationBarProps = ({
screen,
componentId,
componentsList,
- mapOfExpandedIds
+ mapOfExpandedIds,
+ isCertified
}) => {
const {
softwareProductEditor: { data: currentSoftwareProduct = {} }
@@ -235,7 +236,7 @@ const buildNavigationBarProps = ({
return {
activeItemId,
groups,
- disabled: !!candidateOnboardingOrigin
+ disabled: !!candidateOnboardingOrigin && !isCertified
};
};
@@ -268,7 +269,8 @@ const buildVersionControllerProps = ({
userInfo,
usersList,
isManual: onboardingMethod === onboardingMethodType.MANUAL,
- candidateInProcess: !!candidateOnboardingOrigin
+ candidateInProcess:
+ !!candidateOnboardingOrigin && !itemPermission.isCertified
};
};
@@ -360,7 +362,8 @@ const mapStateToProps = (
screen,
componentId,
componentsList,
- mapOfExpandedIds
+ mapOfExpandedIds,
+ isCertified: itemPermission.isCertified
}),
meta
};
diff --git a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/attachments/SoftwareProductAttachments.js b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/attachments/SoftwareProductAttachments.js
index 4d5887be6f..9b0f681eaf 100644
--- a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/attachments/SoftwareProductAttachments.js
+++ b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/attachments/SoftwareProductAttachments.js
@@ -36,7 +36,8 @@ export const mapStateToProps = state => {
heatSetupCache,
heatValidation: { errorList }
}
- }
+ },
+ currentScreen: { itemPermission: { isCertified } }
} = state;
let { unassigned = [], modules = [] } = heatSetup;
@@ -61,7 +62,8 @@ export const mapStateToProps = state => {
version,
onboardingOrigin,
activeTab,
- candidateInProcess: !!currentSoftwareProduct.candidateOnboardingOrigin
+ candidateInProcess:
+ !!currentSoftwareProduct.candidateOnboardingOrigin && !isCertified
};
};
diff --git a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/landingPage/SoftwareProductLandingPage.js b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/landingPage/SoftwareProductLandingPage.js
index f5f3b7ebdb..52a69803a6 100644
--- a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/landingPage/SoftwareProductLandingPage.js
+++ b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/landingPage/SoftwareProductLandingPage.js
@@ -25,7 +25,8 @@ import VNFImportActionHelper from '../vnfMarketPlace/VNFImportActionHelper.js';
export const mapStateToProps = ({
softwareProduct,
- licenseModel: { licenseAgreement }
+ licenseModel: { licenseAgreement },
+ currentScreen: { itemPermission: { isCertified } }
}) => {
let {
softwareProductEditor: { data: currentSoftwareProduct = {} },
@@ -67,6 +68,7 @@ export const mapStateToProps = ({
licenseAgreementName,
fullCategoryDisplayName
},
+ isCertified,
componentsList,
isManual:
currentSoftwareProduct.onboardingMethod === onboardingMethod.MANUAL
diff --git a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/landingPage/SoftwareProductLandingPageView.jsx b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/landingPage/SoftwareProductLandingPageView.jsx
index 00f0c2a0cb..dcc9645750 100644
--- a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/landingPage/SoftwareProductLandingPageView.jsx
+++ b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/landingPage/SoftwareProductLandingPageView.jsx
@@ -65,8 +65,12 @@ class SoftwareProductLandingPageView extends React.Component {
onAddComponent: PropTypes.func
};
componentDidMount() {
- const { onCandidateInProcess, currentSoftwareProduct } = this.props;
- if (currentSoftwareProduct.candidateOnboardingOrigin) {
+ const {
+ onCandidateInProcess,
+ currentSoftwareProduct,
+ isCertified
+ } = this.props;
+ if (currentSoftwareProduct.candidateOnboardingOrigin && !isCertified) {
onCandidateInProcess(currentSoftwareProduct.id);
}
}
diff --git a/openecomp-ui/yarn.lock b/openecomp-ui/yarn.lock
index 2ef15afba4..708cfb48ca 100644
--- a/openecomp-ui/yarn.lock
+++ b/openecomp-ui/yarn.lock
@@ -3635,7 +3635,7 @@ dom-converter@~0.1:
dependencies:
utila "~0.3"
-dom-helpers@^3.2.0, dom-helpers@^3.2.1:
+dom-helpers@^3.2.0, dom-helpers@^3.2.1, dom-helpers@^3.3.1:
version "3.3.1"
resolved "https://registry.yarnpkg.com/dom-helpers/-/dom-helpers-3.3.1.tgz#fc1a4e15ffdf60ddde03a480a9c0fece821dd4a6"
@@ -8384,6 +8384,14 @@ prop-types@^15.5.10, prop-types@^15.5.4, prop-types@^15.5.6, prop-types@^15.5.7,
loose-envify "^1.3.1"
object-assign "^4.1.1"
+prop-types@^15.6.1:
+ version "15.6.1"
+ resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.6.1.tgz#36644453564255ddda391191fb3a125cbdf654ca"
+ dependencies:
+ fbjs "^0.8.16"
+ loose-envify "^1.3.1"
+ object-assign "^4.1.1"
+
proxy-addr@~2.0.2:
version "2.0.2"
resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.2.tgz#6571504f47bb988ec8180253f85dd7e14952bdec"
@@ -8881,6 +8889,14 @@ react-transition-group@^2.0.0, react-transition-group@^2.2.0:
prop-types "^15.5.8"
warning "^3.0.0"
+react-transition-group@^2.3.1:
+ version "2.3.1"
+ resolved "https://registry.yarnpkg.com/react-transition-group/-/react-transition-group-2.3.1.tgz#31d611b33e143a5e0f2d94c348e026a0f3b474b6"
+ dependencies:
+ dom-helpers "^3.3.1"
+ loose-envify "^1.3.1"
+ prop-types "^15.6.1"
+
react-treebeard@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/react-treebeard/-/react-treebeard-2.1.0.tgz#fbd5cf51089b6f09a9b18350ab3bddf736e57800"
@@ -9459,9 +9475,9 @@ scss-tokenizer@^0.2.3:
js-base64 "^2.1.8"
source-map "^0.4.2"
-sdc-ui@1.6.32:
- version "1.6.32"
- resolved "https://registry.yarnpkg.com/sdc-ui/-/sdc-ui-1.6.32.tgz#ce05f10a6923fa5c3865d17e3f34b7751681ee3f"
+sdc-ui@1.6.43:
+ version "1.6.43"
+ resolved "https://registry.yarnpkg.com/sdc-ui/-/sdc-ui-1.6.43.tgz#c069337e977f769e21a237b5e139feed46bc6daa"
dependencies:
"@angular/common" "~2.4.8"
"@angular/core" "~2.4.8"