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