Sha256: cfd3ad9dfa924cecfa39a0da1a3e4f349fb99ac4f63ed140f37f42ff20104d38

Contents?: true

Size: 959 Bytes

Versions: 91

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

91 entries across 91 versions & 1 rubygems

Version Path
foreman-tasks-10.0.1 webpack/ForemanTasks/Components/TasksDashboard/Components/TasksTimeRow/TasksTimeRow.js
foreman-tasks-10.0.0 webpack/ForemanTasks/Components/TasksDashboard/Components/TasksTimeRow/TasksTimeRow.js
foreman-tasks-9.2.3 webpack/ForemanTasks/Components/TasksDashboard/Components/TasksTimeRow/TasksTimeRow.js
foreman-tasks-9.2.2 webpack/ForemanTasks/Components/TasksDashboard/Components/TasksTimeRow/TasksTimeRow.js
foreman-tasks-9.2.1 webpack/ForemanTasks/Components/TasksDashboard/Components/TasksTimeRow/TasksTimeRow.js
foreman-tasks-9.2.0 webpack/ForemanTasks/Components/TasksDashboard/Components/TasksTimeRow/TasksTimeRow.js
foreman-tasks-9.1.1 webpack/ForemanTasks/Components/TasksDashboard/Components/TasksTimeRow/TasksTimeRow.js
foreman-tasks-9.0.4 webpack/ForemanTasks/Components/TasksDashboard/Components/TasksTimeRow/TasksTimeRow.js
foreman-tasks-9.1.0 webpack/ForemanTasks/Components/TasksDashboard/Components/TasksTimeRow/TasksTimeRow.js
foreman-tasks-9.0.2 webpack/ForemanTasks/Components/TasksDashboard/Components/TasksTimeRow/TasksTimeRow.js
foreman-tasks-9.0.1 webpack/ForemanTasks/Components/TasksDashboard/Components/TasksTimeRow/TasksTimeRow.js
foreman-tasks-8.3.3 webpack/ForemanTasks/Components/TasksDashboard/Components/TasksTimeRow/TasksTimeRow.js
foreman-tasks-9.0.0 webpack/ForemanTasks/Components/TasksDashboard/Components/TasksTimeRow/TasksTimeRow.js
foreman-tasks-8.2.1 webpack/ForemanTasks/Components/TasksDashboard/Components/TasksTimeRow/TasksTimeRow.js
foreman-tasks-8.1.4 webpack/ForemanTasks/Components/TasksDashboard/Components/TasksTimeRow/TasksTimeRow.js
foreman-tasks-8.3.2 webpack/ForemanTasks/Components/TasksDashboard/Components/TasksTimeRow/TasksTimeRow.js
foreman-tasks-8.3.1 webpack/ForemanTasks/Components/TasksDashboard/Components/TasksTimeRow/TasksTimeRow.js
foreman-tasks-8.1.3 webpack/ForemanTasks/Components/TasksDashboard/Components/TasksTimeRow/TasksTimeRow.js
foreman-tasks-8.3.0 webpack/ForemanTasks/Components/TasksDashboard/Components/TasksTimeRow/TasksTimeRow.js
foreman-tasks-8.2.0 webpack/ForemanTasks/Components/TasksDashboard/Components/TasksTimeRow/TasksTimeRow.js