Sha256: 6fea561dce7130fcdbc6912ee637e86744b1a620fbd97e91fc9b467a093de4ef

Contents?: true

Size: 811 Bytes

Versions: 6

Compression:

Stored size: 811 Bytes

Contents

import React from 'react';
import PropTypes from 'prop-types';
import { translate as __ } from 'foremanReact/common/I18n';
import TasksTablePage from './';

export const SubTasksPage = props => {
  const parentTaskID = props.match.params.id;
  const getBreadcrumbs = actionName => ({
    breadcrumbItems: [
      { caption: __('Tasks'), url: `/foreman_tasks/tasks` },
      {
        caption: actionName,
        url: `/foreman_tasks/tasks/${parentTaskID}`,
      },
      { caption: __('Sub tasks') },
    ],
  });
  return (
    <TasksTablePage
      getBreadcrumbs={getBreadcrumbs}
      parentTaskID={parentTaskID}
      {...props}
    />
  );
};

SubTasksPage.propTypes = {
  match: PropTypes.shape({
    params: PropTypes.object,
  }),
};

SubTasksPage.defaultProps = {
  match: {
    params: {},
  },
};

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
foreman-tasks-0.17.6 webpack/ForemanTasks/Components/TasksTable/SubTasksPage.js
foreman-tasks-1.0.1 webpack/ForemanTasks/Components/TasksTable/SubTasksPage.js
foreman-tasks-1.0.0 webpack/ForemanTasks/Components/TasksTable/SubTasksPage.js
foreman-tasks-0.17.5 webpack/ForemanTasks/Components/TasksTable/SubTasksPage.js
foreman-tasks-0.17.4 webpack/ForemanTasks/Components/TasksTable/SubTasksPage.js
foreman-tasks-0.17.3 webpack/ForemanTasks/Components/TasksTable/SubTasksPage.js