summaryrefslogtreecommitdiffstats
path: root/openecomp-ui/src/sdc-app/onboarding/softwareProduct/landingPage/SoftwareProductLandingPageView.jsx
diff options
context:
space:
mode:
authorMurali-P <murali.p@huawei.com>2018-03-29 17:46:39 +0530
committerVitaly Emporopulo <Vitaliy.Emporopulo@amdocs.com>2018-04-30 13:51:11 +0000
commit72d62fb1aaaaeaed462083e232f3571b3bde6b08 (patch)
tree0691b2378b76270b7b7dbd8e32aff2afe895042f /openecomp-ui/src/sdc-app/onboarding/softwareProduct/landingPage/SoftwareProductLandingPageView.jsx
parentdb69b87869091b774d6d87f3b6a9155d34d26b12 (diff)
Integrate VNF Repository in Beijing release
Migrate the code Change-Id: Ifccacf83634af32b034fd9c413e68f894f06d2f7 Issue-ID: VNFSDK-155 Signed-off-by: Murali-P <murali.p@huawei.com>
Diffstat (limited to 'openecomp-ui/src/sdc-app/onboarding/softwareProduct/landingPage/SoftwareProductLandingPageView.jsx')
-rw-r--r--openecomp-ui/src/sdc-app/onboarding/softwareProduct/landingPage/SoftwareProductLandingPageView.jsx69
1 files changed, 50 insertions, 19 deletions
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 bc8a2be646..00f0c2a0cb 100644
--- a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/landingPage/SoftwareProductLandingPageView.jsx
+++ b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/landingPage/SoftwareProductLandingPageView.jsx
@@ -19,7 +19,9 @@ import classnames from 'classnames';
import Dropzone from 'react-dropzone';
import i18n from 'nfvo-utils/i18n/i18n.js';
+import Configuration from 'sdc-app/config/Configuration.js';
import DraggableUploadFileBox from 'nfvo-components/fileupload/DraggableUploadFileBox.jsx';
+import VnfRepositorySearchBox from 'nfvo-components/vnfMarketPlace/VnfRepositorySearchBox.jsx';
import SVGIcon from 'sdc-ui/lib/react/SVGIcon.js';
import SoftwareProductComponentsList from 'sdc-app/onboarding/softwareProduct/components/SoftwareProductComponents.js';
@@ -122,26 +124,55 @@ class SoftwareProductLandingPageView extends React.Component {
}
renderProductDetails(isManual, isReadOnlyMode) {
- return (
- <div className="details-panel">
- {!isManual && (
- <div>
- <div className="software-product-landing-view-heading-title">
- {i18n('Software Product Attachments')}
+ let { onBrowseVNF, currentSoftwareProduct } = this.props;
+
+ if (Configuration.get('showBrowseVNF')) {
+ return (
+ <div className="details-panel">
+ {!isManual && (
+ <div>
+ <div className="software-product-landing-view-heading-title">
+ {i18n('Software Product Attachments')}
+ </div>
+ <VnfRepositorySearchBox
+ dataTestId="upload-btn"
+ isReadOnlyMode={isReadOnlyMode}
+ className={classnames(
+ 'software-product-landing-view-top-block-col-upl showVnf',
+ { disabled: isReadOnlyMode }
+ )}
+ onClick={() => this.refs.fileInput.open()}
+ onBrowseVNF={() =>
+ onBrowseVNF(currentSoftwareProduct)
+ }
+ />
</div>
- <DraggableUploadFileBox
- dataTestId="upload-btn"
- isReadOnlyMode={isReadOnlyMode}
- className={classnames(
- 'software-product-landing-view-top-block-col-upl',
- { disabled: isReadOnlyMode }
- )}
- onClick={() => this.refs.fileInput.open()}
- />
- </div>
- )}
- </div>
- );
+ )}
+ </div>
+ );
+ } else {
+ return (
+ <div className="details-panel">
+ {!isManual && (
+ <div>
+ <div className="software-product-landing-view-heading-title">
+ {i18n('Software Product Attachments')}
+ </div>
+ <DraggableUploadFileBox
+ dataTestId="upload-btn"
+ isReadOnlyMode={isReadOnlyMode}
+ className={classnames(
+ 'software-product-landing-view-top-block-col-upl',
+ { disabled: isReadOnlyMode }
+ )}
+ onClick={() => this.refs.fileInput.open()}
+ onBrowseVNF={() => onBrowseVNF()}
+ />
+ </div>
+ )}
+ </div>
+ );
+ }
}
handleImportSubmit(files, isReadOnlyMode, isManual) {