mirror of
https://github.com/empayre/fleet.git
synced 2024-11-07 17:28:54 +00:00
dc4b97d15f
- Refactor imports of PropTypes to use the prop-types package - Upgrade dependencies that were setting off deprecation warnings
38 lines
1.1 KiB
JavaScript
38 lines
1.1 KiB
JavaScript
import React, { Component } from 'react';
|
|
import PropTypes from 'prop-types';
|
|
import { Link } from 'react-router';
|
|
|
|
import Icon from 'components/icons/Icon';
|
|
import scheduledQueryInterface from 'interfaces/scheduled_query';
|
|
|
|
const baseClass = 'pack-details-side-panel';
|
|
|
|
class ScheduledQueriesSection extends Component {
|
|
static propTypes = {
|
|
scheduledQueries: PropTypes.arrayOf(scheduledQueryInterface),
|
|
};
|
|
|
|
render () {
|
|
const { scheduledQueries } = this.props;
|
|
|
|
return (
|
|
<div className={`${baseClass}__scheduled-queries`}>
|
|
<p className={`${baseClass}__section-label`}>Queries</p>
|
|
|
|
<ul className={`${baseClass}__queries-list`}>
|
|
{scheduledQueries.map((scheduledQuery) => {
|
|
return (
|
|
<li key={`scheduled-query-${scheduledQuery.id}`}>
|
|
<Icon className={`${baseClass}__query-icon`} name="query" />
|
|
<Link to={`/queries/${scheduledQuery.query_id}`} className={`${baseClass}__query-name`}>{scheduledQuery.name}</Link>
|
|
</li>
|
|
);
|
|
})}
|
|
</ul>
|
|
</div>
|
|
);
|
|
}
|
|
}
|
|
|
|
export default ScheduledQueriesSection;
|