feat: add detail info to action in detail tab

1. add instance detail info to the attach volume action in the instance detail page
2. add instance detail info to the manage security group action and detach action in the instance detail page
3. add port detail info to the manage security group action and detach action in the port detail page

Change-Id: Ie63f8d330ad5442fdb5c6263e83e974e53fb1a3e
This commit is contained in:
Jingwei.Zhang 2023-09-12 11:16:20 +08:00
parent d5b58ac16d
commit 61e07535a5
3 changed files with 4 additions and 3 deletions

View File

@ -399,8 +399,6 @@ export class BaseDetail extends Base {
</div>
);
});
const { isAdminPage } = this.props;
const containerProps = { isAdminPage };
return (
<Row className={styles['vm-volume']}>
<div className={styles['volume-inline']} />
@ -413,7 +411,7 @@ export class BaseDetail extends Base {
actions={this.volumeActions}
onFinishAction={this.handleRefreshVolume}
item={this.detailData}
containerProps={containerProps}
containerProps={this.props}
firstActionClassName={styles['attach-btn']}
/>
</div>

View File

@ -123,6 +123,7 @@ export class SecurityGroup extends React.Component {
actions={{ firstAction: Detach }}
onFinishAction={this.actionCallback}
item={newItem}
containerProps={this.props}
>
{t('Detach')}
</ItemActionButtons>
@ -229,6 +230,7 @@ export class SecurityGroup extends React.Component {
port: activeInterfaceId,
portItem: activeInterface,
filterData,
...this.props,
}}
>
{t('Attach Security Group')}

View File

@ -90,6 +90,7 @@ export class SecurityGroup extends React.Component {
actions={{ firstAction: Detach }}
onFinishAction={this.refreshSecurityGroup}
item={item}
containerProps={this.props}
>
{t('Detach')}
</ItemActionButtons>