webpack/scenes/RedHatRepositories/index.js in katello-3.9.1 vs webpack/scenes/RedHatRepositories/index.js in katello-3.10.0.rc1
- old
+ new
@@ -4,16 +4,18 @@
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { Grid, Row, Col } from 'react-bootstrap';
+import { Button } from 'patternfly-react';
import { LoadingState } from '../../move_to_pf/LoadingState';
import { createEnabledRepoParams, loadEnabledRepos } from '../../redux/actions/RedHatRepositories/enabled';
import { loadRepositorySets, updateRecommendedRepositorySets } from '../../redux/actions/RedHatRepositories/sets';
import SearchBar from './components/SearchBar';
import RecommendedRepositorySetsToggler from './components/RecommendedRepositorySetsToggler';
import { getSetsComponent, getEnabledComponent } from './helpers';
+import api from '../../services/api';
class RedHatRepositoriesPage extends Component {
componentDidMount() {
this.loadData();
}
@@ -30,11 +32,11 @@
return (
<Grid id="redhatRepositoriesPage" bsClass="container-fluid">
<h1>{__('Red Hat Repositories')}</h1>
<Row className="toolbar-pf">
<Col sm={12}>
- <SearchBar repoParams={repoParams} />
+ <SearchBar />
</Col>
</Row>
<Row className="row-eq-height">
<Col sm={6} className="available-repositories-container">
@@ -58,10 +60,19 @@
)}
</LoadingState>
</Col>
<Col sm={6} className="enabled-repositories-container">
- <h2>{__('Enabled Repositories')}</h2>
+ <h2>
+ {__('Enabled Repositories')}
+ <Button
+ className="pull-right"
+ onClick={() => { api.open('/repositories.csv', repoParams); }}
+ >
+ {__('Export as CSV')}
+ </Button>
+ </h2>
+
<LoadingState loading={enabledRepositories.loading} loadingText={__('Loading')}>
{getEnabledComponent(
enabledRepositories,
(pagination) => {
this.props.loadEnabledRepos({