Always show mqtt client id

This commit is contained in:
Thomas Nordquist
2019-01-18 10:04:20 +01:00
parent 2f2f2842b4
commit 8a72a0224d
2 changed files with 13 additions and 13 deletions

View File

@@ -169,7 +169,7 @@ class Connection extends React.Component<Props, State> {
button: { button: {
margin: theme.spacing.unit, margin: theme.spacing.unit,
}, },
passwordFormControl: { inputFormControl: {
marginTop: '16px', marginTop: '16px',
}, },
} }
@@ -261,7 +261,7 @@ class Connection extends React.Component<Props, State> {
/> />
</Grid> </Grid>
<Grid item={true} xs={5}> <Grid item={true} xs={5}>
<FormControl className={`${classes.textField} ${classes.passwordFormControl}`}> <FormControl className={`${classes.textField} ${classes.inputFormControl}`}>
<InputLabel htmlFor="adornment-password">Password</InputLabel> <InputLabel htmlFor="adornment-password">Password</InputLabel>
<Input <Input
id="adornment-password" id="adornment-password"
@@ -273,14 +273,16 @@ class Connection extends React.Component<Props, State> {
</FormControl> </FormControl>
</Grid> </Grid>
<Grid item={true} xs={5}> <Grid item={true} xs={5}>
<TextField <FormControl className={`${classes.textField} ${classes.inputFormControl}`}>
label="Client ID" <InputLabel htmlFor="client-id">Client ID</InputLabel>
<Input
placeholder={this.randomClientId} placeholder={this.randomClientId}
className={classes.textField} className={classes.textField}
value={this.state.clientId || ''} value={this.state.clientId || ''}
onChange={this.handleChange('clientId')} onChange={this.handleChange('clientId')}
margin="normal" startAdornment={<span />}
/> />
</FormControl>
</Grid> </Grid>
<Grid item={true} xs={4}> <Grid item={true} xs={4}>
<div className={classes.switch}> <div className={classes.switch}>

View File

@@ -11,9 +11,7 @@ import * as q from '../../../../../backend/src/Model'
import { import {
Button, Button,
Fab,
FormControlLabel, FormControlLabel,
InputAdornment,
Radio, Radio,
RadioGroup, RadioGroup,
TextField, TextField,
@@ -192,7 +190,7 @@ class Publish extends React.Component<Props, State> {
} }
private didSelectHistoryEntry = (index: number) => { private didSelectHistoryEntry = (index: number) => {
let message = this.state.history[index] const message = this.state.history[index]
this.props.actions.setPublishTopic(message.topic) this.props.actions.setPublishTopic(message.topic)
this.props.actions.setPublishPayload(message.payload) this.props.actions.setPublishPayload(message.payload)
} }