summaryrefslogtreecommitdiffstats
path: root/sdnr/wt/odlux/apps/mediatorApp/src/views/mediatorServerSelection.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'sdnr/wt/odlux/apps/mediatorApp/src/views/mediatorServerSelection.tsx')
-rw-r--r--sdnr/wt/odlux/apps/mediatorApp/src/views/mediatorServerSelection.tsx26
1 files changed, 15 insertions, 11 deletions
diff --git a/sdnr/wt/odlux/apps/mediatorApp/src/views/mediatorServerSelection.tsx b/sdnr/wt/odlux/apps/mediatorApp/src/views/mediatorServerSelection.tsx
index a23afb5f6..a5b34a2dc 100644
--- a/sdnr/wt/odlux/apps/mediatorApp/src/views/mediatorServerSelection.tsx
+++ b/sdnr/wt/odlux/apps/mediatorApp/src/views/mediatorServerSelection.tsx
@@ -42,8 +42,8 @@ const styles = (theme: Theme) => createStyles({
minWidth: 'unset',
},
spacer: {
- marginLeft: theme.spacing.unit,
- marginRight: theme.spacing.unit,
+ marginLeft: theme.spacing(1),
+ marginRight: theme.spacing(1),
display: "inline",
},
});
@@ -58,7 +58,7 @@ const mapDispatch = (dispatcher: IDispatcher) => ({
});
const emptyMediatorServer: MediatorServer = {
- _id: "",
+ id: "",
name: "",
url: ""
};
@@ -72,7 +72,7 @@ type MediatorServerSelectionComponentState = {
class MediatorServerSelectionComponent extends React.Component<MediatorServerSelectionComponentProps, MediatorServerSelectionComponentState> {
- constructor (props: MediatorServerSelectionComponentProps) {
+ constructor(props: MediatorServerSelectionComponentProps) {
super(props);
this.state = {
@@ -94,7 +94,7 @@ class MediatorServerSelectionComponent extends React.Component<MediatorServerSel
};
return (
<>
- <MediatorServersTable customActionButtons={[addMediatorServerActionButton]} idProperty={"_id"}
+ <MediatorServersTable title={"Mediator"} customActionButtons={[addMediatorServerActionButton]} idProperty={"id"}
{...this.props.mediatorServersActions} {...this.props.mediatorServersProperties} columns={[
{ property: "name", title: "Name", type: ColumnType.text },
{ property: "url", title: "Url", type: ColumnType.text },
@@ -106,19 +106,23 @@ class MediatorServerSelectionComponent extends React.Component<MediatorServerSel
</div>
)
}
- ]} onHandleClick={ this.onSelectMediatorServer } />
+ ]} onHandleClick={this.onSelectMediatorServer} />
<EditMediatorServerDialog
- mediatorServer={ this.state.mediatorServerToEdit }
- mode={ this.state.mediatorServerEditorMode }
- onClose={ this.onCloseEditMediatorServerDialog } />
+ mediatorServer={this.state.mediatorServerToEdit}
+ mode={this.state.mediatorServerEditorMode}
+ onClose={this.onCloseEditMediatorServerDialog} />
</>
);
}
- private onSelectMediatorServer = (event: React.MouseEvent<HTMLElement>, server: MediatorServer) =>{
+ public componentDidMount() {
+ this.props.mediatorServersActions.onToggleFilter();
+ }
+
+ private onSelectMediatorServer = (event: React.MouseEvent<HTMLElement>, server: MediatorServer) => {
event.preventDefault();
event.stopPropagation();
- this.props.selectMediatorServer(server && server._id);
+ this.props.selectMediatorServer(server && server.id);
}