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 DetailsCatalogView from '../DetailsCatalogView.jsx';
18 import {statusEnum} from 'nfvo-components/panel/versionController/VersionControllerConstants.js';
19 import VersionControllerUtils from 'nfvo-components/panel/versionController/VersionControllerUtils.js';
20 import i18n from 'nfvo-utils/i18n/i18n.js';
21 import {tabsMapping} from 'sdc-app/onboarding/onboard/OnboardConstants.js';
23 const WorkspaceView = (props) => {
25 licenseModelList, softwareProductList, onAddLicenseModelClick,
26 onAddSoftwareProductClick, onSelectLicenseModel, onSelectSoftwareProduct, searchValue, onMigrate
29 let {getCheckOutStatusKindByUserID} = VersionControllerUtils;
30 let unfinalizedLicenseModelList = licenseModelList.filter(vlm => {
31 let {status} = getCheckOutStatusKindByUserID(vlm.status, vlm.lockingUser);
32 return status !== statusEnum.SUBMIT_STATUS && status !== statusEnum.LOCK_STATUS;
34 let unfinalizedSoftwareProductList = softwareProductList.filter(vsp =>{
35 let {status} = getCheckOutStatusKindByUserID(vsp.status, vsp.lockingUser);
36 return status !== statusEnum.SUBMIT_STATUS && status !== statusEnum.LOCK_STATUS;
40 <div className='catalog-wrapper workspace-view'>
41 <div className='catalog-header workspace-header'>
45 VLMList={unfinalizedLicenseModelList}
46 VSPList={unfinalizedSoftwareProductList}
47 onAddVLM={onAddLicenseModelClick}
48 onAddVSP={onAddSoftwareProductClick}
49 onSelectVLM={onSelectLicenseModel}
50 onSelectVSP={onSelectSoftwareProduct}
53 tileType={tabsMapping.WORKSPACE} />
57 export default WorkspaceView;