sensor config ing
This commit is contained in:
parent
a5fba2317a
commit
cfce2f36a3
|
@ -32,7 +32,8 @@ export function mapStateToProps(state: any, props: any): SensorConfigurationStat
|
|||
export function mapDispatchToProps(dispatch: Dispatch<any>): SensorConfigurationDispatchProps {
|
||||
return {
|
||||
onReadAllTargetByDomain: (domain: Domain) => {
|
||||
dispatch(asyncRequestActions.request('InfraService', 'readAllByDomain', targetListActions.REQUEST, JSON.stringify(domain)));
|
||||
dispatch(asyncRequestActions.request('InfraService', 'readAllByDomain',
|
||||
targetListActions.REQUEST, JSON.stringify(domain), '0', '10'));
|
||||
},
|
||||
onReadInfra: (infraId: number) => {
|
||||
dispatch(asyncRequestActions.request('InfraService', 'read', readActionType.REQUEST, infraId));
|
||||
|
|
|
@ -104,12 +104,16 @@ export class ConfigStepper extends React.Component<ConfigStepperProps, ConfigSte
|
|||
|
||||
public convertInfraList(): void {
|
||||
|
||||
if (this.props.infraList === undefined) {
|
||||
return null;
|
||||
}
|
||||
|
||||
let selectionOptions: Array<DropdownItemProps> = new Array;
|
||||
|
||||
for (let infra of this.props.infraList) {
|
||||
|
||||
let option = {
|
||||
// key: crawler.id,
|
||||
key: infra.target.id,
|
||||
text: infra.target.displayName,
|
||||
value: infra.target.id,
|
||||
icon: 'check', // or close?
|
||||
|
@ -180,23 +184,26 @@ export class ConfigStepper extends React.Component<ConfigStepperProps, ConfigSte
|
|||
}
|
||||
}
|
||||
|
||||
public renderInfraList(): JSX.Element[] {
|
||||
public renderInfraList(): JSX.Element {
|
||||
|
||||
if (this.props.infraList === undefined) {
|
||||
return null;
|
||||
}
|
||||
|
||||
let elems: Array<JSX.Element> = new Array;
|
||||
this.convertInfraList();
|
||||
|
||||
elems.push(
|
||||
<Dropdown openOnFocus
|
||||
placeholder='Select Crawler' selection />,
|
||||
);
|
||||
// let elems: Array<JSX.Element> = new Array;
|
||||
|
||||
return null;
|
||||
// elems.push(
|
||||
return (<Dropdown openOnFocus
|
||||
placeholder='Select Target' selection options={this.selectOptions} />);
|
||||
// );
|
||||
|
||||
// return elems;
|
||||
}
|
||||
|
||||
public render(): JSX.Element {
|
||||
|
||||
return (
|
||||
<Container fluid>
|
||||
<Step.Group fluid>
|
||||
|
|
Loading…
Reference in New Issue
Block a user