aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-ui/src/sdc-app/onboarding/softwareProduct/landingPage/SoftwareProductLandingPageView.jsx
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/SoftwareProductLandingPageView.jsx
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/SoftwareProductLandingPageView.jsx')
-rw-r--r--openecomp-ui/src/sdc-app/onboarding/softwareProduct/landingPage/SoftwareProductLandingPageView.jsx41
1 files changed, 11 insertions, 30 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 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>
);
}