|
|
@ -295,8 +295,8 @@ class Cluster extends React.Component {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
<div className="product">
|
|
|
|
<div className="product">
|
|
|
|
{this.props.hasPermissionToManage && (
|
|
|
|
<div className="arrow">
|
|
|
|
<div className="arrow">
|
|
|
|
{this.props.hasPermissionToManage && (
|
|
|
|
<button
|
|
|
|
<button
|
|
|
|
disabled={index === 0}
|
|
|
|
disabled={index === 0}
|
|
|
|
className="btn"
|
|
|
|
className="btn"
|
|
|
@ -306,8 +306,8 @@ class Cluster extends React.Component {
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<Icon type="caret-left" theme="filled" />
|
|
|
|
<Icon type="caret-left" theme="filled" />
|
|
|
|
</button>
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
)}
|
|
|
|
)}
|
|
|
|
</div>
|
|
|
|
<div className="product-icon">
|
|
|
|
<div className="product-icon">
|
|
|
|
<img src={imageSrc} />
|
|
|
|
<img src={imageSrc} />
|
|
|
|
<Tooltip title={packageId}>
|
|
|
|
<Tooltip title={packageId}>
|
|
|
@ -348,9 +348,14 @@ class Cluster extends React.Component {
|
|
|
|
<Spin spinning={loading}>
|
|
|
|
<Spin spinning={loading}>
|
|
|
|
<Row>
|
|
|
|
<Row>
|
|
|
|
<Col span={16}>
|
|
|
|
<Col span={16}>
|
|
|
|
<Title editable={{ onChange: this.handleNameChange }} level={4}>
|
|
|
|
{this.props.hasPermissionToManage && (
|
|
|
|
{name}
|
|
|
|
<Title editable={{ onChange: this.handleNameChange }} level={4}>
|
|
|
|
</Title>
|
|
|
|
{name}
|
|
|
|
|
|
|
|
</Title>
|
|
|
|
|
|
|
|
)}
|
|
|
|
|
|
|
|
{!this.props.hasPermissionToManage && (
|
|
|
|
|
|
|
|
<Title level={4}>{name}</Title>
|
|
|
|
|
|
|
|
)}
|
|
|
|
</Col>
|
|
|
|
</Col>
|
|
|
|
<Col span={8}>
|
|
|
|
<Col span={8}>
|
|
|
|
{!isTemporary && this.props.hasPermissionToManage && (
|
|
|
|
{!isTemporary && this.props.hasPermissionToManage && (
|
|
|
@ -413,51 +418,55 @@ class Cluster extends React.Component {
|
|
|
|
);
|
|
|
|
);
|
|
|
|
})}
|
|
|
|
})}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<Row>
|
|
|
|
{this.props.hasPermissionToManage && (
|
|
|
|
<Col>
|
|
|
|
<Row>
|
|
|
|
{isTemporary && (
|
|
|
|
<Col>
|
|
|
|
<div>
|
|
|
|
{isTemporary && (
|
|
|
|
<Button onClick={this.cancelAddingNewCluster}>Cancel</Button>
|
|
|
|
<div>
|
|
|
|
<Divider type="vertical" />
|
|
|
|
<Button onClick={this.cancelAddingNewCluster}>
|
|
|
|
<Tooltip
|
|
|
|
Cancel
|
|
|
|
title={
|
|
|
|
</Button>
|
|
|
|
products.length === 0
|
|
|
|
<Divider type="vertical" />
|
|
|
|
? 'You must add applications to the cluster before saving'
|
|
|
|
<Tooltip
|
|
|
|
: ''
|
|
|
|
title={
|
|
|
|
}
|
|
|
|
products.length === 0
|
|
|
|
>
|
|
|
|
? 'You must add applications to the cluster before saving'
|
|
|
|
|
|
|
|
: ''
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<Button
|
|
|
|
|
|
|
|
disabled={products.length === 0}
|
|
|
|
|
|
|
|
onClick={this.saveNewCluster}
|
|
|
|
|
|
|
|
htmlType="button"
|
|
|
|
|
|
|
|
type="primary"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
Save
|
|
|
|
|
|
|
|
</Button>
|
|
|
|
|
|
|
|
</Tooltip>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
)}
|
|
|
|
|
|
|
|
{!isTemporary && (
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
|
|
|
<Button
|
|
|
|
|
|
|
|
onClick={this.resetChanges}
|
|
|
|
|
|
|
|
disabled={!this.state.isSaveable}
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
Cancel
|
|
|
|
|
|
|
|
</Button>
|
|
|
|
|
|
|
|
<Divider type="vertical" />
|
|
|
|
<Button
|
|
|
|
<Button
|
|
|
|
disabled={products.length === 0}
|
|
|
|
onClick={this.updateCluster}
|
|
|
|
onClick={this.saveNewCluster}
|
|
|
|
|
|
|
|
htmlType="button"
|
|
|
|
htmlType="button"
|
|
|
|
type="primary"
|
|
|
|
type="primary"
|
|
|
|
|
|
|
|
disabled={!this.state.isSaveable}
|
|
|
|
>
|
|
|
|
>
|
|
|
|
Save
|
|
|
|
Save
|
|
|
|
</Button>
|
|
|
|
</Button>
|
|
|
|
</Tooltip>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
)}
|
|
|
|
)}
|
|
|
|
</Col>
|
|
|
|
{!isTemporary && (
|
|
|
|
</Row>
|
|
|
|
<div>
|
|
|
|
)}
|
|
|
|
<Button
|
|
|
|
|
|
|
|
onClick={this.resetChanges}
|
|
|
|
|
|
|
|
disabled={!this.state.isSaveable}
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
Cancel
|
|
|
|
|
|
|
|
</Button>
|
|
|
|
|
|
|
|
<Divider type="vertical" />
|
|
|
|
|
|
|
|
<Button
|
|
|
|
|
|
|
|
onClick={this.updateCluster}
|
|
|
|
|
|
|
|
htmlType="button"
|
|
|
|
|
|
|
|
type="primary"
|
|
|
|
|
|
|
|
disabled={!this.state.isSaveable}
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
Save
|
|
|
|
|
|
|
|
</Button>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
)}
|
|
|
|
|
|
|
|
</Col>
|
|
|
|
|
|
|
|
</Row>
|
|
|
|
|
|
|
|
</Spin>
|
|
|
|
</Spin>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
);
|
|
|
|