Sha256: a9abcdc8d5e7e93aeed5ed4a765936ff90e79d4dc8458605c3766b7c1d245ab0

Contents?: true

Size: 1.19 KB

Versions: 9

Compression:

Stored size: 1.19 KB

Contents

import PropTypes from 'prop-types';
import React from 'react';
import { Route, Switch, Redirect } from 'react-router-dom';
import { route } from './helpers';
import Reports from './SubTabs/Reports';
import ENCPreview from './SubTabs/ENCPreview';

const SecondaryTabRoutes = ({ hostName, hostInfo, status }) => (
  <Switch>
    <Route path={route('reports')}>
      <Reports hostName={hostName} hostInfo={hostInfo} status={status} />
    </Route>
    {/* <Route path={route('assigned')}>
      <EmptyPage
        header={__('Assigned classes')}
        description={__('This tab is still a work in progress')}
      />
    </Route>
    <Route path={route('smart-classes')}>
      <EmptyPage
        header={__('Smart class parameters')}
        description={__('This tab is still a work in progress')}
      />
    </Route> */}
    <Route path={route('yaml')}>
      <ENCPreview hostName={hostName} />
    </Route>
    <Redirect to={route('reports')} />
  </Switch>
);

SecondaryTabRoutes.propTypes = {
  hostName: PropTypes.string,
  hostInfo: PropTypes.object,
  status: PropTypes.string,
};

SecondaryTabRoutes.defaultProps = {
  hostName: '',
  hostInfo: {},
  status: undefined,
};

export default SecondaryTabRoutes;

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
foreman_puppet-6.1.1 webpack/src/Extends/Host/PuppetTab/Routes.js
foreman_puppet-5.1.3 webpack/src/Extends/Host/PuppetTab/Routes.js
foreman_puppet-6.1.0 webpack/src/Extends/Host/PuppetTab/Routes.js
foreman_puppet-6.0.1 webpack/src/Extends/Host/PuppetTab/Routes.js
foreman_puppet-6.0.0 webpack/src/Extends/Host/PuppetTab/Routes.js
foreman_puppet-5.1.2 webpack/src/Extends/Host/PuppetTab/Routes.js
foreman_puppet-5.1.1 webpack/src/Extends/Host/PuppetTab/Routes.js
foreman_puppet-5.1.0 webpack/src/Extends/Host/PuppetTab/Routes.js
foreman_puppet-5.0.0 webpack/src/Extends/Host/PuppetTab/Routes.js