summaryrefslogtreecommitdiffstats
path: root/openecomp-ui/src/sdc-app/onboarding/softwareProduct/landingPage
diff options
context:
space:
mode:
authorshrek2000 <orenkle@amdocs.com>2017-09-11 15:45:37 +0300
committershrek2000 <orenkle@amdocs.com>2017-09-12 10:38:35 +0300
commitc8a540b3c234449163f6fb1899807bba951113b4 (patch)
treea8aae0dd0f6a0feb27369914e9e3fa321740e7ed /openecomp-ui/src/sdc-app/onboarding/softwareProduct/landingPage
parent82d454fd3e8c9fdf66517d01a99019a379dbfdb6 (diff)
Create new VSP, onboard from TOSCA file - UI
Change-Id: I018c6d07a4b9ec7e6b1507ab37e2550865423cfe Issue-ID: SDC-230 Signed-off-by: shrek2000 <orenkle@amdocs.com>
Diffstat (limited to 'openecomp-ui/src/sdc-app/onboarding/softwareProduct/landingPage')
-rw-r--r--openecomp-ui/src/sdc-app/onboarding/softwareProduct/landingPage/SoftwareProductLandingPage.js5
-rw-r--r--openecomp-ui/src/sdc-app/onboarding/softwareProduct/landingPage/SoftwareProductLandingPageView.jsx41
2 files changed, 13 insertions, 33 deletions
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 8806ffd0bf..a13e742006 100644
--- a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/landingPage/SoftwareProductLandingPage.js
+++ b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/landingPage/SoftwareProductLandingPage.js
@@ -53,7 +53,7 @@ export const mapStateToProps = ({softwareProduct, licenseModel: {licenseAgreemen
fullCategoryDisplayName
},
isReadOnlyMode,
- componentsList,
+ componentsList,
isManual: currentSoftwareProduct.onboardingMethod === onboardingMethod.MANUAL
};
};
@@ -65,7 +65,6 @@ const mapActionsToProps = (dispatch, {version}) => {
licenseModelId,
version
}),
- onAttachmentsSelect: ({id: softwareProductId}) => OnboardingActionHelper.navigateToSoftwareProductAttachments(dispatch, {softwareProductId, version}),
onUpload: (softwareProductId, formData) =>
SoftwareProductActionHelper.uploadFile(dispatch, {
softwareProductId,
@@ -98,7 +97,7 @@ const mapActionsToProps = (dispatch, {version}) => {
data: {
title: i18n('Upload Failed'),
confirmationButtonText: i18n('Continue'),
- msg: i18n('no zip file was uploaded or zip file doesn\'t exist')
+ msg: i18n('no zip or csar file was uploaded or expected file doesn\'t exist')
}
}),
onComponentSelect: ({id: softwareProductId, componentId}) => {
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 7ffbeda4dc..72a416473c 100644
--- a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/landingPage/SoftwareProductLandingPageView.jsx
+++ b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/landingPage/SoftwareProductLandingPageView.jsx
@@ -57,7 +57,6 @@ class SoftwareProductLandingPageView extends React.Component {
isReadOnlyMode: React.PropTypes.bool,
componentsList: React.PropTypes.arrayOf(ComponentPropType),
onDetailsSelect: React.PropTypes.func,
- onAttachmentsSelect: React.PropTypes.func,
onUpload: React.PropTypes.func,
onUploadConfirmation: React.PropTypes.func,
onInvalidFileSizeUpload: React.PropTypes.func,
@@ -78,15 +77,13 @@ class SoftwareProductLandingPageView extends React.Component {
disableClick={true}
ref='fileInput'
name='fileInput'
- accept='.zip'
+ accept='.zip, .csar'
disabled>
<div className='draggable-wrapper'>
<div className='software-product-landing-view-top'>
<div className='row'>
<ProductSummary currentSoftwareProduct={currentSoftwareProduct} onDetailsSelect={onDetailsSelect} />
- {isManual ?
- <div className='details-panel'/>
- : this.renderProductDetails(currentSoftwareProduct, isReadOnlyMode)}
+ {this.renderProductDetails(isManual, isReadOnlyMode)}
</div>
</div>
</div>
@@ -106,34 +103,18 @@ class SoftwareProductLandingPageView extends React.Component {
}
}
- renderProductDetails(currentSoftwareProduct, isReadOnlyMode) {
- let {validationData} = currentSoftwareProduct;
- let {onAttachmentsSelect} = this.props;
- let details = {
- heatTemplates: validationData ? '1' : '0',
- images: '0',
- otherArtifacts: '0'
- };
-
+ renderProductDetails(isManual, isReadOnlyMode) {
return (
<div className='details-panel'>
- <div className='software-product-landing-view-heading-title'>{i18n('Software Product Attachments')}</div>
- <div className='software-product-landing-view-top-block'>
- <div
- className='software-product-landing-view-top-block-col'
- onClick={() => onAttachmentsSelect(currentSoftwareProduct)}>
- <div>
- <div className='attachment-details'>{i18n('HEAT Templates')} (<span
- className='attachment-details-count'>{details.heatTemplates}</span>)
- </div>
- </div>
+ { !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()}/>
</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>
);
}