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 from 'react';
17 import PropTypes from 'prop-types';
18 import {selectedButton} from '../LicenseModelOverviewConstants.js';
19 import Tabs from 'sdc-ui/lib/react/Tabs.js';
20 import Tab from 'sdc-ui/lib/react/Tab.js';
21 import i18n from 'nfvo-utils/i18n/i18n.js';
23 function ListButtons ({onTabSelect, selectedTab, hasOrphans, hasLicensing}) {
25 if (!hasLicensing && !hasOrphans) {
30 onTabClick={(tabId) => onTabSelect(tabId)}
31 activeTab={selectedTab}
32 className='overview-buttons-section'
35 tabId={selectedButton.VLM_LIST_VIEW}
36 title={i18n('Connections List')}
37 data-test-id='vlm-overview-vlmlist-tab' />
39 tabId={selectedButton.NOT_IN_USE}
40 title={i18n('Orphans List')}
41 data-test-id='vlm-overview-orphans-tab' />
46 ListButtons.propTypes = {
47 onTabSelect: PropTypes.func,
48 selectedInUse: PropTypes.bool
51 export default ListButtons;