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-2.0.2 webpack/ForemanTasks/Components/TasksDashboard/Components/TasksTimeRow/TasksTimeRow.js
foreman-tasks-1.1.3 webpack/ForemanTasks/Components/TasksDashboard/Components/TasksTimeRow/TasksTimeRow.js
foreman-tasks-1.1.2 webpack/ForemanTasks/Components/TasksDashboard/Components/TasksTimeRow/TasksTimeRow.js
foreman-tasks-2.0.1 webpack/ForemanTasks/Components/TasksDashboard/Components/TasksTimeRow/TasksTimeRow.js
foreman-tasks-2.0.0 webpack/ForemanTasks/Components/TasksDashboard/Components/TasksTimeRow/TasksTimeRow.js
foreman-tasks-1.2.0 webpack/ForemanTasks/Components/TasksDashboard/Components/TasksTimeRow/TasksTimeRow.js
foreman-tasks-1.1.1 webpack/ForemanTasks/Components/TasksDashboard/Components/TasksTimeRow/TasksTimeRow.js
foreman-tasks-1.1.0 webpack/ForemanTasks/Components/TasksDashboard/Components/TasksTimeRow/TasksTimeRow.js
foreman-tasks-0.17.6 webpack/ForemanTasks/Components/TasksDashboard/Components/TasksTimeRow/TasksTimeRow.js
foreman-tasks-1.0.1 webpack/ForemanTasks/Components/TasksDashboard/Components/TasksTimeRow/TasksTimeRow.js
foreman-tasks-1.0.0 webpack/ForemanTasks/Components/TasksDashboard/Components/TasksTimeRow/TasksTimeRow.js
foreman-tasks-0.17.5 webpack/ForemanTasks/Components/TasksDashboard/Components/TasksTimeRow/TasksTimeRow.js
foreman-tasks-0.17.4 webpack/ForemanTasks/Components/TasksDashboard/Components/TasksTimeRow/TasksTimeRow.js
foreman-tasks-0.17.3 webpack/ForemanTasks/Components/TasksDashboard/Components/TasksTimeRow/TasksTimeRow.js
foreman-tasks-0.17.2 webpack/ForemanTasks/Components/TasksDashboard/Components/TasksTimeRow/TasksTimeRow.js
foreman-tasks-0.16.3 webpack/ForemanTasks/Components/TasksDashboard/Components/TasksTimeRow/TasksTimeRow.js
foreman-tasks-0.17.1 webpack/ForemanTasks/Components/TasksDashboard/Components/TasksTimeRow/TasksTimeRow.js
foreman-tasks-0.15.11 webpack/ForemanTasks/Components/TasksDashboard/Components/TasksTimeRow/TasksTimeRow.js
foreman-tasks-0.16.2 webpack/ForemanTasks/Components/TasksDashboard/Components/TasksTimeRow/TasksTimeRow.js
foreman-tasks-0.15.10 webpack/ForemanTasks/Components/TasksDashboard/Components/TasksTimeRow/TasksTimeRow.js