summaryrefslogtreecommitdiffstats
path: root/openecomp-ui/src/nfvo-components
diff options
context:
space:
mode:
authorAvi Ziv <AVIZI@amdocs.com>2017-07-26 17:37:57 +0300
committerAvi Ziv <avi.ziv@amdocs.com>2017-07-26 18:27:22 +0300
commit61070c9c6b665fdea79b3ccdfeafc3a6b50d262e (patch)
treedfe9c169cfac91d6c72ac9ff23375f2aafac6405 /openecomp-ui/src/nfvo-components
parentb824a997e19f6ee9627cb1b1e124c756bd8183fc (diff)
[SDC] Full OnBoard health-check and NFoD support
Change-Id: I606f8a52c7e6d2bd5558f824957d890e552c5423 Signed-off-by: Avi Ziv <avi.ziv@amdocs.com>
Diffstat (limited to 'openecomp-ui/src/nfvo-components')
-rw-r--r--openecomp-ui/src/nfvo-components/datepicker/Datepicker.jsx8
-rw-r--r--openecomp-ui/src/nfvo-components/input/validation/InputOptions.jsx3
-rw-r--r--openecomp-ui/src/nfvo-components/input/validation/Tabs.jsx17
-rw-r--r--openecomp-ui/src/nfvo-components/listEditor/ListEditorItemView.jsx2
-rw-r--r--openecomp-ui/src/nfvo-components/panel/versionController/VersionControllerConstants.js2
-rw-r--r--openecomp-ui/src/nfvo-components/table/SelectActionTable.jsx2
-rw-r--r--openecomp-ui/src/nfvo-components/table/SelectActionTableRow.jsx4
7 files changed, 19 insertions, 19 deletions
diff --git a/openecomp-ui/src/nfvo-components/datepicker/Datepicker.jsx b/openecomp-ui/src/nfvo-components/datepicker/Datepicker.jsx
index cd39376bda..f4673c1c93 100644
--- a/openecomp-ui/src/nfvo-components/datepicker/Datepicker.jsx
+++ b/openecomp-ui/src/nfvo-components/datepicker/Datepicker.jsx
@@ -17,10 +17,10 @@ class CustomInput extends React.Component {
const text = date ? date : placeholderText;
const textStyle = date ? '' : 'placeholder';
return (
- <div ref={inputRef} className='datepicker-custom-input'>
- <div onClick={onClick} className={`datepicker-text ${textStyle}`}>{text}</div>
- <div onClick={onClear} className='clear-input'/>
- <SVGIcon onClick={onClick} name='calendar'/>
+ <div onClick={onClick} ref={inputRef} className='datepicker-custom-input'>
+ <div className={`datepicker-text ${textStyle}`}>{text}</div>
+ {date && <SVGIcon onClick={e => {e.stopPropagation(); onClear();}} name='close' className='clear-input'/>}
+ <SVGIcon name='calendar'/>
</div>
);
}
diff --git a/openecomp-ui/src/nfvo-components/input/validation/InputOptions.jsx b/openecomp-ui/src/nfvo-components/input/validation/InputOptions.jsx
index 6e54254eb0..9b11d27c2b 100644
--- a/openecomp-ui/src/nfvo-components/input/validation/InputOptions.jsx
+++ b/openecomp-ui/src/nfvo-components/input/validation/InputOptions.jsx
@@ -64,7 +64,8 @@ class InputOptions extends React.Component {
const dataTestId = this.props['data-test-id'] ? {'data-test-id': this.props['data-test-id']} : {};
let currentMultiSelectedEnum = [];
let currentSelectedEnum = '';
- let {otherInputDisabled} = this.state;
+ let otherInputDisabled = (isMultiSelect && (multiSelectedEnum === undefined || multiSelectedEnum.length === 0 || multiSelectedEnum[0] !== other.OTHER))
+ || (!isMultiSelect && (selectedEnum === undefined || selectedEnum !== other.OTHER));
if (isMultiSelect) {
currentMultiSelectedEnum = multiSelectedEnum;
if(!otherInputDisabled) {
diff --git a/openecomp-ui/src/nfvo-components/input/validation/Tabs.jsx b/openecomp-ui/src/nfvo-components/input/validation/Tabs.jsx
index 95144b1468..6f33536b04 100644
--- a/openecomp-ui/src/nfvo-components/input/validation/Tabs.jsx
+++ b/openecomp-ui/src/nfvo-components/input/validation/Tabs.jsx
@@ -15,7 +15,7 @@
*/
import React from 'react';
import ReactDOM from 'react-dom';
-import {default as BTabs} from 'react-bootstrap/lib/Tabs.js';
+import {default as SDCTabs} from 'sdc-ui/lib/react/Tabs.js';
import Overlay from 'react-bootstrap/lib/Overlay.js';
import Tooltip from 'react-bootstrap/lib/Tooltip.js';
@@ -33,15 +33,15 @@ class Tabs extends React.Component {
return React.cloneElement(
element,
{
- key: element.props.eventKey,
- tabClassName: invalidTabs.indexOf(element.props.eventKey) > -1 ? 'invalid-tab' : 'valid-tab'
+ key: element.props.tabId,
+ className: invalidTabs.indexOf(element.props.tabId) > -1 ? 'invalid-tab' : 'valid-tab'
}
);
}
showTabsError() {
const {invalidTabs} = this.props;
- const showError = ((invalidTabs.length === 1 && invalidTabs[0] !== this.props.activeKey) || (invalidTabs.length > 1));
+ const showError = ((invalidTabs.length === 1 && invalidTabs[0] !== this.props.activeTab) || (invalidTabs.length > 1));
return showError;
}
@@ -50,21 +50,20 @@ class Tabs extends React.Component {
let {invalidTabs, ...tabProps} = this.props;
return (
<div>
- <BTabs {...tabProps} ref='tabsList' id='tabsList' >
+ <SDCTabs {...tabProps} ref='tabsList' id='tabsList' >
{this.props.children.map(element => this.cloneTab(element))}
- </BTabs>
+ </SDCTabs>
<Overlay
animation={false}
show={this.showTabsError()}
placement='bottom'
- containerPadding={50}
target={() => {
- let target = ReactDOM.findDOMNode(this.refs.tabsList).querySelector('ul > li.invalid-tab:not(.active):nth-of-type(n)');
+ let target = ReactDOM.findDOMNode(this.refs.tabsList).querySelector('ul > li.invalid-tab:not(.sdc-tab-active):nth-of-type(n)');
return target && target.offsetParent ? target : undefined;
}
}
container={() => {
- let target = ReactDOM.findDOMNode(this.refs.tabsList).querySelector('ul > li.invalid-tab:not(.active):nth-of-type(n)');
+ let target = ReactDOM.findDOMNode(this.refs.tabsList).querySelector('ul > li.invalid-tab:not(.sdc-tab-active):nth-of-type(n)');
return target && target.offsetParent ? target.offsetParent : this;
}}>
<Tooltip
diff --git a/openecomp-ui/src/nfvo-components/listEditor/ListEditorItemView.jsx b/openecomp-ui/src/nfvo-components/listEditor/ListEditorItemView.jsx
index 8d7c63f567..bed304b756 100644
--- a/openecomp-ui/src/nfvo-components/listEditor/ListEditorItemView.jsx
+++ b/openecomp-ui/src/nfvo-components/listEditor/ListEditorItemView.jsx
@@ -39,7 +39,7 @@ class ListEditorItem extends React.Component {
</div>
{(onEdit || onDelete) && <div className='list-editor-item-view-controller'>
{onEdit && <SVGIcon name='sliders' onClick={() => this.onClickedItem(onEdit)}/>}
- {onDelete && isAbilityToDelete && <SVGIcon name='trashO' onClick={() => this.onClickedItem(onDelete)}/>}
+ {onDelete && isAbilityToDelete && <SVGIcon name='trashO' data-test-id='delete-list-item' onClick={() => this.onClickedItem(onDelete)}/>}
</div>}
</div>
);
diff --git a/openecomp-ui/src/nfvo-components/panel/versionController/VersionControllerConstants.js b/openecomp-ui/src/nfvo-components/panel/versionController/VersionControllerConstants.js
index 9af142433c..c2548e4fb4 100644
--- a/openecomp-ui/src/nfvo-components/panel/versionController/VersionControllerConstants.js
+++ b/openecomp-ui/src/nfvo-components/panel/versionController/VersionControllerConstants.js
@@ -33,7 +33,7 @@ export const statusEnum = keyMirror({
export const statusBarTextMap = keyMirror({
'Locked': 'Checked Out',
- 'LockedByUser': '',
+ 'LockedByUser': 'Locked',
'Available': 'Checked In',
'Final': 'Submitted',
'READ ONLY': 'Locked'
diff --git a/openecomp-ui/src/nfvo-components/table/SelectActionTable.jsx b/openecomp-ui/src/nfvo-components/table/SelectActionTable.jsx
index 6c04ad74fd..12e9a06623 100644
--- a/openecomp-ui/src/nfvo-components/table/SelectActionTable.jsx
+++ b/openecomp-ui/src/nfvo-components/table/SelectActionTable.jsx
@@ -16,7 +16,7 @@ export default class SelectActionTable extends React.Component {
<div className='select-action-table'>
<div className='select-action-table-headers'>
{columns.map(column => <div key={uuid.create()} className='select-action-table-header'>{i18n(column)}</div>)}
- {Array(numOfIcons).fill().map(() => <SVGIcon name='trashO' className='dummy-icon' />)}
+ {Array(numOfIcons).fill().map((e, i) => <SVGIcon name='trashO' key={i} className='dummy-icon' />)}
</div>
<div className='select-action-table-body'>
{children}
diff --git a/openecomp-ui/src/nfvo-components/table/SelectActionTableRow.jsx b/openecomp-ui/src/nfvo-components/table/SelectActionTableRow.jsx
index a711b42918..7df7d532e8 100644
--- a/openecomp-ui/src/nfvo-components/table/SelectActionTableRow.jsx
+++ b/openecomp-ui/src/nfvo-components/table/SelectActionTableRow.jsx
@@ -27,12 +27,12 @@ function renderErrorOrCheck({hasError, overlayMsg}) {
return <SVGIcon name='checkCircle'/>;
}
-const SelectActionTableRow = ({children, onDelete, hasError, hasErrorIndication, overlayMsg}) => (
+const SelectActionTableRow = ({children, onDelete, hasError, hasErrorIndication, overlayMsg, showDelete}) => (
<div className='select-action-table-row-wrapper'>
<div className={`select-action-table-row ${hasError ? 'has-error' : ''}`}>
{children}
</div>
- {onDelete && <SVGIcon name='trashO' data-test-id='select-action-table-delete' onClick={onDelete} />}
+ {onDelete && <SVGIcon name='trashO' iconClassName={(showDelete) ? '' : 'hideDelete'} data-test-id='select-action-table-delete' onClick={(showDelete) ? onDelete : null} />}
{hasErrorIndication && renderErrorOrCheck({hasError, overlayMsg})}
</div>
);