mirror of
https://github.com/arangodb/kube-arangodb.git
synced 2024-12-14 11:57:37 +00:00
Review comments
This commit is contained in:
parent
bf29d7a6c0
commit
de5cd8f60f
3 changed files with 9 additions and 9 deletions
|
@ -1,16 +1,16 @@
|
||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
import { Button, Container, Form, Icon, Message, Modal } from 'semantic-ui-react';
|
import { Button, Container, Form, Icon, Message, Modal } from 'semantic-ui-react';
|
||||||
|
|
||||||
const LoginView = ({username, password, usernameChanged, passwordChanged, doLogin, error}) => (
|
const LoginView = ({username, password, onUsernameChanged, onPasswordChanged, doLogin, error}) => (
|
||||||
<Container>
|
<Container>
|
||||||
<Form onSubmit={doLogin}>
|
<Form onSubmit={doLogin}>
|
||||||
<Form.Field>
|
<Form.Field>
|
||||||
<label>Name</label>
|
<label>Name</label>
|
||||||
<input focus="true" value={username} onChange={(e) => usernameChanged(e.target.value)}/>
|
<input focus="true" value={username} onChange={(e) => onUsernameChanged(e.target.value)}/>
|
||||||
</Form.Field>
|
</Form.Field>
|
||||||
<Form.Field>
|
<Form.Field>
|
||||||
<label>Password</label>
|
<label>Password</label>
|
||||||
<input type="password" value={password} onChange={(e) => passwordChanged(e.target.value)}/>
|
<input type="password" value={password} onChange={(e) => onPasswordChanged(e.target.value)}/>
|
||||||
</Form.Field>
|
</Form.Field>
|
||||||
</Form>
|
</Form>
|
||||||
{(error) ? <Message error content={error}/> : null}
|
{(error) ? <Message error content={error}/> : null}
|
||||||
|
@ -36,8 +36,8 @@ class Login extends Component {
|
||||||
error={this.props.error}
|
error={this.props.error}
|
||||||
username={this.state.username}
|
username={this.state.username}
|
||||||
password={this.state.password}
|
password={this.state.password}
|
||||||
usernameChanged={(v) => this.setState({username:v})}
|
onUsernameChanged={(v) => this.setState({username:v})}
|
||||||
passwordChanged={(v) => this.setState({password:v})}
|
onPasswordChanged={(v) => this.setState({password:v})}
|
||||||
doLogin={this.handleLogin}
|
doLogin={this.handleLogin}
|
||||||
/>
|
/>
|
||||||
</Modal.Content>
|
</Modal.Content>
|
||||||
|
|
|
@ -19,7 +19,7 @@ const LoaderBox = styled('span')`
|
||||||
const MemberGroupsView = ({memberGroups, namespace}) => (
|
const MemberGroupsView = ({memberGroups, namespace}) => (
|
||||||
<div>
|
<div>
|
||||||
{memberGroups.map((item) => <MemberList
|
{memberGroups.map((item) => <MemberList
|
||||||
key={`server-group-${item.group}`}
|
key={item.group}
|
||||||
group={item.group}
|
group={item.group}
|
||||||
members={item.members}
|
members={item.members}
|
||||||
namespace={namespace}
|
namespace={namespace}
|
||||||
|
|
|
@ -152,8 +152,8 @@ function getStateColorDescription(stateColor) {
|
||||||
|
|
||||||
class DeploymentList extends Component {
|
class DeploymentList extends Component {
|
||||||
state = {
|
state = {
|
||||||
items: undefined,
|
items: null,
|
||||||
error: undefined,
|
error: null,
|
||||||
loading: true
|
loading: true
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -168,7 +168,7 @@ class DeploymentList extends Component {
|
||||||
this.setState({
|
this.setState({
|
||||||
items: result.deployments,
|
items: result.deployments,
|
||||||
loading: false,
|
loading: false,
|
||||||
error: undefined
|
error: null
|
||||||
});
|
});
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
this.setState({error: e.message, loading: false});
|
this.setState({error: e.message, loading: false});
|
||||||
|
|
Loading…
Reference in a new issue