2 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
13 * or implied. See the License for the specific language governing
14 * permissions and limitations under the License.
16 import React, {Component} from 'react';
17 import {overviewEditorHeaders} from '../LicenseModelOverviewConstants.js';
18 import ArrowCol from './listItemsComponents/ArrowCol.jsx';
19 import ItemInfo from './listItemsComponents/ItemInfo.jsx';
20 import IconCol from './listItemsComponents/IconCol.jsx';
22 class FeatureGroup extends Component {
24 let {fgData: {name, description, children = []}, isCollapsed, onClick} = this.props;
26 <div onClick={e => onClick(e)} className='vlm-list-item vlm-list-item-fg' data-test-id='vlm-list-item-fg'>
27 <ArrowCol isCollapsed={isCollapsed} length={children.length} />
28 <IconCol className='fg-icon'/>
29 <ItemInfo name={name} description={description}>
30 <div className='children-count'>
31 <span className='count-value'>
33 <span data-test-id='vlm-list-ep-count-value'>
34 {`${children.filter(child => child.itemType === overviewEditorHeaders.ENTITLEMENT_POOL).length}`}
37 <span className='count-value'>
39 <span data-test-id='vlm-list-lkg-count-value'>
40 {`${children.filter(child => child.itemType === overviewEditorHeaders.LICENSE_KEY_GROUP).length}`}
50 export default FeatureGroup;