diff options
author | svishnev <shlomo-stanisla.vishnevetskiy@amdocs.com> | 2018-04-15 09:06:57 +0300 |
---|---|---|
committer | Einav Keidar <einavw@amdocs.com> | 2018-04-15 07:55:06 +0000 |
commit | ea5e43cc939f2010b4f4c97cb8d346c91348fbba (patch) | |
tree | 23e0d347103d16099ec3ca657ab246088cf88d01 /openecomp-ui/src/sdc-app/onboarding/onboard/OnboardView.jsx | |
parent | 894285bfa9ccacde35b1e94e07856b53971e2559 (diff) |
Onboarding filter
Issue-ID: SDC-1187
Change-Id: I74ce464c8ee4060c381b094d26d1ded270cdf40d
Signed-off-by: svishnev <shlomo-stanisla.vishnevetskiy@amdocs.com>
Diffstat (limited to 'openecomp-ui/src/sdc-app/onboarding/onboard/OnboardView.jsx')
-rw-r--r-- | openecomp-ui/src/sdc-app/onboarding/onboard/OnboardView.jsx | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/openecomp-ui/src/sdc-app/onboarding/onboard/OnboardView.jsx b/openecomp-ui/src/sdc-app/onboarding/onboard/OnboardView.jsx index dcaeaa787d..0fc64b328c 100644 --- a/openecomp-ui/src/sdc-app/onboarding/onboard/OnboardView.jsx +++ b/openecomp-ui/src/sdc-app/onboarding/onboard/OnboardView.jsx @@ -16,7 +16,9 @@ import React from 'react'; import PropTypes from 'prop-types'; import OnboardingCatalogView from './onboardingCatalog/OnboardingCatalogView.jsx'; +import OnboardingCatalogViewWithFilter from './onboardingCatalog/OnboardingCatalogViewWithFilter.jsx'; import WorkspaceView from './workspace/WorkspaceView.jsx'; +import WorkspaceViewWithFilter from './workspace/WorkspaceViewWithFilter.jsx'; import { tabsMapping } from './OnboardConstants.js'; import i18n from 'nfvo-utils/i18n/i18n.js'; import classnames from 'classnames'; @@ -25,7 +27,8 @@ import objectValues from 'lodash/values.js'; import { catalogItemTypes } from './onboardingCatalog/OnboardingCatalogConstants.js'; import NotificationsView from 'sdc-app/onboarding/userNotifications/NotificationsView.jsx'; import Filter from 'sdc-app/onboarding/onboard/filter/Filter.jsx'; - +import featureToggle from 'sdc-app/features/featureToggle.js'; +import { featureToggleNames } from 'sdc-app/features/FeaturesConstants.js'; const OnboardHeaderTabs = ({ onTabClick, activeTab }) => ( <div className="onboard-header-tabs"> <div @@ -47,6 +50,16 @@ const OnboardHeaderTabs = ({ onTabClick, activeTab }) => ( </div> ); +const ToggledOnboardingCatalogView = featureToggle(featureToggleNames.FILTER)({ + OnComp: OnboardingCatalogViewWithFilter, + OffComp: OnboardingCatalogView +}); + +const ToggledWorkspaceView = featureToggle(featureToggleNames.FILTER)({ + OnComp: WorkspaceViewWithFilter, + OffComp: WorkspaceView +}); + const OnboardHeader = ({ onSearch, activeTab, onTabClick, searchValue }) => ( <div className="onboard-header"> <OnboardHeaderTabs activeTab={activeTab} onTabClick={onTabClick} /> @@ -85,11 +98,11 @@ class OnboardView extends React.Component { renderViewByTab(activeTab) { switch (activeTab) { case tabsMapping.WORKSPACE: - return <WorkspaceView {...this.props} />; + return <ToggledWorkspaceView {...this.props} />; case tabsMapping.CATALOG: - return <OnboardingCatalogView {...this.props} />; + return <ToggledOnboardingCatalogView {...this.props} />; default: - return <WorkspaceView {...this.props} />; + return <ToggledWorkspaceView {...this.props} />; } } |