Skip to content

Commit

Permalink
feat(topic-data): copy topic data to another cluster (#458)
Browse files Browse the repository at this point in the history
close #331
  • Loading branch information
polarising-java authored Nov 11, 2020
1 parent f8894b8 commit 75a9def
Show file tree
Hide file tree
Showing 11 changed files with 698 additions and 2 deletions.
3 changes: 2 additions & 1 deletion client/src/components/Form/Form.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ class Form extends Root {
);
};

renderSelect = (name, label, items, onChange, selectClass, wrapperClass, rest) => {
renderSelect = (name, label, items, onChange, selectClass, wrapperClass, blankItem, rest) => {
const { formData, errors } = this.state;

return (
Expand All @@ -157,6 +157,7 @@ class Form extends Root {
}}
selectClass={selectClass}
wrapperClass={wrapperClass}
blankItem={blankItem}
{...rest}
/>
);
Expand Down
7 changes: 6 additions & 1 deletion client/src/components/Form/Select/Select.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';

const Select = ({ name, label, items, error, wrapperClass, selectClass, ...rest }) => {
const Select = ({ name, label, items, error, wrapperClass, selectClass, blankItem, ...rest }) => {
let wrapperClassRender = 'form-group';
let selectClassRender = 'col-xs-10';
if (wrapperClass) {
Expand All @@ -21,6 +21,11 @@ const Select = ({ name, label, items, error, wrapperClass, selectClass, ...rest
)}
<div className={`${selectClassRender}`}>
<select className={'form-control'} id={name} name={name} {...rest}>
{blankItem &&
<option key="" value="">
Choose item...
</option>
}
{items.map(item => (
<option key={item._id} value={item._id}>
{item.name}
Expand Down
8 changes: 8 additions & 0 deletions client/src/containers/Topic/Topic/Topic.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,14 @@ class Topic extends Root {
</div>
}

<Link to={{
pathname: `/ui/${clusterId}/topic/${topicId}/copy`
}}
className="btn btn-secondary mr-2"
>
<i className="fa fa-fw fa-level-down" aria-hidden={true} /> Copy Topic
</Link>

<Link to={{
pathname: `/ui/${clusterId}/tail`,
state: {
Expand Down
Loading

0 comments on commit 75a9def

Please sign in to comment.