feat: add tip for rebuild instance

Add snapshot tip of the root disk when rebuilding instance

Change-Id: I551d774f12cc4d8646d91a6cfad72bf835cf5315
This commit is contained in:
zhangjingwei 2024-03-08 12:29:59 +08:00
parent cc99a8199f
commit 9b2425e781
6 changed files with 43 additions and 0 deletions

View File

@ -1209,6 +1209,7 @@
"If set then all tenants will be able to see this share.": "If set then all tenants will be able to see this share.",
"If the capacity of the disk is large, the type modify operation may take several hours. Please be cautious.": "If the capacity of the disk is large, the type modify operation may take several hours. Please be cautious.",
"If the listener has an SNI certificate installed, it cannot be removed. Please delete the listener or replace the SNI certificate": "If the listener has an SNI certificate installed, it cannot be removed. Please delete the listener or replace the SNI certificate",
"If the root disk has a snapshot, it will affect the deletion of the original disk during reconstruction or the recovery of the instance snapshot.": "If the root disk has a snapshot, it will affect the deletion of the original disk during reconstruction or the recovery of the instance snapshot.",
"If the value is set to 0, it means unlimited": "If the value is set to 0, it means unlimited",
"If the volume associated with the snapshot has changed the volume type, please modify this option manually; if the volume associated with the snapshot keeps the volume type unchanged, please ignore this option. (no need to change).": "If the volume associated with the snapshot has changed the volume type, please modify this option manually; if the volume associated with the snapshot keeps the volume type unchanged, please ignore this option. (no need to change).",
"If this parameter is specified, Zun will create a security group with a set of rules to open the ports that should be exposed, and associate the security group to the container.": "If this parameter is specified, Zun will create a security group with a set of rules to open the ports that should be exposed, and associate the security group to the container.",
@ -2512,6 +2513,7 @@
"The resource class of the scheduled node needs to correspond to the resource class name of the flavor used by the ironic instance (for example, the resource class name of the scheduling node is baremetal.with-GPU, and the custom resource class name of the flavor is CUSTOM_BAREMETAL_WITH_GPU=1).": "The resource class of the scheduled node needs to correspond to the resource class name of the flavor used by the ironic instance (for example, the resource class name of the scheduling node is baremetal.with-GPU, and the custom resource class name of the flavor is CUSTOM_BAREMETAL_WITH_GPU=1).",
"The resource has been deleted": "The resource has been deleted",
"The root and os_admin are default users and cannot be created!": "The root and os_admin are default users and cannot be created!",
"The root disk of the instance has snapshots": "The root disk of the instance has snapshots",
"The security group is similar to the firewall function and is used to set up network access control. ": "The security group is similar to the firewall function and is used to set up network access control. ",
"The security group is similar to the firewall function for setting up network access control, or you can go to the console and create a new security group. (Note: The security group you selected will work on all virtual LANs on the instances.)": "The security group is similar to the firewall function for setting up network access control, or you can go to the console and create a new security group. (Note: The security group you selected will work on all virtual LANs on the instances.)",
"The selected VPC/subnet does not have IPv6 enabled.": "The selected VPC/subnet does not have IPv6 enabled.",

View File

@ -1209,6 +1209,7 @@
"If set then all tenants will be able to see this share.": "설정하면 모든 tenant가 이 share를 조회할 수 있습니다.",
"If the capacity of the disk is large, the type modify operation may take several hours. Please be cautious.": "디스크 용량이 큰 경우 유형 수정 작업이 몇 시간 걸릴 수 있습니다. 신중하세요.",
"If the listener has an SNI certificate installed, it cannot be removed. Please delete the listener or replace the SNI certificate": "listener에 SNI 인증서가 설치되어 있으면 삭제할 수 없습니다. listener를 삭제하거나 SNI 인증서를 교체하세요.",
"If the root disk has a snapshot, it will affect the deletion of the original disk during reconstruction or the recovery of the instance snapshot.": "",
"If the value is set to 0, it means unlimited": "값이 0으로 설정되어 있으면 무제한임을 의미합니다.",
"If the volume associated with the snapshot has changed the volume type, please modify this option manually; if the volume associated with the snapshot keeps the volume type unchanged, please ignore this option. (no need to change).": "스냅샷과 연결된 볼륨의 볼륨 유형이 변경된 경우, 이 옵션을 수동으로 수정하세요. 만약 스냅샷과 연결된 볼륨의 볼륨 유형이 변경되지 않는 경우 이 옵션을 무시하세요. (변경할 필요 없음).",
"If this parameter is specified, Zun will create a security group with a set of rules to open the ports that should be exposed, and associate the security group to the container.": "이 매개 변수가 지정된 경우 Zun은 노출되어야 하는 포트를 허용하는 rule을 포함한 Security Group을 생성하고, 해당 Security Group을 컨테이너에 연결합니다.",
@ -2512,6 +2513,7 @@
"The resource class of the scheduled node needs to correspond to the resource class name of the flavor used by the ironic instance (for example, the resource class name of the scheduling node is baremetal.with-GPU, and the custom resource class name of the flavor is CUSTOM_BAREMETAL_WITH_GPU=1).": "예약된 노드의 자원 클래스는 ironic 인스턴스에서 사용하는 flavor의 자원 클래스 이름과 일치해야 합니다 (예: 예약된 노드의 자원 클래스 이름이 baremetal.with-GPU이고 플레이버의 사용자 정의 자원 클래스 이름이 CUSTOM_BAREMETAL_WITH_GPU=1인 경우).",
"The resource has been deleted": "이 리소스는 삭제되었습니다.",
"The root and os_admin are default users and cannot be created!": "root와 os_admin은 기본 사용자로, 생성할 수 없습니다!",
"The root disk of the instance has snapshots": "",
"The security group is similar to the firewall function and is used to set up network access control. ": "security group은 방화벽 기능과 유사하며 네트워크 액세스 제어를 설정하는 데 사용됩니다.",
"The security group is similar to the firewall function for setting up network access control, or you can go to the console and create a new security group. (Note: The security group you selected will work on all virtual LANs on the instances.)": "security group은 방화벽 기능과 유사하며 네트워크 액세스 제어를 설정하는 데 사용됩니다. 또는 콘솔로 이동하여 새 security group을 만들 수 있습니다. (참고: 선택한 security group은 인스턴스의 모든 가상 LAN에서 작동합니다.)",
"The selected VPC/subnet does not have IPv6 enabled.": "선택한 VPC/subnet에는 IPv6가 활성화되어 있지 않습니다.",

View File

@ -1209,6 +1209,7 @@
"If set then all tenants will be able to see this share.": "Если установлено, все арендаторы смогут видеть эту долю.",
"If the capacity of the disk is large, the type modify operation may take several hours. Please be cautious.": "Если объем диска большой, операция изменения типа может занять несколько часов. Пожалуйста, будьте осторожны.",
"If the listener has an SNI certificate installed, it cannot be removed. Please delete the listener or replace the SNI certificate": "Если у слушателя установлен сертификат SNI, его нельзя удалить. Пожалуйста, удалите слушателя или замените сертификат SNI",
"If the root disk has a snapshot, it will affect the deletion of the original disk during reconstruction or the recovery of the instance snapshot.": "",
"If the value is set to 0, it means unlimited": "Если значение установлено как 0, это означает неограниченное количество",
"If the volume associated with the snapshot has changed the volume type, please modify this option manually; if the volume associated with the snapshot keeps the volume type unchanged, please ignore this option. (no need to change).": "Если тип диска, связанного со снимком, был изменен, пожалуйста, измените эту опцию вручную. Если тип диска, связанного со снимком, остался неизменным, проигнорируйте эту опцию (не требуется изменять).",
"If this parameter is specified, Zun will create a security group with a set of rules to open the ports that should be exposed, and associate the security group to the container.": "Если этот параметр указан, Zun создаст группу безопасности с набором правил для открытия портов, которые должны быть доступны, и свяжет группу безопасности с контейнером.",
@ -2512,6 +2513,7 @@
"The resource class of the scheduled node needs to correspond to the resource class name of the flavor used by the ironic instance (for example, the resource class name of the scheduling node is baremetal.with-GPU, and the custom resource class name of the flavor is CUSTOM_BAREMETAL_WITH_GPU=1).": "Ресурсный класс запланированного узла должен соответствовать имени ресурсного класса используемого образца (например, имя ресурсного класса запланированного узла - baremetal.with-GPU, а пользовательское имя ресурсного класса образца - CUSTOM_BAREMETAL_WITH_GPU=1).",
"The resource has been deleted": "Ресурс был удален",
"The root and os_admin are default users and cannot be created!": "Пользователи root и os_admin являются пользователями по умолчанию и не могут быть созданы!",
"The root disk of the instance has snapshots": "",
"The security group is similar to the firewall function and is used to set up network access control. ": "Группа безопасности аналогична функции брандмауэра и используется для настройки контроля доступа к сети.",
"The security group is similar to the firewall function for setting up network access control, or you can go to the console and create a new security group. (Note: The security group you selected will work on all virtual LANs on the instances.)": "Группа безопасности аналогична функции брандмауэра для настройки контроля доступа к сети, или вы можете перейти в консоль и создать новую группу безопасности. (Примечание: Группа безопасности, которую вы выбрали, будет работать на всех виртуальных сетях инстансов.)",
"The selected VPC/subnet does not have IPv6 enabled.": "Выбранная ВПС/ подсеть не поддерживает IPv6.",

View File

@ -1209,6 +1209,7 @@
"If set then all tenants will be able to see this share.": "Eğer belirtilirse, tüm tenantlar bu paylaşımı görebilecektir.",
"If the capacity of the disk is large, the type modify operation may take several hours. Please be cautious.": "Disk kapasitesi büyükse, tip değiştirme işlemi birkaç saat sürebilir. Lütfen dikkatli olun.",
"If the listener has an SNI certificate installed, it cannot be removed. Please delete the listener or replace the SNI certificate": "Dinleyiciye SNI sertifikası yüklüyse, kaldırılamaz. Dinleyiciyi silin veya SNI sertifikasını değiştirin.",
"If the root disk has a snapshot, it will affect the deletion of the original disk during reconstruction or the recovery of the instance snapshot.": "",
"If the value is set to 0, it means unlimited": "Değer 0 olarak ayarlanırsa, sınırsız anlamına gelir.",
"If the volume associated with the snapshot has changed the volume type, please modify this option manually; if the volume associated with the snapshot keeps the volume type unchanged, please ignore this option. (no need to change).": "Anlık görüntü ile ilişkilendirilen diskteki disk türü değiştirildiyse, lütfen bu seçeneği manuel olarak değiştirin; eğer anlık görüntü ile ilişkilendirilen diskteki disk türü değişmediyse, lütfen bu seçeneği yok sayın (değiştirmeniz gerekmez).",
"If this parameter is specified, Zun will create a security group with a set of rules to open the ports that should be exposed, and associate the security group to the container.": "Eğer bu parametre belirtilirse, Zun belirtilen ağ adaptörlerini açmak için bir kural kümesi ile bir güvenlik grubu oluşturacak ve güvenlik grubunu konteynerle ilişkilendirecektir.",
@ -2512,6 +2513,7 @@
"The resource class of the scheduled node needs to correspond to the resource class name of the flavor used by the ironic instance (for example, the resource class name of the scheduling node is baremetal.with-GPU, and the custom resource class name of the flavor is CUSTOM_BAREMETAL_WITH_GPU=1).": "Zamanlanan düğümün kaynak sınıfı, ironik sanal makine tarafından kullanılan şablonun kaynak sınıfı adına karşılık gelmelidir (örneğin, zamanlama düğümünün kaynak sınıfı adı baremetal.with-GPU ve şablonun özel kaynak sınıfı adı CUSTOM_BAREMETAL_WITH_GPU=1).",
"The resource has been deleted": "Kaynak silinmiştir.",
"The root and os_admin are default users and cannot be created!": "root ve os_admin varsayılan kullanıcılardır ve oluşturulamazlar!",
"The root disk of the instance has snapshots": "",
"The security group is similar to the firewall function and is used to set up network access control. ": "Güvenlik grubu, güvenlik duvarı işlevine benzer ve ağ erişim kontrolü kurmak için kullanılır.",
"The security group is similar to the firewall function for setting up network access control, or you can go to the console and create a new security group. (Note: The security group you selected will work on all virtual LANs on the instances.)": "Güvenlik grubu, ağ erişim kontrolü kurmak için güvenlik duvarı işlevine benzerdir veya konsola giderek yeni bir güvenlik grubu oluşturabilirsiniz. (Not: Seçtiğiniz güvenlik grubu, Sanal Makinelerdeki tüm sanal LAN'larda çalışacaktır.)",
"The selected VPC/subnet does not have IPv6 enabled.": "Seçilen VPC/alt ağda IPv6 etkinleştirilmemiş.",

View File

@ -1209,6 +1209,7 @@
"If set then all tenants will be able to see this share.": "如果设置,则所有租户都将能够看到此共享。",
"If the capacity of the disk is large, the type modify operation may take several hours. Please be cautious.": "如果云硬盘容量较大,修改云硬盘类型可能需要花费几个小时,请您谨慎操作。",
"If the listener has an SNI certificate installed, it cannot be removed. Please delete the listener or replace the SNI certificate": "如果监听器安装了 SNI 证书,则无法将其删除。请删除监听器或更换 SNI 证书",
"If the root disk has a snapshot, it will affect the deletion of the original disk during reconstruction or the recovery of the instance snapshot.": "如果根盘有快照,会影响重构时原盘的删除或云主机快照的恢复。",
"If the value is set to 0, it means unlimited": "如果值为0则表示无限制",
"If the volume associated with the snapshot has changed the volume type, please modify this option manually; if the volume associated with the snapshot keeps the volume type unchanged, please ignore this option. (no need to change).": "若快照关联的云硬盘修改过云硬盘类型,请手动修改此选项;若快照关联的云硬盘保持云硬盘类型不变,请忽略此选项(不需要做变更)。",
"If this parameter is specified, Zun will create a security group with a set of rules to open the ports that should be exposed, and associate the security group to the container.": "如果指定了这个参数Zun 会创建一个安全组,里面有一组规则来开放应该暴露的端口,并将安全组关联到容器上。",
@ -2512,6 +2513,7 @@
"The resource class of the scheduled node needs to correspond to the resource class name of the flavor used by the ironic instance (for example, the resource class name of the scheduling node is baremetal.with-GPU, and the custom resource class name of the flavor is CUSTOM_BAREMETAL_WITH_GPU=1).": "被调度节点的资源类需要与裸机实例使用的云主机类型的资源类名称对应(比如:调度节点的资源类名称为 baremetal.with-GPU云主机类型的资源类名称为CUSTOM_BAREMETAL_WITH_GPU=1 )。",
"The resource has been deleted": "该资源已被删除",
"The root and os_admin are default users and cannot be created!": "root 和 os_admin 是默认用户,不能创建!",
"The root disk of the instance has snapshots": "云主机的根盘有快照",
"The security group is similar to the firewall function and is used to set up network access control. ": "安全组类似防火墙功能,用于设置网络访问控制。",
"The security group is similar to the firewall function for setting up network access control, or you can go to the console and create a new security group. (Note: The security group you selected will work on all virtual LANs on the instances.)": "安全组类似防火墙功能,用于设置网络访问控制,您也可以前往控制台新建安全组。(注:您所选的安全组将作用于云主机的全部虚拟网卡。)",
"The selected VPC/subnet does not have IPv6 enabled.": "所选的VPC/子网未开通IPv6",

View File

@ -15,6 +15,8 @@
import { inject, observer } from 'mobx-react';
import globalImageStore from 'stores/glance/image';
import globalServerStore from 'stores/nova/instance';
import { InstanceVolumeStore } from 'stores/nova/instance-volume';
import { SnapshotStore } from 'stores/cinder/snapshot';
import { ModalAction } from 'containers/Action';
import {
isActiveOrShutOff,
@ -27,6 +29,7 @@ import {
canImageCreateInstance,
getImageSystemTabs,
} from 'resources/glance/image';
import { isOsDisk } from 'resources/cinder/volume';
export class Rebuild extends ModalAction {
static id = 'rebuild';
@ -36,7 +39,10 @@ export class Rebuild extends ModalAction {
init() {
this.store = globalServerStore;
this.imageStore = globalImageStore;
this.instanceVolumeStore = new InstanceVolumeStore();
this.snapshotStore = new SnapshotStore();
this.getImages();
this.getRootVolumeSnapshots();
}
get name() {
@ -54,6 +60,12 @@ export class Rebuild extends ModalAction {
};
}
get tips() {
return t(
'If the root disk has a snapshot, it will affect the deletion of the original disk during reconstruction or the recovery of the instance snapshot.'
);
}
get images() {
const { imageTab } = this.state;
const images = (this.imageStore.list.data || []).filter((it) => {
@ -75,6 +87,18 @@ export class Rebuild extends ModalAction {
this.imageStore.fetchList({ all_projects: this.hasAdminRole });
}
async getRootVolumeSnapshots() {
const volumes = await this.instanceVolumeStore.fetchList({
serverId: this.item.id,
});
const rootDisk = volumes.find((v) => isOsDisk(v));
if (!rootDisk) {
return;
}
const snapshots = await this.snapshotStore.fetchList({ id: rootDisk.id });
this.setState({ snapshots });
}
get systemTabs() {
return getImageSystemTabs();
}
@ -107,6 +131,14 @@ export class Rebuild extends ModalAction {
});
};
get instanceExtra() {
const { snapshots = [] } = this.state;
if (!snapshots.length) {
return '';
}
return t('The root disk of the instance has snapshots');
}
get formItems() {
return [
{
@ -114,6 +146,7 @@ export class Rebuild extends ModalAction {
label: t('Instance'),
type: 'label',
iconType: 'instance',
extra: this.instanceExtra,
},
{
name: 'image',