mirror of
https://github.com/empayre/fleet.git
synced 2024-11-07 09:18:59 +00:00
117130701a
* Fix various url-prefix links Co-authored-by: gillespi314 <73313222+gillespi314@users.noreply.github.com>
43 lines
1.1 KiB
JavaScript
43 lines
1.1 KiB
JavaScript
import React, { Component } from "react";
|
|
import PropTypes from "prop-types";
|
|
import { Link } from "react-router";
|
|
|
|
import PATHS from "router/paths";
|
|
|
|
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}`}>
|
|
<Link
|
|
to={PATHS.EDIT_QUERY({ id: scheduledQuery.query_id })}
|
|
className={`${baseClass}__query-name`}
|
|
>
|
|
{scheduledQuery.name}
|
|
</Link>
|
|
</li>
|
|
);
|
|
})}
|
|
</ul>
|
|
</div>
|
|
);
|
|
}
|
|
}
|
|
|
|
export default ScheduledQueriesSection;
|