fix a couple of invaild props (#10810)
This commit is contained in:
parent
3b9880a0ed
commit
64774de6e1
@ -39,7 +39,7 @@ class MainLayout extends React.Component {
|
|||||||
getState: PropTypes.func,
|
getState: PropTypes.func,
|
||||||
functionMode: PropTypes.string,
|
functionMode: PropTypes.string,
|
||||||
authEnabled: PropTypes.string,
|
authEnabled: PropTypes.string,
|
||||||
children: PropTypes.object,
|
children: PropTypes.array,
|
||||||
getNotice: PropTypes.func,
|
getNotice: PropTypes.func,
|
||||||
notice: PropTypes.string,
|
notice: PropTypes.string,
|
||||||
};
|
};
|
||||||
@ -152,7 +152,9 @@ class MainLayout extends React.Component {
|
|||||||
</div>
|
</div>
|
||||||
<div className="right-panel next-shell-sub-main">
|
<div className="right-panel next-shell-sub-main">
|
||||||
{authEnabled === 'false' ? (
|
{authEnabled === 'false' ? (
|
||||||
<Message type="notice"><div dangerouslySetInnerHTML={{ __html: this.props.notice }} /></Message>
|
<Message type="notice">
|
||||||
|
<div dangerouslySetInnerHTML={{ __html: this.props.notice }} />
|
||||||
|
</Message>
|
||||||
) : null}
|
) : null}
|
||||||
{this.props.children}
|
{this.props.children}
|
||||||
</div>
|
</div>
|
||||||
|
@ -48,7 +48,7 @@ class PermissionsManagement extends React.Component {
|
|||||||
static propTypes = {
|
static propTypes = {
|
||||||
locale: PropTypes.object,
|
locale: PropTypes.object,
|
||||||
permissions: PropTypes.object,
|
permissions: PropTypes.object,
|
||||||
namespaces: PropTypes.object,
|
namespaces: PropTypes.array,
|
||||||
getPermissions: PropTypes.func,
|
getPermissions: PropTypes.func,
|
||||||
getNamespaces: PropTypes.func,
|
getNamespaces: PropTypes.func,
|
||||||
};
|
};
|
||||||
|
@ -123,7 +123,7 @@ class UserManagement extends React.Component {
|
|||||||
<Form inline>
|
<Form inline>
|
||||||
<Form.Item label={locale.username}>
|
<Form.Item label={locale.username}>
|
||||||
<Input
|
<Input
|
||||||
value={this.username}
|
value={this.state.username || ''}
|
||||||
htmlType="text"
|
htmlType="text"
|
||||||
placeholder={this.state.defaultFuzzySearch ? locale.defaultFuzzyd : locale.fuzzyd}
|
placeholder={this.state.defaultFuzzySearch ? locale.defaultFuzzyd : locale.fuzzyd}
|
||||||
style={{ width: 200 }}
|
style={{ width: 200 }}
|
||||||
|
@ -29,8 +29,8 @@ class EditInstanceDialog extends React.Component {
|
|||||||
serviceName: PropTypes.string,
|
serviceName: PropTypes.string,
|
||||||
clusterName: PropTypes.string,
|
clusterName: PropTypes.string,
|
||||||
groupName: PropTypes.string,
|
groupName: PropTypes.string,
|
||||||
openLoading: PropTypes.string,
|
openLoading: PropTypes.func,
|
||||||
closeLoading: PropTypes.string,
|
closeLoading: PropTypes.func,
|
||||||
getInstanceList: PropTypes.func,
|
getInstanceList: PropTypes.func,
|
||||||
locale: PropTypes.object,
|
locale: PropTypes.object,
|
||||||
};
|
};
|
||||||
|
@ -162,7 +162,7 @@ class InstanceTable extends React.Component {
|
|||||||
cell={(metadata = {}) => {
|
cell={(metadata = {}) => {
|
||||||
if (!metadata) return null;
|
if (!metadata) return null;
|
||||||
return Object.keys(metadata).map(k => (
|
return Object.keys(metadata).map(k => (
|
||||||
<p>
|
<p key={k}>
|
||||||
{k}={metadata[k]}
|
{k}={metadata[k]}
|
||||||
</p>
|
</p>
|
||||||
));
|
));
|
||||||
|
@ -111,6 +111,8 @@ class SubscriberList extends React.Component {
|
|||||||
render() {
|
render() {
|
||||||
const { locale = {}, subscriberData = {} } = this.props;
|
const { locale = {}, subscriberData = {} } = this.props;
|
||||||
const { count = 0, subscribers = [] } = subscriberData;
|
const { count = 0, subscribers = [] } = subscriberData;
|
||||||
|
const subscribersArray = Array.isArray(subscribers) ? subscribers : [];
|
||||||
|
|
||||||
const {
|
const {
|
||||||
pubNoData,
|
pubNoData,
|
||||||
subscriberList,
|
subscriberList,
|
||||||
@ -186,7 +188,7 @@ class SubscriberList extends React.Component {
|
|||||||
</Row>
|
</Row>
|
||||||
<Row style={{ padding: 0 }}>
|
<Row style={{ padding: 0 }}>
|
||||||
<Col span="24" style={{ padding: 0 }}>
|
<Col span="24" style={{ padding: 0 }}>
|
||||||
<Table dataSource={subscribers} locale={{ empty: pubNoData }}>
|
<Table dataSource={subscribersArray} locale={{ empty: pubNoData }}>
|
||||||
<Column title={locale.serviceName} dataIndex="serviceName" />
|
<Column title={locale.serviceName} dataIndex="serviceName" />
|
||||||
<Column title={locale.address} dataIndex="addrStr" />
|
<Column title={locale.address} dataIndex="addrStr" />
|
||||||
<Column title={locale.clientVersion} dataIndex="agent" />
|
<Column title={locale.clientVersion} dataIndex="agent" />
|
||||||
|
Loading…
Reference in New Issue
Block a user