From bf13de9e961a9cdbe6376982bdd611dc5be1333b Mon Sep 17 00:00:00 2001 From: ilanap Date: Mon, 23 Oct 2017 15:21:22 +0300 Subject: Readonly screen for limits Issue-ID: SDC-494 Change-Id: I0f86e688801f65f376b3181518b97ee68462b1ef Signed-off-by: ilanap --- .../EntitlementPoolsEditorView.jsx | 21 ++++++++++++++++++--- .../LicenseKeyGroupsEditorView.jsx | 22 ++++++++++++++++++---- .../onboarding/licenseModel/limits/LimitEditor.jsx | 2 +- .../onboarding/licenseModel/limits/Limits.jsx | 13 +++++++++---- 4 files changed, 46 insertions(+), 12 deletions(-) (limited to 'openecomp-ui/src/sdc-app/onboarding') diff --git a/openecomp-ui/src/sdc-app/onboarding/licenseModel/entitlementPools/EntitlementPoolsEditorView.jsx b/openecomp-ui/src/sdc-app/onboarding/licenseModel/entitlementPools/EntitlementPoolsEditorView.jsx index aa1321c24a..8473c1a2be 100644 --- a/openecomp-ui/src/sdc-app/onboarding/licenseModel/entitlementPools/EntitlementPoolsEditorView.jsx +++ b/openecomp-ui/src/sdc-app/onboarding/licenseModel/entitlementPools/EntitlementPoolsEditorView.jsx @@ -245,6 +245,7 @@ class EntitlementPoolsEditorView extends React.Component { {selectedTab === tabIds.SP_LIMITS && item.type === limitType.SERVICE_PROVIDER)} selectedLimit={this.state.selectedLimit} @@ -254,19 +255,33 @@ class EntitlementPoolsEditorView extends React.Component { {selectedTab === tabIds.VENDOR_LIMITS && item.type === limitType.VENDOR)} selectedLimit={this.state.selectedLimit} onCloseLimitEditor={() => this.onCloseLimitEditor()} onSelectLimit={limit => this.onSelectLimit(limit)}/>} - {selectedTab !== tabIds.GENERAL ? - : + { + selectedTab !== tabIds.GENERAL ? + + :
// Render empty div to not break tabs } - {!this.state.selectedLimit && } + {!this.state.selectedLimit && + + } diff --git a/openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseKeyGroups/LicenseKeyGroupsEditorView.jsx b/openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseKeyGroups/LicenseKeyGroupsEditorView.jsx index 647e205cb5..70fb43ee88 100644 --- a/openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseKeyGroups/LicenseKeyGroupsEditorView.jsx +++ b/openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseKeyGroups/LicenseKeyGroupsEditorView.jsx @@ -269,7 +269,8 @@ class LicenseKeyGroupsEditorView extends React.Component { limitsList={limitsList.filter(item => item.type === limitType.SERVICE_PROVIDER)} selectedLimit={this.state.selectedLimit} onCloseLimitEditor={() => this.onCloseLimitEditor()} - onSelectLimit={limit => this.onSelectLimit(limit)}/>} + onSelectLimit={limit => this.onSelectLimit(limit)} + isReadOnlyMode={isReadOnlyMode} />}
{selectedTab === tabIds.VENDOR_LIMITS && @@ -278,16 +279,29 @@ class LicenseKeyGroupsEditorView extends React.Component { limitsList={limitsList.filter(item => item.type === limitType.VENDOR)} selectedLimit={this.state.selectedLimit} onCloseLimitEditor={() => this.onCloseLimitEditor()} - onSelectLimit={limit => this.onSelectLimit(limit)}/>} + onSelectLimit={limit => this.onSelectLimit(limit)} + isReadOnlyMode={isReadOnlyMode} />} {selectedTab !== tabIds.GENERAL ? - : + + :
// Render empty div to not break tabs } - {!this.state.selectedLimit && } + {!this.state.selectedLimit && + + } diff --git a/openecomp-ui/src/sdc-app/onboarding/licenseModel/limits/LimitEditor.jsx b/openecomp-ui/src/sdc-app/onboarding/licenseModel/limits/LimitEditor.jsx index d4b7e5c898..110e5137e1 100644 --- a/openecomp-ui/src/sdc-app/onboarding/licenseModel/limits/LimitEditor.jsx +++ b/openecomp-ui/src/sdc-app/onboarding/licenseModel/limits/LimitEditor.jsx @@ -179,7 +179,7 @@ class LimitEditor extends React.Component { - + diff --git a/openecomp-ui/src/sdc-app/onboarding/licenseModel/limits/Limits.jsx b/openecomp-ui/src/sdc-app/onboarding/licenseModel/limits/Limits.jsx index b144f63968..4841d0335c 100644 --- a/openecomp-ui/src/sdc-app/onboarding/licenseModel/limits/Limits.jsx +++ b/openecomp-ui/src/sdc-app/onboarding/licenseModel/limits/Limits.jsx @@ -61,10 +61,9 @@ class Limits extends React.Component { } return (
- + {this.props.selectedLimit === NEW_LIMIT_TEMP_ID && limitEditor.data && - this.submit()}/> + this.submit()} isReadOnlyMode={isReadOnlyMode}/> } {limitsList.length === 0 && !limitEditor.data &&
{i18n('There are no limits')}
} {limitsList.map(limit => @@ -75,7 +74,13 @@ class Limits extends React.Component { clickable={!selectedLimit} isReadOnlyMode={isReadOnlyMode} limit={limit}/> - {limit.id === selectedLimit && limitEditor.data && this.submit()}/>} + {limit.id === selectedLimit && limitEditor.data && + this.submit()} + isReadOnlyMode={isReadOnlyMode} /> + }
)} -- cgit 1.2.3-korg