Merge pull request #772 from nymtech/update/disable-bonding

add app alert
This commit is contained in:
Fouad
2021-09-10 17:17:14 +01:00
committed by GitHub
2 changed files with 15 additions and 1 deletions
@@ -43,6 +43,7 @@ export const BondNodeForm = ({
<Grid container spacing={3}> <Grid container spacing={3}>
<Grid item xs={12} sm={8}> <Grid item xs={12} sm={8}>
<TextField <TextField
disabled
required required
value={manageForm.formData.amount.value} value={manageForm.formData.amount.value}
onChange={manageForm.handleAmountChange} onChange={manageForm.handleAmountChange}
@@ -80,6 +81,7 @@ export const BondNodeForm = ({
)} )}
<Grid item xs={12}> <Grid item xs={12}>
<TextField <TextField
disabled
value={manageForm.formData.identityKey.value} value={manageForm.formData.identityKey.value}
onChange={manageForm.handleIdentityKeyChange} onChange={manageForm.handleIdentityKeyChange}
error={manageForm.formData.identityKey.isValid === false} error={manageForm.formData.identityKey.isValid === false}
@@ -95,6 +97,7 @@ export const BondNodeForm = ({
</Grid> </Grid>
<Grid item xs={12}> <Grid item xs={12}>
<TextField <TextField
disabled
value={manageForm.formData.sphinxKey.value} value={manageForm.formData.sphinxKey.value}
onChange={manageForm.handleShinxKeyChange} onChange={manageForm.handleShinxKeyChange}
error={manageForm.formData.sphinxKey.isValid === false} error={manageForm.formData.sphinxKey.isValid === false}
@@ -110,6 +113,7 @@ export const BondNodeForm = ({
</Grid> </Grid>
<Grid item xs={12} sm={6}> <Grid item xs={12} sm={6}>
<TextField <TextField
disabled
value={manageForm.formData.host.value} value={manageForm.formData.host.value}
onChange={manageForm.handleHostChange} onChange={manageForm.handleHostChange}
error={manageForm.formData.host.isValid === false} error={manageForm.formData.host.isValid === false}
@@ -128,6 +132,7 @@ export const BondNodeForm = ({
<Grid item xs={12} sm={6}> <Grid item xs={12} sm={6}>
{type === NodeType.Gateway && ( {type === NodeType.Gateway && (
<TextField <TextField
disabled
value={manageForm.formData.location.value} value={manageForm.formData.location.value}
onChange={manageForm.handleLocationChange} onChange={manageForm.handleLocationChange}
error={manageForm.formData.location.isValid === false} error={manageForm.formData.location.isValid === false}
@@ -145,6 +150,7 @@ export const BondNodeForm = ({
<Grid item xs={12} sm={6}> <Grid item xs={12} sm={6}>
<TextField <TextField
disabled
value={manageForm.formData.version.value} value={manageForm.formData.version.value}
onChange={manageForm.handleVersionChange} onChange={manageForm.handleVersionChange}
error={manageForm.formData.version.isValid === false} error={manageForm.formData.version.isValid === false}
@@ -183,6 +189,7 @@ export const BondNodeForm = ({
<> <>
<Grid item xs={12} sm={4}> <Grid item xs={12} sm={4}>
<TextField <TextField
disabled
value={manageForm.formData.mixPort.value} value={manageForm.formData.mixPort.value}
onChange={(e: React.ChangeEvent<HTMLInputElement>) => onChange={(e: React.ChangeEvent<HTMLInputElement>) =>
manageForm.handlePortChange('mixPort', e.target.value) manageForm.handlePortChange('mixPort', e.target.value)
@@ -199,6 +206,7 @@ export const BondNodeForm = ({
<> <>
<Grid item xs={12} sm={4}> <Grid item xs={12} sm={4}>
<TextField <TextField
disabled
value={manageForm.formData.verlocPort.value} value={manageForm.formData.verlocPort.value}
onChange={(e: React.ChangeEvent<HTMLInputElement>) => onChange={(e: React.ChangeEvent<HTMLInputElement>) =>
manageForm.handlePortChange('verlocPort', e.target.value) manageForm.handlePortChange('verlocPort', e.target.value)
@@ -214,6 +222,7 @@ export const BondNodeForm = ({
<Grid item xs={12} sm={4}> <Grid item xs={12} sm={4}>
<TextField <TextField
disabled
value={manageForm.formData.httpApiPort.value} value={manageForm.formData.httpApiPort.value}
onChange={(e: React.ChangeEvent<HTMLInputElement>) => onChange={(e: React.ChangeEvent<HTMLInputElement>) =>
manageForm.handlePortChange('httpApiPort', e.target.value) manageForm.handlePortChange('httpApiPort', e.target.value)
@@ -230,6 +239,7 @@ export const BondNodeForm = ({
) : ( ) : (
<Grid item xs={12} sm={4}> <Grid item xs={12} sm={4}>
<TextField <TextField
disabled
value={manageForm.formData.clientsPort.value} value={manageForm.formData.clientsPort.value}
onChange={(e: React.ChangeEvent<HTMLInputElement>) => onChange={(e: React.ChangeEvent<HTMLInputElement>) =>
manageForm.handlePortChange('clientsPort', e.target.value) manageForm.handlePortChange('clientsPort', e.target.value)
+5 -1
View File
@@ -24,7 +24,6 @@ export default function Application(props: AppProps) {
const { Component, pageProps } = props const { Component, pageProps } = props
const [client, setClient] = useState(null) const [client, setClient] = useState(null)
const [showAlert, setShowAlert] = useState(true)
React.useEffect(() => { React.useEffect(() => {
const jssStyles = document.querySelector('#jss-server-side') const jssStyles = document.querySelector('#jss-server-side')
@@ -46,6 +45,11 @@ export default function Application(props: AppProps) {
<ValidatorClientContext.Provider value={{ client, setClient }}> <ValidatorClientContext.Provider value={{ client, setClient }}>
<ThemeProvider theme={theme}> <ThemeProvider theme={theme}>
<CssBaseline /> <CssBaseline />
<AppAlert
title="Bonding disabled"
message="Mixnode bonding has been temporarily disabled"
severity="info"
/>
<Component {...pageProps} /> <Component {...pageProps} />
</ThemeProvider> </ThemeProvider>
</ValidatorClientContext.Provider> </ValidatorClientContext.Provider>