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 {
|
export function mapDispatchToProps(dispatch: Dispatch<any>): SensorConfigurationDispatchProps {
|
||||||
return {
|
return {
|
||||||
onReadAllTargetByDomain: (domain: Domain) => {
|
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) => {
|
onReadInfra: (infraId: number) => {
|
||||||
dispatch(asyncRequestActions.request('InfraService', 'read', readActionType.REQUEST, infraId));
|
dispatch(asyncRequestActions.request('InfraService', 'read', readActionType.REQUEST, infraId));
|
||||||
|
|
|
@ -104,12 +104,16 @@ export class ConfigStepper extends React.Component<ConfigStepperProps, ConfigSte
|
||||||
|
|
||||||
public convertInfraList(): void {
|
public convertInfraList(): void {
|
||||||
|
|
||||||
|
if (this.props.infraList === undefined) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
let selectionOptions: Array<DropdownItemProps> = new Array;
|
let selectionOptions: Array<DropdownItemProps> = new Array;
|
||||||
|
|
||||||
for (let infra of this.props.infraList) {
|
for (let infra of this.props.infraList) {
|
||||||
|
|
||||||
let option = {
|
let option = {
|
||||||
// key: crawler.id,
|
key: infra.target.id,
|
||||||
text: infra.target.displayName,
|
text: infra.target.displayName,
|
||||||
value: infra.target.id,
|
value: infra.target.id,
|
||||||
icon: 'check', // or close?
|
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) {
|
if (this.props.infraList === undefined) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
let elems: Array<JSX.Element> = new Array;
|
this.convertInfraList();
|
||||||
|
|
||||||
elems.push(
|
// let elems: Array<JSX.Element> = new Array;
|
||||||
<Dropdown openOnFocus
|
|
||||||
placeholder='Select Crawler' selection />,
|
|
||||||
);
|
|
||||||
|
|
||||||
return null;
|
// elems.push(
|
||||||
|
return (<Dropdown openOnFocus
|
||||||
|
placeholder='Select Target' selection options={this.selectOptions} />);
|
||||||
|
// );
|
||||||
|
|
||||||
|
// return elems;
|
||||||
}
|
}
|
||||||
|
|
||||||
public render(): JSX.Element {
|
public render(): JSX.Element {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Container fluid>
|
<Container fluid>
|
||||||
<Step.Group fluid>
|
<Step.Group fluid>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user