Merge "feat: Add Keypair column list to instances."
This commit is contained in:
commit
8be87ab24e
@ -65,6 +65,7 @@ export class BaseDetail extends Base {
|
||||
this.imageCard,
|
||||
this.securityGroupCard,
|
||||
this.tagsCard,
|
||||
this.keypairCard,
|
||||
];
|
||||
if (!isIronicInstance(this.detailData)) {
|
||||
cards.push(this.serverGroupCard);
|
||||
@ -172,6 +173,22 @@ export class BaseDetail extends Base {
|
||||
};
|
||||
}
|
||||
|
||||
get keypairCard() {
|
||||
const keypair = this.detailData.key_name;
|
||||
const url = this.getRoutePath('keypairDetail', { id: keypair });
|
||||
const content = keypair ? (this.isAdminPage ? <div>{keypair}</div> : <Link to={url}>{keypair}</Link>) : '-';
|
||||
const options = [
|
||||
{
|
||||
label: t('Name'),
|
||||
content: content,
|
||||
},
|
||||
];
|
||||
return {
|
||||
title: t('Keypair Info'),
|
||||
options,
|
||||
};
|
||||
}
|
||||
|
||||
get imageCard() {
|
||||
const item = this.detailData.itemInList || {};
|
||||
const { image, image_name } = item;
|
||||
|
Loading…
Reference in New Issue
Block a user