Sha256: cfd3ad9dfa924cecfa39a0da1a3e4f349fb99ac4f63ed140f37f42ff20104d38

Contents?: true

Size: 959 Bytes

Versions: 92

Compression:

Stored size: 959 Bytes

Contents

import React from 'react';
import PropTypes from 'prop-types';
import { Row } from 'patternfly-react';
import { noop } from 'foremanReact/common/helpers';
import { translate as __ } from 'foremanReact/common/I18n';

import { timePropType } from '../../TasksDashboardPropTypes';
import { TASKS_DASHBOARD_AVAILABLE_TIMES } from '../../TasksDashboardConstants';
import TimeDropDown from './Components/TimeDropDown/TimeDropDown';
import './TasksTimeRow.scss';

const TasksTimeRow = ({ time, updateTime }) => (
  <Row className="tasks-time-row">
    <span className="time-label">{__('With focus on last')}</span>
    <TimeDropDown
      id="tasks-dashboard-time-period-dropdown"
      selectedTime={time}
      onChange={updateTime}
    />
  </Row>
);

TasksTimeRow.propTypes = {
  time: timePropType,
  updateTime: PropTypes.func,
};

TasksTimeRow.defaultProps = {
  time: TASKS_DASHBOARD_AVAILABLE_TIMES.H24,
  updateTime: noop,
};

export default TasksTimeRow;

Version data entries

92 entries across 92 versions & 1 rubygems

Version Path
foreman-tasks-0.15.10 webpack/ForemanTasks/Components/TasksDashboard/Components/TasksTimeRow/TasksTimeRow.js
foreman-tasks-0.16.1 webpack/ForemanTasks/Components/TasksDashboard/Components/TasksTimeRow/TasksTimeRow.js
foreman-tasks-0.17.0 webpack/ForemanTasks/Components/TasksDashboard/Components/TasksTimeRow/TasksTimeRow.js
foreman-tasks-0.15.9 webpack/ForemanTasks/Components/TasksDashboard/Components/TasksTimeRow/TasksTimeRow.js
foreman-tasks-0.15.8 webpack/ForemanTasks/Components/TasksDashboard/Components/TasksTimeRow/TasksTimeRow.js
foreman-tasks-0.15.7 webpack/ForemanTasks/Components/TasksDashboard/Components/TasksTimeRow/TasksTimeRow.js
foreman-tasks-0.16.0 webpack/ForemanTasks/Components/TasksDashboard/Components/TasksTimeRow/TasksTimeRow.js
foreman-tasks-0.15.6 webpack/ForemanTasks/Components/TasksDashboard/Components/TasksTimeRow/TasksTimeRow.js
foreman-tasks-0.15.5 webpack/ForemanTasks/Components/TasksDashboard/Components/TasksTimeRow/TasksTimeRow.js
foreman-tasks-0.15.4 webpack/ForemanTasks/Components/TasksDashboard/Components/TasksTimeRow/TasksTimeRow.js
foreman-tasks-0.15.3 webpack/ForemanTasks/Components/TasksDashboard/Components/TasksTimeRow/TasksTimeRow.js
foreman-tasks-0.15.2 webpack/ForemanTasks/Components/TasksDashboard/Components/TasksTimeRow/TasksTimeRow.js